Coverage Report

Created: 2025-08-28 06:31

/src/connectedhomeip/zzz_generated/app-common/clusters/SmokeCoAlarm/Events.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-Events.ipp.zapt
20
21
#include <clusters/SmokeCoAlarm/Events.h>
22
23
#include <app/data-model/Decode.h>
24
#include <app/data-model/Encode.h>
25
#include <app/data-model/StructDecodeIterator.h>
26
#include <app/data-model/WrappedStructEncoder.h>
27
28
namespace chip {
29
namespace app {
30
namespace Clusters {
31
namespace SmokeCoAlarm {
32
namespace Events {
33
namespace SmokeAlarm {
34
CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const
35
0
{
36
0
    TLV::TLVType outer;
37
0
    ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer));
38
0
    ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kAlarmSeverityLevel), alarmSeverityLevel));
39
0
    return aWriter.EndContainer(outer);
40
0
}
41
42
CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader)
43
0
{
44
0
    detail::StructDecodeIterator __iterator(reader);
45
0
    while (true)
46
0
    {
47
0
        uint8_t __context_tag = 0;
48
0
        CHIP_ERROR err        = __iterator.Next(__context_tag);
49
0
        VerifyOrReturnError(err != CHIP_ERROR_END_OF_TLV, CHIP_NO_ERROR);
50
0
        ReturnErrorOnFailure(err);
51
52
0
        if (__context_tag == to_underlying(Fields::kAlarmSeverityLevel))
53
0
        {
54
0
            err = DataModel::Decode(reader, alarmSeverityLevel);
55
0
        }
56
0
        else
57
0
        {
58
0
        }
59
60
0
        ReturnErrorOnFailure(err);
61
0
    }
62
0
}
63
} // namespace SmokeAlarm.
64
namespace COAlarm {
65
CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const
66
0
{
67
0
    TLV::TLVType outer;
68
0
    ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer));
69
0
    ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kAlarmSeverityLevel), alarmSeverityLevel));
70
0
    return aWriter.EndContainer(outer);
71
0
}
72
73
CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader)
74
0
{
75
0
    detail::StructDecodeIterator __iterator(reader);
76
0
    while (true)
77
0
    {
78
0
        uint8_t __context_tag = 0;
79
0
        CHIP_ERROR err        = __iterator.Next(__context_tag);
80
0
        VerifyOrReturnError(err != CHIP_ERROR_END_OF_TLV, CHIP_NO_ERROR);
81
0
        ReturnErrorOnFailure(err);
82
83
0
        if (__context_tag == to_underlying(Fields::kAlarmSeverityLevel))
84
0
        {
85
0
            err = DataModel::Decode(reader, alarmSeverityLevel);
86
0
        }
87
0
        else
88
0
        {
89
0
        }
90
91
0
        ReturnErrorOnFailure(err);
92
0
    }
93
0
}
94
} // namespace COAlarm.
95
namespace LowBattery {
96
CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const
97
0
{
98
0
    TLV::TLVType outer;
99
0
    ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer));
100
0
    ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kAlarmSeverityLevel), alarmSeverityLevel));
101
0
    return aWriter.EndContainer(outer);
102
0
}
103
104
CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader)
105
0
{
106
0
    detail::StructDecodeIterator __iterator(reader);
107
0
    while (true)
108
0
    {
109
0
        uint8_t __context_tag = 0;
110
0
        CHIP_ERROR err        = __iterator.Next(__context_tag);
111
0
        VerifyOrReturnError(err != CHIP_ERROR_END_OF_TLV, CHIP_NO_ERROR);
112
0
        ReturnErrorOnFailure(err);
113
114
0
        if (__context_tag == to_underlying(Fields::kAlarmSeverityLevel))
115
0
        {
116
0
            err = DataModel::Decode(reader, alarmSeverityLevel);
117
0
        }
118
0
        else
119
0
        {
120
0
        }
121
122
0
        ReturnErrorOnFailure(err);
123
0
    }
124
0
}
125
} // namespace LowBattery.
126
namespace HardwareFault {
127
CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const
128
0
{
129
0
    TLV::TLVType outer;
130
0
    ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer));
131
0
    return aWriter.EndContainer(outer);
132
0
}
133
134
CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader)
135
0
{
136
0
    detail::StructDecodeIterator __iterator(reader);
137
0
    while (true)
138
0
    {
139
0
        uint8_t __context_tag = 0;
140
0
        CHIP_ERROR err        = __iterator.Next(__context_tag);
141
0
        VerifyOrReturnError(err != CHIP_ERROR_END_OF_TLV, CHIP_NO_ERROR);
142
0
        ReturnErrorOnFailure(err);
143
144
0
        ReturnErrorOnFailure(err);
145
0
    }
146
0
}
147
} // namespace HardwareFault.
148
namespace EndOfService {
149
CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const
150
0
{
151
0
    TLV::TLVType outer;
152
0
    ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer));
153
0
    return aWriter.EndContainer(outer);
154
0
}
155
156
CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader)
157
0
{
158
0
    detail::StructDecodeIterator __iterator(reader);
159
0
    while (true)
160
0
    {
161
0
        uint8_t __context_tag = 0;
162
0
        CHIP_ERROR err        = __iterator.Next(__context_tag);
163
0
        VerifyOrReturnError(err != CHIP_ERROR_END_OF_TLV, CHIP_NO_ERROR);
164
0
        ReturnErrorOnFailure(err);
165
166
0
        ReturnErrorOnFailure(err);
167
0
    }
168
0
}
169
} // namespace EndOfService.
170
namespace SelfTestComplete {
171
CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const
172
0
{
173
0
    TLV::TLVType outer;
174
0
    ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer));
