Coverage Report

Created: 2025-06-20 06:55

/src/connectedhomeip/zzz_generated/app-common/clusters/OnOff/Commands.h
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.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/OnOff/ClusterId.h>
37
#include <clusters/OnOff/CommandIds.h>
38
#include <clusters/OnOff/Enums.h>
39
#include <clusters/OnOff/Structs.h>
40
41
#include <cstdint>
42
43
namespace chip {
44
namespace app {
45
namespace Clusters {
46
namespace OnOff {
47
namespace Commands {
48
// Forward-declarations so we can reference these later.
49
50
namespace Off {
51
struct Type;
52
struct DecodableType;
53
} // namespace Off
54
55
namespace On {
56
struct Type;
57
struct DecodableType;
58
} // namespace On
59
60
namespace Toggle {
61
struct Type;
62
struct DecodableType;
63
} // namespace Toggle
64
65
namespace OffWithEffect {
66
struct Type;
67
struct DecodableType;
68
} // namespace OffWithEffect
69
70
namespace OnWithRecallGlobalScene {
71
struct Type;
72
struct DecodableType;
73
} // namespace OnWithRecallGlobalScene
74
75
namespace OnWithTimedOff {
76
struct Type;
77
struct DecodableType;
78
} // namespace OnWithTimedOff
79
80
} // namespace Commands
81
82
namespace Commands {
83
namespace Off {
84
enum class Fields : uint8_t
85
{
86
};
87
88
struct Type
89
{
90
public:
91
    // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
92
0
    static constexpr CommandId GetCommandId() { return Commands::Off::Id; }
93
0
    static constexpr ClusterId GetClusterId() { return Clusters::OnOff::Id; }
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::Off::Id; }
106
0
    static constexpr ClusterId GetClusterId() { return Clusters::OnOff::Id; }
107
    static constexpr bool kIsFabricScoped = false;
108
109
    CHIP_ERROR Decode(TLV::TLVReader & reader);
110
};
111
}; // namespace Off
112
namespace On {
113
enum class Fields : uint8_t
114
{
115
};
116
117
struct Type
118
{
119
public:
120
    // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
121
0
    static constexpr CommandId GetCommandId() { return Commands::On::Id; }
122
0
    static constexpr ClusterId GetClusterId() { return Clusters::OnOff::Id; }
123
124
    CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const;
125
126
    using ResponseType = DataModel::NullObjectType;
127
128
0
    static constexpr bool MustUseTimedInvoke() { return false; }
129
};
130
131
struct DecodableType
132
{
133
public:
134
0
    static constexpr CommandId GetCommandId() { return Commands::On::Id; }
135
0
    static constexpr ClusterId GetClusterId() { return Clusters::OnOff::Id; }
136
    static constexpr bool kIsFabricScoped = false;
137
138
    CHIP_ERROR Decode(TLV::TLVReader & reader);
139
};
140
}; // namespace On
141
namespace Toggle {
142
enum class Fields : uint8_t
143
{
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::Toggle::Id; }
151
0
    static constexpr ClusterId GetClusterId() { return Clusters::OnOff::Id; }
152
153
    CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const;
154
155
    using ResponseType = DataModel::NullObjectType;
156
157
0
    static constexpr bool MustUseTimedInvoke() { return false; }
158
};
159
160
struct DecodableType
161
{
162
public:
163
0
    static constexpr CommandId GetCommandId() { return Commands::Toggle::Id; }
164
0
    static constexpr ClusterId GetClusterId() { return Clusters::OnOff::Id; }
165
    static constexpr bool kIsFabricScoped = false;
166
167
    CHIP_ERROR Decode(TLV::TLVReader & reader);
168
};
169
}; // namespace Toggle
170
namespace OffWithEffect {
171
enum class Fields : uint8_t
172
{
173
    kEffectIdentifier = 0,
174
    kEffectVariant    = 1,
175
};
176
177
struct Type
178
{
179
public:
180
    // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
181
0
    static constexpr CommandId GetCommandId() { return Commands::OffWithEffect::Id; }
182
0
    static constexpr ClusterId GetClusterId() { return Clusters::OnOff::Id; }
183
184
    EffectIdentifierEnum effectIdentifier = static_cast<EffectIdentifierEnum>(0);
185
    uint8_t effectVariant                 = static_cast<uint8_t>(0);
186
187
    CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const;
188
189
    using ResponseType = DataModel::NullObjectType;
190
191
0
    static constexpr bool MustUseTimedInvoke() { return false; }
192
};
193
194
struct DecodableType
195
{
196
public:
197
0
    static constexpr CommandId GetCommandId() { return Commands::OffWithEffect::Id; }
198
0
    static constexpr ClusterId GetClusterId() { return Clusters::OnOff::Id; }
199
    static constexpr bool kIsFabricScoped = false;
200
201
    EffectIdentifierEnum effectIdentifier = static_cast<EffectIdentifierEnum>(0);
202
    uint8_t effectVariant                 = static_cast<uint8_t>(0);
203
204
    CHIP_ERROR Decode(TLV::TLVReader & reader);
205
};
206
}; // namespace OffWithEffect
207
namespace OnWithRecallGlobalScene {
208
enum class Fields : uint8_t
209
{
210
};
211
212
struct Type
213
{
214
public:
215
    // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
216
0
    static constexpr CommandId GetCommandId() { return Commands::OnWithRecallGlobalScene::Id; }
217
0
    static constexpr ClusterId GetClusterId() { return Clusters::OnOff::Id; }
218
219
    CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const;
220
221
    using ResponseType = DataModel::NullObjectType;
222
223
0
    static constexpr bool MustUseTimedInvoke() { return false; }
224
};
225
226
struct DecodableType
227
{
228
public:
229
0
    static constexpr CommandId GetCommandId() { return Commands::OnWithRecallGlobalScene::Id; }
230
0
    static constexpr ClusterId GetClusterId() { return Clusters::OnOff::Id; }
231
    static constexpr bool kIsFabricScoped = false;
232
233
    CHIP_ERROR Decode(TLV::TLVReader & reader);
234
};
235
}; // namespace OnWithRecallGlobalScene
236
namespace OnWithTimedOff {
237
enum class Fields : uint8_t
238
{
239
    kOnOffControl = 0,
240
    kOnTime       = 1,
241
    kOffWaitTime  = 2,
242
};
243
244
struct Type
245
{
246
public:
247
    // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
248
0
    static constexpr CommandId GetCommandId() { return Commands::OnWithTimedOff::Id; }
249
0
    static constexpr ClusterId GetClusterId() { return Clusters::OnOff::Id; }
250
251
    chip::BitMask<OnOffControlBitmap> onOffControl = static_cast<chip::BitMask<OnOffControlBitmap>>(0);
252
    uint16_t onTime                                = static_cast<uint16_t>(0);
253
    uint16_t offWaitTime                           = static_cast<uint16_t>(0);
254
255
    CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const;
256
257
    using ResponseType = DataModel::NullObjectType;
258
259
0
    static constexpr bool MustUseTimedInvoke() { return false; }
260
};
261
262
struct DecodableType
263
{
264
public:
265
0
    static constexpr CommandId GetCommandId() { return Commands::OnWithTimedOff::Id; }
266
0
    static constexpr ClusterId GetClusterId() { return Clusters::OnOff::Id; }
267
    static constexpr bool kIsFabricScoped = false;
268
269
    chip::BitMask<OnOffControlBitmap> onOffControl = static_cast<chip::BitMask<OnOffControlBitmap>>(0);
270
    uint16_t onTime                                = static_cast<uint16_t>(0);
271
    uint16_t offWaitTime                           = static_cast<uint16_t>(0);
272
273
    CHIP_ERROR Decode(TLV::TLVReader & reader);
274
};
275
}; // namespace OnWithTimedOff
276
} // namespace Commands
277
} // namespace OnOff
278
} // namespace Clusters
279
} // namespace app
280
} // namespace chip