From 140584953c5316c5ea7aa144a20a36ea027134d0 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Fri, 20 Jan 2023 11:54:18 -0500 Subject: [PATCH] Fix xcodebuild to actually work on Darwin even without ZAP installed. (#24539) --- .github/workflows/darwin.yaml | 30 +- scripts/codegen.py | 2 +- scripts/codepregen.py | 9 +- scripts/pregenerate/__init__.py | 4 +- scripts/pregenerate/using_codegen.py | 13 +- scripts/pregenerate/using_zap.py | 2 +- scripts/tools/zap_regen_all.py | 43 +- .../Matter.xcodeproj/project.pbxproj | 4 +- .../Framework/chip_xcode_build_connector.sh | 1 + .../cpp-app/app/PluginApplicationCallbacks.h | 5 + .../codegen/cpp-app/app/callback-stub.cpp | 545 ++++++++++++++++++ .../zap-generated/CHIPClientCallbacks.h | 0 .../zap-generated/CHIPClusters.h | 0 .../zap-generated/IMClusterCommandHandler.cpp | 0 .../zap/app-templates}/zap-generated/access.h | 0 .../zap-generated/endpoint_config.h | 0 .../app-templates}/zap-generated/gen_config.h | 0 17 files changed, 635 insertions(+), 23 deletions(-) create mode 100644 zzz_generated/darwin/src/controller/data_model/controller-clusters/codegen/cpp-app/app/PluginApplicationCallbacks.h create mode 100644 zzz_generated/darwin/src/controller/data_model/controller-clusters/codegen/cpp-app/app/callback-stub.cpp rename zzz_generated/darwin/{controller-clusters => src/controller/data_model/controller-clusters/zap/app-templates}/zap-generated/CHIPClientCallbacks.h (100%) rename zzz_generated/darwin/{controller-clusters => src/controller/data_model/controller-clusters/zap/app-templates}/zap-generated/CHIPClusters.h (100%) rename zzz_generated/darwin/{controller-clusters => src/controller/data_model/controller-clusters/zap/app-templates}/zap-generated/IMClusterCommandHandler.cpp (100%) rename zzz_generated/darwin/{controller-clusters => src/controller/data_model/controller-clusters/zap/app-templates}/zap-generated/access.h (100%) rename zzz_generated/darwin/{controller-clusters => src/controller/data_model/controller-clusters/zap/app-templates}/zap-generated/endpoint_config.h (100%) rename zzz_generated/darwin/{controller-clusters => src/controller/data_model/controller-clusters/zap/app-templates}/zap-generated/gen_config.h (100%) diff --git a/.github/workflows/darwin.yaml b/.github/workflows/darwin.yaml index d4cb5b8b7bdf90..57009e371a2616 100644 --- a/.github/workflows/darwin.yaml +++ b/.github/workflows/darwin.yaml @@ -31,12 +31,6 @@ jobs: if: github.actor != 'restyled-io[bot]' runs-on: macos-latest - env: - # NOTE: Generally kept in sync within the repo using - # scripts/tools/zap/version_update.py - ZAP_VERSION: v2023.01.18-nightly - ZAP_INSTALL_PATH: /usr/local/zap/zap-v2023.01.18-nightly - steps: - uses: Wandalen/wretry.action@v1.0.36 name: Checkout @@ -68,6 +62,12 @@ jobs: unzip zap-mac.zip zap-cli rm zap-mac.zip ./zap-cli --version + env: + # NOTE: Generally kept in sync within the repo using + # scripts/tools/zap/version_update.py + # This is scoped to only the steps that don't use xcodebuild. + ZAP_VERSION: v2023.01.18-nightly + ZAP_INSTALL_PATH: /usr/local/zap/zap-v2023.01.18-nightly - name: Bootstrap timeout-minutes: 25 run: scripts/build/gn_bootstrap.sh @@ -122,14 +122,32 @@ jobs: timeout-minutes: 15 run: | scripts/examples/gn_build_example.sh examples/all-clusters-app/linux out/debug chip_config_network_layer_ble=false + env: + # NOTE: Generally kept in sync within the repo using + # scripts/tools/zap/version_update.py + # This is scoped to only the steps that don't use xcodebuild. + ZAP_VERSION: v2023.01.18-nightly + ZAP_INSTALL_PATH: /usr/local/zap/zap-v2023.01.18-nightly - name: Build example OTA Provider timeout-minutes: 10 run: | scripts/examples/gn_build_example.sh examples/ota-provider-app/linux out/debug chip_config_network_layer_ble=false + env: + # NOTE: Generally kept in sync within the repo using + # scripts/tools/zap/version_update.py + # This is scoped to only the steps that don't use xcodebuild. + ZAP_VERSION: v2023.01.18-nightly + ZAP_INSTALL_PATH: /usr/local/zap/zap-v2023.01.18-nightly - name: Build example OTA Requestor timeout-minutes: 10 run: | scripts/examples/gn_build_example.sh examples/ota-requestor-app/linux out/debug chip_config_network_layer_ble=false + env: + # NOTE: Generally kept in sync within the repo using + # scripts/tools/zap/version_update.py + # This is scoped to only the steps that don't use xcodebuild. + ZAP_VERSION: v2023.01.18-nightly + ZAP_INSTALL_PATH: /usr/local/zap/zap-v2023.01.18-nightly - name: Delete Defaults run: defaults delete com.apple.dt.xctest.tool continue-on-error: true diff --git a/scripts/codegen.py b/scripts/codegen.py index 8f6b73badf6fa0..291a5df4b97318 100755 --- a/scripts/codegen.py +++ b/scripts/codegen.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Copyright (c) 2022 Project CHIP Authors # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/scripts/codepregen.py b/scripts/codepregen.py index 6344c9a38142a9..2f99243f30c5a3 100755 --- a/scripts/codepregen.py +++ b/scripts/codepregen.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Copyright (c) 2022 Project CHIP Authors # @@ -74,7 +74,7 @@ def _ParallelGenerateOne(arg): @click.option( '--generator', default='all', - type=click.Choice(['all', 'zap', 'codegen']), + type=click.Choice(['all', 'zap', 'codegen', 'codegen-cpp-only']), help='To what code generator to restrict the generation.') @click.option( '--input-glob', @@ -119,9 +119,12 @@ def main(log_level, parallel, dry_run, generator, input_glob, sdk_root, output_d if generator == 'zap': filter.file_type = IdlFileType.ZAP - elif generator == 'codegen': + elif generator == 'codegen' or generator == 'codegen-cpp-only': filter.file_type = IdlFileType.MATTER + if generator == 'codegen-cpp-only': + filter.cpp_only = True + targets = FindPregenerationTargets(sdk_root, filter, runner) runner.ensure_directory_exists(output_dir) diff --git a/scripts/pregenerate/__init__.py b/scripts/pregenerate/__init__.py index c5033f406fdf7c..d5e28c750eb99d 100644 --- a/scripts/pregenerate/__init__.py +++ b/scripts/pregenerate/__init__.py @@ -55,6 +55,8 @@ class TargetFilter: # If non-empty only the given paths will be code-generated path_glob: List[str] = field(default_factory=list) + cpp_only: bool = False + # TODO: the build GlobMatcher is more complete by supporting `{}` grouping # For now this limited glob seems sufficient. @@ -98,5 +100,5 @@ def FindPregenerationTargets(sdk_root: str, filter: TargetFilter, runner): continue for generator in generators: - if generator.Accept(idl): + if generator.Accept(idl, filter.cpp_only): yield generator.CreateTarget(idl, runner=runner) diff --git a/scripts/pregenerate/using_codegen.py b/scripts/pregenerate/using_codegen.py index 0ca159704b6f4a..60070237b0cc11 100644 --- a/scripts/pregenerate/using_codegen.py +++ b/scripts/pregenerate/using_codegen.py @@ -64,7 +64,7 @@ class CodegenBridgePregenerator: def __init__(self, sdk_root): self.sdk_root = sdk_root - def Accept(self, idl: InputIdlFile): + def Accept(self, idl: InputIdlFile, cpp_only: bool): # Bridge is highly specific, a single path is acceptable for dynamic # bridge codegen return idl.relative_path == "examples/dynamic-bridge-app/bridge-common/bridge-app.matter" @@ -79,9 +79,12 @@ class CodegenJavaPregenerator: def __init__(self, sdk_root): self.sdk_root = sdk_root - def Accept(self, idl: InputIdlFile): - # Java is highly specific, a single path is acceptable for dynamic - # bridge codegen + def Accept(self, idl: InputIdlFile, cpp_only: bool): + if cpp_only: + return False + + # Java is highly specific, a single path is acceptable for java + # codegen return idl.relative_path == "src/controller/data_model/controller-clusters.matter" def CreateTarget(self, idl: InputIdlFile, runner): @@ -94,7 +97,7 @@ class CodegenCppAppPregenerator: def __init__(self, sdk_root): self.sdk_root = sdk_root - def Accept(self, idl: InputIdlFile): + def Accept(self, idl: InputIdlFile, cpp_only: bool): if idl.file_type != IdlFileType.MATTER: return False diff --git a/scripts/pregenerate/using_zap.py b/scripts/pregenerate/using_zap.py index 4d28f213370655..67a05bca9f7a5b 100644 --- a/scripts/pregenerate/using_zap.py +++ b/scripts/pregenerate/using_zap.py @@ -77,7 +77,7 @@ class ZapApplicationPregenerator: def __init__(self, sdk_root): self.sdk_root = sdk_root - def Accept(self, idl: InputIdlFile): + def Accept(self, idl: InputIdlFile, cpp_only: bool): if idl.file_type != IdlFileType.ZAP: return False diff --git a/scripts/tools/zap_regen_all.py b/scripts/tools/zap_regen_all.py index 8e2e4a9a52e94e..bd5c9d8e68bee9 100755 --- a/scripts/tools/zap_regen_all.py +++ b/scripts/tools/zap_regen_all.py @@ -113,6 +113,41 @@ def generate(self) -> TargetRunStats: ) +class ZAPPregenerateTarget: + def __init__(self, input_glob, output_dir, generator=None): + self.input_glob = input_glob + self.output_dir = output_dir + self.script = "./scripts/codepregen.py" + self.command = [self.script, "--input-glob", input_glob] + self.generator = generator + + if generator is not None: + self.command.extend(["--generator", generator]) + self.command.append(output_dir) + + def distinct_output(self): + input_template = self.input_glob + if self.generator is not None: + input_template += " " + self.generator + return ZapDistinctOutput(input_template=input_template, output_directory=self.output_dir) + + def log_command(self): + logging.info(" %s" % " ".join(self.command)) + + def generate(self) -> TargetRunStats: + logging.info("Generating target: %s" % " ".join(self.command)) + + generate_start = time.time() + subprocess.check_call(self.command) + generate_end = time.time() + + return TargetRunStats( + generate_time=generate_end - generate_start, + config=self.script, + template=self.script, + ) + + def checkPythonVersion(): if sys.version_info[0] < 3: print('Must use Python 3. Current version is ' + @@ -200,10 +235,10 @@ def getGlobalTemplatesTargets(): # # TODO: These files can be code generated at compile time, we should figure # out a path for this codegen to not be required. - targets.append(ZAPGenerateTarget( - 'src/controller/data_model/controller-clusters.zap', - template="src/app/zap-templates/app-templates.json", - output_dir=os.path.join('zzz_generated/darwin/controller-clusters/zap-generated'))) + targets.append(ZAPPregenerateTarget( + "*controller-clusters*", "zzz_generated/darwin", generator="zap")) + targets.append(ZAPPregenerateTarget( + "*controller-clusters*", "zzz_generated/darwin", generator="codegen-cpp-only")) return targets diff --git a/src/darwin/Framework/Matter.xcodeproj/project.pbxproj b/src/darwin/Framework/Matter.xcodeproj/project.pbxproj index 6369a943c8ec7e..2ffb4a32b0827a 100644 --- a/src/darwin/Framework/Matter.xcodeproj/project.pbxproj +++ b/src/darwin/Framework/Matter.xcodeproj/project.pbxproj @@ -1016,7 +1016,7 @@ "$(CHIP_ROOT)/zzz_generated/app-common", "$(CHIP_ROOT)/zzz_generated/controller-clusters", /* darwin-specific bypassing compile time codegen for header inclusion */ - "$(CHIP_ROOT)/zzz_generated/darwin/controller-clusters", + "$(CHIP_ROOT)/zzz_generated/darwin/src/controller/data_model/controller-clusters/zap/app-templates", ); INFOPLIST_FILE = CHIP/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; @@ -1172,7 +1172,7 @@ "$(CHIP_ROOT)/zzz_generated/app-common", "$(CHIP_ROOT)/zzz_generated/controller-clusters", /* darwin-specific bypassing compile time codegen for header inclusion */ - "$(CHIP_ROOT)/zzz_generated/darwin/controller-clusters", + "$(CHIP_ROOT)/zzz_generated/darwin/src/controller/data_model/controller-clusters/zap/app-templates", ); INFOPLIST_FILE = CHIP/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; diff --git a/src/darwin/Framework/chip_xcode_build_connector.sh b/src/darwin/Framework/chip_xcode_build_connector.sh index 5d8459b835681b..013f01c9c782a8 100755 --- a/src/darwin/Framework/chip_xcode_build_connector.sh +++ b/src/darwin/Framework/chip_xcode_build_connector.sh @@ -96,6 +96,7 @@ declare -a args=( "target_defines=$target_defines" "target_cflags=[$target_cflags]" "mac_target_arch=\"$target_arch\"" + "chip_code_pre_generated_directory=\"$CHIP_ROOT/zzz_generated/darwin\"" "mac_deployment_target=\"$LLVM_TARGET_TRIPLE_OS_VERSION$LLVM_TARGET_TRIPLE_SUFFIX\"" ) diff --git a/zzz_generated/darwin/src/controller/data_model/controller-clusters/codegen/cpp-app/app/PluginApplicationCallbacks.h b/zzz_generated/darwin/src/controller/data_model/controller-clusters/codegen/cpp-app/app/PluginApplicationCallbacks.h new file mode 100644 index 00000000000000..3a068016e2970e --- /dev/null +++ b/zzz_generated/darwin/src/controller/data_model/controller-clusters/codegen/cpp-app/app/PluginApplicationCallbacks.h @@ -0,0 +1,5 @@ +#pragma once + +#define MATTER_PLUGINS_INIT \ + (void)0; /* No server side clusters */ + diff --git a/zzz_generated/darwin/src/controller/data_model/controller-clusters/codegen/cpp-app/app/callback-stub.cpp b/zzz_generated/darwin/src/controller/data_model/controller-clusters/codegen/cpp-app/app/callback-stub.cpp new file mode 100644 index 00000000000000..3ded47fafc54b4 --- /dev/null +++ b/zzz_generated/darwin/src/controller/data_model/controller-clusters/codegen/cpp-app/app/callback-stub.cpp @@ -0,0 +1,545 @@ +#include +#include +#include +#include + +using namespace chip; + +// Cluster Init Functions +void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) +{ + switch (clusterId) + { + case app::Clusters::AccessControl::Id: + emberAfAccessControlClusterInitCallback(endpoint); + break; + case app::Clusters::AccountLogin::Id: + emberAfAccountLoginClusterInitCallback(endpoint); + break; + case app::Clusters::Actions::Id: + emberAfActionsClusterInitCallback(endpoint); + break; + case app::Clusters::AdministratorCommissioning::Id: + emberAfAdministratorCommissioningClusterInitCallback(endpoint); + break; + case app::Clusters::ApplicationBasic::Id: + emberAfApplicationBasicClusterInitCallback(endpoint); + break; + case app::Clusters::ApplicationLauncher::Id: + emberAfApplicationLauncherClusterInitCallback(endpoint); + break; + case app::Clusters::AudioOutput::Id: + emberAfAudioOutputClusterInitCallback(endpoint); + break; + case app::Clusters::BallastConfiguration::Id: + emberAfBallastConfigurationClusterInitCallback(endpoint); + break; + case app::Clusters::BarrierControl::Id: + emberAfBarrierControlClusterInitCallback(endpoint); + break; + case app::Clusters::BasicInformation::Id: + emberAfBasicInformationClusterInitCallback(endpoint); + break; + case app::Clusters::BinaryInputBasic::Id: + emberAfBinaryInputBasicClusterInitCallback(endpoint); + break; + case app::Clusters::Binding::Id: + emberAfBindingClusterInitCallback(endpoint); + break; + case app::Clusters::BooleanState::Id: + emberAfBooleanStateClusterInitCallback(endpoint); + break; + case app::Clusters::BridgedDeviceBasicInformation::Id: + emberAfBridgedDeviceBasicInformationClusterInitCallback(endpoint); + break; + case app::Clusters::Channel::Id: + emberAfChannelClusterInitCallback(endpoint); + break; + case app::Clusters::ClientMonitoring::Id: + emberAfClientMonitoringClusterInitCallback(endpoint); + break; + case app::Clusters::ColorControl::Id: + emberAfColorControlClusterInitCallback(endpoint); + break; + case app::Clusters::ContentLauncher::Id: + emberAfContentLauncherClusterInitCallback(endpoint); + break; + case app::Clusters::Descriptor::Id: + emberAfDescriptorClusterInitCallback(endpoint); + break; + case app::Clusters::DiagnosticLogs::Id: + emberAfDiagnosticLogsClusterInitCallback(endpoint); + break; + case app::Clusters::DoorLock::Id: + emberAfDoorLockClusterInitCallback(endpoint); + break; + case app::Clusters::ElectricalMeasurement::Id: + emberAfElectricalMeasurementClusterInitCallback(endpoint); + break; + case app::Clusters::EthernetNetworkDiagnostics::Id: + emberAfEthernetNetworkDiagnosticsClusterInitCallback(endpoint); + break; + case app::Clusters::FanControl::Id: + emberAfFanControlClusterInitCallback(endpoint); + break; + case app::Clusters::FixedLabel::Id: + emberAfFixedLabelClusterInitCallback(endpoint); + break; + case app::Clusters::FlowMeasurement::Id: + emberAfFlowMeasurementClusterInitCallback(endpoint); + break; + case app::Clusters::GeneralCommissioning::Id: + emberAfGeneralCommissioningClusterInitCallback(endpoint); + break; + case app::Clusters::GeneralDiagnostics::Id: + emberAfGeneralDiagnosticsClusterInitCallback(endpoint); + break; + case app::Clusters::GroupKeyManagement::Id: + emberAfGroupKeyManagementClusterInitCallback(endpoint); + break; + case app::Clusters::Groups::Id: + emberAfGroupsClusterInitCallback(endpoint); + break; + case app::Clusters::Identify::Id: + emberAfIdentifyClusterInitCallback(endpoint); + break; + case app::Clusters::IlluminanceMeasurement::Id: + emberAfIlluminanceMeasurementClusterInitCallback(endpoint); + break; + case app::Clusters::KeypadInput::Id: + emberAfKeypadInputClusterInitCallback(endpoint); + break; + case app::Clusters::LevelControl::Id: + emberAfLevelControlClusterInitCallback(endpoint); + break; + case app::Clusters::LocalizationConfiguration::Id: + emberAfLocalizationConfigurationClusterInitCallback(endpoint); + break; + case app::Clusters::LowPower::Id: + emberAfLowPowerClusterInitCallback(endpoint); + break; + case app::Clusters::MediaInput::Id: + emberAfMediaInputClusterInitCallback(endpoint); + break; + case app::Clusters::MediaPlayback::Id: + emberAfMediaPlaybackClusterInitCallback(endpoint); + break; + case app::Clusters::ModeSelect::Id: + emberAfModeSelectClusterInitCallback(endpoint); + break; + case app::Clusters::NetworkCommissioning::Id: + emberAfNetworkCommissioningClusterInitCallback(endpoint); + break; + case app::Clusters::OccupancySensing::Id: + emberAfOccupancySensingClusterInitCallback(endpoint); + break; + case app::Clusters::OnOff::Id: + emberAfOnOffClusterInitCallback(endpoint); + break; + case app::Clusters::OnOffSwitchConfiguration::Id: + emberAfOnOffSwitchConfigurationClusterInitCallback(endpoint); + break; + case app::Clusters::OperationalCredentials::Id: + emberAfOperationalCredentialsClusterInitCallback(endpoint); + break; + case app::Clusters::OtaSoftwareUpdateProvider::Id: + emberAfOtaSoftwareUpdateProviderClusterInitCallback(endpoint); + break; + case app::Clusters::OtaSoftwareUpdateRequestor::Id: + emberAfOtaSoftwareUpdateRequestorClusterInitCallback(endpoint); + break; + case app::Clusters::PowerSource::Id: + emberAfPowerSourceClusterInitCallback(endpoint); + break; + case app::Clusters::PowerSourceConfiguration::Id: + emberAfPowerSourceConfigurationClusterInitCallback(endpoint); + break; + case app::Clusters::PressureMeasurement::Id: + emberAfPressureMeasurementClusterInitCallback(endpoint); + break; + case app::Clusters::PumpConfigurationAndControl::Id: + emberAfPumpConfigurationAndControlClusterInitCallback(endpoint); + break; + case app::Clusters::RelativeHumidityMeasurement::Id: + emberAfRelativeHumidityMeasurementClusterInitCallback(endpoint); + break; + case app::Clusters::Scenes::Id: + emberAfScenesClusterInitCallback(endpoint); + break; + case app::Clusters::SoftwareDiagnostics::Id: + emberAfSoftwareDiagnosticsClusterInitCallback(endpoint); + break; + case app::Clusters::Switch::Id: + emberAfSwitchClusterInitCallback(endpoint); + break; + case app::Clusters::TargetNavigator::Id: + emberAfTargetNavigatorClusterInitCallback(endpoint); + break; + case app::Clusters::TemperatureMeasurement::Id: + emberAfTemperatureMeasurementClusterInitCallback(endpoint); + break; + case app::Clusters::Thermostat::Id: + emberAfThermostatClusterInitCallback(endpoint); + break; + case app::Clusters::ThermostatUserInterfaceConfiguration::Id: + emberAfThermostatUserInterfaceConfigurationClusterInitCallback(endpoint); + break; + case app::Clusters::ThreadNetworkDiagnostics::Id: + emberAfThreadNetworkDiagnosticsClusterInitCallback(endpoint); + break; + case app::Clusters::TimeFormatLocalization::Id: + emberAfTimeFormatLocalizationClusterInitCallback(endpoint); + break; + case app::Clusters::UnitLocalization::Id: + emberAfUnitLocalizationClusterInitCallback(endpoint); + break; + case app::Clusters::UnitTesting::Id: + emberAfUnitTestingClusterInitCallback(endpoint); + break; + case app::Clusters::UserLabel::Id: + emberAfUserLabelClusterInitCallback(endpoint); + break; + case app::Clusters::WakeOnLan::Id: + emberAfWakeOnLanClusterInitCallback(endpoint); + break; + case app::Clusters::WiFiNetworkDiagnostics::Id: + emberAfWiFiNetworkDiagnosticsClusterInitCallback(endpoint); + break; + case app::Clusters::WindowCovering::Id: + emberAfWindowCoveringClusterInitCallback(endpoint); + break; + default: + // Unrecognized cluster ID + break; + } +} +void __attribute__((weak)) emberAfAccessControlClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} +void __attribute__((weak)) emberAfAccountLoginClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} +void __attribute__((weak)) emberAfActionsClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} +void __attribute__((weak)) emberAfAdministratorCommissioningClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} +void __attribute__((weak)) emberAfApplicationBasicClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} +void __attribute__((weak)) emberAfApplicationLauncherClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} +void __attribute__((weak)) emberAfAudioOutputClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} +void __attribute__((weak)) emberAfBallastConfigurationClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} +void __attribute__((weak)) emberAfBarrierControlClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} +void __attribute__((weak)) emberAfBasicInformationClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} +void __attribute__((weak)) emberAfBinaryInputBasicClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} +void __attribute__((weak)) emberAfBindingClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} +void __attribute__((weak)) emberAfBooleanStateClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} +void __attribute__((weak)) emberAfBridgedDeviceBasicInformationClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} +void __attribute__((weak)) emberAfChannelClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} +void __attribute__((weak)) emberAfClientMonitoringClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} +void __attribute__((weak)) emberAfColorControlClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} +void __attribute__((weak)) emberAfContentLauncherClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} +void __attribute__((weak)) emberAfDescriptorClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} +void __attribute__((weak)) emberAfDiagnosticLogsClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} +void __attribute__((weak)) emberAfDoorLockClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} +void __attribute__((weak)) emberAfElectricalMeasurementClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} +void __attribute__((weak)) emberAfEthernetNetworkDiagnosticsClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} +void __attribute__((weak)) emberAfFanControlClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} +void __attribute__((weak)) emberAfFixedLabelClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} +void __attribute__((weak)) emberAfFlowMeasurementClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} +void __attribute__((weak)) emberAfGeneralCommissioningClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} +void __attribute__((weak)) emberAfGeneralDiagnosticsClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} +void __attribute__((weak)) emberAfGroupKeyManagementClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} +void __attribute__((weak)) emberAfGroupsClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} +void __attribute__((weak)) emberAfIdentifyClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} +void __attribute__((weak)) emberAfIlluminanceMeasurementClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} +void __attribute__((weak)) emberAfKeypadInputClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} +void __attribute__((weak)) emberAfLevelControlClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} +void __attribute__((weak)) emberAfLocalizationConfigurationClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} +void __attribute__((weak)) emberAfLowPowerClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} +void __attribute__((weak)) emberAfMediaInputClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} +void __attribute__((weak)) emberAfMediaPlaybackClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} +void __attribute__((weak)) emberAfModeSelectClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} +void __attribute__((weak)) emberAfNetworkCommissioningClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} +void __attribute__((weak)) emberAfOccupancySensingClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} +void __attribute__((weak)) emberAfOnOffClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} +void __attribute__((weak)) emberAfOnOffSwitchConfigurationClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} +void __attribute__((weak)) emberAfOperationalCredentialsClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} +void __attribute__((weak)) emberAfOtaSoftwareUpdateProviderClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} +void __attribute__((weak)) emberAfOtaSoftwareUpdateRequestorClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} +void __attribute__((weak)) emberAfPowerSourceClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} +void __attribute__((weak)) emberAfPowerSourceConfigurationClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} +void __attribute__((weak)) emberAfPressureMeasurementClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} +void __attribute__((weak)) emberAfPumpConfigurationAndControlClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} +void __attribute__((weak)) emberAfRelativeHumidityMeasurementClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} +void __attribute__((weak)) emberAfScenesClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} +void __attribute__((weak)) emberAfSoftwareDiagnosticsClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} +void __attribute__((weak)) emberAfSwitchClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} +void __attribute__((weak)) emberAfTargetNavigatorClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} +void __attribute__((weak)) emberAfTemperatureMeasurementClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} +void __attribute__((weak)) emberAfThermostatClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} +void __attribute__((weak)) emberAfThermostatUserInterfaceConfigurationClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} +void __attribute__((weak)) emberAfThreadNetworkDiagnosticsClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} +void __attribute__((weak)) emberAfTimeFormatLocalizationClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} +void __attribute__((weak)) emberAfUnitLocalizationClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} +void __attribute__((weak)) emberAfUnitTestingClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} +void __attribute__((weak)) emberAfUserLabelClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} +void __attribute__((weak)) emberAfWakeOnLanClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} +void __attribute__((weak)) emberAfWiFiNetworkDiagnosticsClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} +void __attribute__((weak)) emberAfWindowCoveringClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} diff --git a/zzz_generated/darwin/controller-clusters/zap-generated/CHIPClientCallbacks.h b/zzz_generated/darwin/src/controller/data_model/controller-clusters/zap/app-templates/zap-generated/CHIPClientCallbacks.h similarity index 100% rename from zzz_generated/darwin/controller-clusters/zap-generated/CHIPClientCallbacks.h rename to zzz_generated/darwin/src/controller/data_model/controller-clusters/zap/app-templates/zap-generated/CHIPClientCallbacks.h diff --git a/zzz_generated/darwin/controller-clusters/zap-generated/CHIPClusters.h b/zzz_generated/darwin/src/controller/data_model/controller-clusters/zap/app-templates/zap-generated/CHIPClusters.h similarity index 100% rename from zzz_generated/darwin/controller-clusters/zap-generated/CHIPClusters.h rename to zzz_generated/darwin/src/controller/data_model/controller-clusters/zap/app-templates/zap-generated/CHIPClusters.h diff --git a/zzz_generated/darwin/controller-clusters/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/darwin/src/controller/data_model/controller-clusters/zap/app-templates/zap-generated/IMClusterCommandHandler.cpp similarity index 100% rename from zzz_generated/darwin/controller-clusters/zap-generated/IMClusterCommandHandler.cpp rename to zzz_generated/darwin/src/controller/data_model/controller-clusters/zap/app-templates/zap-generated/IMClusterCommandHandler.cpp diff --git a/zzz_generated/darwin/controller-clusters/zap-generated/access.h b/zzz_generated/darwin/src/controller/data_model/controller-clusters/zap/app-templates/zap-generated/access.h similarity index 100% rename from zzz_generated/darwin/controller-clusters/zap-generated/access.h rename to zzz_generated/darwin/src/controller/data_model/controller-clusters/zap/app-templates/zap-generated/access.h diff --git a/zzz_generated/darwin/controller-clusters/zap-generated/endpoint_config.h b/zzz_generated/darwin/src/controller/data_model/controller-clusters/zap/app-templates/zap-generated/endpoint_config.h similarity index 100% rename from zzz_generated/darwin/controller-clusters/zap-generated/endpoint_config.h rename to zzz_generated/darwin/src/controller/data_model/controller-clusters/zap/app-templates/zap-generated/endpoint_config.h diff --git a/zzz_generated/darwin/controller-clusters/zap-generated/gen_config.h b/zzz_generated/darwin/src/controller/data_model/controller-clusters/zap/app-templates/zap-generated/gen_config.h similarity index 100% rename from zzz_generated/darwin/controller-clusters/zap-generated/gen_config.h rename to zzz_generated/darwin/src/controller/data_model/controller-clusters/zap/app-templates/zap-generated/gen_config.h