Coverage Report

Created: 2026-06-30 06:52

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/connectedhomeip/zzz_generated/app-common/clusters/OtaSoftwareUpdateProvider/Commands.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-Commands.h.zapt
20
21
#pragma once
22
23
#include <app/data-model/DecodableList.h>
24
#include <app/data-model/Encode.h>
25
#include <app/data-model/List.h>
26
#include <app/data-model/NullObject.h>
27
#include <app/data-model/Nullable.h>
28
#include <lib/core/DataModelTypes.h>
29
#include <lib/core/Optional.h>
30
#include <lib/core/TLV.h>
31
#include <lib/support/BitMask.h>
32
33
#include <clusters/shared/Enums.h>
34
#include <clusters/shared/Structs.h>
35
36
#include <clusters/OtaSoftwareUpdateProvider/ClusterId.h>
37
#include <clusters/OtaSoftwareUpdateProvider/CommandIds.h>
38
#include <clusters/OtaSoftwareUpdateProvider/Enums.h>
39
#include <clusters/OtaSoftwareUpdateProvider/Structs.h>
40
41
#include <cstdint>
42
43
namespace chip {
44
namespace app {
45
namespace Clusters {
46
namespace OtaSoftwareUpdateProvider {
47
namespace Commands {
48
// Forward-declarations so we can reference these later.
49
50
namespace QueryImage {
51
struct Type;
52
struct DecodableType;
53
} // namespace QueryImage
54
55
namespace QueryImageResponse {
56
struct Type;
57
struct DecodableType;
58
} // namespace QueryImageResponse
59
60
namespace ApplyUpdateRequest {
61
struct Type;
62
struct DecodableType;
63
} // namespace ApplyUpdateRequest
64
65
namespace ApplyUpdateResponse {
66
struct Type;
67
struct DecodableType;
68
} // namespace ApplyUpdateResponse
69
70
namespace NotifyUpdateApplied {
71
struct Type;
72
struct DecodableType;
73
} // namespace NotifyUpdateApplied
74
75
} // namespace Commands
76
77
namespace Commands {
78
namespace QueryImage {
79
enum class Fields : uint8_t
80
{
81
    kVendorID            = 0,
82
    kProductID           = 1,
83
    kSoftwareVersion     = 2,
84
    kProtocolsSupported  = 3,
85
    kHardwareVersion     = 4,
86
    kLocation            = 5,
87
    kRequestorCanConsent = 6,
88
    kMetadataForProvider = 7,
89
};
90
91
struct Type
92
{
93
public:
94
    // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
95
0
    static constexpr CommandId GetCommandId() { return Commands::QueryImage::Id; }
96
0
    static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateProvider::Id; }
97
98
    chip::VendorId vendorID  = static_cast<chip::VendorId>(0);
99
    uint16_t productID       = static_cast<uint16_t>(0);
100
    uint32_t softwareVersion = static_cast<uint32_t>(0);
101
    DataModel::List<const DownloadProtocolEnum> protocolsSupported;
102
    Optional<uint16_t> hardwareVersion;
103
    Optional<chip::CharSpan> location;
104
    Optional<bool> requestorCanConsent;
105
    Optional<chip::ByteSpan> metadataForProvider;
106
107
    CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const;
108
109
    using ResponseType = Clusters::OtaSoftwareUpdateProvider::Commands::QueryImageResponse::DecodableType;
110
111
0
    static constexpr bool MustUseTimedInvoke() { return false; }
112
};
113
114
struct DecodableType
115
{
116
public:
117
0
    static constexpr CommandId GetCommandId() { return Commands::QueryImage::Id; }
118
0
    static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateProvider::Id; }
119
    static constexpr bool kIsFabricScoped = false;
120
121
    chip::VendorId vendorID  = static_cast<chip::VendorId>(0);
122
    uint16_t productID       = static_cast<uint16_t>(0);
123
    uint32_t softwareVersion = static_cast<uint32_t>(0);
124
    DataModel::DecodableList<DownloadProtocolEnum> protocolsSupported;
125
    Optional<uint16_t> hardwareVersion;
126
    Optional<chip::CharSpan> location;
127
    Optional<bool> requestorCanConsent;
128
    Optional<chip::ByteSpan> metadataForProvider;
129
130
    CHIP_ERROR Decode(TLV::TLVReader & reader);
131
};
132
}; // namespace QueryImage
133
namespace QueryImageResponse {
134
enum class Fields : uint8_t
135
{
136
    kStatus                = 0,
137
    kDelayedActionTime     = 1,
138
    kImageURI              = 2,
139
    kSoftwareVersion       = 3,
140
    kSoftwareVersionString = 4,
141
    kUpdateToken           = 5,
142
    kUserConsentNeeded     = 6,
143
    kMetadataForRequestor  = 7,
144
};
145
146
struct Type
147
{
148
public:
149
    // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
150
0
    static constexpr CommandId GetCommandId() { return Commands::QueryImageResponse::Id; }
151
0
    static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateProvider::Id; }
152
153
    StatusEnum status = static_cast<StatusEnum>(0);
154
    Optional<uint32_t> delayedActionTime;
155
    Optional<chip::CharSpan> imageURI;
156
    Optional<uint32_t> softwareVersion;
157
    Optional<chip::CharSpan> softwareVersionString;
158
    Optional<chip::ByteSpan> updateToken;
159
    Optional<bool> userConsentNeeded;
160
    Optional<chip::ByteSpan> metadataForRequestor;
161
162
    CHIP_ERROR Encode(DataModel::FabricAwareTLVWriter & aWriter, TLV::Tag aTag) const;
163
164
    using ResponseType = DataModel::NullObjectType;
165
166
0
    static constexpr bool MustUseTimedInvoke() { return false; }
167
};
168
169
struct DecodableType
170
{
171
public:
172
0
    static constexpr CommandId GetCommandId() { return Commands::QueryImageResponse::Id; }
173
0
    static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateProvider::Id; }
174
175
    StatusEnum status = static_cast<StatusEnum>(0);
176
    Optional<uint32_t> delayedActionTime;
177
    Optional<chip::CharSpan> imageURI;
178
    Optional<uint32_t> softwareVersion;
179
    Optional<chip::CharSpan> softwareVersionString;
180
    Optional<chip::ByteSpan> updateToken;
181
    Optional<bool> userConsentNeeded;
182
    Optional<chip::ByteSpan> metadataForRequestor;
183
184
    CHIP_ERROR Decode(TLV::TLVReader & reader);
185
};
186
}; // namespace QueryImageResponse
187
namespace ApplyUpdateRequest {
188
enum class Fields : uint8_t
189
{
190
    kUpdateToken = 0,
191
    kNewVersion  = 1,
192
};
193
194
struct Type
195
{
196
public:
197
    // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
198
0
    static constexpr CommandId GetCommandId() { return Commands::ApplyUpdateRequest::Id; }
199
0
    static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateProvider::Id; }
200
201
    chip::ByteSpan updateToken;
202
    uint32_t newVersion = static_cast<uint32_t>(0);
203
204
    CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const;
205
206
    using ResponseType = Clusters::OtaSoftwareUpdateProvider::Commands::ApplyUpdateResponse::DecodableType;
207
208
0
    static constexpr bool MustUseTimedInvoke() { return false; }
209
};
210
211
struct DecodableType
212
{
213
public:
214
0
    static constexpr CommandId GetCommandId() { return Commands::ApplyUpdateRequest::Id; }
215
0
    static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateProvider::Id; }
216
    static constexpr bool kIsFabricScoped = false;
217
218
    chip::ByteSpan updateToken;
219
    uint32_t newVersion = static_cast<uint32_t>(0);
220
221
    CHIP_ERROR Decode(TLV::TLVReader & reader);
222
};
223
}; // namespace ApplyUpdateRequest
224
namespace ApplyUpdateResponse {
225
enum class Fields : uint8_t
226
{
227
    kAction            = 0,
228
    kDelayedActionTime = 1,
229
};
230
231
struct Type
232
{
233
public:
234
    // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
235
0
    static constexpr CommandId GetCommandId() { return Commands::ApplyUpdateResponse::Id; }
236
0
    static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateProvider::Id; }
237
238
    ApplyUpdateActionEnum action = static_cast<ApplyUpdateActionEnum>(0);
239
    uint32_t delayedActionTime   = static_cast<uint32_t>(0);
240
241
    CHIP_ERROR Encode(DataModel::FabricAwareTLVWriter & aWriter, TLV::Tag aTag) const;
242
243
    using ResponseType = DataModel::NullObjectType;
244
245
0
    static constexpr bool MustUseTimedInvoke() { return false; }
246
};
247
248
struct DecodableType
249
{
250
public:
251
0
    static constexpr CommandId GetCommandId() { return Commands::ApplyUpdateResponse::Id; }
252
0
    static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateProvider::Id; }
