Coverage Report

Created: 2026-02-12 06:57

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/connectedhomeip/zzz_generated/app-common/clusters/TlsClientManagement/Commands.ipp
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-Commands.ipp.zapt
20
21
#include <clusters/TlsClientManagement/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 TlsClientManagement {
31
namespace Commands {
32
namespace ProvisionEndpoint {
33
34
CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const
35
0
{
36
0
    DataModel::WrappedStructEncoder encoder{ aWriter, aTag };
37
0
    encoder.Encode(to_underlying(Fields::kHostname), hostname);
38
0
    encoder.Encode(to_underlying(Fields::kPort), port);
39
0
    encoder.Encode(to_underlying(Fields::kCaid), caid);
40
0
    encoder.Encode(to_underlying(Fields::kCcdid), ccdid);
41
0
    encoder.Encode(to_underlying(Fields::kEndpointID), endpointID);
42
0
    return encoder.Finalize();
43
0
}
44
45
CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader, FabricIndex aAccessingFabricIndex)
46
0
{
47
0
    detail::StructDecodeIterator __iterator(reader);
48
0
    while (true)
49
0
    {
50
0
        uint8_t __context_tag = 0;
51
0
        CHIP_ERROR err        = __iterator.Next(__context_tag);
52
0
        VerifyOrReturnError(err != CHIP_ERROR_END_OF_TLV, CHIP_NO_ERROR);
53
0
        ReturnErrorOnFailure(err);
54
55
0
        if (__context_tag == to_underlying(Fields::kHostname))
56
0
        {
57
0
            err = DataModel::Decode(reader, hostname);
58
0
        }
59
0
        else if (__context_tag == to_underlying(Fields::kPort))
60
0
        {
61
0
            err = DataModel::Decode(reader, port);
62
0
        }
63
0
        else if (__context_tag == to_underlying(Fields::kCaid))
64
0
        {
65
0
            err = DataModel::Decode(reader, caid);
66
0
        }
67
0
        else if (__context_tag == to_underlying(Fields::kCcdid))
68
0
        {
69
0
            err = DataModel::Decode(reader, ccdid);
70
0
        }
71
0
        else if (__context_tag == to_underlying(Fields::kEndpointID))
72
0
        {
73
0
            err = DataModel::Decode(reader, endpointID);
74
0
        }
75
76
0
        ReturnErrorOnFailure(err);
77
0
    }
78
0
}
79
} // namespace ProvisionEndpoint.
80
namespace ProvisionEndpointResponse {
81
82
CHIP_ERROR Type::Encode(DataModel::FabricAwareTLVWriter & aWriter, TLV::Tag aTag) const
83
0
{
84
0
    DataModel::WrappedStructEncoder encoder{ aWriter, aTag };
85
0
    encoder.Encode(to_underlying(Fields::kEndpointID), endpointID);
86
0
    return encoder.Finalize();
87
0
}
88
89
CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader)
90
0
{
91
0
    detail::StructDecodeIterator __iterator(reader);
92
0
    while (true)
93
0
    {
94
0
        uint8_t __context_tag = 0;
95
0
        CHIP_ERROR err        = __iterator.Next(__context_tag);
96
0
        VerifyOrReturnError(err != CHIP_ERROR_END_OF_TLV, CHIP_NO_ERROR);
97
0
        ReturnErrorOnFailure(err);
98
99
0
        if (__context_tag == to_underlying(Fields::kEndpointID))
100
0
        {
101
0
            err = DataModel::Decode(reader, endpointID);
102
0
        }
103
104
0
        ReturnErrorOnFailure(err);
105
0
    }
106
0
}
107
} // namespace ProvisionEndpointResponse.
108
namespace FindEndpoint {
109
110
CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const
111
0
{
112
0
    DataModel::WrappedStructEncoder encoder{ aWriter, aTag };
113
0
    encoder.Encode(to_underlying(Fields::kEndpointID), endpointID);
114
0
    return encoder.Finalize();
115
0
}
116
117
CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader, FabricIndex aAccessingFabricIndex)
118
0
{
119
0
    detail::StructDecodeIterator __iterator(reader);
120
0
    while (true)
121
0
    {
122
0
        uint8_t __context_tag = 0;
123
0
        CHIP_ERROR err        = __iterator.Next(__context_tag);
124
0
        VerifyOrReturnError(err != CHIP_ERROR_END_OF_TLV, CHIP_NO_ERROR);
125
0
        ReturnErrorOnFailure(err);
126
127
0
        if (__context_tag == to_underlying(Fields::kEndpointID))
128
0
        {
129
0
            err = DataModel::Decode(reader, endpointID);
130
0
        }
131
132
0
        ReturnErrorOnFailure(err);
133
0
    }
134
0
}
135
} // namespace FindEndpoint.
136
namespace FindEndpointResponse {
137
138
CHIP_ERROR Type::Encode(DataModel::FabricAwareTLVWriter & aWriter, TLV::Tag aTag) const
139
0
{
140
0
    DataModel::WrappedStructEncoder encoder{ aWriter, aTag };
141
0
    encoder.EncodeResponseCommandFabricScopedStructField(to_underlying(Fields::kEndpoint), aWriter.mAccessingFabricIndex, endpoint);
142
0
    return encoder.Finalize();
143
0
}
144
145
CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader)
146
0
{
147
0
    detail::StructDecodeIterator __iterator(reader);
148
0
    while (true)
149
0
    {
150
0
        uint8_t __context_tag = 0;
151
0
        CHIP_ERROR err        = __iterator.Next(__context_tag);
152
0
        VerifyOrReturnError(err != CHIP_ERROR_END_OF_TLV, CHIP_NO_ERROR);
153
0
        ReturnErrorOnFailure(err);
154
155
0
        if (__context_tag == to_underlying(Fields::kEndpoint))
156
0
        {
157
0
            err = DataModel::Decode(reader, endpoint);
158
0
        }
159
160
0
        ReturnErrorOnFailure(err);
161
0
    }
162
0
}
163
} // namespace FindEndpointResponse.
164
namespace RemoveEndpoint {
165
166
CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const
167
0
{
168
0
    DataModel::WrappedStructEncoder encoder{ aWriter, aTag };
169
0
    encoder.Encode(to_underlying(Fields::kEndpointID), endpointID);
170
0
    return encoder.Finalize();
171
0
}
172
173
CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader, FabricIndex aAccessingFabricIndex)
174
0
{
175
0
    detail::StructDecodeIterator __iterator(reader);
176
0
    while (true)
177
0
    {
178
0
        uint8_t __context_tag = 0;
179
0
        CHIP_ERROR err        = __iterator.Next(__context_tag);
180
0
        VerifyOrReturnError(err != CHIP_ERROR_END_OF_TLV, CHIP_NO_ERROR);
181
0
        ReturnErrorOnFailure(err);
182
183
0
        if (__context_tag == to_underlying(Fields::kEndpointID))
184
0
        {
185
0
            err = DataModel::Decode(reader, endpointID);
186
0
        }
187
188
0
        ReturnErrorOnFailure(err);
189
0
    }
190
0
}
191
} // namespace RemoveEndpoint.
192
} // namespace Commands
193
} // namespace TlsClientManagement
194
} // namespace Clusters
195
} // namespace app
196
} // namespace chip