blob: 52141091e03aeeb5aa6e8d4c4e74479af20032f1 [file]
{{#user_endpoint_types}}
{{#user_clusters}}
{{#if (is_enabled enabled)}}
{{#template_options category="tick_events"}}
{{#if (is_lowercase_equal (concatenate ../name ../side) optionLabel)~}}
sl_zigbee_event_t {{optionCode}}Event{{endpoint_type_identifier ../../endpointTypeId}}; \
{{/if}}
{{/template_options}}
{{/if}}
{{/user_clusters}}
{{/user_endpoint_types}}
{{#all_user_clusters}}
{{#template_options category="generic_events"}}
{{#if (is_lowercase_equal (concatenate ../name ../side) optionLabel)~}}
sl_zigbee_event_t {{optionCode}}EndpointEvents[{{user_endpoint_count_by_cluster ../id ../side}}]; \
{{/if}}
{{/template_options}}
{{/all_user_clusters}}
#define EMBER_AF_GENERATED_UC_EVENTS_INIT \
{{#all_user_clusters}}
{{#if (is_enabled enabled)}}
{{#template_options category="tick_events"}}
{{#if (is_lowercase_equal (concatenate ../name ../side) optionLabel)~}}
extern void {{optionCode}}(uint8_t enpoint); \
{{/if}}
{{/template_options}}
{{/if}}
{{/all_user_clusters}}
{{#user_endpoints}}
{{#user_clusters}}
{{#if (is_enabled enabled)}}
{{#template_options category="tick_events"}}
{{#if (is_lowercase_equal (concatenate ../name ../side) optionLabel)~}}
sl_zigbee_endpoint_event_init(&{{optionCode}}Event{{endpoint_type_identifier ../../endpointTypeId}}, (void *){{optionCode}}, {{endpoint_type_identifier ../../endpointTypeId}}); \
{{/if}}
{{/template_options}}
{{/if}}
{{/user_clusters}}
{{/user_endpoints}}
{{#all_user_clusters}}
{{#if (is_enabled enabled)}}
{{#template_options category="generic_events"}}
{{#if (is_lowercase_equal (concatenate ../name ../side) optionLabel)~}}
extern void {{optionCode}}EndpointEventHandler(uint8_t enpoint); \
{{/if}}
{{/template_options}}
{{/if}}
{{/all_user_clusters}}
{{#user_endpoints}}
{{#user_clusters}}
{{#if (is_enabled enabled)}}
{{#template_options category="generic_events"}}
{{#if (is_lowercase_equal (concatenate ../name ../side) optionLabel)~}}
sl_zigbee_endpoint_event_init(&{{optionCode}}EndpointEvents[{{endpoint_type_index ../../endpointTypeId}}], (void *){{optionCode}}EndpointEventHandler, {{endpoint_type_identifier ../../endpointTypeId}}); \
{{/if}}
{{/template_options}}
{{/if}}
{{/user_clusters}}
{{/user_endpoints}}
// sl_zigbee_event_context_t structs used to populate the sli_zigbee_app_event_context table
#define EMBER_AF_GENERATED_UC_EVENT_CONTEXT \
{{#user_endpoints}}
{{#user_clusters}}
{{#if (is_enabled enabled)}}
{{#template_options category="tick_events"}}
{{#if (is_lowercase_equal (concatenate ../name ../side) optionLabel)~}}
{ {{endpoint_type_identifier ../../endpointTypeId}}, {{asHex ../code}}, {{#if (is_client ../side)}}true{{else}}false{{/if}}, EMBER_AF_LONG_POLL, EMBER_AF_OK_TO_SLEEP, &{{optionCode}}Event{{endpoint_type_identifier ../../endpointTypeId}} }, \
{{/if}}
{{/template_options}}
{{/if}}
{{/user_clusters}}
{{/user_endpoints}}
{{#user_endpoints}}
{{~addToAccumulator "event_size" 1~}}
{{/user_endpoints}}
{{#after}}
{{#iterateAccumulator accumulator="event_size"}}
#define SL_ZIGBEE_AF_GENERATED_UC_EVENT_CONTEXT_COUNT {{sum}}
{{/iterateAccumulator}}
{{/after}}