| {{> header}} |
| |
| #include <core/CHIPCore.h> |
| |
| #include <app/CommandSender.h> |
| #include <app/InteractionModelEngine.h> |
| #include <support/ReturnMacros.h> |
| |
| #include <controller/CHIPClusters.h> |
| #include <controller/CHIPDevice.h> |
| |
| using namespace chip; |
| using namespace chip::app; |
| |
| extern "C" { |
| |
| {{#chip_server_clusters}} |
| // Cluster {{asCamelCased name false}} |
| {{#chip_server_cluster_commands}} |
| 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}}, {{chipType}} {{asCamelCased label}}{{#if (isByteString type)}}, uint32_t {{asCamelCased label}}_Len{{/if}}{{/chip_server_cluster_command_arguments}}) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT); |
| chip::Controller::{{asCamelCased clusterName false}}Cluster cluster{{asCamelCased clusterName false}}; |
| (void) ZCLgroupId; |
| cluster{{asCamelCased clusterName false}}.Associate(device, ZCLendpointId); |
| return cluster{{asCamelCased clusterName false}}.{{asCamelCased name false}}(nullptr{{#chip_server_cluster_command_arguments}}, {{asCamelCased label}}{{/chip_server_cluster_command_arguments}}); |
| } |
| {{/chip_server_cluster_commands}} |
| // End of Cluster {{asCamelCased name false}} |
| |
| {{/chip_server_clusters}} |
| |
| } |