From 4e639da9109c1da5859816667e85b4012a790353 Mon Sep 17 00:00:00 2001 From: Rohit Date: Tue, 30 Dec 2025 12:43:38 +0530 Subject: [PATCH] components/esp_matter: Add weak definition of ESPMatterClusterInit/ShutdownCallback. --- .../zap_common/app/ClusterCallbacks.cpp | 1429 +++++++++++++++++ .../zap_common/generate_zap_common_files.py | 36 + 2 files changed, 1465 insertions(+) create mode 100644 components/esp_matter/zap_common/app/ClusterCallbacks.cpp diff --git a/components/esp_matter/zap_common/app/ClusterCallbacks.cpp b/components/esp_matter/zap_common/app/ClusterCallbacks.cpp new file mode 100644 index 000000000..37207d6d5 --- /dev/null +++ b/components/esp_matter/zap_common/app/ClusterCallbacks.cpp @@ -0,0 +1,1429 @@ +// Copyright 2025-2026 Espressif Systems (Shanghai) PTE LTD +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// This file is auto-generated. Do not edit manually. +// Weak definitions for cluster callbacks - can be overridden by application. + +#include + +__attribute__((weak)) void ESPMatterAccessControlClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterAccessControlClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterAccountLoginClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterAccountLoginClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterActionsClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterActionsClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterActivatedCarbonFilterMonitoringClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterActivatedCarbonFilterMonitoringClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterAdministratorCommissioningClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterAdministratorCommissioningClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterAirQualityClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterAirQualityClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterApplicationBasicClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterApplicationBasicClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterApplicationLauncherClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterApplicationLauncherClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterAudioOutputClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterAudioOutputClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterBallastConfigurationClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterBallastConfigurationClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterBasicInformationClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterBasicInformationClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterBindingClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterBindingClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterBooleanStateClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterBooleanStateClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterBooleanStateConfigurationClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterBooleanStateConfigurationClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterBridgedDeviceBasicInformationClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterBridgedDeviceBasicInformationClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterCameraAvSettingsUserLevelManagementClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterCameraAvSettingsUserLevelManagementClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterCameraAvStreamManagementClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterCameraAvStreamManagementClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterCarbonDioxideConcentrationMeasurementClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterCarbonDioxideConcentrationMeasurementClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterCarbonMonoxideConcentrationMeasurementClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterCarbonMonoxideConcentrationMeasurementClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterChannelClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterChannelClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterChimeClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterChimeClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterClosureControlClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterClosureControlClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterClosureDimensionClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterClosureDimensionClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterColorControlClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterColorControlClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterCommissionerControlClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterCommissionerControlClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterCommodityMeteringClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterCommodityMeteringClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterCommodityPriceClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterCommodityPriceClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterCommodityTariffClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterCommodityTariffClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterContentAppObserverClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterContentAppObserverClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterContentControlClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterContentControlClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterContentLauncherClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterContentLauncherClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterDescriptorClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterDescriptorClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterDeviceEnergyManagementClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterDeviceEnergyManagementClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterDeviceEnergyManagementModeClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterDeviceEnergyManagementModeClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterDiagnosticLogsClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterDiagnosticLogsClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterDishwasherAlarmClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterDishwasherAlarmClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterDishwasherModeClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterDishwasherModeClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterDoorLockClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterDoorLockClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterEcosystemInformationClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterEcosystemInformationClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterElectricalEnergyMeasurementClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterElectricalEnergyMeasurementClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterElectricalGridConditionsClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterElectricalGridConditionsClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterElectricalPowerMeasurementClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterElectricalPowerMeasurementClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterEnergyEvseClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterEnergyEvseClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterEnergyEvseModeClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterEnergyEvseModeClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterEnergyPreferenceClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterEnergyPreferenceClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterEthernetNetworkDiagnosticsClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterEthernetNetworkDiagnosticsClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterFanControlClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterFanControlClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterFaultInjectionClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterFaultInjectionClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterFixedLabelClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterFixedLabelClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterFlowMeasurementClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterFlowMeasurementClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterFormaldehydeConcentrationMeasurementClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterFormaldehydeConcentrationMeasurementClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterGeneralCommissioningClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterGeneralCommissioningClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterGeneralDiagnosticsClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterGeneralDiagnosticsClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterGroupKeyManagementClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterGroupKeyManagementClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterGroupcastClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterGroupcastClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterGroupsClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterGroupsClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterHepaFilterMonitoringClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterHepaFilterMonitoringClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterIcdManagementClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterIcdManagementClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterIdentifyClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterIdentifyClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterIlluminanceMeasurementClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterIlluminanceMeasurementClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterJointFabricAdministratorClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterJointFabricAdministratorClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterJointFabricDatastoreClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterJointFabricDatastoreClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterKeypadInputClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterKeypadInputClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterLaundryDryerControlsClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterLaundryDryerControlsClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterLaundryWasherControlsClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterLaundryWasherControlsClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterLaundryWasherModeClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterLaundryWasherModeClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterLevelControlClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterLevelControlClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterLocalizationConfigurationClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterLocalizationConfigurationClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterLowPowerClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterLowPowerClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterMediaInputClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterMediaInputClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterMediaPlaybackClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterMediaPlaybackClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterMessagesClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterMessagesClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterMeterIdentificationClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterMeterIdentificationClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterMicrowaveOvenControlClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterMicrowaveOvenControlClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterMicrowaveOvenModeClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterMicrowaveOvenModeClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterModeSelectClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterModeSelectClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterNetworkCommissioningClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterNetworkCommissioningClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterNitrogenDioxideConcentrationMeasurementClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterNitrogenDioxideConcentrationMeasurementClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterOccupancySensingClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterOccupancySensingClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterOnOffClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterOnOffClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterOperationalCredentialsClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterOperationalCredentialsClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterOperationalStateClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterOperationalStateClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterOtaSoftwareUpdateProviderClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterOtaSoftwareUpdateProviderClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterOtaSoftwareUpdateRequestorClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterOtaSoftwareUpdateRequestorClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterOvenCavityOperationalStateClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterOvenCavityOperationalStateClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterOvenModeClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterOvenModeClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterOzoneConcentrationMeasurementClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterOzoneConcentrationMeasurementClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterPm10ConcentrationMeasurementClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterPm10ConcentrationMeasurementClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterPm1ConcentrationMeasurementClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterPm1ConcentrationMeasurementClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterPm25ConcentrationMeasurementClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterPm25ConcentrationMeasurementClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterPowerSourceClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterPowerSourceClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterPowerSourceConfigurationClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterPowerSourceConfigurationClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterPowerTopologyClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterPowerTopologyClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterPressureMeasurementClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterPressureMeasurementClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterProxyConfigurationClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterProxyConfigurationClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterProxyDiscoveryClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterProxyDiscoveryClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterProxyValidClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterProxyValidClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterPulseWidthModulationClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterPulseWidthModulationClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterPumpConfigurationAndControlClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterPumpConfigurationAndControlClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterPushAvStreamTransportClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterPushAvStreamTransportClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterRadonConcentrationMeasurementClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterRadonConcentrationMeasurementClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterRefrigeratorAlarmClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterRefrigeratorAlarmClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterRefrigeratorAndTemperatureControlledCabinetModeClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterRefrigeratorAndTemperatureControlledCabinetModeClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterRelativeHumidityMeasurementClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterRelativeHumidityMeasurementClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterRvcCleanModeClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterRvcCleanModeClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterRvcOperationalStateClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterRvcOperationalStateClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterRvcRunModeClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterRvcRunModeClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterSampleMeiClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterSampleMeiClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterScenesManagementClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterScenesManagementClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterServiceAreaClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterServiceAreaClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterSmokeCoAlarmClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterSmokeCoAlarmClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterSoftwareDiagnosticsClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterSoftwareDiagnosticsClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterSoilMeasurementClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterSoilMeasurementClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterSwitchClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterSwitchClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterTargetNavigatorClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterTargetNavigatorClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterTemperatureControlClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterTemperatureControlClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterTemperatureMeasurementClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterTemperatureMeasurementClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterThermostatClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterThermostatClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterThermostatUserInterfaceConfigurationClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterThermostatUserInterfaceConfigurationClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterThreadBorderRouterManagementClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterThreadBorderRouterManagementClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterThreadNetworkDiagnosticsClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterThreadNetworkDiagnosticsClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterThreadNetworkDirectoryClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterThreadNetworkDirectoryClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterTimeFormatLocalizationClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterTimeFormatLocalizationClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterTimeSynchronizationClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterTimeSynchronizationClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterTlsCertificateManagementClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterTlsCertificateManagementClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterTlsClientManagementClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterTlsClientManagementClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterTotalVolatileOrganicCompoundsConcentrationMeasurementClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterTotalVolatileOrganicCompoundsConcentrationMeasurementClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterUnitLocalizationClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterUnitLocalizationClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterUnitTestingClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterUnitTestingClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterUserLabelClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterUserLabelClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterValveConfigurationAndControlClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterValveConfigurationAndControlClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterWakeOnLanClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterWakeOnLanClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterWaterHeaterManagementClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterWaterHeaterManagementClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterWaterHeaterModeClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterWaterHeaterModeClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterWaterTankLevelMonitoringClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterWaterTankLevelMonitoringClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterWebRTCTransportProviderClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterWebRTCTransportProviderClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterWebRTCTransportRequestorClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterWebRTCTransportRequestorClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterWiFiNetworkDiagnosticsClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterWiFiNetworkDiagnosticsClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterWiFiNetworkManagementClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterWiFiNetworkManagementClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterWindowCoveringClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterWindowCoveringClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterZoneManagementClusterServerInitCallback(EndpointId endpoint) +{ + // Default empty implementation +} + +__attribute__((weak)) void ESPMatterZoneManagementClusterServerShutdownCallback(EndpointId endpoint) +{ + // Default empty implementation +} + diff --git a/components/esp_matter/zap_common/generate_zap_common_files.py b/components/esp_matter/zap_common/generate_zap_common_files.py index 876e53f1c..eab2f267c 100755 --- a/components/esp_matter/zap_common/generate_zap_common_files.py +++ b/components/esp_matter/zap_common/generate_zap_common_files.py @@ -25,6 +25,7 @@ import logging import sys import glob import re +from datetime import date # These clusters are not implemented in current connectedhomeip repo EXCLUDE_CLUSTERS = ['Demand Response Load Control', 'Timer'] @@ -127,6 +128,40 @@ def generate_cluster_callbacks_h(xml_files, output_dir): format_cluster_name(get_cluster_name(cluster)))) +def generate_cluster_callbacks_cpp(xml_files, output_dir): + with open(os.path.join(output_dir, 'app/ClusterCallbacks.cpp'), 'w') as cpp_file: + cpp_file.write(f'// Copyright 2025-{date.today().year} Espressif Systems (Shanghai) PTE LTD\n') + cpp_file.write('//\n') + cpp_file.write('// Licensed under the Apache License, Version 2.0 (the "License");\n') + cpp_file.write('// you may not use this file except in compliance with the License.\n') + cpp_file.write('// You may obtain a copy of the License at\n') + cpp_file.write('//\n') + cpp_file.write('// http://www.apache.org/licenses/LICENSE-2.0\n') + cpp_file.write('//\n') + cpp_file.write('// Unless required by applicable law or agreed to in writing, software\n') + cpp_file.write('// distributed under the License is distributed on an "AS IS" BASIS,\n') + cpp_file.write('// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n') + cpp_file.write('// See the License for the specific language governing permissions and\n') + cpp_file.write('// limitations under the License.\n\n') + cpp_file.write('// This file is auto-generated. Do not edit manually.\n') + cpp_file.write('// Weak definitions for cluster callbacks - can be overridden by application.\n\n') + cpp_file.write('#include \n\n') + clusters = get_clusters_from_xml_files(xml_files) + clusters.sort(key=get_formatted_cluster_name) + for cluster in clusters: + cluster_name = format_cluster_name(get_cluster_name(cluster)) + cpp_file.write('__attribute__((weak)) void ESPMatter{}ClusterServerInitCallback(EndpointId endpoint)\n'.format( + cluster_name)) + cpp_file.write('{\n') + cpp_file.write(' // Default empty implementation\n') + cpp_file.write('}\n\n') + cpp_file.write('__attribute__((weak)) void ESPMatter{}ClusterServerShutdownCallback(EndpointId endpoint)\n'.format( + cluster_name)) + cpp_file.write('{\n') + cpp_file.write(' // Default empty implementation\n') + cpp_file.write('}\n\n') + + def get_attribute_read_privilege(attribute): for element in attribute: if element.tag == 'access' and element.attrib['op'] == 'read': @@ -299,6 +334,7 @@ def main(): xml_files = glob.glob(os.path.join(args.xml_dir, '*.xml')) generate_plugin_application_callbacks_h(xml_files, args.output_dir) generate_cluster_callbacks_h(xml_files, args.output_dir) + generate_cluster_callbacks_cpp(xml_files, args.output_dir) generate_access_h(xml_files, args.output_dir)