/src/connectedhomeip/zzz_generated/app-common/clusters/Thermostat/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/Thermostat/ClusterId.h> |
37 | | #include <clusters/Thermostat/CommandIds.h> |
38 | | #include <clusters/Thermostat/Enums.h> |
39 | | #include <clusters/Thermostat/Structs.h> |
40 | | |
41 | | #include <cstdint> |
42 | | |
43 | | namespace chip { |
44 | | namespace app { |
45 | | namespace Clusters { |
46 | | namespace Thermostat { |
47 | | namespace Commands { |
48 | | // Forward-declarations so we can reference these later. |
49 | | |
50 | | namespace SetpointRaiseLower { |
51 | | struct Type; |
52 | | struct DecodableType; |
53 | | } // namespace SetpointRaiseLower |
54 | | |
55 | | namespace GetWeeklyScheduleResponse { |
56 | | struct Type; |
57 | | struct DecodableType; |
58 | | } // namespace GetWeeklyScheduleResponse |
59 | | |
60 | | namespace SetWeeklySchedule { |
61 | | struct Type; |
62 | | struct DecodableType; |
63 | | } // namespace SetWeeklySchedule |
64 | | |
65 | | namespace GetWeeklySchedule { |
66 | | struct Type; |
67 | | struct DecodableType; |
68 | | } // namespace GetWeeklySchedule |
69 | | |
70 | | namespace AddThermostatSuggestionResponse { |
71 | | struct Type; |
72 | | struct DecodableType; |
73 | | } // namespace AddThermostatSuggestionResponse |
74 | | |
75 | | namespace ClearWeeklySchedule { |
76 | | struct Type; |
77 | | struct DecodableType; |
78 | | } // namespace ClearWeeklySchedule |
79 | | |
80 | | namespace SetActiveScheduleRequest { |
81 | | struct Type; |
82 | | struct DecodableType; |
83 | | } // namespace SetActiveScheduleRequest |
84 | | |
85 | | namespace SetActivePresetRequest { |
86 | | struct Type; |
87 | | struct DecodableType; |
88 | | } // namespace SetActivePresetRequest |
89 | | |
90 | | namespace AddThermostatSuggestion { |
91 | | struct Type; |
92 | | struct DecodableType; |
93 | | } // namespace AddThermostatSuggestion |
94 | | |
95 | | namespace RemoveThermostatSuggestion { |
96 | | struct Type; |
97 | | struct DecodableType; |
98 | | } // namespace RemoveThermostatSuggestion |
99 | | |
100 | | namespace AtomicResponse { |
101 | | struct Type; |
102 | | struct DecodableType; |
103 | | } // namespace AtomicResponse |
104 | | |
105 | | namespace AtomicRequest { |
106 | | struct Type; |
107 | | struct DecodableType; |
108 | | } // namespace AtomicRequest |
109 | | |
110 | | } // namespace Commands |
111 | | |
112 | | namespace Commands { |
113 | | namespace SetpointRaiseLower { |
114 | | enum class Fields : uint8_t |
115 | | { |
116 | | kMode = 0, |
117 | | kAmount = 1, |
118 | | }; |
119 | | |
120 | | struct Type |
121 | | { |
122 | | public: |
123 | | // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand |
124 | 0 | static constexpr CommandId GetCommandId() { return Commands::SetpointRaiseLower::Id; } |
125 | 0 | static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } |
126 | | |
127 | | SetpointRaiseLowerModeEnum mode = static_cast<SetpointRaiseLowerModeEnum>(0); |
128 | | int8_t amount = static_cast<int8_t>(0); |
129 | | |
130 | | CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; |
131 | | |
132 | | using ResponseType = DataModel::NullObjectType; |
133 | | |
134 | 0 | static constexpr bool MustUseTimedInvoke() { return false; } |
135 | | }; |
136 | | |
137 | | struct DecodableType |
138 | | { |
139 | | public: |
140 | 0 | static constexpr CommandId GetCommandId() { return Commands::SetpointRaiseLower::Id; } |
141 | 0 | static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } |
142 | | static constexpr bool kIsFabricScoped = false; |
143 | | |
144 | | SetpointRaiseLowerModeEnum mode = static_cast<SetpointRaiseLowerModeEnum>(0); |
145 | | int8_t amount = static_cast<int8_t>(0); |
146 | | |
147 | | CHIP_ERROR Decode(TLV::TLVReader & reader); |
148 | | }; |
149 | | }; // namespace SetpointRaiseLower |
150 | | namespace GetWeeklyScheduleResponse { |
151 | | enum class Fields : uint8_t |
152 | | { |
153 | | kNumberOfTransitionsForSequence = 0, |
154 | | kDayOfWeekForSequence = 1, |
155 | | kModeForSequence = 2, |
156 | | kTransitions = 3, |
157 | | }; |
158 | | |
159 | | struct Type |
160 | | { |
161 | | public: |
162 | | // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand |
163 | 0 | static constexpr CommandId GetCommandId() { return Commands::GetWeeklyScheduleResponse::Id; } |
164 | 0 | static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } |
165 | | |
166 | | uint8_t numberOfTransitionsForSequence = static_cast<uint8_t>(0); |
167 | | chip::BitMask<ScheduleDayOfWeekBitmap> dayOfWeekForSequence = static_cast<chip::BitMask<ScheduleDayOfWeekBitmap>>(0); |
168 | | chip::BitMask<ScheduleModeBitmap> modeForSequence = static_cast<chip::BitMask<ScheduleModeBitmap>>(0); |
169 | | DataModel::List<const Structs::WeeklyScheduleTransitionStruct::Type> transitions; |
170 | | |
171 | | CHIP_ERROR Encode(DataModel::FabricAwareTLVWriter & aWriter, TLV::Tag aTag) const; |
172 | | |
173 | | using ResponseType = DataModel::NullObjectType; |
174 | | |
175 | 0 | static constexpr bool MustUseTimedInvoke() { return false; } |
176 | | }; |
177 | | |
178 | | struct DecodableType |
179 | | { |
180 | | public: |
181 | 0 | static constexpr CommandId GetCommandId() { return Commands::GetWeeklyScheduleResponse::Id; } |
182 | 0 | static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } |
183 | | |
184 | | uint8_t numberOfTransitionsForSequence = static_cast<uint8_t>(0); |
185 | | chip::BitMask<ScheduleDayOfWeekBitmap> dayOfWeekForSequence = static_cast<chip::BitMask<ScheduleDayOfWeekBitmap>>(0); |
186 | | chip::BitMask<ScheduleModeBitmap> modeForSequence = static_cast<chip::BitMask<ScheduleModeBitmap>>(0); |
187 | | DataModel::DecodableList<Structs::WeeklyScheduleTransitionStruct::DecodableType> transitions; |
188 | | |
189 | | CHIP_ERROR Decode(TLV::TLVReader & reader); |
190 | | }; |
191 | | }; // namespace GetWeeklyScheduleResponse |
192 | | namespace SetWeeklySchedule { |
193 | | enum class Fields : uint8_t |
194 | | { |
195 | | kNumberOfTransitionsForSequence = 0, |
196 | | kDayOfWeekForSequence = 1, |
197 | | kModeForSequence = 2, |
198 | | kTransitions = 3, |
199 | | }; |
200 | | |
201 | | struct Type |
202 | | { |
203 | | public: |
204 | | // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand |
205 | 0 | static constexpr CommandId GetCommandId() { return Commands::SetWeeklySchedule::Id; } |
206 | 0 | static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } |
207 | | |
208 | | uint8_t numberOfTransitionsForSequence = static_cast<uint8_t>(0); |
209 | | chip::BitMask<ScheduleDayOfWeekBitmap> dayOfWeekForSequence = static_cast<chip::BitMask<ScheduleDayOfWeekBitmap>>(0); |
210 | | chip::BitMask<ScheduleModeBitmap> modeForSequence = static_cast<chip::BitMask<ScheduleModeBitmap>>(0); |
211 | | DataModel::List<const Structs::WeeklyScheduleTransitionStruct::Type> transitions; |
212 | | |
213 | | CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; |
214 | | |
215 | | using ResponseType = DataModel::NullObjectType; |
216 | | |
217 | 0 | static constexpr bool MustUseTimedInvoke() { return false; } |
218 | | }; |
219 | | |
220 | | struct DecodableType |
221 | | { |
222 | | public: |
223 | 0 | static constexpr CommandId GetCommandId() { return Commands::SetWeeklySchedule::Id; } |
224 | 0 | static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } |
225 | | static constexpr bool kIsFabricScoped = false; |
226 | | |
227 | | uint8_t numberOfTransitionsForSequence = static_cast<uint8_t>(0); |
228 | | chip::BitMask<ScheduleDayOfWeekBitmap> dayOfWeekForSequence = static_cast<chip::BitMask<ScheduleDayOfWeekBitmap>>(0); |
229 | | chip::BitMask<ScheduleModeBitmap> modeForSequence = static_cast<chip::BitMask<ScheduleModeBitmap>>(0); |
230 | | DataModel::DecodableList<Structs::WeeklyScheduleTransitionStruct::DecodableType> transitions; |
231 | | |
232 | | CHIP_ERROR Decode(TLV::TLVReader & reader); |
233 | | }; |
234 | | }; // namespace SetWeeklySchedule |
235 | | namespace GetWeeklySchedule { |
236 | | enum class Fields : uint8_t |
237 | | { |
238 | | kDaysToReturn = 0, |
239 | | kModeToReturn = 1, |
240 | | }; |
241 | | |
242 | | struct Type |
243 | | { |
244 | | public: |
245 | | // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand |
246 | 0 | static constexpr CommandId GetCommandId() { return Commands::GetWeeklySchedule::Id; } |
247 | 0 | static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } |
248 | | |
249 | | chip::BitMask<ScheduleDayOfWeekBitmap> daysToReturn = static_cast<chip::BitMask<ScheduleDayOfWeekBitmap>>(0); |
250 | | chip::BitMask<ScheduleModeBitmap> modeToReturn = static_cast<chip::BitMask<ScheduleModeBitmap>>(0); |
251 | | |
252 | | CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; |
253 | | |
254 | | using ResponseType = Clusters::Thermostat::Commands::GetWeeklyScheduleResponse::DecodableType; |
255 | | |
256 | 0 | static constexpr bool MustUseTimedInvoke() { return false; } |
257 | | }; |
258 | | |
259 | | struct DecodableType |
260 | | { |
261 | | public: |
262 | 0 | static constexpr CommandId GetCommandId() { return Commands::GetWeeklySchedule::Id; } |
263 | 0 | static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } |
264 | | static constexpr bool kIsFabricScoped = false; |
265 | | |
266 | | chip::BitMask<ScheduleDayOfWeekBitmap> daysToReturn = static_cast<chip::BitMask<ScheduleDayOfWeekBitmap>>(0); |
267 | | chip::BitMask<ScheduleModeBitmap> modeToReturn = static_cast<chip::BitMask<ScheduleModeBitmap>>(0); |
268 | | |
269 | | CHIP_ERROR Decode(TLV::TLVReader & reader); |
270 | | }; |
271 | | }; // namespace GetWeeklySchedule |
272 | | namespace AddThermostatSuggestionResponse { |
273 | | enum class Fields : uint8_t |
274 | | { |
275 | | kUniqueID = 0, |
276 | | }; |
277 | | |
278 | | struct Type |
279 | | { |
280 | | public: |
281 | | // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand |
282 | 0 | static constexpr CommandId GetCommandId() { return Commands::AddThermostatSuggestionResponse::Id; } |
283 | 0 | static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } |
284 | | |
285 | | uint8_t uniqueID = static_cast<uint8_t>(0); |
286 | | |
287 | | CHIP_ERROR Encode(DataModel::FabricAwareTLVWriter & aWriter, TLV::Tag aTag) const; |
288 | | |
289 | | using ResponseType = DataModel::NullObjectType; |
290 | | |
291 | 0 | static constexpr bool MustUseTimedInvoke() { return false; } |
292 | | }; |
293 | | |
294 | | struct DecodableType |
295 | | { |
296 | | public: |
297 | 0 | static constexpr CommandId GetCommandId() { return Commands::AddThermostatSuggestionResponse::Id; } |
298 | 0 | static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } |
299 | | |
300 | | uint8_t uniqueID = static_cast<uint8_t>(0); |
301 | | |
302 | | CHIP_ERROR Decode(TLV::TLVReader & reader); |
303 | | }; |
304 | | }; // namespace AddThermostatSuggestionResponse |
305 | | namespace ClearWeeklySchedule { |
306 | | enum class Fields : uint8_t |
307 | | { |
308 | | }; |
309 | | |
310 | | struct Type |
311 | | { |
312 | | public: |
313 | | // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand |
314 | 0 | static constexpr CommandId GetCommandId() { return Commands::ClearWeeklySchedule::Id; } |
315 | 0 | static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } |
316 | | |
317 | | CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; |
318 | | |
319 | | using ResponseType = DataModel::NullObjectType; |
320 | | |
321 | 0 | static constexpr bool MustUseTimedInvoke() { return false; } |
322 | | }; |
323 | | |
324 | | struct DecodableType |
325 | | { |
326 | | public: |
327 | 0 | static constexpr CommandId GetCommandId() { return Commands::ClearWeeklySchedule::Id; } |
328 | 0 | static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } |
329 | | static constexpr bool kIsFabricScoped = false; |
330 | | |
331 | | CHIP_ERROR Decode(TLV::TLVReader & reader); |
332 | | }; |
333 | | }; // namespace ClearWeeklySchedule |
334 | | namespace SetActiveScheduleRequest { |
335 | | enum class Fields : uint8_t |
336 | | { |
337 | | kScheduleHandle = 0, |
338 | | }; |
339 | | |
340 | | struct Type |
341 | | { |
342 | | public: |
343 | | // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand |
344 | 0 | static constexpr CommandId GetCommandId() { return Commands::SetActiveScheduleRequest::Id; } |
345 | 0 | static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } |
346 | | |
347 | | chip::ByteSpan scheduleHandle; |
348 | | |
349 | | CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; |
350 | | |
351 | | using ResponseType = DataModel::NullObjectType; |
352 | | |
353 | 0 | static constexpr bool MustUseTimedInvoke() { return false; } |
354 | | }; |
355 | | |
356 | | struct DecodableType |
357 | | { |
358 | | public: |
359 | 0 | static constexpr CommandId GetCommandId() { return Commands::SetActiveScheduleRequest::Id; } |
360 | 0 | static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } |
361 | | static constexpr bool kIsFabricScoped = false; |
362 | | |
363 | | chip::ByteSpan scheduleHandle; |
364 | | |
365 | | CHIP_ERROR Decode(TLV::TLVReader & reader); |
366 | | }; |
367 | | }; // namespace SetActiveScheduleRequest |
368 | | namespace SetActivePresetRequest { |
369 | | enum class Fields : uint8_t |
370 | | { |
371 | | kPresetHandle = 0, |
372 | | }; |
373 | | |
374 | | struct Type |
375 | | { |
376 | | public: |
377 | | // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand |
378 | 0 | static constexpr CommandId GetCommandId() { return Commands::SetActivePresetRequest::Id; } |
379 | 0 | static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } |
380 | | |
381 | | DataModel::Nullable<chip::ByteSpan> presetHandle; |
382 | | |
383 | | CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; |
384 | | |
385 | | using ResponseType = DataModel::NullObjectType; |
386 | | |
387 | 0 | static constexpr bool MustUseTimedInvoke() { return false; } |
388 | | }; |
389 | | |
390 | | struct DecodableType |
391 | | { |
392 | | public: |
393 | 0 | static constexpr CommandId GetCommandId() { return Commands::SetActivePresetRequest::Id; } |
394 | 0 | static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } |
395 | | static constexpr bool kIsFabricScoped = false; |
396 | | |
397 | | DataModel::Nullable<chip::ByteSpan> presetHandle; |
398 | | |
399 | | CHIP_ERROR Decode(TLV::TLVReader & reader); |
400 | | }; |
401 | | }; // namespace SetActivePresetRequest |
402 | | namespace AddThermostatSuggestion { |
403 | | enum class Fields : uint8_t |
404 | | { |
405 | | kPresetHandle = 0, |
406 | | kEffectiveTime = 1, |
407 | | kExpirationInMinutes = 2, |
408 | | }; |
409 | | |
410 | | struct Type |
411 | | { |
412 | | public: |
413 | | // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand |
414 | 0 | static constexpr CommandId GetCommandId() { return Commands::AddThermostatSuggestion::Id; } |
415 | 0 | static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } |
416 | | |
417 | | chip::ByteSpan presetHandle; |
418 | | DataModel::Nullable<uint32_t> effectiveTime; |
419 | | uint16_t expirationInMinutes = static_cast<uint16_t>(0); |
420 | | |
421 | | CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; |
422 | | |
423 | | using ResponseType = Clusters::Thermostat::Commands::AddThermostatSuggestionResponse::DecodableType; |
424 | | |
425 | 0 | static constexpr bool MustUseTimedInvoke() { return false; } |
426 | | }; |
427 | | |
428 | | struct DecodableType |
429 | | { |
430 | | public: |
431 | 0 | static constexpr CommandId GetCommandId() { return Commands::AddThermostatSuggestion::Id; } |
432 | 0 | static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } |
433 | | static constexpr bool kIsFabricScoped = false; |
434 | | |
435 | | chip::ByteSpan presetHandle; |
436 | | DataModel::Nullable<uint32_t> effectiveTime; |
437 | | uint16_t expirationInMinutes = static_cast<uint16_t>(0); |
438 | | |
439 | | CHIP_ERROR Decode(TLV::TLVReader & reader); |
440 | | }; |
441 | | }; // namespace AddThermostatSuggestion |
442 | | namespace RemoveThermostatSuggestion { |
443 | | enum class Fields : uint8_t |
444 | | { |
445 | | kUniqueID = 0, |
446 | | }; |
447 | | |
448 | | struct Type |
449 | | { |
450 | | public: |
451 | | // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand |
452 | 0 | static constexpr CommandId GetCommandId() { return Commands::RemoveThermostatSuggestion::Id; } |
453 | 0 | static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } |
454 | | |
455 | | uint8_t uniqueID = static_cast<uint8_t>(0); |
456 | | |
457 | | CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; |
458 | | |
459 | | using ResponseType = DataModel::NullObjectType; |
460 | | |
461 | 0 | static constexpr bool MustUseTimedInvoke() { return false; } |
462 | | }; |
463 | | |
464 | | struct DecodableType |
465 | | { |
466 | | public: |
467 | 0 | static constexpr CommandId GetCommandId() { return Commands::RemoveThermostatSuggestion::Id; } |
468 | 0 | static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } |
469 | | static constexpr bool kIsFabricScoped = false; |
470 | | |
471 | | uint8_t uniqueID = static_cast<uint8_t>(0); |
472 | | |
473 | | CHIP_ERROR Decode(TLV::TLVReader & reader); |
474 | | }; |
475 | | }; // namespace RemoveThermostatSuggestion |
476 | | namespace AtomicResponse { |
477 | | enum class Fields : uint8_t |
478 | | { |
479 | | kStatusCode = 0, |
480 | | kAttributeStatus = 1, |
481 | | kTimeout = 2, |
482 | | }; |
483 | | |
484 | | struct Type |
485 | | { |
486 | | public: |
487 | | // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand |
488 | 0 | static constexpr CommandId GetCommandId() { return Commands::AtomicResponse::Id; } |
489 | 0 | static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } |
490 | | |
491 | | uint8_t statusCode = static_cast<uint8_t>(0); |
492 | | DataModel::List<const Globals::Structs::AtomicAttributeStatusStruct::Type> attributeStatus; |
493 | | Optional<uint16_t> timeout; |
494 | | |
495 | | CHIP_ERROR Encode(DataModel::FabricAwareTLVWriter & aWriter, TLV::Tag aTag) const; |
496 | | |
497 | | using ResponseType = DataModel::NullObjectType; |
498 | | |
499 | 0 | static constexpr bool MustUseTimedInvoke() { return false; } |
500 | | }; |
501 | | |
502 | | struct DecodableType |
503 | | { |
504 | | public: |
505 | 0 | static constexpr CommandId GetCommandId() { return Commands::AtomicResponse::Id; } |
506 | 0 | static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } |
507 | | |
508 | | uint8_t statusCode = static_cast<uint8_t>(0); |
509 | | DataModel::DecodableList<Globals::Structs::AtomicAttributeStatusStruct::DecodableType> attributeStatus; |
510 | | Optional<uint16_t> timeout; |
511 | | |
512 | | CHIP_ERROR Decode(TLV::TLVReader & reader); |
513 | | }; |
514 | | }; // namespace AtomicResponse |
515 | | namespace AtomicRequest { |
516 | | enum class Fields : uint8_t |
517 | | { |
518 | | kRequestType = 0, |
519 | | kAttributeRequests = 1, |
520 | | kTimeout = 2, |
521 | | }; |
522 | | |
523 | | struct Type |
524 | | { |
525 | | public: |
526 | | // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand |
527 | 0 | static constexpr CommandId GetCommandId() { return Commands::AtomicRequest::Id; } |
528 | 0 | static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } |
529 | | |
530 | | Globals::AtomicRequestTypeEnum requestType = static_cast<Globals::AtomicRequestTypeEnum>(0); |
531 | | DataModel::List<const chip::AttributeId> attributeRequests; |
532 | | Optional<uint16_t> timeout; |
533 | | |
534 | | CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; |
535 | | |
536 | | using ResponseType = Clusters::Thermostat::Commands::AtomicResponse::DecodableType; |
537 | | |
538 | 0 | static constexpr bool MustUseTimedInvoke() { return false; } |
539 | | }; |
540 | | |
541 | | struct DecodableType |
542 | | { |
543 | | public: |
544 | 0 | static constexpr CommandId GetCommandId() { return Commands::AtomicRequest::Id; } |
545 | 0 | static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } |
546 | | static constexpr bool kIsFabricScoped = false; |
547 | | |
548 | | Globals::AtomicRequestTypeEnum requestType = static_cast<Globals::AtomicRequestTypeEnum>(0); |
549 | | DataModel::DecodableList<chip::AttributeId> attributeRequests; |
550 | | Optional<uint16_t> timeout; |
551 | | |
552 | | CHIP_ERROR Decode(TLV::TLVReader & reader); |
553 | | }; |
554 | | }; // namespace AtomicRequest |
555 | | } // namespace Commands |
556 | | } // namespace Thermostat |
557 | | } // namespace Clusters |
558 | | } // namespace app |
559 | | } // namespace chip |