/src/connectedhomeip/zzz_generated/app-common/clusters/DeviceEnergyManagement/Commands.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-Commands.h.zapt |
20 | | |
21 | | #pragma once |
22 | | |
23 | | #include <app/data-model/DecodableList.h> |
24 | | #include <app/data-model/Encode.h> |
25 | | #include <app/data-model/List.h> |
26 | | #include <app/data-model/NullObject.h> |
27 | | #include <app/data-model/Nullable.h> |
28 | | #include <lib/core/DataModelTypes.h> |
29 | | #include <lib/core/Optional.h> |
30 | | #include <lib/core/TLV.h> |
31 | | #include <lib/support/BitMask.h> |
32 | | |
33 | | #include <clusters/shared/Enums.h> |
34 | | #include <clusters/shared/Structs.h> |
35 | | |
36 | | #include <clusters/DeviceEnergyManagement/ClusterId.h> |
37 | | #include <clusters/DeviceEnergyManagement/CommandIds.h> |
38 | | #include <clusters/DeviceEnergyManagement/Enums.h> |
39 | | #include <clusters/DeviceEnergyManagement/Structs.h> |
40 | | |
41 | | #include <cstdint> |
42 | | |
43 | | namespace chip { |
44 | | namespace app { |
45 | | namespace Clusters { |
46 | | namespace DeviceEnergyManagement { |
47 | | namespace Commands { |
48 | | // Forward-declarations so we can reference these later. |
49 | | |
50 | | namespace PowerAdjustRequest { |
51 | | struct Type; |
52 | | struct DecodableType; |
53 | | } // namespace PowerAdjustRequest |
54 | | |
55 | | namespace CancelPowerAdjustRequest { |
56 | | struct Type; |
57 | | struct DecodableType; |
58 | | } // namespace CancelPowerAdjustRequest |
59 | | |
60 | | namespace StartTimeAdjustRequest { |
61 | | struct Type; |
62 | | struct DecodableType; |
63 | | } // namespace StartTimeAdjustRequest |
64 | | |
65 | | namespace PauseRequest { |
66 | | struct Type; |
67 | | struct DecodableType; |
68 | | } // namespace PauseRequest |
69 | | |
70 | | namespace ResumeRequest { |
71 | | struct Type; |
72 | | struct DecodableType; |
73 | | } // namespace ResumeRequest |
74 | | |
75 | | namespace ModifyForecastRequest { |
76 | | struct Type; |
77 | | struct DecodableType; |
78 | | } // namespace ModifyForecastRequest |
79 | | |
80 | | namespace RequestConstraintBasedForecast { |
81 | | struct Type; |
82 | | struct DecodableType; |
83 | | } // namespace RequestConstraintBasedForecast |
84 | | |
85 | | namespace CancelRequest { |
86 | | struct Type; |
87 | | struct DecodableType; |
88 | | } // namespace CancelRequest |
89 | | |
90 | | namespace PowerRangeAdjustRequest { |
91 | | struct Type; |
92 | | struct DecodableType; |
93 | | } // namespace PowerRangeAdjustRequest |
94 | | |
95 | | namespace CancelPowerRangeAdjustRequest { |
96 | | struct Type; |
97 | | struct DecodableType; |
98 | | } // namespace CancelPowerRangeAdjustRequest |
99 | | |
100 | | } // namespace Commands |
101 | | |
102 | | namespace Commands { |
103 | | namespace PowerAdjustRequest { |
104 | | enum class Fields : uint8_t |
105 | | { |
106 | | kPower = 0, |
107 | | kDuration = 1, |
108 | | kCause = 2, |
109 | | }; |
110 | | |
111 | | struct Type |
112 | | { |
113 | | public: |
114 | | // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand |
115 | 0 | static constexpr CommandId GetCommandId() { return Commands::PowerAdjustRequest::Id; } |
116 | 0 | static constexpr ClusterId GetClusterId() { return Clusters::DeviceEnergyManagement::Id; } |
117 | | |
118 | | int64_t power = static_cast<int64_t>(0); |
119 | | uint32_t duration = static_cast<uint32_t>(0); |
120 | | AdjustmentCauseEnum cause = static_cast<AdjustmentCauseEnum>(0); |
121 | | |
122 | | CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; |
123 | | |
124 | | using ResponseType = DataModel::NullObjectType; |
125 | | |
126 | 0 | static constexpr bool MustUseTimedInvoke() { return false; } |
127 | | }; |
128 | | |
129 | | struct DecodableType |
130 | | { |
131 | | public: |
132 | 0 | static constexpr CommandId GetCommandId() { return Commands::PowerAdjustRequest::Id; } |
133 | 0 | static constexpr ClusterId GetClusterId() { return Clusters::DeviceEnergyManagement::Id; } |
134 | | static constexpr bool kIsFabricScoped = false; |
135 | | |
136 | | int64_t power = static_cast<int64_t>(0); |
137 | | uint32_t duration = static_cast<uint32_t>(0); |
138 | | AdjustmentCauseEnum cause = static_cast<AdjustmentCauseEnum>(0); |
139 | | |
140 | | CHIP_ERROR Decode(TLV::TLVReader & reader); |
141 | | }; |
142 | | }; // namespace PowerAdjustRequest |
143 | | namespace CancelPowerAdjustRequest { |
144 | | enum class Fields : uint8_t |
145 | | { |
146 | | }; |
147 | | |
148 | | struct Type |
149 | | { |
150 | | public: |
151 | | // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand |
152 | 0 | static constexpr CommandId GetCommandId() { return Commands::CancelPowerAdjustRequest::Id; } |
153 | 0 | static constexpr ClusterId GetClusterId() { return Clusters::DeviceEnergyManagement::Id; } |
154 | | |
155 | | CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; |
156 | | |
157 | | using ResponseType = DataModel::NullObjectType; |
158 | | |
159 | 0 | static constexpr bool MustUseTimedInvoke() { return false; } |
160 | | }; |
161 | | |
162 | | struct DecodableType |
163 | | { |
164 | | public: |
165 | 0 | static constexpr CommandId GetCommandId() { return Commands::CancelPowerAdjustRequest::Id; } |
166 | 0 | static constexpr ClusterId GetClusterId() { return Clusters::DeviceEnergyManagement::Id; } |
167 | | static constexpr bool kIsFabricScoped = false; |
168 | | |
169 | | CHIP_ERROR Decode(TLV::TLVReader & reader); |
170 | | }; |
171 | | }; // namespace CancelPowerAdjustRequest |
172 | | namespace StartTimeAdjustRequest { |
173 | | enum class Fields : uint8_t |
174 | | { |
175 | | kRequestedStartTime = 0, |
176 | | kCause = 1, |
177 | | }; |
178 | | |
179 | | struct Type |
180 | | { |
181 | | public: |
182 | | // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand |
183 | 0 | static constexpr CommandId GetCommandId() { return Commands::StartTimeAdjustRequest::Id; } |
184 | 0 | static constexpr ClusterId GetClusterId() { return Clusters::DeviceEnergyManagement::Id; } |
185 | | |
186 | | uint32_t requestedStartTime = static_cast<uint32_t>(0); |
187 | | AdjustmentCauseEnum cause = static_cast<AdjustmentCauseEnum>(0); |
188 | | |
189 | | CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; |
190 | | |
191 | | using ResponseType = DataModel::NullObjectType; |
192 | | |
193 | 0 | static constexpr bool MustUseTimedInvoke() { return false; } |
194 | | }; |
195 | | |
196 | | struct DecodableType |
197 | | { |
198 | | public: |
199 | 0 | static constexpr CommandId GetCommandId() { return Commands::StartTimeAdjustRequest::Id; } |
200 | 0 | static constexpr ClusterId GetClusterId() { return Clusters::DeviceEnergyManagement::Id; } |
201 | | static constexpr bool kIsFabricScoped = false; |
202 | | |
203 | | uint32_t requestedStartTime = static_cast<uint32_t>(0); |
204 | | AdjustmentCauseEnum cause = static_cast<AdjustmentCauseEnum>(0); |
205 | | |
206 | | CHIP_ERROR Decode(TLV::TLVReader & reader); |
207 | | }; |
208 | | }; // namespace StartTimeAdjustRequest |
209 | | namespace PauseRequest { |
210 | | enum class Fields : uint8_t |
211 | | { |
212 | | kDuration = 0, |
213 | | kCause = 1, |
214 | | }; |
215 | | |
216 | | struct Type |
217 | | { |
218 | | public: |
219 | | // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand |
220 | 0 | static constexpr CommandId GetCommandId() { return Commands::PauseRequest::Id; } |
221 | 0 | static constexpr ClusterId GetClusterId() { return Clusters::DeviceEnergyManagement::Id; } |
222 | | |
223 | | uint32_t duration = static_cast<uint32_t>(0); |
224 | | AdjustmentCauseEnum cause = static_cast<AdjustmentCauseEnum>(0); |
225 | | |
226 | | CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; |
227 | | |
228 | | using ResponseType = DataModel::NullObjectType; |
229 | | |
230 | 0 | static constexpr bool MustUseTimedInvoke() { return false; } |
231 | | }; |
232 | | |
233 | | struct DecodableType |
234 | | { |
235 | | public: |
236 | 0 | static constexpr CommandId GetCommandId() { return Commands::PauseRequest::Id; } |
237 | 0 | static constexpr ClusterId GetClusterId() { return Clusters::DeviceEnergyManagement::Id; } |
238 | | static constexpr bool kIsFabricScoped = false; |
239 | | |
240 | | uint32_t duration = static_cast<uint32_t>(0); |
241 | | AdjustmentCauseEnum cause = static_cast<AdjustmentCauseEnum>(0); |
242 | | |
243 | | CHIP_ERROR Decode(TLV::TLVReader & reader); |
244 | | }; |
245 | | }; // namespace PauseRequest |
246 | | namespace ResumeRequest { |
247 | | enum class Fields : uint8_t |
248 | | { |
249 | | }; |
250 | | |
251 | | struct Type |
252 | | { |
253 | | public: |
254 | | // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand |
255 | 0 | static constexpr CommandId GetCommandId() { return Commands::ResumeRequest::Id; } |
256 | 0 | static constexpr ClusterId GetClusterId() { return Clusters::DeviceEnergyManagement::Id; } |
257 | | |
258 | | CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; |
259 | | |
260 | | using ResponseType = DataModel::NullObjectType; |
261 | | |
262 | 0 | static constexpr bool MustUseTimedInvoke() { return false; } |
263 | | }; |
264 | | |
265 | | struct DecodableType |
266 | | { |
267 | | public: |
268 | 0 | static constexpr CommandId GetCommandId() { return Commands::ResumeRequest::Id; } |
269 | 0 | static constexpr ClusterId GetClusterId() { return Clusters::DeviceEnergyManagement::Id; } |
270 | | static constexpr bool kIsFabricScoped = false; |
271 | | |
272 | | CHIP_ERROR Decode(TLV::TLVReader & reader); |
273 | | }; |
274 | | }; // namespace ResumeRequest |
275 | | namespace ModifyForecastRequest { |
276 | | enum class Fields : uint8_t |
277 | | { |
278 | | kForecastID = 0, |
279 | | kSlotAdjustments = 1, |
280 | | kCause = 2, |
281 | | }; |
282 | | |
283 | | struct Type |
284 | | { |
285 | | public: |
286 | | // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand |
287 | 0 | static constexpr CommandId GetCommandId() { return Commands::ModifyForecastRequest::Id; } |
288 | 0 | static constexpr ClusterId GetClusterId() { return Clusters::DeviceEnergyManagement::Id; } |
289 | | |
290 | | uint32_t forecastID = static_cast<uint32_t>(0); |
291 | | DataModel::List<const Structs::SlotAdjustmentStruct::Type> slotAdjustments; |
292 | | AdjustmentCauseEnum cause = static_cast<AdjustmentCauseEnum>(0); |
293 | | |
294 | | CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; |
295 | | |
296 | | using ResponseType = DataModel::NullObjectType; |
297 | | |
298 | 0 | static constexpr bool MustUseTimedInvoke() { return false; } |
299 | | }; |
300 | | |
301 | | struct DecodableType |
302 | | { |
303 | | public: |
304 | 0 | static constexpr CommandId GetCommandId() { return Commands::ModifyForecastRequest::Id; } |
305 | 0 | static constexpr ClusterId GetClusterId() { return Clusters::DeviceEnergyManagement::Id; } |
306 | | static constexpr bool kIsFabricScoped = false; |
307 | | |
308 | | uint32_t forecastID = static_cast<uint32_t>(0); |
309 | | DataModel::DecodableList<Structs::SlotAdjustmentStruct::DecodableType> slotAdjustments; |
310 | | AdjustmentCauseEnum cause = static_cast<AdjustmentCauseEnum>(0); |
311 | | |
312 | | CHIP_ERROR Decode(TLV::TLVReader & reader); |
313 | | }; |
314 | | }; // namespace ModifyForecastRequest |
315 | | namespace RequestConstraintBasedForecast { |
316 | | enum class Fields : uint8_t |
317 | | { |
318 | | kConstraints = 0, |
319 | | kCause = 1, |
320 | | }; |
321 | | |
322 | | struct Type |
323 | | { |
324 | | public: |
325 | | // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand |
326 | 0 | static constexpr CommandId GetCommandId() { return Commands::RequestConstraintBasedForecast::Id; } |
327 | 0 | static constexpr ClusterId GetClusterId() { return Clusters::DeviceEnergyManagement::Id; } |
328 | | |
329 | | DataModel::List<const Structs::ConstraintsStruct::Type> constraints; |
330 | | AdjustmentCauseEnum cause = static_cast<AdjustmentCauseEnum>(0); |
331 | | |
332 | | CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; |
333 | | |
334 | | using ResponseType = DataModel::NullObjectType; |
335 | | |
336 | 0 | static constexpr bool MustUseTimedInvoke() { return false; } |
337 | | }; |
338 | | |
339 | | struct DecodableType |
340 | | { |
341 | | public: |
342 | 0 | static constexpr CommandId GetCommandId() { return Commands::RequestConstraintBasedForecast::Id; } |
343 | 0 | static constexpr ClusterId GetClusterId() { return Clusters::DeviceEnergyManagement::Id; } |
344 | | static constexpr bool kIsFabricScoped = false; |
345 | | |
346 | | DataModel::DecodableList<Structs::ConstraintsStruct::DecodableType> constraints; |
347 | | AdjustmentCauseEnum cause = static_cast<AdjustmentCauseEnum>(0); |
348 | | |
349 | | CHIP_ERROR Decode(TLV::TLVReader & reader); |
350 | | }; |
351 | | }; // namespace RequestConstraintBasedForecast |
352 | | namespace CancelRequest { |
353 | | enum class Fields : uint8_t |
354 | | { |
355 | | }; |
356 | | |
357 | | struct Type |
358 | | { |
359 | | public: |
360 | | // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand |
361 | 0 | static constexpr CommandId GetCommandId() { return Commands::CancelRequest::Id; } |
362 | 0 | static constexpr ClusterId GetClusterId() { return Clusters::DeviceEnergyManagement::Id; } |
363 | | |
364 | | CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; |
365 | | |
366 | | using ResponseType = DataModel::NullObjectType; |
367 | | |
368 | 0 | static constexpr bool MustUseTimedInvoke() { return false; } |
369 | | }; |
370 | | |
371 | | struct DecodableType |
372 | | { |
373 | | public: |
374 | 0 | static constexpr CommandId GetCommandId() { return Commands::CancelRequest::Id; } |
375 | 0 | static constexpr ClusterId GetClusterId() { return Clusters::DeviceEnergyManagement::Id; } |
376 | | static constexpr bool kIsFabricScoped = false; |
377 | | |
378 | | CHIP_ERROR Decode(TLV::TLVReader & reader); |
379 | | }; |
380 | | }; // namespace CancelRequest |
381 | | namespace PowerRangeAdjustRequest { |
382 | | enum class Fields : uint8_t |
383 | | { |
384 | | kMinPower = 0, |
385 | | kMaxPower = 1, |
386 | | kDuration = 2, |
387 | | kCause = 3, |
388 | | }; |
389 | | |
390 | | struct Type |
391 | | { |
392 | | public: |
393 | | // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand |
394 | 0 | static constexpr CommandId GetCommandId() { return Commands::PowerRangeAdjustRequest::Id; } |
395 | 0 | static constexpr ClusterId GetClusterId() { return Clusters::DeviceEnergyManagement::Id; } |
396 | | |
397 | | DataModel::Nullable<int64_t> minPower; |
398 | | DataModel::Nullable<int64_t> maxPower; |
399 | | uint32_t duration = static_cast<uint32_t>(0); |
400 | | AdjustmentCauseEnum cause = static_cast<AdjustmentCauseEnum>(0); |
401 | | |
402 | | CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; |
403 | | |
404 | | using ResponseType = DataModel::NullObjectType; |
405 | | |
406 | 0 | static constexpr bool MustUseTimedInvoke() { return false; } |
407 | | }; |
408 | | |
409 | | struct DecodableType |
410 | | { |
411 | | public: |
412 | 0 | static constexpr CommandId GetCommandId() { return Commands::PowerRangeAdjustRequest::Id; } |
413 | 0 | static constexpr ClusterId GetClusterId() { return Clusters::DeviceEnergyManagement::Id; } |
414 | | static constexpr bool kIsFabricScoped = false; |
415 | | |
416 | | DataModel::Nullable<int64_t> minPower; |
417 | | DataModel::Nullable<int64_t> maxPower; |
418 | | uint32_t duration = static_cast<uint32_t>(0); |
419 | | AdjustmentCauseEnum cause = static_cast<AdjustmentCauseEnum>(0); |
420 | | |
421 | | CHIP_ERROR Decode(TLV::TLVReader & reader); |
422 | | }; |
423 | | }; // namespace PowerRangeAdjustRequest |
424 | | namespace CancelPowerRangeAdjustRequest { |
425 | | enum class Fields : uint8_t |
426 | | { |
427 | | }; |
428 | | |
429 | | struct Type |
430 | | { |
431 | | public: |
432 | | // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand |
433 | 0 | static constexpr CommandId GetCommandId() { return Commands::CancelPowerRangeAdjustRequest::Id; } |
434 | 0 | static constexpr ClusterId GetClusterId() { return Clusters::DeviceEnergyManagement::Id; } |
435 | | |
436 | | CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; |
437 | | |
438 | | using ResponseType = DataModel::NullObjectType; |
439 | | |
440 | 0 | static constexpr bool MustUseTimedInvoke() { return false; } |
441 | | }; |
442 | | |
443 | | struct DecodableType |
444 | | { |
445 | | public: |
446 | 0 | static constexpr CommandId GetCommandId() { return Commands::CancelPowerRangeAdjustRequest::Id; } |
447 | 0 | static constexpr ClusterId GetClusterId() { return Clusters::DeviceEnergyManagement::Id; } |
448 | | static constexpr bool kIsFabricScoped = false; |
449 | | |
450 | | CHIP_ERROR Decode(TLV::TLVReader & reader); |
451 | | }; |
452 | | }; // namespace CancelPowerRangeAdjustRequest |
453 | | } // namespace Commands |
454 | | } // namespace DeviceEnergyManagement |
455 | | } // namespace Clusters |
456 | | } // namespace app |
457 | | } // namespace chip |