Coverage Report

Created: 2026-11-12 07:31

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/connectedhomeip/zzz_generated/app-common/clusters/ElectricalPowerMeasurement/Attributes.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-Attributes.h.zapt
20
21
#pragma once
22
23
#include <app/ConcreteAttributePath.h>
24
#include <app/data-model/DecodableList.h>
25
#include <app/data-model/List.h>
26
#include <app/data-model/Nullable.h>
27
#include <app/util/basic-types.h>
28
#include <lib/core/TLV.h>
29
#include <lib/support/BitMask.h>
30
31
#include <clusters/shared/Attributes.h>
32
#include <clusters/shared/Enums.h>
33
#include <clusters/shared/Structs.h>
34
35
#include <clusters/ElectricalPowerMeasurement/AttributeIds.h>
36
#include <clusters/ElectricalPowerMeasurement/ClusterId.h>
37
#include <clusters/ElectricalPowerMeasurement/Enums.h>
38
#include <clusters/ElectricalPowerMeasurement/Structs.h>
39
40
namespace chip {
41
namespace app {
42
namespace Clusters {
43
namespace ElectricalPowerMeasurement {
44
namespace Attributes {
45
46
namespace PowerMode {
47
struct TypeInfo
48
{
49
    using Type             = chip::app::Clusters::ElectricalPowerMeasurement::PowerModeEnum;
50
    using DecodableType    = chip::app::Clusters::ElectricalPowerMeasurement::PowerModeEnum;
51
    using DecodableArgType = chip::app::Clusters::ElectricalPowerMeasurement::PowerModeEnum;
52
53
0
    static constexpr ClusterId GetClusterId() { return Clusters::ElectricalPowerMeasurement::Id; }
54
0
    static constexpr AttributeId GetAttributeId() { return Attributes::PowerMode::Id; }
55
0
    static constexpr bool MustUseTimedWrite() { return false; }
56
};
57
} // namespace PowerMode
58
namespace NumberOfMeasurementTypes {
59
struct TypeInfo
60
{
61
    using Type             = uint8_t;
62
    using DecodableType    = uint8_t;
63
    using DecodableArgType = uint8_t;
64
65
0
    static constexpr ClusterId GetClusterId() { return Clusters::ElectricalPowerMeasurement::Id; }
66
0
    static constexpr AttributeId GetAttributeId() { return Attributes::NumberOfMeasurementTypes::Id; }
67
0
    static constexpr bool MustUseTimedWrite() { return false; }
68
};
69
} // namespace NumberOfMeasurementTypes
70
namespace Accuracy {
71
struct TypeInfo
72
{
73
    using Type =
74
        chip::app::DataModel::List<const chip::app::Clusters::ElectricalPowerMeasurement::Structs::MeasurementAccuracyStruct::Type>;
75
    using DecodableType = chip::app::DataModel::DecodableList<
76
        chip::app::Clusters::ElectricalPowerMeasurement::Structs::MeasurementAccuracyStruct::DecodableType>;
77
    using DecodableArgType = const chip::app::DataModel::DecodableList<
78
        chip::app::Clusters::ElectricalPowerMeasurement::Structs::MeasurementAccuracyStruct::DecodableType> &;
79
80
0
    static constexpr ClusterId GetClusterId() { return Clusters::ElectricalPowerMeasurement::Id; }
81
0
    static constexpr AttributeId GetAttributeId() { return Attributes::Accuracy::Id; }
82
0
    static constexpr bool MustUseTimedWrite() { return false; }
83
};
84
} // namespace Accuracy
85
namespace Ranges {
86
struct TypeInfo
87
{
88
    using Type =
89
        chip::app::DataModel::List<const chip::app::Clusters::ElectricalPowerMeasurement::Structs::MeasurementRangeStruct::Type>;
90
    using DecodableType = chip::app::DataModel::DecodableList<
91
        chip::app::Clusters::ElectricalPowerMeasurement::Structs::MeasurementRangeStruct::DecodableType>;
92
    using DecodableArgType = const chip::app::DataModel::DecodableList<
93
        chip::app::Clusters::ElectricalPowerMeasurement::Structs::MeasurementRangeStruct::DecodableType> &;
94
95
0
    static constexpr ClusterId GetClusterId() { return Clusters::ElectricalPowerMeasurement::Id; }
96
0
    static constexpr AttributeId GetAttributeId() { return Attributes::Ranges::Id; }
97
0
    static constexpr bool MustUseTimedWrite() { return false; }
98
};
99
} // namespace Ranges
100
namespace Voltage {
101
struct TypeInfo
102
{
103
    using Type             = chip::app::DataModel::Nullable<int64_t>;
104
    using DecodableType    = chip::app::DataModel::Nullable<int64_t>;
105
    using DecodableArgType = const chip::app::DataModel::Nullable<int64_t> &;
106
107
0
    static constexpr ClusterId GetClusterId() { return Clusters::ElectricalPowerMeasurement::Id; }
108
0
    static constexpr AttributeId GetAttributeId() { return Attributes::Voltage::Id; }
109
0
    static constexpr bool MustUseTimedWrite() { return false; }
110
};
111
} // namespace Voltage
112
namespace ActiveCurrent {
113
struct TypeInfo
114
{
115
    using Type             = chip::app::DataModel::Nullable<int64_t>;
116
    using DecodableType    = chip::app::DataModel::Nullable<int64_t>;
117
    using DecodableArgType = const chip::app::DataModel::Nullable<int64_t> &;
118
119
0
    static constexpr ClusterId GetClusterId() { return Clusters::ElectricalPowerMeasurement::Id; }
120
0
    static constexpr AttributeId GetAttributeId() { return Attributes::ActiveCurrent::Id; }
121
0
    static constexpr bool MustUseTimedWrite() { return false; }
122
};
123
} // namespace ActiveCurrent
124
namespace ReactiveCurrent {
125
struct TypeInfo
126
{
127
    using Type             = chip::app::DataModel::Nullable<int64_t>;
128
    using DecodableType    = chip::app::DataModel::Nullable<int64_t>;
129
    using DecodableArgType = const chip::app::DataModel::Nullable<int64_t> &;
130
131
0
    static constexpr ClusterId GetClusterId() { return Clusters::ElectricalPowerMeasurement::Id; }
132
0
    static constexpr AttributeId GetAttributeId() { return Attributes::ReactiveCurrent::Id; }
133
0
    static constexpr bool MustUseTimedWrite() { return false; }
134
};
135
} // namespace ReactiveCurrent
136
namespace ApparentCurrent {
137
struct TypeInfo
138
{
139
    using Type             = chip::app::DataModel::Nullable<int64_t>;
140
    using DecodableType    = chip::app::DataModel::Nullable<int64_t>;
141
    using DecodableArgType = const chip::app::DataModel::Nullable<int64_t> &;
142
143
0
    static constexpr ClusterId GetClusterId() { return Clusters::ElectricalPowerMeasurement::Id; }
144
0
    static constexpr AttributeId GetAttributeId() { return Attributes::ApparentCurrent::Id; }
145
0
    static constexpr bool MustUseTimedWrite() { return false; }
146
};
147
} // namespace ApparentCurrent
148
namespace ActivePower {
149
struct TypeInfo
150
{
151
    using Type             = chip::app::DataModel::Nullable<int64_t>;
152
    using DecodableType    = chip::app::DataModel::Nullable<int64_t>;
153
    using DecodableArgType = const chip::app::DataModel::Nullable<int64_t> &;
154
155
0
    static constexpr ClusterId GetClusterId() { return Clusters::ElectricalPowerMeasurement::Id; }
156
0
    static constexpr AttributeId GetAttributeId() { return Attributes::ActivePower::Id; }
157
0
    static constexpr bool MustUseTimedWrite() { return false; }
158
};
159
} // namespace ActivePower
160
namespace ReactivePower {
161
struct TypeInfo
162
{
163
    using Type             = chip::app::DataModel::Nullable<int64_t>;
164
    using DecodableType    = chip::app::DataModel::Nullable<int64_t>;
165
    using DecodableArgType = const chip::app::DataModel::Nullable<int64_t> &;
166
167
0
    static constexpr ClusterId GetClusterId() { return Clusters::ElectricalPowerMeasurement::Id; }
168
0
    static constexpr AttributeId GetAttributeId() { return Attributes::ReactivePower::Id; }
169
0
    static constexpr bool MustUseTimedWrite() { return false; }
170
};
171
} // namespace ReactivePower
172
namespace ApparentPower {
173
struct TypeInfo
174
{
175
    using Type             = chip::app::DataModel::Nullable<int64_t>;
176
    using DecodableType    = chip::app::DataModel::Nullable<int64_t>;
177
    using DecodableArgType = const chip::app::DataModel::Nullable<int64_t> &;
178
179
0
    static constexpr ClusterId GetClusterId() { return Clusters::ElectricalPowerMeasurement::Id; }
180
0
    static constexpr AttributeId GetAttributeId() { return Attributes::ApparentPower::Id; }
181
0
    static constexpr bool MustUseTimedWrite() { return false; }
182
};
183
} // namespace ApparentPower
184
namespace RMSVoltage {
185
struct TypeInfo
186
{
187
    using Type             = chip::app::DataModel::Nullable<int64_t>;
188
    using DecodableType    = chip::app::DataModel::Nullable<int64_t>;
189
    using DecodableArgType = const chip::app::DataModel::Nullable<int64_t> &;
190
191
0
    static constexpr ClusterId GetClusterId() { return Clusters::ElectricalPowerMeasurement::Id; }
192
0
    static constexpr AttributeId GetAttributeId() { return Attributes::RMSVoltage::Id; }
193
0
    static constexpr bool MustUseTimedWrite() { return false; }
194
};
195
} // namespace RMSVoltage
196
namespace RMSCurrent {
197
struct TypeInfo
198
{
199
    using Type             = chip::app::DataModel::Nullable<int64_t>;
200
    using DecodableType    = chip::app::DataModel::Nullable<int64_t>;
201
    using DecodableArgType = const chip::app::DataModel::Nullable<int64_t> &;
202
203
0
    static constexpr ClusterId GetClusterId() { return Clusters::ElectricalPowerMeasurement::Id; }
204
0
    static constexpr AttributeId GetAttributeId() { return Attributes::RMSCurrent::Id; }
205
0
    static constexpr bool MustUseTimedWrite() { return false; }
206
};
207
} // namespace RMSCurrent
208
namespace RMSPower {
209
struct TypeInfo
210
{
211
    using Type             = chip::app::DataModel::Nullable<int64_t>;
212
    using DecodableType    = chip::app::DataModel::Nullable<int64_t>;
213
    using DecodableArgType = const chip::app::DataModel::Nullable<int64_t> &;
214
215
0
    static constexpr ClusterId GetClusterId() { return Clusters::ElectricalPowerMeasurement::Id; }
216
0
    static constexpr AttributeId GetAttributeId() { return Attributes::RMSPower::Id; }
217
0
    static constexpr bool MustUseTimedWrite() { return false; }
218
};
219
} // namespace RMSPower
220
namespace Frequency {
221
struct TypeInfo
222
{
223
    using Type             = chip::app::DataModel::Nullable<int64_t>;
224
    using DecodableType    = chip::app::DataModel::Nullable<int64_t>;
225
    using DecodableArgType = const chip::app::DataModel::Nullable<int64_t> &;
226
227
0
    static constexpr ClusterId GetClusterId() { return Clusters::ElectricalPowerMeasurement::Id; }
228
0
    static constexpr AttributeId GetAttributeId() { return Attributes::Frequency::Id; }
229
0
    static constexpr bool MustUseTimedWrite() { return false; }
230
};
231
} // namespace Frequency
232
namespace HarmonicCurrents {
233
struct TypeInfo
234
{
235
    using Type             = chip::app::DataModel::Nullable<chip::app::DataModel::List<
236
        const chip::app::Clusters::ElectricalPowerMeasurement::Structs::HarmonicMeasurementStruct::Type>>;
237
    using DecodableType    = chip::app::DataModel::Nullable<chip::app::DataModel::DecodableList<
238
        chip::app::Clusters::ElectricalPowerMeasurement::Structs::HarmonicMeasurementStruct::DecodableType>>;
239
    using DecodableArgType = const chip::app::DataModel::Nullable<chip::app::DataModel::DecodableList<
240
        chip::app::Clusters::ElectricalPowerMeasurement::Structs::HarmonicMeasurementStruct::DecodableType>> &;
241
242
0
    static constexpr ClusterId GetClusterId() { return Clusters::ElectricalPowerMeasurement::Id; }
243
0
    static constexpr AttributeId GetAttributeId() { return Attributes::HarmonicCurrents::Id; }
244
0
    static constexpr bool MustUseTimedWrite() { return false; }
245
};
246
} // namespace HarmonicCurrents
247
namespace HarmonicPhases {
248
struct TypeInfo
249
{
250
    using Type             = chip::app::DataModel::Nullable<chip::app::DataModel::List<
251
        const chip::app::Clusters::ElectricalPowerMeasurement::Structs::HarmonicMeasurementStruct::Type>>;
252
    using DecodableType    = chip::app::DataModel::Nullable<chip::app::DataModel::DecodableList<
253
        chip::app::Clusters::ElectricalPowerMeasurement::Structs::HarmonicMeasurementStruct::DecodableType>>;
254
    using DecodableArgType = const chip::app::DataModel::Nullable<chip::app::DataModel::DecodableList<
255
        chip::app::Clusters::ElectricalPowerMeasurement::Structs::HarmonicMeasurementStruct::DecodableType>> &;
256
257
0
    static constexpr ClusterId GetClusterId() { return Clusters::ElectricalPowerMeasurement::Id; }
258
0
    static constexpr AttributeId GetAttributeId() { return Attributes::HarmonicPhases::Id; }
259
0
    static constexpr bool MustUseTimedWrite() { return false; }
260
};
261
} // namespace HarmonicPhases
262
namespace PowerFactor {
263
struct TypeInfo
264
{
265
    using Type             = chip::app::DataModel::Nullable<int64_t>;
266
    using DecodableType    = chip::app::DataModel::Nullable<int64_t>;
267
    using DecodableArgType = const chip::app::DataModel::Nullable<int64_t> &;
268
269
0
    static constexpr ClusterId GetClusterId() { return Clusters::ElectricalPowerMeasurement::Id; }
270
0
    static constexpr AttributeId GetAttributeId() { return Attributes::PowerFactor::Id; }
271
0
    static constexpr bool MustUseTimedWrite() { return false; }
272
};
273
} // namespace PowerFactor
274
namespace NeutralCurrent {
275
struct TypeInfo
276
{
277
    using Type             = chip::app::DataModel::Nullable<int64_t>;
278
    using DecodableType    = chip::app::DataModel::Nullable<int64_t>;
279
    using DecodableArgType = const chip::app::DataModel::Nullable<int64_t> &;
280
281
0
    static constexpr ClusterId GetClusterId() { return Clusters::ElectricalPowerMeasurement::Id; }
282
0
    static constexpr AttributeId GetAttributeId() { return Attributes::NeutralCurrent::Id; }
283
0
    static constexpr bool MustUseTimedWrite() { return false; }
284
};
285
} // namespace NeutralCurrent
286
namespace GeneratedCommandList {
287
struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo
288
{
289
0
    static constexpr ClusterId GetClusterId() { return Clusters::ElectricalPowerMeasurement::Id; }
290
};
291
} // namespace GeneratedCommandList
292
namespace AcceptedCommandList {
293
struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo
294
{
295
0
    static constexpr ClusterId GetClusterId() { return Clusters::ElectricalPowerMeasurement::Id; }
296
};
297
} // namespace AcceptedCommandList
298
namespace AttributeList {
299
struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo
300
{
301
0
    static constexpr ClusterId GetClusterId() { return Clusters::ElectricalPowerMeasurement::Id; }
302
};
303
} // namespace AttributeList
304
namespace FeatureMap {
305
struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo
306
{
307
0
    static constexpr ClusterId GetClusterId() { return Clusters::ElectricalPowerMeasurement::Id; }
308
};
309
} // namespace FeatureMap
310
namespace ClusterRevision {
311
struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo
312
{
313
0
    static constexpr ClusterId GetClusterId() { return Clusters::ElectricalPowerMeasurement::Id; }
314
};
315
} // namespace ClusterRevision
316
317
struct TypeInfo
318
{
319
    struct DecodableType
320
    {
321
0
        static constexpr ClusterId GetClusterId() { return Clusters::ElectricalPowerMeasurement::Id; }
322
323
        CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path);
324
325
        Attributes::PowerMode::TypeInfo::DecodableType powerMode =
326
            static_cast<chip::app::Clusters::ElectricalPowerMeasurement::PowerModeEnum>(0);
327
        Attributes::NumberOfMeasurementTypes::TypeInfo::DecodableType numberOfMeasurementTypes = static_cast<uint8_t>(0);
328
        Attributes::Accuracy::TypeInfo::DecodableType accuracy;
329
        Attributes::Ranges::TypeInfo::DecodableType ranges;
330
        Attributes::Voltage::TypeInfo::DecodableType voltage;
331
        Attributes::ActiveCurrent::TypeInfo::DecodableType activeCurrent;
332
        Attributes::ReactiveCurrent::TypeInfo::DecodableType reactiveCurrent;
333
        Attributes::ApparentCurrent::TypeInfo::DecodableType apparentCurrent;
334
        Attributes::ActivePower::TypeInfo::DecodableType activePower;
335
        Attributes::ReactivePower::TypeInfo::DecodableType reactivePower;
336
        Attributes::ApparentPower::TypeInfo::DecodableType apparentPower;
337
        Attributes::RMSVoltage::TypeInfo::DecodableType RMSVoltage;
338
        Attributes::RMSCurrent::TypeInfo::DecodableType RMSCurrent;
339
        Attributes::RMSPower::TypeInfo::DecodableType RMSPower;
340
        Attributes::Frequency::TypeInfo::DecodableType frequency;
341
        Attributes::HarmonicCurrents::TypeInfo::DecodableType harmonicCurrents;
342
        Attributes::HarmonicPhases::TypeInfo::DecodableType harmonicPhases;
343
        Attributes::PowerFactor::TypeInfo::DecodableType powerFactor;
344
        Attributes::NeutralCurrent::TypeInfo::DecodableType neutralCurrent;
345
        Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList;
346
        Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList;
347
        Attributes::AttributeList::TypeInfo::DecodableType attributeList;
348
        Attributes::FeatureMap::TypeInfo::DecodableType featureMap           = static_cast<uint32_t>(0);
349
        Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast<uint16_t>(0);
350
    };
351
};
352
} // namespace Attributes
353
} // namespace ElectricalPowerMeasurement
354
} // namespace Clusters
355
} // namespace app
356
} // namespace chip