Coverage Report

Created: 2026-08-14 07:41

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/connectedhomeip/zzz_generated/app-common/clusters/GeneralDiagnostics/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/GeneralDiagnostics/ClusterId.h>
37
#include <clusters/GeneralDiagnostics/CommandIds.h>
38
#include <clusters/GeneralDiagnostics/Enums.h>
39
#include <clusters/GeneralDiagnostics/Structs.h>
40
41
#include <cstdint>
42
43
namespace chip {
44
namespace app {
45
namespace Clusters {
46
namespace GeneralDiagnostics {
47
namespace Commands {
48
// Forward-declarations so we can reference these later.
49
50
namespace TestEventTrigger {
51
struct Type;
52
struct DecodableType;
53
} // namespace TestEventTrigger
54
55
namespace TimeSnapshot {
56
struct Type;
57
struct DecodableType;
58
} // namespace TimeSnapshot
59
60
namespace TimeSnapshotResponse {
61
struct Type;
62
struct DecodableType;
63
} // namespace TimeSnapshotResponse
64
65
namespace PayloadTestRequest {
66
struct Type;
67
struct DecodableType;
68
} // namespace PayloadTestRequest
69
70
namespace PayloadTestResponse {
71
struct Type;
72
struct DecodableType;
73
} // namespace PayloadTestResponse
74
75
} // namespace Commands
76
77
namespace Commands {
78
namespace TestEventTrigger {
79
enum class Fields : uint8_t
80
{
81
    kEnableKey    = 0,
82
    kEventTrigger = 1,
83
};
84
85
struct Type
86
{
87
public:
88
    // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
89
0
    static constexpr CommandId GetCommandId() { return Commands::TestEventTrigger::Id; }
90
0
    static constexpr ClusterId GetClusterId() { return Clusters::GeneralDiagnostics::Id; }
91
92
    chip::ByteSpan enableKey;
93
    uint64_t eventTrigger = static_cast<uint64_t>(0);
94
95
    CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const;
96
97
    using ResponseType = DataModel::NullObjectType;
98
99
0
    static constexpr bool MustUseTimedInvoke() { return false; }
100
};
101
102
struct DecodableType
103
{
104
public:
105
0
    static constexpr CommandId GetCommandId() { return Commands::TestEventTrigger::Id; }
106
0
    static constexpr ClusterId GetClusterId() { return Clusters::GeneralDiagnostics::Id; }
107
    static constexpr bool kIsFabricScoped = false;
108
109
    chip::ByteSpan enableKey;
110
    uint64_t eventTrigger = static_cast<uint64_t>(0);
111
112
    CHIP_ERROR Decode(TLV::TLVReader & reader);
113
};
114
}; // namespace TestEventTrigger
115
namespace TimeSnapshot {
116
enum class Fields : uint8_t
117
{
118
};
119
120
struct Type
121
{
122
public:
123
    // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
124
0
    static constexpr CommandId GetCommandId() { return Commands::TimeSnapshot::Id; }
125
0
    static constexpr ClusterId GetClusterId() { return Clusters::GeneralDiagnostics::Id; }
126
127
    CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const;
128
129
    using ResponseType = Clusters::GeneralDiagnostics::Commands::TimeSnapshotResponse::DecodableType;
130
131
0
    static constexpr bool MustUseTimedInvoke() { return false; }
132
};
133
134
struct DecodableType
135
{
136
public:
137
0
    static constexpr CommandId GetCommandId() { return Commands::TimeSnapshot::Id; }
138
0
    static constexpr ClusterId GetClusterId() { return Clusters::GeneralDiagnostics::Id; }
139
    static constexpr bool kIsFabricScoped = false;
140
141
    CHIP_ERROR Decode(TLV::TLVReader & reader);
142
};
143
}; // namespace TimeSnapshot
144
namespace TimeSnapshotResponse {
145
enum class Fields : uint8_t
146
{
147
    kSystemTimeMs = 0,
148
    kPosixTimeMs  = 1,
149
};
150
151
struct Type
152
{
153
public:
154
    // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
155
0
    static constexpr CommandId GetCommandId() { return Commands::TimeSnapshotResponse::Id; }
156
0
    static constexpr ClusterId GetClusterId() { return Clusters::GeneralDiagnostics::Id; }
157
158
    uint64_t systemTimeMs = static_cast<uint64_t>(0);
159
    DataModel::Nullable<uint64_t> posixTimeMs;
160
161
    CHIP_ERROR Encode(DataModel::FabricAwareTLVWriter & aWriter, TLV::Tag aTag) const;
162
163
    using ResponseType = DataModel::NullObjectType;
164
165
0
    static constexpr bool MustUseTimedInvoke() { return false; }
166
};
167
168
struct DecodableType
169
{
170
public:
171
0
    static constexpr CommandId GetCommandId() { return Commands::TimeSnapshotResponse::Id; }
172
0
    static constexpr ClusterId GetClusterId() { return Clusters::GeneralDiagnostics::Id; }
173
174
    uint64_t systemTimeMs = static_cast<uint64_t>(0);
175
    DataModel::Nullable<uint64_t> posixTimeMs;
176
177
    CHIP_ERROR Decode(TLV::TLVReader & reader);
178
};
179
}; // namespace TimeSnapshotResponse
180
namespace PayloadTestRequest {
181
enum class Fields : uint8_t
182
{
183
    kEnableKey = 0,
184
    kValue     = 1,
185
    kCount     = 2,
186
};
187
188
struct Type
189
{
190
public:
191
    // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
192
0
    static constexpr CommandId GetCommandId() { return Commands::PayloadTestRequest::Id; }
193
0
    static constexpr ClusterId GetClusterId() { return Clusters::GeneralDiagnostics::Id; }
194
195
    chip::ByteSpan enableKey;
196
    uint8_t value  = static_cast<uint8_t>(0);
197
    uint16_t count = static_cast<uint16_t>(0);
198
199
    CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const;
200
201
    using ResponseType = Clusters::GeneralDiagnostics::Commands::PayloadTestResponse::DecodableType;
202
203
0
    static constexpr bool MustUseTimedInvoke() { return false; }
204
};
205
206
struct DecodableType
207
{
208
public:
209
0
    static constexpr CommandId GetCommandId() { return Commands::PayloadTestRequest::Id; }
210
0
    static constexpr ClusterId GetClusterId() { return Clusters::GeneralDiagnostics::Id; }
211
    static constexpr bool kIsFabricScoped = false;
212
213
    chip::ByteSpan enableKey;
214
    uint8_t value  = static_cast<uint8_t>(0);
215
    uint16_t count = static_cast<uint16_t>(0);
216
217
    CHIP_ERROR Decode(TLV::TLVReader & reader);
218
};
219
}; // namespace PayloadTestRequest
220
namespace PayloadTestResponse {
221
enum class Fields : uint8_t
222
{
223
    kPayload = 0,
224
};
225
226
struct Type
227
{
228
public:
229
    // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
230
0
    static constexpr CommandId GetCommandId() { return Commands::PayloadTestResponse::Id; }
231
0
    static constexpr ClusterId GetClusterId() { return Clusters::GeneralDiagnostics::Id; }
232
233
    chip::ByteSpan payload;
234
235
    CHIP_ERROR Encode(DataModel::FabricAwareTLVWriter & aWriter, TLV::Tag aTag) const;
236
237
    using ResponseType = DataModel::NullObjectType;
238
239
0
    static constexpr bool MustUseTimedInvoke() { return false; }
240
};
241
242
struct DecodableType
243
{
244
public:
245
0
    static constexpr CommandId GetCommandId() { return Commands::PayloadTestResponse::Id; }
246
0
    static constexpr ClusterId GetClusterId() { return Clusters::GeneralDiagnostics::Id; }
247
248
    chip::ByteSpan payload;
249
250
    CHIP_ERROR Decode(TLV::TLVReader & reader);
251
};
252
}; // namespace PayloadTestResponse
253
} // namespace Commands
254
} // namespace GeneralDiagnostics
255
} // namespace Clusters
256
} // namespace app
257
} // namespace chip