Coverage Report

Created: 2026-05-16 06:48

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/connectedhomeip/zzz_generated/app-common/clusters/GroupKeyManagement/Structs.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-Structs.h.zapt
20
21
#pragma once
22
23
#include <app/data-model/DecodableList.h>
24
#include <app/data-model/List.h>
25
#include <app/data-model/Nullable.h>
26
#include <lib/core/DataModelTypes.h>
27
#include <lib/core/Optional.h>
28
#include <lib/core/TLV.h>
29
#include <lib/support/BitMask.h>
30
31
#include <clusters/shared/Structs.h>
32
33
#include <cstdint>
34
35
namespace chip {
36
namespace app {
37
namespace Clusters {
38
namespace GroupKeyManagement {
39
namespace Structs {
40
namespace GroupInfoMapStruct {
41
enum class Fields : uint8_t
42
{
43
    kGroupId     = 1,
44
    kEndpoints   = 2,
45
    kGroupName   = 3,
46
    kFabricIndex = 254,
47
};
48
49
struct Type
50
{
51
public:
52
    chip::GroupId groupId = static_cast<chip::GroupId>(0);
53
    DataModel::List<const chip::EndpointId> endpoints;
54
    Optional<chip::CharSpan> groupName;
55
    chip::FabricIndex fabricIndex = static_cast<chip::FabricIndex>(0);
56
57
    static constexpr bool kIsFabricScoped = true;
58
59
0
    auto GetFabricIndex() const { return fabricIndex; }
60
61
0
    void SetFabricIndex(chip::FabricIndex fabricIndex_) { fabricIndex = fabricIndex_; }
62
63
    CHIP_ERROR EncodeForWrite(TLV::TLVWriter & aWriter, TLV::Tag aTag) const;
64
    CHIP_ERROR EncodeForRead(TLV::TLVWriter & aWriter, TLV::Tag aTag, FabricIndex aAccessingFabricIndex) const;
65
66
private:
67
    CHIP_ERROR DoEncode(TLV::TLVWriter & aWriter, TLV::Tag aTag, const Optional<FabricIndex> & aAccessingFabricIndex) const;
68
};
69
70
struct DecodableType
71
{
72
public:
73
    chip::GroupId groupId = static_cast<chip::GroupId>(0);
74
    DataModel::DecodableList<chip::EndpointId> endpoints;
75
    Optional<chip::CharSpan> groupName;
76
    chip::FabricIndex fabricIndex = static_cast<chip::FabricIndex>(0);
77
78
    CHIP_ERROR Decode(TLV::TLVReader & reader);
79
80
    static constexpr bool kIsFabricScoped = true;
81
82
0
    auto GetFabricIndex() const { return fabricIndex; }
83
84
0
    void SetFabricIndex(chip::FabricIndex fabricIndex_) { fabricIndex = fabricIndex_; }
85
};
86
87
} // namespace GroupInfoMapStruct
88
namespace GroupKeyMapStruct {
89
enum class Fields : uint8_t
90
{
91
    kGroupId       = 1,
92
    kGroupKeySetID = 2,
93
    kFabricIndex   = 254,
94
};
95
96
struct Type
97
{
98
public:
99
    chip::GroupId groupId         = static_cast<chip::GroupId>(0);
100
    uint16_t groupKeySetID        = static_cast<uint16_t>(0);
101
    chip::FabricIndex fabricIndex = static_cast<chip::FabricIndex>(0);
102
103
    CHIP_ERROR Decode(TLV::TLVReader & reader);
104
105
    static constexpr bool kIsFabricScoped = true;
106
107
0
    auto GetFabricIndex() const { return fabricIndex; }
108
109
0
    void SetFabricIndex(chip::FabricIndex fabricIndex_) { fabricIndex = fabricIndex_; }
110
111
    CHIP_ERROR EncodeForWrite(TLV::TLVWriter & aWriter, TLV::Tag aTag) const;
112
    CHIP_ERROR EncodeForRead(TLV::TLVWriter & aWriter, TLV::Tag aTag, FabricIndex aAccessingFabricIndex) const;
113
114
private:
115
    CHIP_ERROR DoEncode(TLV::TLVWriter & aWriter, TLV::Tag aTag, const Optional<FabricIndex> & aAccessingFabricIndex) const;
116
};
117
118
using DecodableType = Type;
119
120
} // namespace GroupKeyMapStruct
121
namespace GroupKeySetStruct {
122
enum class Fields : uint8_t
123
{
124
    kGroupKeySetID           = 0,
125
    kGroupKeySecurityPolicy  = 1,
126
    kEpochKey0               = 2,
127
    kEpochStartTime0         = 3,
128
    kEpochKey1               = 4,
129
    kEpochStartTime1         = 5,
130
    kEpochKey2               = 6,
131
    kEpochStartTime2         = 7,
132
    kGroupKeyMulticastPolicy = 8,
133
};
134
135
struct Type
136
{
137
public:
138
    uint16_t groupKeySetID                            = static_cast<uint16_t>(0);
139
    GroupKeySecurityPolicyEnum groupKeySecurityPolicy = static_cast<GroupKeySecurityPolicyEnum>(0);
140
    DataModel::Nullable<chip::ByteSpan> epochKey0;
141
    DataModel::Nullable<uint64_t> epochStartTime0;
142
    DataModel::Nullable<chip::ByteSpan> epochKey1;
143
    DataModel::Nullable<uint64_t> epochStartTime1;
144
    DataModel::Nullable<chip::ByteSpan> epochKey2;
145
    DataModel::Nullable<uint64_t> epochStartTime2;
146
    GroupKeyMulticastPolicyEnum groupKeyMulticastPolicy = static_cast<GroupKeyMulticastPolicyEnum>(0);
147
148
    CHIP_ERROR Decode(TLV::TLVReader & reader);
149
150
    static constexpr bool kIsFabricScoped = false;
151
152
    CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const;
153
};
154
155
using DecodableType = Type;
156
157
} // namespace GroupKeySetStruct
158
namespace GroupcastAdoptionStruct {
159
enum class Fields : uint8_t
160
{
161
    kGroupcastAdopted = 0,
162
    kFabricIndex      = 254,
163
};
164
165
struct Type
166
{
167
public:
168
    bool groupcastAdopted         = static_cast<bool>(0);
169
    chip::FabricIndex fabricIndex = static_cast<chip::FabricIndex>(0);
170
171
    CHIP_ERROR Decode(TLV::TLVReader & reader);
172
173
    static constexpr bool kIsFabricScoped = true;
174
175
0
    auto GetFabricIndex() const { return fabricIndex; }
176
177
0
    void SetFabricIndex(chip::FabricIndex fabricIndex_) { fabricIndex = fabricIndex_; }
178
179
    CHIP_ERROR EncodeForWrite(TLV::TLVWriter & aWriter, TLV::Tag aTag) const;
180
    CHIP_ERROR EncodeForRead(TLV::TLVWriter & aWriter, TLV::Tag aTag, FabricIndex aAccessingFabricIndex) const;
181
182
private:
183
    CHIP_ERROR DoEncode(TLV::TLVWriter & aWriter, TLV::Tag aTag, const Optional<FabricIndex> & aAccessingFabricIndex) const;
184
};
185
186
using DecodableType = Type;
187
188
} // namespace GroupcastAdoptionStruct
189
} // namespace Structs
190
} // namespace GroupKeyManagement
191
} // namespace Clusters
192
} // namespace app
193
} // namespace chip