blob: 9659df92b61416ae1ee65e48574dcae625b71fd8 [file] [log] [blame]
{{> header}}
// Prevent multiple inclusion
#pragma once
#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 Server Shutdown
*
* Server Shutdown
*
* @param endpoint Endpoint that is being shutdown
*/
void Matter{{asUpperCamelCase label}}ClusterServerShutdownCallback(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 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}}
{{#if (isClient source)}}
{{#unless (isInConfigList (asUpperCamelCase parent.name) "CommandHandlerInterfaceOnlyClusters")}}
/**
* @brief {{parent.name}} Cluster {{name}} Command callback (from {{source}})
*/
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);
{{/unless}}
{{/if}}
{{/zcl_commands}}
{{/zcl_clusters}}