Coverage Report

Created: 2026-07-10 06:38

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