diff --git a/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/IMClusterCommandHandler.cpp b/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/IMClusterCommandHandler.cpp index fb772205ed90bd..a79f3119723296 100644 --- a/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/IMClusterCommandHandler.cpp +++ b/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/IMClusterCommandHandler.cpp @@ -1226,43 +1226,6 @@ void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandP } // namespace SmokeCoAlarm -namespace SoftwareDiagnostics { - -void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aDataTlv) -{ - CHIP_ERROR TLVError = CHIP_NO_ERROR; - bool wasHandled = false; - { - switch (aCommandPath.mCommandId) - { - case Commands::ResetWatermarks::Id: { - Commands::ResetWatermarks::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) - { - wasHandled = emberAfSoftwareDiagnosticsClusterResetWatermarksCallback(apCommandObj, aCommandPath, commandData); - } - break; - } - default: { - // Unrecognized command ID, error status will apply. - apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command " ChipLogFormatMEI " for cluster " ChipLogFormatMEI, - ChipLogValueMEI(aCommandPath.mCommandId), ChipLogValueMEI(aCommandPath.mClusterId)); - return; - } - } - } - - if (CHIP_NO_ERROR != TLVError || !wasHandled) - { - apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::InvalidCommand); - ChipLogProgress(Zcl, "Failed to dispatch command, TLVError=%" CHIP_ERROR_FORMAT, TLVError.Format()); - } -} - -} // namespace SoftwareDiagnostics - namespace TemperatureControl { void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aDataTlv) @@ -1935,9 +1898,6 @@ void DispatchSingleClusterCommand(const ConcreteCommandPath & aCommandPath, TLV: case Clusters::SmokeCoAlarm::Id: Clusters::SmokeCoAlarm::DispatchServerCommand(apCommandObj, aCommandPath, aReader); break; - case Clusters::SoftwareDiagnostics::Id: - Clusters::SoftwareDiagnostics::DispatchServerCommand(apCommandObj, aCommandPath, aReader); - break; case Clusters::TemperatureControl::Id: Clusters::TemperatureControl::DispatchServerCommand(apCommandObj, aCommandPath, aReader); break; diff --git a/scripts/tools/zap/tests/outputs/lighting-app/app-templates/IMClusterCommandHandler.cpp b/scripts/tools/zap/tests/outputs/lighting-app/app-templates/IMClusterCommandHandler.cpp index 6baabbe22362bf..7eb2fb16239fd3 100644 --- a/scripts/tools/zap/tests/outputs/lighting-app/app-templates/IMClusterCommandHandler.cpp +++ b/scripts/tools/zap/tests/outputs/lighting-app/app-templates/IMClusterCommandHandler.cpp @@ -930,43 +930,6 @@ void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandP } // namespace OperationalCredentials -namespace SoftwareDiagnostics { - -void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aDataTlv) -{ - CHIP_ERROR TLVError = CHIP_NO_ERROR; - bool wasHandled = false; - { - switch (aCommandPath.mCommandId) - { - case Commands::ResetWatermarks::Id: { - Commands::ResetWatermarks::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) - { - wasHandled = emberAfSoftwareDiagnosticsClusterResetWatermarksCallback(apCommandObj, aCommandPath, commandData); - } - break; - } - default: { - // Unrecognized command ID, error status will apply. - apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command " ChipLogFormatMEI " for cluster " ChipLogFormatMEI, - ChipLogValueMEI(aCommandPath.mCommandId), ChipLogValueMEI(aCommandPath.mClusterId)); - return; - } - } - } - - if (CHIP_NO_ERROR != TLVError || !wasHandled) - { - apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::InvalidCommand); - ChipLogProgress(Zcl, "Failed to dispatch command, TLVError=%" CHIP_ERROR_FORMAT, TLVError.Format()); - } -} - -} // namespace SoftwareDiagnostics - namespace ThreadNetworkDiagnostics { void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aDataTlv) @@ -1083,9 +1046,6 @@ void DispatchSingleClusterCommand(const ConcreteCommandPath & aCommandPath, TLV: case Clusters::OperationalCredentials::Id: Clusters::OperationalCredentials::DispatchServerCommand(apCommandObj, aCommandPath, aReader); break; - case Clusters::SoftwareDiagnostics::Id: - Clusters::SoftwareDiagnostics::DispatchServerCommand(apCommandObj, aCommandPath, aReader); - break; case Clusters::ThreadNetworkDiagnostics::Id: Clusters::ThreadNetworkDiagnostics::DispatchServerCommand(apCommandObj, aCommandPath, aReader); break; diff --git a/src/app/clusters/software-diagnostics-server/software-diagnostics-server.cpp b/src/app/clusters/software-diagnostics-server/software-diagnostics-server.cpp index 9f9235a16f46d8..d90d09d354749a 100644 --- a/src/app/clusters/software-diagnostics-server/software-diagnostics-server.cpp +++ b/src/app/clusters/software-diagnostics-server/software-diagnostics-server.cpp @@ -220,14 +220,6 @@ void SoftwareDiagnosticsServer::OnSoftwareFaultDetect(const SoftwareDiagnostics: } // namespace app } // namespace chip -bool emberAfSoftwareDiagnosticsClusterResetWatermarksCallback(app::CommandHandler * commandObj, - const app::ConcreteCommandPath & commandPath, - const Commands::ResetWatermarks::DecodableType & commandData) -{ - // Shouldn't be called at all. - return false; -} - void MatterSoftwareDiagnosticsPluginServerInitCallback() { AttributeAccessInterfaceRegistry::Instance().Register(&gAttrAccess); diff --git a/src/app/common/templates/config-data.yaml b/src/app/common/templates/config-data.yaml index c6bff2b65788c9..53ca4e9525ebe7 100644 --- a/src/app/common/templates/config-data.yaml +++ b/src/app/common/templates/config-data.yaml @@ -50,6 +50,7 @@ CommandHandlerInterfaceOnlyClusters: - Water Heater Management - Water Heater Mode - General Commissioning + - Software Diagnostics # We need a more configurable way of deciding which clusters have which init functions.... # See https://github.com/project-chip/connectedhomeip/issues/4369 diff --git a/zzz_generated/app-common/app-common/zap-generated/callback.h b/zzz_generated/app-common/app-common/zap-generated/callback.h index 8360f83add3c33..7e0673285b52bf 100644 --- a/zzz_generated/app-common/app-common/zap-generated/callback.h +++ b/zzz_generated/app-common/app-common/zap-generated/callback.h @@ -5846,12 +5846,6 @@ bool emberAfGeneralDiagnosticsClusterTimeSnapshotCallback( bool emberAfGeneralDiagnosticsClusterPayloadTestRequestCallback( chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, const chip::app::Clusters::GeneralDiagnostics::Commands::PayloadTestRequest::DecodableType & commandData); -/** - * @brief Software Diagnostics Cluster ResetWatermarks Command callback (from client) - */ -bool emberAfSoftwareDiagnosticsClusterResetWatermarksCallback( - chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, - const chip::app::Clusters::SoftwareDiagnostics::Commands::ResetWatermarks::DecodableType & commandData); /** * @brief Thread Network Diagnostics Cluster ResetCounts Command callback (from client) */