Coverage Report

Created: 2025-06-24 06:17

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