175
0
    return aWriter.EndContainer(outer);
176
0
}
177
178
CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader)
179
0
{
180
0
    detail::StructDecodeIterator __iterator(reader);
181
0
    while (true)
182
0
    {
183
0
        uint8_t __context_tag = 0;
184
0
        CHIP_ERROR err        = __iterator.Next(__context_tag);
185
0
        VerifyOrReturnError(err != CHIP_ERROR_END_OF_TLV, CHIP_NO_ERROR);
186
0
        ReturnErrorOnFailure(err);
187
188
0
        ReturnErrorOnFailure(err);
189
0
    }
190
0
}
191
} // namespace SelfTestComplete.
192
namespace AlarmMuted {
193
CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const
194
0
{
195
0
    TLV::TLVType outer;
196
0
    ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer));
197
0
    return aWriter.EndContainer(outer);
198
0
}
199
200
CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader)
201
0
{
202
0
    detail::StructDecodeIterator __iterator(reader);
203
0
    while (true)
204
0
    {
205
0
        uint8_t __context_tag = 0;
206
0
        CHIP_ERROR err        = __iterator.Next(__context_tag);
207
0
        VerifyOrReturnError(err != CHIP_ERROR_END_OF_TLV, CHIP_NO_ERROR);
208
0
        ReturnErrorOnFailure(err);
209
210
0
        ReturnErrorOnFailure(err);
211
0
    }
212
0
}
213
} // namespace AlarmMuted.
214
namespace MuteEnded {
215
CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const
216
0
{
217
0
    TLV::TLVType outer;
218
0
    ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer));
219
0
    return aWriter.EndContainer(outer);
220
0
}
221
222
CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader)
223
0
{
224
0
    detail::StructDecodeIterator __iterator(reader);
225
0
    while (true)
226
0
    {
227
0
        uint8_t __context_tag = 0;
228
0
        CHIP_ERROR err        = __iterator.Next(__context_tag);
229
0
        VerifyOrReturnError(err != CHIP_ERROR_END_OF_TLV, CHIP_NO_ERROR);
230
0
        ReturnErrorOnFailure(err);
231
232
0
        ReturnErrorOnFailure(err);
233
0
    }
234
0
}
235
} // namespace MuteEnded.
236
namespace InterconnectSmokeAlarm {
237
CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const
238
0
{
239
0
    TLV::TLVType outer;
240
0
    ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer));
241
0
    ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kAlarmSeverityLevel), alarmSeverityLevel));
242
0
    return aWriter.EndContainer(outer);
243
0
}
244
245
CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader)
246
0
{
247
0
    detail::StructDecodeIterator __iterator(reader);
248
0
    while (true)
249
0
    {
250
0
        uint8_t __context_tag = 0;
251
0
        CHIP_ERROR err        = __iterator.Next(__context_tag);
252
0
        VerifyOrReturnError(err != CHIP_ERROR_END_OF_TLV, CHIP_NO_ERROR);
253
0
        ReturnErrorOnFailure(err);
254
255
0
        if (__context_tag == to_underlying(Fields::kAlarmSeverityLevel))
256
0
        {
257
0
            err = DataModel::Decode(reader, alarmSeverityLevel);
258
0
        }
259
0
        else
260
0
        {
261
0
        }
262
263
0
        ReturnErrorOnFailure(err);
264
0
    }
265
0
}
266
} // namespace InterconnectSmokeAlarm.
267
namespace InterconnectCOAlarm {
268
CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const
269
0
{
270
0
    TLV::TLVType outer;
271
0
    ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer));
272
0
    ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kAlarmSeverityLevel), alarmSeverityLevel));
273
0
    return aWriter.EndContainer(outer);
274
0
}
275
276
CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader)
277
0
{
278
0
    detail::StructDecodeIterator __iterator(reader);
279
0
    while (true)
280
0
    {
281
0
        uint8_t __context_tag = 0;
282
0
        CHIP_ERROR err        = __iterator.Next(__context_tag);
283
0
        VerifyOrReturnError(err != CHIP_ERROR_END_OF_TLV, CHIP_NO_ERROR);
284
0
        ReturnErrorOnFailure(err);
285
286
0
        if (__context_tag == to_underlying(Fields::kAlarmSeverityLevel))
287
0
        {
288
0
            err = DataModel::Decode(reader, alarmSeverityLevel);
289
0
        }
290
0
        else
291
0
        {
292
0
        }
293
294
0
        ReturnErrorOnFailure(err);
295
0
    }
296
0
}
297
} // namespace InterconnectCOAlarm.
298
namespace AllClear {
299
CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const
300
0
{
301
0
    TLV::TLVType outer;
302
0
    ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer));
303
0
    return aWriter.EndContainer(outer);
304
0
}
305
306
CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader)
307
0
{
308
0
    detail::StructDecodeIterator __iterator(reader);
309
0
    while (true)
310
0
    {
311
0
        uint8_t __context_tag = 0;
312
0
        CHIP_ERROR err        = __iterator.Next(__context_tag);
313
0
        VerifyOrReturnError(err != CHIP_ERROR_END_OF_TLV, CHIP_NO_ERROR);
314
0
        ReturnErrorOnFailure(err);
315
316
0
        ReturnErrorOnFailure(err);
317
0
    }
318
0
}
319
} // namespace AllClear.
320
} // namespace Events
321
} // namespace SmokeCoAlarm
322
} // namespace Clusters
323
} // namespace app
324
} // namespace chip