Coverage Report

Created: 2025-08-28 06:31

/src/connectedhomeip/zzz_generated/app-common/clusters/EnergyEvse/Commands.ipp
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.ipp.zapt
20
21
#include <clusters/EnergyEvse/Commands.h>
22
23
#include <app/data-model/Decode.h>
24
#include <app/data-model/StructDecodeIterator.h>
25
#include <app/data-model/WrappedStructEncoder.h>
26
27
namespace chip {
28
namespace app {
29
namespace Clusters {
30
namespace EnergyEvse {
31
namespace Commands {
32
namespace GetTargetsResponse {
33
34
CHIP_ERROR Type::Encode(DataModel::FabricAwareTLVWriter & aWriter, TLV::Tag aTag) const
35
0
{
36
0
    DataModel::WrappedStructEncoder encoder{ aWriter, aTag };
37
0
    encoder.Encode(to_underlying(Fields::kChargingTargetSchedules), chargingTargetSchedules);
38
0
    return encoder.Finalize();
39
0
}
40
41
CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader)
42
0
{
43
0
    detail::StructDecodeIterator __iterator(reader);
44
0
    while (true)
45
0
    {
46
0
        uint8_t __context_tag = 0;
47
0
        CHIP_ERROR err        = __iterator.Next(__context_tag);
48
0
        VerifyOrReturnError(err != CHIP_ERROR_END_OF_TLV, CHIP_NO_ERROR);
49
0
        ReturnErrorOnFailure(err);
50
51
0
        if (__context_tag == to_underlying(Fields::kChargingTargetSchedules))
52
0
        {
53
0
            err = DataModel::Decode(reader, chargingTargetSchedules);
54
0
        }
55
56
0
        ReturnErrorOnFailure(err);
57
0
    }
58
0
}
59
} // namespace GetTargetsResponse.
60
namespace Disable {
61
62
CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const
63
0
{
64
0
    DataModel::WrappedStructEncoder encoder{ aWriter, aTag };
65
0
    return encoder.Finalize();
66
0
}
67
68
CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader)
69
0
{
70
0
    detail::StructDecodeIterator __iterator(reader);
71
0
    while (true)
72
0
    {
73
0
        uint8_t __context_tag = 0;
74
0
        CHIP_ERROR err        = __iterator.Next(__context_tag);
75
0
        VerifyOrReturnError(err != CHIP_ERROR_END_OF_TLV, CHIP_NO_ERROR);
76
0
        ReturnErrorOnFailure(err);
77
78
0
        ReturnErrorOnFailure(err);
79
0
    }
80
0
}
81
} // namespace Disable.
82
namespace EnableCharging {
83
84
CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const
85
0
{
86
0
    DataModel::WrappedStructEncoder encoder{ aWriter, aTag };
87
0
    encoder.Encode(to_underlying(Fields::kChargingEnabledUntil), chargingEnabledUntil);
88
0
    encoder.Encode(to_underlying(Fields::kMinimumChargeCurrent), minimumChargeCurrent);
89
0
    encoder.Encode(to_underlying(Fields::kMaximumChargeCurrent), maximumChargeCurrent);
90
0
    return encoder.Finalize();
91
0
}
92
93
CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader)
94
0
{
95
0
    detail::StructDecodeIterator __iterator(reader);
96
0
    while (true)
97
0
    {
98
0
        uint8_t __context_tag = 0;
99
0
        CHIP_ERROR err        = __iterator.Next(__context_tag);
100
0
        VerifyOrReturnError(err != CHIP_ERROR_END_OF_TLV, CHIP_NO_ERROR);
101
0
        ReturnErrorOnFailure(err);
102
103
0
        if (__context_tag == to_underlying(Fields::kChargingEnabledUntil))
104
0
        {
105
0
            err = DataModel::Decode(reader, chargingEnabledUntil);
106
0
        }
107
0
        else if (__context_tag == to_underlying(Fields::kMinimumChargeCurrent))
108
0
        {
109
0
            err = DataModel::Decode(reader, minimumChargeCurrent);
110
0
        }
111
0
        else if (__context_tag == to_underlying(Fields::kMaximumChargeCurrent))
112
0
        {
113
0
            err = DataModel::Decode(reader, maximumChargeCurrent);
114
0
        }
115
116
0
        ReturnErrorOnFailure(err);
117
0
    }
118
0
}
119
} // namespace EnableCharging.
120
namespace EnableDischarging {
121
122
CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const
123
0
{
124
0
    DataModel::WrappedStructEncoder encoder{ aWriter, aTag };
125
0
    encoder.Encode(to_underlying(Fields::kDischargingEnabledUntil), dischargingEnabledUntil);
126
0
    encoder.Encode(to_underlying(Fields::kMaximumDischargeCurrent), maximumDischargeCurrent);
127
0
    return encoder.Finalize();
128
0
}
129
130
CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader)
131
0
{
132
0
    detail::StructDecodeIterator __iterator(reader);
133
0
    while (true)
134
0
    {
135
0
        uint8_t __context_tag = 0;
136
0
        CHIP_ERROR err        = __iterator.Next(__context_tag);
137
0
        VerifyOrReturnError(err != CHIP_ERROR_END_OF_TLV, CHIP_NO_ERROR);
138
0
        ReturnErrorOnFailure(err);
139
140
0
        if (__context_tag == to_underlying(Fields::kDischargingEnabledUntil))
141
0
        {
142
0
            err = DataModel::Decode(reader, dischargingEnabledUntil);
143
0
        }
144
0
        else if (__context_tag == to_underlying(Fields::kMaximumDischargeCurrent))
145
0
        {
146
0
            err = DataModel::Decode(reader, maximumDischargeCurrent);
147
0
        }
148
149
0
        ReturnErrorOnFailure(err);
150
0
    }
151
0
}
152
} // namespace EnableDischarging.
153
namespace StartDiagnostics {
154
155
CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const
156
0
{
157
0
    DataModel::WrappedStructEncoder encoder{ aWriter, aTag };
158
0
    return encoder.Finalize();
159
0
}
160
161
CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader)
162
0
{
163
0
    detail::StructDecodeIterator __iterator(reader);
164
0
    while (true)
165
0
    {
166
0
        uint8_t __context_tag = 0;
167
0
        CHIP_ERROR err        = __iterator.Next(__context_tag);
168
0
        VerifyOrReturnError(err != CHIP_ERROR_END_OF_TLV, CHIP_NO_ERROR);
169
0
        ReturnErrorOnFailure(err);
170
171
0
        ReturnErrorOnFailure(err);
172
0
    }
173
0
}
174
} // namespace StartDiagnostics.
175
namespace SetTargets {
176
177
CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const
178
0
{
179
0
    DataModel::WrappedStructEncoder encoder{ aWriter, aTag };
180
0
    encoder.Encode(to_underlying(Fields::kChargingTargetSchedules), chargingTargetSchedules);
181
0
    return encoder.Finalize();
182
0
}
183
184
CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader)
185
0
{
186
0
    detail::StructDecodeIterator __iterator(reader);
187
0
    while (true)
188
0
    {
189
0
        uint8_t __context_tag = 0;
190
0
        CHIP_ERROR err        = __iterator.Next(__context_tag);
191
0
        VerifyOrReturnError(err != CHIP_ERROR_END_OF_TLV, CHIP_NO_ERROR);
192
0
        ReturnErrorOnFailure(err);
193
194
0
        if (__context_tag == to_underlying(Fields::kChargingTargetSchedules))
195
0
        {
196
0
            err = DataModel::Decode(reader, chargingTargetSchedules);
197
0
        }
198
199
0
        ReturnErrorOnFailure(err);
200
0
    }
201
0
}
202
} // namespace SetTargets.
203
namespace GetTargets {
204
205
CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const
206
0
{
207
0
    DataModel::WrappedStructEncoder encoder{ aWriter, aTag };
208
0
    return encoder.Finalize();
209
0
}
210
211
CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader)
212
0
{
213
0
    detail::StructDecodeIterator __iterator(reader);
214
0
    while (true)
215
0
    {
216
0
        uint8_t __context_tag = 0;
217
0
        CHIP_ERROR err        = __iterator.Next(__context_tag);
218
0
        VerifyOrReturnError(err != CHIP_ERROR_END_OF_TLV, CHIP_NO_ERROR);
219
0
        ReturnErrorOnFailure(err);
220
221
0
        ReturnErrorOnFailure(err);
222
0
    }
223
0
}
224
} // namespace GetTargets.
225
namespace ClearTargets {
226
227
CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const
228
0
{
229
0
    DataModel::WrappedStructEncoder encoder{ aWriter, aTag };
230
0
    return encoder.Finalize();
231
0
}
232
233
CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader)
234
0
{
235
0
    detail::StructDecodeIterator __iterator(reader);
236
0
    while (true)
237
0
    {
238
0
        uint8_t __context_tag = 0;
239
0
        CHIP_ERROR err        = __iterator.Next(__context_tag);
240
0
        VerifyOrReturnError(err != CHIP_ERROR_END_OF_TLV, CHIP_NO_ERROR);
241
0
        ReturnErrorOnFailure(err);
242
243
0
        ReturnErrorOnFailure(err);
244
0
    }
245
0
}
246
} // namespace ClearTargets.
247
} // namespace Commands
248
} // namespace EnergyEvse
249
} // namespace Clusters
250
} // namespace app
251
} // namespace chip