3 // #TODO : This template wasn't tested in any way with CHIP
4 // Might need a zap submodule update and / or other fixes to make it work.
10 #define EMBER_AF_GENERATED_UC_EVENTS_DEF \
11 {{#user_endpoint_types}}
13 {{#if (is_enabled enabled)}}
14 {{#template_options category="tick_events"}}
15 {{#if (is_lowercase_equal (concatenate ../name ../side) optionLabel)~}}
16 sl_zigbee_event_t {{optionCode}}Event{{endpoint_type_identifier ../../endpointTypeId}}; \
21 {{/user_endpoint_types}}
22 {{#all_user_clusters}}
23 {{#template_options category="generic_events"}}
24 {{#if (is_lowercase_equal (concatenate ../name ../side) optionLabel)~}}
25 sl_zigbee_event_t {{optionCode}}EndpointEvents[{{user_endpoint_count_by_cluster ../id ../side}}]; \
28 {{/all_user_clusters}}
31 #define EMBER_AF_GENERATED_UC_EVENTS_INIT \
32 {{#all_user_clusters}}
33 {{#if (is_enabled enabled)}}
34 {{#template_options category="tick_events"}}
35 {{#if (is_lowercase_equal (concatenate ../name ../side) optionLabel)~}}
36 extern void {{optionCode}}(uint8_t enpoint); \
40 {{/all_user_clusters}}
41 {{#user_endpoint_types}}
43 {{#if (is_enabled enabled)}}
44 {{#template_options category="tick_events"}}
45 {{#if (is_lowercase_equal (concatenate ../name ../side) optionLabel)~}}
46 sl_zigbee_endpoint_event_init(&{{optionCode}}Event{{endpoint_type_identifier ../../endpointTypeId}}, {{optionCode}}, {{endpoint_type_identifier ../../endpointTypeId}}); \
51 {{/user_endpoint_types}}
52 {{#all_user_clusters}}
53 {{#if (is_enabled enabled)}}
54 {{#template_options category="generic_events"}}
55 {{#if (is_lowercase_equal (concatenate ../name ../side) optionLabel)~}}
56 extern void {{optionCode}}EndpointEventHandler(uint8_t enpoint); \
60 {{/all_user_clusters}}
61 {{#user_endpoint_types}}
63 {{#if (is_enabled enabled)}}
64 {{#template_options category="generic_events"}}
65 {{#if (is_lowercase_equal (concatenate ../name ../side) optionLabel)~}}
66 sl_zigbee_endpoint_event_init(&{{optionCode}}EndpointEvents[{{endpoint_type_identifier ../../endpointTypeId}}], {{optionCode}}EndpointEventHandler, {{endpoint_type_identifier ../../endpointTypeId}}); \
71 {{/user_endpoint_types}}
73 // sl_zigbee_event_context_t structs used to populate the sli_zigbee_app_event_context table
74 #define EMBER_AF_GENERATED_UC_EVENT_CONTEXT \
75 {{#user_endpoint_types}}
77 {{#if (is_enabled enabled)}}
78 {{#template_options category="tick_events"}}
79 {{#if (is_lowercase_equal (concatenate ../name ../side) optionLabel)~}}
80 { {{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}} }, \
85 {{/user_endpoint_types}}