/src/connectedhomeip/zzz_generated/app-common/clusters/GroupKeyManagement/Structs.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-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 | | }; |
133 | | |
134 | | struct Type |
135 | | { |
136 | | public: |
137 | | uint16_t groupKeySetID = static_cast<uint16_t>(0); |
138 | | GroupKeySecurityPolicyEnum groupKeySecurityPolicy = static_cast<GroupKeySecurityPolicyEnum>(0); |
139 | | DataModel::Nullable<chip::ByteSpan> epochKey0; |
140 | | DataModel::Nullable<uint64_t> epochStartTime0; |
141 | | DataModel::Nullable<chip::ByteSpan> epochKey1; |
142 | | DataModel::Nullable<uint64_t> epochStartTime1; |
143 | | DataModel::Nullable<chip::ByteSpan> epochKey2; |
144 | | DataModel::Nullable<uint64_t> epochStartTime2; |
145 | | |
146 | | CHIP_ERROR Decode(TLV::TLVReader & reader); |
147 | | |
148 | | static constexpr bool kIsFabricScoped = false; |
149 | | |
150 | | CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; |
151 | | }; |
152 | | |
153 | | using DecodableType = Type; |
154 | | |
155 | | } // namespace GroupKeySetStruct |
156 | | } // namespace Structs |
157 | | } // namespace GroupKeyManagement |
158 | | } // namespace Clusters |
159 | | } // namespace app |
160 | | } // namespace chip |