diff --git a/examples/all-clusters-app/all-clusters-common/gen/IMClusterCommandHandler.cpp b/examples/all-clusters-app/all-clusters-common/gen/IMClusterCommandHandler.cpp index 484b5c7fce73fd..70299109290a75 100644 --- a/examples/all-clusters-app/all-clusters-common/gen/IMClusterCommandHandler.cpp +++ b/examples/all-clusters-app/all-clusters-common/gen/IMClusterCommandHandler.cpp @@ -220,15 +220,7 @@ void DispatchServerCommand(app::CommandHandler * apCommandObj, CommandId aComman } default: { // Unrecognized command ID, error status will apply. - chip::app::CommandPathParams returnStatusParam = { aEndpointId, - 0, // GroupId - Clusters::AdministratorCommissioning::Id, aCommandId, - (chip::app::CommandPathFlags::kEndpointIdValid) }; - apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, - Protocols::SecureChannel::Id, - Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command " ChipLogFormatMEI " for cluster " ChipLogFormatMEI, ChipLogValueMEI(aCommandId), - ChipLogValueMEI(Clusters::AdministratorCommissioning::Id)); + ReportCommandUnsupported(apCommandObj, aEndpointId, Clusters::AdministratorCommissioning::Id, aCommandId); return; } } diff --git a/examples/bridge-app/bridge-common/gen/IMClusterCommandHandler.cpp b/examples/bridge-app/bridge-common/gen/IMClusterCommandHandler.cpp index 67633eba4a72a2..bdc31a3dccf42f 100644 --- a/examples/bridge-app/bridge-common/gen/IMClusterCommandHandler.cpp +++ b/examples/bridge-app/bridge-common/gen/IMClusterCommandHandler.cpp @@ -220,15 +220,7 @@ void DispatchServerCommand(app::CommandHandler * apCommandObj, CommandId aComman } default: { // Unrecognized command ID, error status will apply. - chip::app::CommandPathParams returnStatusParam = { aEndpointId, - 0, // GroupId - Clusters::AdministratorCommissioning::Id, aCommandId, - (chip::app::CommandPathFlags::kEndpointIdValid) }; - apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, - Protocols::SecureChannel::Id, - Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command " ChipLogFormatMEI " for cluster " ChipLogFormatMEI, ChipLogValueMEI(aCommandId), - ChipLogValueMEI(Clusters::AdministratorCommissioning::Id)); + ReportCommandUnsupported(apCommandObj, aEndpointId, Clusters::AdministratorCommissioning::Id, aCommandId); return; } } diff --git a/examples/lighting-app/lighting-common/gen/IMClusterCommandHandler.cpp b/examples/lighting-app/lighting-common/gen/IMClusterCommandHandler.cpp index 10118a0b833fd0..d8deb24f2f8bbf 100644 --- a/examples/lighting-app/lighting-common/gen/IMClusterCommandHandler.cpp +++ b/examples/lighting-app/lighting-common/gen/IMClusterCommandHandler.cpp @@ -220,15 +220,7 @@ void DispatchServerCommand(app::CommandHandler * apCommandObj, CommandId aComman } default: { // Unrecognized command ID, error status will apply. - chip::app::CommandPathParams returnStatusParam = { aEndpointId, - 0, // GroupId - Clusters::AdministratorCommissioning::Id, aCommandId, - (chip::app::CommandPathFlags::kEndpointIdValid) }; - apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, - Protocols::SecureChannel::Id, - Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command " ChipLogFormatMEI " for cluster " ChipLogFormatMEI, ChipLogValueMEI(aCommandId), - ChipLogValueMEI(Clusters::AdministratorCommissioning::Id)); + ReportCommandUnsupported(apCommandObj, aEndpointId, Clusters::AdministratorCommissioning::Id, aCommandId); return; } } diff --git a/examples/lock-app/lock-common/gen/IMClusterCommandHandler.cpp b/examples/lock-app/lock-common/gen/IMClusterCommandHandler.cpp index 9bb3cc9e583611..fe910c7ff2caef 100644 --- a/examples/lock-app/lock-common/gen/IMClusterCommandHandler.cpp +++ b/examples/lock-app/lock-common/gen/IMClusterCommandHandler.cpp @@ -220,15 +220,7 @@ void DispatchServerCommand(app::CommandHandler * apCommandObj, CommandId aComman } default: { // Unrecognized command ID, error status will apply. - chip::app::CommandPathParams returnStatusParam = { aEndpointId, - 0, // GroupId - Clusters::AdministratorCommissioning::Id, aCommandId, - (chip::app::CommandPathFlags::kEndpointIdValid) }; - apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, - Protocols::SecureChannel::Id, - Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command " ChipLogFormatMEI " for cluster " ChipLogFormatMEI, ChipLogValueMEI(aCommandId), - ChipLogValueMEI(Clusters::AdministratorCommissioning::Id)); + ReportCommandUnsupported(apCommandObj, aEndpointId, Clusters::AdministratorCommissioning::Id, aCommandId); return; } } diff --git a/examples/pump-app/pump-common/gen/IMClusterCommandHandler.cpp b/examples/pump-app/pump-common/gen/IMClusterCommandHandler.cpp index 43b76473de120b..cdbacc589f45ff 100644 --- a/examples/pump-app/pump-common/gen/IMClusterCommandHandler.cpp +++ b/examples/pump-app/pump-common/gen/IMClusterCommandHandler.cpp @@ -220,15 +220,7 @@ void DispatchServerCommand(app::CommandHandler * apCommandObj, CommandId aComman } default: { // Unrecognized command ID, error status will apply. - chip::app::CommandPathParams returnStatusParam = { aEndpointId, - 0, // GroupId - Clusters::AdministratorCommissioning::Id, aCommandId, - (chip::app::CommandPathFlags::kEndpointIdValid) }; - apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, - Protocols::SecureChannel::Id, - Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command " ChipLogFormatMEI " for cluster " ChipLogFormatMEI, ChipLogValueMEI(aCommandId), - ChipLogValueMEI(Clusters::AdministratorCommissioning::Id)); + ReportCommandUnsupported(apCommandObj, aEndpointId, Clusters::AdministratorCommissioning::Id, aCommandId); return; } } diff --git a/examples/pump-controller-app/pump-controller-common/gen/IMClusterCommandHandler.cpp b/examples/pump-controller-app/pump-controller-common/gen/IMClusterCommandHandler.cpp index d30da4e3b9169b..e4947d4d18fc4d 100644 --- a/examples/pump-controller-app/pump-controller-common/gen/IMClusterCommandHandler.cpp +++ b/examples/pump-controller-app/pump-controller-common/gen/IMClusterCommandHandler.cpp @@ -220,15 +220,7 @@ void DispatchServerCommand(app::CommandHandler * apCommandObj, CommandId aComman } default: { // Unrecognized command ID, error status will apply. - chip::app::CommandPathParams returnStatusParam = { aEndpointId, - 0, // GroupId - Clusters::AdministratorCommissioning::Id, aCommandId, - (chip::app::CommandPathFlags::kEndpointIdValid) }; - apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, - Protocols::SecureChannel::Id, - Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command " ChipLogFormatMEI " for cluster " ChipLogFormatMEI, ChipLogValueMEI(aCommandId), - ChipLogValueMEI(Clusters::AdministratorCommissioning::Id)); + ReportCommandUnsupported(apCommandObj, aEndpointId, Clusters::AdministratorCommissioning::Id, aCommandId); return; } } diff --git a/examples/temperature-measurement-app/esp32/main/gen/IMClusterCommandHandler.cpp b/examples/temperature-measurement-app/esp32/main/gen/IMClusterCommandHandler.cpp index 02bbd6db3931d0..2cab5ac53ee071 100644 --- a/examples/temperature-measurement-app/esp32/main/gen/IMClusterCommandHandler.cpp +++ b/examples/temperature-measurement-app/esp32/main/gen/IMClusterCommandHandler.cpp @@ -220,15 +220,7 @@ void DispatchServerCommand(app::CommandHandler * apCommandObj, CommandId aComman } default: { // Unrecognized command ID, error status will apply. - chip::app::CommandPathParams returnStatusParam = { aEndpointId, - 0, // GroupId - Clusters::AdministratorCommissioning::Id, aCommandId, - (chip::app::CommandPathFlags::kEndpointIdValid) }; - apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, - Protocols::SecureChannel::Id, - Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command " ChipLogFormatMEI " for cluster " ChipLogFormatMEI, ChipLogValueMEI(aCommandId), - ChipLogValueMEI(Clusters::AdministratorCommissioning::Id)); + ReportCommandUnsupported(apCommandObj, aEndpointId, Clusters::AdministratorCommissioning::Id, aCommandId); return; } } diff --git a/examples/thermostat/thermostat-common/gen/IMClusterCommandHandler.cpp b/examples/thermostat/thermostat-common/gen/IMClusterCommandHandler.cpp index 417ba8d39fbfa6..475e34e1f6f3dd 100644 --- a/examples/thermostat/thermostat-common/gen/IMClusterCommandHandler.cpp +++ b/examples/thermostat/thermostat-common/gen/IMClusterCommandHandler.cpp @@ -220,15 +220,7 @@ void DispatchServerCommand(app::CommandHandler * apCommandObj, CommandId aComman } default: { // Unrecognized command ID, error status will apply. - chip::app::CommandPathParams returnStatusParam = { aEndpointId, - 0, // GroupId - Clusters::AdministratorCommissioning::Id, aCommandId, - (chip::app::CommandPathFlags::kEndpointIdValid) }; - apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, - Protocols::SecureChannel::Id, - Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command " ChipLogFormatMEI " for cluster " ChipLogFormatMEI, ChipLogValueMEI(aCommandId), - ChipLogValueMEI(Clusters::AdministratorCommissioning::Id)); + ReportCommandUnsupported(apCommandObj, aEndpointId, Clusters::AdministratorCommissioning::Id, aCommandId); return; } } diff --git a/examples/tv-app/tv-common/gen/IMClusterCommandHandler.cpp b/examples/tv-app/tv-common/gen/IMClusterCommandHandler.cpp index 05b34de8e4afe5..52a8e75efd969d 100644 --- a/examples/tv-app/tv-common/gen/IMClusterCommandHandler.cpp +++ b/examples/tv-app/tv-common/gen/IMClusterCommandHandler.cpp @@ -393,15 +393,7 @@ void DispatchServerCommand(app::CommandHandler * apCommandObj, CommandId aComman } default: { // Unrecognized command ID, error status will apply. - chip::app::CommandPathParams returnStatusParam = { aEndpointId, - 0, // GroupId - Clusters::AdministratorCommissioning::Id, aCommandId, - (chip::app::CommandPathFlags::kEndpointIdValid) }; - apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, - Protocols::SecureChannel::Id, - Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command " ChipLogFormatMEI " for cluster " ChipLogFormatMEI, ChipLogValueMEI(aCommandId), - ChipLogValueMEI(Clusters::AdministratorCommissioning::Id)); + ReportCommandUnsupported(apCommandObj, aEndpointId, Clusters::AdministratorCommissioning::Id, aCommandId); return; } } diff --git a/examples/window-app/common/gen/IMClusterCommandHandler.cpp b/examples/window-app/common/gen/IMClusterCommandHandler.cpp index 688f11b1938cc4..c06d6589cd0b55 100644 --- a/examples/window-app/common/gen/IMClusterCommandHandler.cpp +++ b/examples/window-app/common/gen/IMClusterCommandHandler.cpp @@ -220,15 +220,7 @@ void DispatchServerCommand(app::CommandHandler * apCommandObj, CommandId aComman } default: { // Unrecognized command ID, error status will apply. - chip::app::CommandPathParams returnStatusParam = { aEndpointId, - 0, // GroupId - Clusters::AdministratorCommissioning::Id, aCommandId, - (chip::app::CommandPathFlags::kEndpointIdValid) }; - apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, - Protocols::SecureChannel::Id, - Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command " ChipLogFormatMEI " for cluster " ChipLogFormatMEI, ChipLogValueMEI(aCommandId), - ChipLogValueMEI(Clusters::AdministratorCommissioning::Id)); + ReportCommandUnsupported(apCommandObj, aEndpointId, Clusters::AdministratorCommissioning::Id, aCommandId); return; } }