3 #include <core/CHIPCore.h>
5 #include <app/CommandSender.h>
6 #include <app/InteractionModelEngine.h>
7 #include <lib/support/Span.h>
8 #include <support/ReturnMacros.h>
10 #include <controller/CHIPClusters.h>
11 #include <controller/CHIPDevice.h>
14 using namespace chip::app;
18 {{#chip_server_clusters}}
19 // Cluster {{asCamelCased name false}}
20 {{#chip_server_cluster_commands}}
21 CHIP_ERROR chip_ime_AppendCommand_{{asCamelCased clusterName false}}_{{asCamelCased name false}}(chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId ZCLgroupId{{#chip_server_cluster_command_arguments}}, {{#if (isByteString type)}}const uint8_t * {{asCamelCased label}}, uint32_t {{asCamelCased label}}_Len{{else}}{{chipType}} {{asCamelCased label}}{{/if}}{{/chip_server_cluster_command_arguments}})
23 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
24 chip::Controller::{{asCamelCased clusterName false}}Cluster cluster{{asCamelCased clusterName false}};
26 cluster{{asCamelCased clusterName false}}.Associate(device, ZCLendpointId);
27 return cluster{{asCamelCased clusterName false}}.{{asCamelCased name false}}(nullptr, nullptr{{#chip_server_cluster_command_arguments}}, {{#if (isByteString type)}}chip::ByteSpan({{asCamelCased label}}, {{asCamelCased label}}_Len){{else}}{{asCamelCased label}}{{/if}}
28 {{/chip_server_cluster_command_arguments}});
30 {{/chip_server_cluster_commands}}
31 // End of Cluster {{asCamelCased name false}}
33 {{/chip_server_clusters}}