blob: 307214d9d12cd726a2e1da448c3ceaaf7b880e65 [file] [log] [blame]
{{> header}}
// Prevent multiple inclusion
#pragma once
#include <app-common/zap-generated/af-structs.h>
#include <app-common/zap-generated/cluster-objects.h>
#include <app/util/af-types.h>
#include <app/util/basic-types.h>
#include <app/CommandHandler.h>
#include <app/CommandSender.h>
#include <app/ConcreteAttributePath.h>
#include <app/ConcreteCommandPath.h>
#include <lib/support/Span.h>
#include <protocols/interaction_model/Constants.h>
// Cluster Init Functions
{{#zcl_clusters}}
/** @brief {{label}} Cluster Init
*
* Cluster Init
*
* @param endpoint Endpoint that is being initialized
*/
void emberAf{{asUpperCamelCase label}}ClusterInitCallback(chip::EndpointId endpoint);
{{/zcl_clusters}}
// Cluster Server/Client Init Functions
{{#zcl_clusters}}
//
// {{label}} Cluster
//
/** @brief {{label}} Cluster Server Init
*
* Server Init
*
* @param endpoint Endpoint that is being initialized
*/
void emberAf{{asUpperCamelCase label}}ClusterServerInitCallback(chip::EndpointId endpoint);
/** @brief {{label}} Cluster Client Init
*
* Client Init
*
* @param endpoint Endpoint that is being initialized
*/
void emberAf{{asUpperCamelCase label}}ClusterClientInitCallback(chip::EndpointId endpoint);
/** @brief {{label}} Cluster Server Attribute Changed
*
* Server Attribute Changed
*
* @param attributePath Concrete attribute path that changed
*/
void Matter{{asUpperCamelCase label}}ClusterServerAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath);
/** @brief {{label}} Cluster Server Message Sent
*
* Server Message Sent
*
* @param destination The destination to which the message was sent
* @param apsFrame The APS frame for the message
* @param msgLen The length of the message
* @param message The message that was sent
* @param status The status of the sent message
*/
void emberAf{{asUpperCamelCase label}}ClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status);
/** @brief {{label}} Cluster Client Message Sent
*
* Client Message Sent
*
* @param destination The destination to which the message was sent
* @param apsFrame The APS frame for the message
* @param msgLen The length of the message
* @param message The message that was sent
* @param status The status of the sent message
*/
void emberAf{{asUpperCamelCase label}}ClusterClientMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status);
/** @brief {{label}} Cluster Server Pre Attribute Changed
*
* Server Pre Attribute Changed
*
* @param attributePath Concrete attribute path to be changed
* @param attributeType Attribute type
* @param size Attribute size
* @param value Attribute value
*/
chip::Protocols::InteractionModel::Status Matter{{asUpperCamelCase label}}ClusterServerPreAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath, EmberAfAttributeType attributeType, uint16_t size, uint8_t * value);
/** @brief {{label}} Cluster Client Pre Attribute Changed
*
* Client Pre Attribute Changed
*
* @param attributePath Concrete attribute path to be changed
* @param attributeType Attribute type
* @param size Attribute size
* @param value Attribute value
*/
chip::Protocols::InteractionModel::Status Matter{{asUpperCamelCase label}}ClusterClientPreAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath, EmberAfAttributeType attributeType, uint16_t size, uint8_t * value);
/** @brief {{label}} Cluster Server Tick
*
* Server Tick
*
* @param endpoint Endpoint that is being served
*/
void emberAf{{asUpperCamelCase label}}ClusterServerTickCallback(chip::EndpointId endpoint);
/** @brief {{label}} Cluster Client Tick
*
* Client Tick
*
* @param endpoint Endpoint that is being served
*/
void emberAf{{asUpperCamelCase label}}ClusterClientTickCallback(chip::EndpointId endpoint);
{{/zcl_clusters}}
// Cluster Commands Callback
{{#zcl_clusters}}
{{#zcl_commands}}
/**
* @brief {{parent.name}} Cluster {{name}} Command callback (from {{source}})
*/
{{#if (isServer source)}}
bool emberAf{{asUpperCamelCase parent.label}}Cluster{{asUpperCamelCase name}}Callback(chip::EndpointId endpoint,
chip::app::CommandSender * commandObj
{{#zcl_command_arguments}}, {{#if isArray}}{{asUnderlyingZclType type}}{{else}}{{#if_is_struct type}}{{zapTypeToDecodableClusterObjectType type ns=parent.parent.label}}{{else}}{{asUnderlyingZclType type}}{{/if_is_struct}}{{/if}} {{asSymbol label}}{{/zcl_command_arguments}});
{{else}}
bool emberAf{{asUpperCamelCase parent.label}}Cluster{{asUpperCamelCase name}}Callback(chip::app::CommandHandler * commandObj,
const chip::app::ConcreteCommandPath & commandPath,
const chip::app::Clusters::{{asUpperCamelCase parent.label}}::Commands::{{asUpperCamelCase name}}::DecodableType & commandData);
{{/if}}
{{/zcl_commands}}
{{/zcl_clusters}}