Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use gen/ids into im_cluster_command_handler.cpp #8069

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

117 changes: 58 additions & 59 deletions examples/bridge-app/bridge-common/gen/IMClusterCommandHandler.cpp

Large diffs are not rendered by default.

117 changes: 58 additions & 59 deletions examples/lighting-app/lighting-common/gen/IMClusterCommandHandler.cpp

Large diffs are not rendered by default.

93 changes: 46 additions & 47 deletions examples/lock-app/lock-common/gen/IMClusterCommandHandler.cpp

Large diffs are not rendered by default.

123 changes: 61 additions & 62 deletions examples/pump-app/pump-common/gen/IMClusterCommandHandler.cpp

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

216 changes: 108 additions & 108 deletions examples/tv-app/tv-common/gen/IMClusterCommandHandler.cpp

Large diffs are not rendered by default.

91 changes: 45 additions & 46 deletions examples/window-app/common/gen/IMClusterCommandHandler.cpp

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
#include <cinttypes>

#include "app/common/gen/af-structs.h"
#include "app/common/gen/cluster-id.h"
#include "app/common/gen/command-id.h"
#include "app/common/gen/ids/Clusters.h"
#include "app/common/gen/ids/Commands.h"
#include "callback.h"
#include "app/util/util.h"

Expand Down Expand Up @@ -47,7 +47,7 @@ void Dispatch{{asCamelCased side false}}Command(app::Command * apCommandObj, Com
{{#unless mfgCode}}
{{#if (isStrEqual clusterName parent.name)}}
{{#if (isCommandAvailable parent.side incoming outgoing commandSource name)}}
case ZCL_{{asDelimitedMacro name}}_COMMAND_ID: {
case Clusters::{{asUpperCamelCase parent.name}}::Commands::Ids::{{asUpperCamelCase name}}: {
{{> im_command_handler_cluster_commands}}
break;
}
Expand All @@ -59,12 +59,12 @@ void Dispatch{{asCamelCased side false}}Command(app::Command * apCommandObj, Com
// Unrecognized command ID, error status will apply.
chip::app::CommandPathParams returnStatusParam = { aEndpointId,
0, // GroupId
ZCL_{{asDelimitedMacro define}}_ID,
Clusters::{{asUpperCamelCase name}}::Id,
aCommandId,
(chip::app::CommandPathFlags::kEndpointIdValid) };
apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id,
Protocols::InteractionModel::ProtocolCode::UnsupportedCommand);
ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_{{asDelimitedMacro define}}_ID);
ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, Clusters::{{asUpperCamelCase name}}::Id);
return;
}
}
Expand All @@ -74,7 +74,7 @@ void Dispatch{{asCamelCased side false}}Command(app::Command * apCommandObj, Com
{
chip::app::CommandPathParams returnStatusParam = { aEndpointId,
0, // GroupId
ZCL_{{asDelimitedMacro define}}_ID,
Clusters::{{asUpperCamelCase name}}::Id,
aCommandId,
(chip::app::CommandPathFlags::kEndpointIdValid) };
apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, Protocols::SecureChannel::Id,
Expand Down Expand Up @@ -102,7 +102,7 @@ void DispatchSingleClusterCommand(chip::ClusterId aClusterId, chip::CommandId aC
{
{{#all_user_clusters}}
{{#if (user_cluster_has_enabled_command name side)}}
case ZCL_{{asDelimitedMacro define}}_ID :
case Clusters::{{asUpperCamelCase name}}::Id:
clusters::{{asCamelCased name false}}::Dispatch{{asCamelCased side false}}Command(apCommandObj, aCommandId, aEndPointId, aReader);
break;
{{/if}}
Expand Down
272 changes: 136 additions & 136 deletions src/controller/data_model/gen/IMClusterCommandHandler.cpp

Large diffs are not rendered by default.