/src/connectedhomeip/zzz_generated/app-common/clusters/Switch/Events.h
Line | Count | Source |
1 | | /* |
2 | | * |
3 | | * Copyright (c) 2022 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 | | // THIS FILE IS GENERATED BY ZAP |
19 | | // This file is generated from clusters-Events.h.zapt |
20 | | |
21 | | #pragma once |
22 | | |
23 | | #include <app/EventLoggingTypes.h> |
24 | | #include <app/data-model/DecodableList.h> |
25 | | #include <app/data-model/List.h> |
26 | | #include <app/data-model/Nullable.h> |
27 | | #include <lib/core/DataModelTypes.h> |
28 | | #include <lib/core/TLV.h> |
29 | | #include <lib/support/BitMask.h> |
30 | | |
31 | | #include <clusters/shared/Enums.h> |
32 | | #include <clusters/shared/Structs.h> |
33 | | |
34 | | #include <clusters/Switch/ClusterId.h> |
35 | | #include <clusters/Switch/Enums.h> |
36 | | #include <clusters/Switch/EventIds.h> |
37 | | #include <clusters/Switch/Structs.h> |
38 | | |
39 | | #include <cstdint> |
40 | | |
41 | | namespace chip { |
42 | | namespace app { |
43 | | namespace Clusters { |
44 | | namespace Switch { |
45 | | namespace Events { |
46 | | namespace SwitchLatched { |
47 | | static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; |
48 | | |
49 | | enum class Fields : uint8_t |
50 | | { |
51 | | kNewPosition = 0, |
52 | | }; |
53 | | |
54 | | struct Type |
55 | | { |
56 | | public: |
57 | 0 | static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } |
58 | 0 | static constexpr EventId GetEventId() { return Events::SwitchLatched::Id; } |
59 | 0 | static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } |
60 | | static constexpr bool kIsFabricScoped = false; |
61 | | |
62 | | uint8_t newPosition = static_cast<uint8_t>(0); |
63 | | |
64 | | CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; |
65 | | }; |
66 | | |
67 | | struct DecodableType |
68 | | { |
69 | | public: |
70 | 0 | static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } |
71 | 0 | static constexpr EventId GetEventId() { return Events::SwitchLatched::Id; } |
72 | 0 | static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } |
73 | | |
74 | | uint8_t newPosition = static_cast<uint8_t>(0); |
75 | | |
76 | | CHIP_ERROR Decode(TLV::TLVReader & reader); |
77 | | }; |
78 | | } // namespace SwitchLatched |
79 | | namespace InitialPress { |
80 | | static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; |
81 | | |
82 | | enum class Fields : uint8_t |
83 | | { |
84 | | kNewPosition = 0, |
85 | | }; |
86 | | |
87 | | struct Type |
88 | | { |
89 | | public: |
90 | 0 | static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } |
91 | 0 | static constexpr EventId GetEventId() { return Events::InitialPress::Id; } |
92 | 0 | static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } |
93 | | static constexpr bool kIsFabricScoped = false; |
94 | | |
95 | | uint8_t newPosition = static_cast<uint8_t>(0); |
96 | | |
97 | | CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; |
98 | | }; |
99 | | |
100 | | struct DecodableType |
101 | | { |
102 | | public: |
103 | 0 | static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } |
104 | 0 | static constexpr EventId GetEventId() { return Events::InitialPress::Id; } |
105 | 0 | static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } |
106 | | |
107 | | uint8_t newPosition = static_cast<uint8_t>(0); |
108 | | |
109 | | CHIP_ERROR Decode(TLV::TLVReader & reader); |
110 | | }; |
111 | | } // namespace InitialPress |
112 | | namespace LongPress { |
113 | | static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; |
114 | | |
115 | | enum class Fields : uint8_t |
116 | | { |
117 | | kNewPosition = 0, |
118 | | }; |
119 | | |
120 | | struct Type |
121 | | { |
122 | | public: |
123 | 0 | static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } |
124 | 0 | static constexpr EventId GetEventId() { return Events::LongPress::Id; } |
125 | 0 | static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } |
126 | | static constexpr bool kIsFabricScoped = false; |
127 | | |
128 | | uint8_t newPosition = static_cast<uint8_t>(0); |
129 | | |
130 | | CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; |
131 | | }; |
132 | | |
133 | | struct DecodableType |
134 | | { |
135 | | public: |
136 | 0 | static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } |
137 | 0 | static constexpr EventId GetEventId() { return Events::LongPress::Id; } |
138 | 0 | static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } |
139 | | |
140 | | uint8_t newPosition = static_cast<uint8_t>(0); |
141 | | |
142 | | CHIP_ERROR Decode(TLV::TLVReader & reader); |
143 | | }; |
144 | | } // namespace LongPress |
145 | | namespace ShortRelease { |
146 | | static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; |
147 | | |
148 | | enum class Fields : uint8_t |
149 | | { |
150 | | kPreviousPosition = 0, |
151 | | }; |
152 | | |
153 | | struct Type |
154 | | { |
155 | | public: |
156 | 0 | static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } |
157 | 0 | static constexpr EventId GetEventId() { return Events::ShortRelease::Id; } |
158 | 0 | static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } |
159 | | static constexpr bool kIsFabricScoped = false; |
160 | | |
161 | | uint8_t previousPosition = static_cast<uint8_t>(0); |
162 | | |
163 | | CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; |
164 | | }; |
165 | | |
166 | | struct DecodableType |
167 | | { |
168 | | public: |
169 | 0 | static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } |
170 | 0 | static constexpr EventId GetEventId() { return Events::ShortRelease::Id; } |
171 | 0 | static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } |
172 | | |
173 | | uint8_t previousPosition = static_cast<uint8_t>(0); |
174 | | |
175 | | CHIP_ERROR Decode(TLV::TLVReader & reader); |
176 | | }; |
177 | | } // namespace ShortRelease |
178 | | namespace LongRelease { |
179 | | static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; |
180 | | |
181 | | enum class Fields : uint8_t |
182 | | { |
183 | | kPreviousPosition = 0, |
184 | | }; |
185 | | |
186 | | struct Type |
187 | | { |
188 | | public: |
189 | 0 | static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } |
190 | 0 | static constexpr EventId GetEventId() { return Events::LongRelease::Id; } |
191 | 0 | static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } |
192 | | static constexpr bool kIsFabricScoped = false; |
193 | | |
194 | | uint8_t previousPosition = static_cast<uint8_t>(0); |
195 | | |
196 | | CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; |
197 | | }; |
198 | | |
199 | | struct DecodableType |
200 | | { |
201 | | public: |
202 | 0 | static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } |
203 | 0 | static constexpr EventId GetEventId() { return Events::LongRelease::Id; } |
204 | 0 | static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } |
205 | | |
206 | | uint8_t previousPosition = static_cast<uint8_t>(0); |
207 | | |
208 | | CHIP_ERROR Decode(TLV::TLVReader & reader); |
209 | | }; |
210 | | } // namespace LongRelease |
211 | | namespace MultiPressOngoing { |
212 | | static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; |
213 | | |
214 | | enum class Fields : uint8_t |
215 | | { |
216 | | kNewPosition = 0, |
217 | | kCurrentNumberOfPressesCounted = 1, |
218 | | }; |
219 | | |
220 | | struct Type |
221 | | { |
222 | | public: |
223 | 0 | static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } |
224 | 0 | static constexpr EventId GetEventId() { return Events::MultiPressOngoing::Id; } |
225 | 0 | static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } |
226 | | static constexpr bool kIsFabricScoped = false; |
227 | | |
228 | | uint8_t newPosition = static_cast<uint8_t>(0); |
229 | | uint8_t currentNumberOfPressesCounted = static_cast<uint8_t>(0); |
230 | | |
231 | | CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; |
232 | | }; |
233 | | |
234 | | struct DecodableType |
235 | | { |
236 | | public: |
237 | 0 | static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } |
238 | 0 | static constexpr EventId GetEventId() { return Events::MultiPressOngoing::Id; } |
239 | 0 | static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } |
240 | | |
241 | | uint8_t newPosition = static_cast<uint8_t>(0); |
242 | | uint8_t currentNumberOfPressesCounted = static_cast<uint8_t>(0); |
243 | | |
244 | | CHIP_ERROR Decode(TLV::TLVReader & reader); |
245 | | }; |
246 | | } // namespace MultiPressOngoing |
247 | | namespace MultiPressComplete { |
248 | | static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; |
249 | | |
250 | | enum class Fields : uint8_t |
251 | | { |
252 | | kPreviousPosition = 0, |
253 | | kTotalNumberOfPressesCounted = 1, |
254 | | }; |
255 | | |
256 | | struct Type |
257 | | { |
258 | | public: |
259 | 0 | static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } |
260 | 0 | static constexpr EventId GetEventId() { return Events::MultiPressComplete::Id; } |
261 | 0 | static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } |
262 | | static constexpr bool kIsFabricScoped = false; |
263 | | |
264 | | uint8_t previousPosition = static_cast<uint8_t>(0); |
265 | | uint8_t totalNumberOfPressesCounted = static_cast<uint8_t>(0); |
266 | | |
267 | | CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; |
268 | | }; |
269 | | |
270 | | struct DecodableType |
271 | | { |
272 | | public: |
273 | 0 | static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } |
274 | 0 | static constexpr EventId GetEventId() { return Events::MultiPressComplete::Id; } |
275 | 0 | static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } |
276 | | |
277 | | uint8_t previousPosition = static_cast<uint8_t>(0); |
278 | | uint8_t totalNumberOfPressesCounted = static_cast<uint8_t>(0); |
279 | | |
280 | | CHIP_ERROR Decode(TLV::TLVReader & reader); |
281 | | }; |
282 | | } // namespace MultiPressComplete |
283 | | } // namespace Events |
284 | | } // namespace Switch |
285 | | } // namespace Clusters |
286 | | } // namespace app |
287 | | } // namespace chip |