Coverage Report

Created: 2026-09-24 06:58

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/connectedhomeip/zzz_generated/app-common/clusters/DeviceEnergyManagementMode/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/DeviceEnergyManagementMode/ClusterId.h>
37
#include <clusters/DeviceEnergyManagementMode/CommandIds.h>
38
#include <clusters/DeviceEnergyManagementMode/Enums.h>
39
#include <clusters/DeviceEnergyManagementMode/Structs.h>
40
41
#include <cstdint>
42
43
namespace chip {
44
namespace app {
45
namespace Clusters {
46
namespace DeviceEnergyManagementMode {
47
namespace Commands {
48
// Forward-declarations so we can reference these later.
49
50
namespace ChangeToMode {
51
struct Type;
52
struct DecodableType;
53
} // namespace ChangeToMode
54
55
namespace ChangeToModeResponse {
56
struct Type;
57
struct DecodableType;
58
} // namespace ChangeToModeResponse
59
60
namespace ChangeToModeByCoreTag {
61
struct Type;
62
struct DecodableType;
63
} // namespace ChangeToModeByCoreTag
64
65
} // namespace Commands
66
67
namespace Commands {
68
namespace ChangeToMode {
69
enum class Fields : uint8_t
70
{
71
    kNewMode = 0,
72
};
73
74
struct Type
75
{
76
public:
77
    // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
78
0
    static constexpr CommandId GetCommandId() { return Commands::ChangeToMode::Id; }
79
0
    static constexpr ClusterId GetClusterId() { return Clusters::DeviceEnergyManagementMode::Id; }
80
81
    uint8_t newMode = static_cast<uint8_t>(0);
82
83
    CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const;
84
85
    using ResponseType = Clusters::DeviceEnergyManagementMode::Commands::ChangeToModeResponse::DecodableType;
86
87
0
    static constexpr bool MustUseTimedInvoke() { return false; }
88
};
89
90
struct DecodableType
91
{
92
public:
93
0
    static constexpr CommandId GetCommandId() { return Commands::ChangeToMode::Id; }
94
0
    static constexpr ClusterId GetClusterId() { return Clusters::DeviceEnergyManagementMode::Id; }
95
    static constexpr bool kIsFabricScoped = false;
96
97
    uint8_t newMode = static_cast<uint8_t>(0);
98
99
    CHIP_ERROR Decode(TLV::TLVReader & reader);
100
};
101
}; // namespace ChangeToMode
102
namespace ChangeToModeResponse {
103
enum class Fields : uint8_t
104
{
105
    kStatus     = 0,
106
    kStatusText = 1,
107
};
108
109
struct Type
110
{
111
public:
112
    // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
113
0
    static constexpr CommandId GetCommandId() { return Commands::ChangeToModeResponse::Id; }
114
0
    static constexpr ClusterId GetClusterId() { return Clusters::DeviceEnergyManagementMode::Id; }
115
116
    uint8_t status = static_cast<uint8_t>(0);
117
    Optional<chip::CharSpan> statusText;
118
119
    CHIP_ERROR Encode(DataModel::FabricAwareTLVWriter & aWriter, TLV::Tag aTag) const;
120
121
    using ResponseType = DataModel::NullObjectType;
122
123
0
    static constexpr bool MustUseTimedInvoke() { return false; }
124
};
125
126
struct DecodableType
127
{
128
public:
129
0
    static constexpr CommandId GetCommandId() { return Commands::ChangeToModeResponse::Id; }
130
0
    static constexpr ClusterId GetClusterId() { return Clusters::DeviceEnergyManagementMode::Id; }
131
132
    uint8_t status = static_cast<uint8_t>(0);
133
    Optional<chip::CharSpan> statusText;
134
135
    CHIP_ERROR Decode(TLV::TLVReader & reader);
136
};
137
}; // namespace ChangeToModeResponse
138
namespace ChangeToModeByCoreTag {
139
enum class Fields : uint8_t
140
{
141
    kNewModeTag = 0,
142
};
143
144
struct Type
145
{
146
public:
147
    // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
148
0
    static constexpr CommandId GetCommandId() { return Commands::ChangeToModeByCoreTag::Id; }
149
0
    static constexpr ClusterId GetClusterId() { return Clusters::DeviceEnergyManagementMode::Id; }
150
151
    uint16_t newModeTag = static_cast<uint16_t>(0);
152
153
    CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const;
154
155
    using ResponseType = Clusters::DeviceEnergyManagementMode::Commands::ChangeToModeResponse::DecodableType;
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::ChangeToModeByCoreTag::Id; }
164
0
    static constexpr ClusterId GetClusterId() { return Clusters::DeviceEnergyManagementMode::Id; }
165
    static constexpr bool kIsFabricScoped = false;
166
167
    uint16_t newModeTag = static_cast<uint16_t>(0);
168
169
    CHIP_ERROR Decode(TLV::TLVReader & reader);
170
};
171
}; // namespace ChangeToModeByCoreTag
172
} // namespace Commands
173
} // namespace DeviceEnergyManagementMode
174
} // namespace Clusters
175
} // namespace app
176
} // namespace chip