253
254
    ApplyUpdateActionEnum action = static_cast<ApplyUpdateActionEnum>(0);
255
    uint32_t delayedActionTime   = static_cast<uint32_t>(0);
256
257
    CHIP_ERROR Decode(TLV::TLVReader & reader);
258
};
259
}; // namespace ApplyUpdateResponse
260
namespace NotifyUpdateApplied {
261
enum class Fields : uint8_t
262
{
263
    kUpdateToken     = 0,
264
    kSoftwareVersion = 1,
265
};
266
267
struct Type
268
{
269
public:
270
    // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
271
0
    static constexpr CommandId GetCommandId() { return Commands::NotifyUpdateApplied::Id; }
272
0
    static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateProvider::Id; }
273
274
    chip::ByteSpan updateToken;
275
    uint32_t softwareVersion = static_cast<uint32_t>(0);
276
277
    CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const;
278
279
    using ResponseType = DataModel::NullObjectType;
280
281
0
    static constexpr bool MustUseTimedInvoke() { return false; }
282
};
283
284
struct DecodableType
285
{
286
public:
287
0
    static constexpr CommandId GetCommandId() { return Commands::NotifyUpdateApplied::Id; }
288
0
    static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateProvider::Id; }
289
    static constexpr bool kIsFabricScoped = false;
290
291
    chip::ByteSpan updateToken;
292
    uint32_t softwareVersion = static_cast<uint32_t>(0);
293
294
    CHIP_ERROR Decode(TLV::TLVReader & reader);
295
};
296
}; // namespace NotifyUpdateApplied
297
} // namespace Commands
298
} // namespace OtaSoftwareUpdateProvider
299
} // namespace Clusters
300
} // namespace app
301
} // namespace chip