Fix for x86_64 build fail
[platform/upstream/connectedhomeip.git] / examples / all-clusters-app / all-clusters-common / gen / af-gen-event.h
1 /**
2  *
3  *    Copyright (c) 2020 Project CHIP Authors
4  *
5  *    Licensed under the Apache License, Version 2.0 (the "License");
6  *    you may not use this file except in compliance with the License.
7  *    You may obtain a copy of the License at
8  *
9  *        http://www.apache.org/licenses/LICENSE-2.0
10  *
11  *    Unless required by applicable law or agreed to in writing, software
12  *    distributed under the License is distributed on an "AS IS" BASIS,
13  *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  *    See the License for the specific language governing permissions and
15  *    limitations under the License.
16  */
17
18 /**
19  *
20  *    Copyright (c) 2020 Silicon Labs
21  *
22  *    Licensed under the Apache License, Version 2.0 (the "License");
23  *    you may not use this file except in compliance with the License.
24  *    You may obtain a copy of the License at
25  *
26  *        http://www.apache.org/licenses/LICENSE-2.0
27  *
28  *    Unless required by applicable law or agreed to in writing, software
29  *    distributed under the License is distributed on an "AS IS" BASIS,
30  *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
31  *    See the License for the specific language governing permissions and
32  *    limitations under the License.
33  */
34 // This file is generated by Simplicity Studio.  Please do not edit manually.
35 //
36 //
37
38 // Enclosing macro to prevent multiple inclusion
39 #ifndef __AF_GEN_EVENT__
40 #define __AF_GEN_EVENT__
41
42 // Code used to configure the cluster event mechanism
43 #define EMBER_AF_GENERATED_EVENT_CODE                                                                                              \
44     EmberEventControl emberAfIdentifyClusterServerTickCallbackControl1;                                                            \
45     EmberEventControl emberAfLevelControlClusterServerTickCallbackControl1;                                                        \
46     EmberEventControl emberAfBarrierControlClusterServerTickCallbackControl1;                                                      \
47     EmberEventControl emberAfIasZoneClusterServerTickCallbackControl1;                                                             \
48     extern EmberEventControl emberAfPluginColorControlServerHueSatTransitionEventControl;                                          \
49     extern EmberEventControl emberAfPluginColorControlServerTempTransitionEventControl;                                            \
50     extern EmberEventControl emberAfPluginColorControlServerXyTransitionEventControl;                                              \
51     extern EmberEventControl emberAfPluginDoorLockServerLockoutEventControl;                                                       \
52     extern EmberEventControl emberAfPluginDoorLockServerRelockEventControl;                                                        \
53     extern EmberEventControl emberAfPluginIasZoneServerManageQueueEventControl;                                                    \
54     extern EmberEventControl emberAfPluginReportingTickEventControl;                                                               \
55     extern void emberAfPluginColorControlServerHueSatTransitionEventHandler(void);                                                 \
56     extern void emberAfPluginColorControlServerTempTransitionEventHandler(void);                                                   \
57     extern void emberAfPluginColorControlServerXyTransitionEventHandler(void);                                                     \
58     extern void emberAfPluginDoorLockServerLockoutEventHandler(void);                                                              \
59     extern void emberAfPluginDoorLockServerRelockEventHandler(void);                                                               \
60     extern void emberAfPluginIasZoneServerManageQueueEventHandler(void);                                                           \
61     extern void emberAfPluginReportingTickEventHandler(void);                                                                      \
62     static void clusterTickWrapper(EmberEventControl * control, EmberAfTickFunction callback, chip::EndpointId endpoint)           \
63     {                                                                                                                              \
64         /* emberAfPushEndpointNetworkIndex(endpoint); */                                                                           \
65         emberEventControlSetInactive(control);                                                                                     \
66         (*callback)(endpoint);                                                                                                     \
67         /* emberAfPopNetworkIndex(); */                                                                                            \
68     }                                                                                                                              \
69     void emberAfIdentifyClusterServerTickCallbackWrapperFunction1(void)                                                            \
70     {                                                                                                                              \
71         clusterTickWrapper(&emberAfIdentifyClusterServerTickCallbackControl1, emberAfIdentifyClusterServerTickCallback, 1);        \
72     }                                                                                                                              \
73     void emberAfLevelControlClusterServerTickCallbackWrapperFunction1(void)                                                        \
74     {                                                                                                                              \
75         clusterTickWrapper(&emberAfLevelControlClusterServerTickCallbackControl1, emberAfLevelControlClusterServerTickCallback,    \
76                            1);                                                                                                     \
77     }                                                                                                                              \
78     void emberAfBarrierControlClusterServerTickCallbackWrapperFunction1(void)                                                      \
79     {                                                                                                                              \
80         clusterTickWrapper(&emberAfBarrierControlClusterServerTickCallbackControl1,                                                \
81                            emberAfBarrierControlClusterServerTickCallback, 1);                                                     \
82     }                                                                                                                              \
83     void emberAfIasZoneClusterServerTickCallbackWrapperFunction1(void)                                                             \
84     {                                                                                                                              \
85         clusterTickWrapper(&emberAfIasZoneClusterServerTickCallbackControl1, emberAfIasZoneClusterServerTickCallback, 1);          \
86     }
87
88 // EmberEventData structs used to populate the EmberEventData table
89 #define EMBER_AF_GENERATED_EVENTS                                                                                                  \
90     { &emberAfIdentifyClusterServerTickCallbackControl1, emberAfIdentifyClusterServerTickCallbackWrapperFunction1 },               \
91         { &emberAfLevelControlClusterServerTickCallbackControl1, emberAfLevelControlClusterServerTickCallbackWrapperFunction1 },   \
92         { &emberAfBarrierControlClusterServerTickCallbackControl1,                                                                 \
93           emberAfBarrierControlClusterServerTickCallbackWrapperFunction1 },                                                        \
94         { &emberAfIasZoneClusterServerTickCallbackControl1, emberAfIasZoneClusterServerTickCallbackWrapperFunction1 },             \
95         { &emberAfPluginColorControlServerHueSatTransitionEventControl,                                                            \
96           emberAfPluginColorControlServerHueSatTransitionEventHandler },                                                           \
97         { &emberAfPluginColorControlServerTempTransitionEventControl, emberAfPluginColorControlServerTempTransitionEventHandler }, \
98         { &emberAfPluginColorControlServerXyTransitionEventControl, emberAfPluginColorControlServerXyTransitionEventHandler },     \
99         { &emberAfPluginDoorLockServerLockoutEventControl, emberAfPluginDoorLockServerLockoutEventHandler },                       \
100         { &emberAfPluginDoorLockServerRelockEventControl, emberAfPluginDoorLockServerRelockEventHandler },                         \
101         { &emberAfPluginIasZoneServerManageQueueEventControl, emberAfPluginIasZoneServerManageQueueEventHandler },                 \
102         { &emberAfPluginReportingTickEventControl, emberAfPluginReportingTickEventHandler },
103
104 #define EMBER_AF_GENERATED_EVENT_STRINGS                                                                                           \
105     "Identify Cluster Server EP 1", "Level Control Cluster Server EP 1", "Barrier Control Cluster Server EP 1",                    \
106         "IAS Zone Cluster Server EP 1", "Color Control Cluster Server Plugin HueSatTransition",                                    \
107         "Color Control Cluster Server Plugin TempTransition", "Color Control Cluster Server Plugin XyTransition",                  \
108         "Door Lock Server Cluster Plugin Lockout", "Door Lock Server Cluster Plugin Relock", "IAS Zone Server Plugin ManageQueue", \
109         "Reporting Plugin Tick",
110
111 // The length of the event context table used to track and retrieve cluster events
112 #define EMBER_AF_EVENT_CONTEXT_LENGTH 4
113
114 // EmberAfEventContext structs used to populate the EmberAfEventContext table
115 #define EMBER_AF_GENERATED_EVENT_CONTEXT                                                                                           \
116     { 0x1, 0x3, false, EMBER_AF_LONG_POLL, EMBER_AF_OK_TO_SLEEP, &emberAfIdentifyClusterServerTickCallbackControl1 },              \
117         { 0x1, 0x8, false, EMBER_AF_LONG_POLL, EMBER_AF_OK_TO_SLEEP, &emberAfLevelControlClusterServerTickCallbackControl1 },      \
118         { 0x1, 0x103, false, EMBER_AF_LONG_POLL, EMBER_AF_OK_TO_SLEEP, &emberAfBarrierControlClusterServerTickCallbackControl1 },  \
119     {                                                                                                                              \
120         0x1, 0x500, false, EMBER_AF_LONG_POLL, EMBER_AF_OK_TO_SLEEP, &emberAfIasZoneClusterServerTickCallbackControl1              \
121     }
122
123 #endif // __AF_GEN_EVENT__