/src/connectedhomeip/zzz_generated/app-common/clusters/ElectricalAlarm/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/ElectricalAlarm/ClusterId.h> |
37 | | #include <clusters/ElectricalAlarm/CommandIds.h> |
38 | | #include <clusters/ElectricalAlarm/Enums.h> |
39 | | #include <clusters/ElectricalAlarm/Structs.h> |
40 | | |
41 | | #include <cstdint> |
42 | | |
43 | | namespace chip { |
44 | | namespace app { |
45 | | namespace Clusters { |
46 | | namespace ElectricalAlarm { |
47 | | namespace Commands { |
48 | | // Forward-declarations so we can reference these later. |
49 | | |
50 | | namespace Reset { |
51 | | struct Type; |
52 | | struct DecodableType; |
53 | | } // namespace Reset |
54 | | |
55 | | namespace ModifyEnabledAlarms { |
56 | | struct Type; |
57 | | struct DecodableType; |
58 | | } // namespace ModifyEnabledAlarms |
59 | | |
60 | | namespace SetElectricalAlarmThresholds { |
61 | | struct Type; |
62 | | struct DecodableType; |
63 | | } // namespace SetElectricalAlarmThresholds |
64 | | |
65 | | } // namespace Commands |
66 | | |
67 | | namespace Commands { |
68 | | namespace Reset { |
69 | | enum class Fields : uint8_t |
70 | | { |
71 | | kAlarms = 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::Reset::Id; } |
79 | 0 | static constexpr ClusterId GetClusterId() { return Clusters::ElectricalAlarm::Id; } |
80 | | |
81 | | chip::BitMask<AlarmBitmap> alarms = static_cast<chip::BitMask<AlarmBitmap>>(0); |
82 | | |
83 | | CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; |
84 | | |
85 | | using ResponseType = DataModel::NullObjectType; |
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::Reset::Id; } |
94 | 0 | static constexpr ClusterId GetClusterId() { return Clusters::ElectricalAlarm::Id; } |
95 | | static constexpr bool kIsFabricScoped = false; |
96 | | |
97 | | chip::BitMask<AlarmBitmap> alarms = static_cast<chip::BitMask<AlarmBitmap>>(0); |
98 | | |
99 | | CHIP_ERROR Decode(TLV::TLVReader & reader); |
100 | | }; |
101 | | }; // namespace Reset |
102 | | namespace ModifyEnabledAlarms { |
103 | | enum class Fields : uint8_t |
104 | | { |
105 | | kMask = 0, |
106 | | }; |
107 | | |
108 | | struct Type |
109 | | { |
110 | | public: |
111 | | // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand |
112 | 0 | static constexpr CommandId GetCommandId() { return Commands::ModifyEnabledAlarms::Id; } |
113 | 0 | static constexpr ClusterId GetClusterId() { return Clusters::ElectricalAlarm::Id; } |
114 | | |
115 | | chip::BitMask<AlarmBitmap> mask = static_cast<chip::BitMask<AlarmBitmap>>(0); |
116 | | |
117 | | CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; |
118 | | |
119 | | using ResponseType = DataModel::NullObjectType; |
120 | | |
121 | 0 | static constexpr bool MustUseTimedInvoke() { return false; } |
122 | | }; |
123 | | |
124 | | struct DecodableType |
125 | | { |
126 | | public: |
127 | 0 | static constexpr CommandId GetCommandId() { return Commands::ModifyEnabledAlarms::Id; } |
128 | 0 | static constexpr ClusterId GetClusterId() { return Clusters::ElectricalAlarm::Id; } |
129 | | static constexpr bool kIsFabricScoped = false; |
130 | | |
131 | | chip::BitMask<AlarmBitmap> mask = static_cast<chip::BitMask<AlarmBitmap>>(0); |
132 | | |
133 | | CHIP_ERROR Decode(TLV::TLVReader & reader); |
134 | | }; |
135 | | }; // namespace ModifyEnabledAlarms |
136 | | namespace SetElectricalAlarmThresholds { |
137 | | enum class Fields : uint8_t |
138 | | { |
139 | | kOverVoltageThreshold = 0, |
140 | | kUnderVoltageThreshold = 1, |
141 | | kOverFrequencyThreshold = 2, |
142 | | kUnderFrequencyThreshold = 3, |
143 | | kOverPowerThreshold = 4, |
144 | | kUnderPowerThreshold = 5, |
145 | | kOverCurrentThreshold = 6, |
146 | | kUnderCurrentThreshold = 7, |
147 | | kPowerImportThreshold = 8, |
148 | | kPowerExportThreshold = 9, |
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::SetElectricalAlarmThresholds::Id; } |
156 | 0 | static constexpr ClusterId GetClusterId() { return Clusters::ElectricalAlarm::Id; } |
157 | | |
158 | | Optional<int64_t> overVoltageThreshold; |
159 | | Optional<int64_t> underVoltageThreshold; |
160 | | Optional<int64_t> overFrequencyThreshold; |
161 | | Optional<int64_t> underFrequencyThreshold; |
162 | | Optional<int64_t> overPowerThreshold; |
163 | | Optional<int64_t> underPowerThreshold; |
164 | | Optional<int64_t> overCurrentThreshold; |
165 | | Optional<int64_t> underCurrentThreshold; |
166 | | Optional<int64_t> powerImportThreshold; |
167 | | Optional<int64_t> powerExportThreshold; |
168 | | |
169 | | CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; |
170 | | |
171 | | using ResponseType = DataModel::NullObjectType; |
172 | | |
173 | 0 | static constexpr bool MustUseTimedInvoke() { return false; } |
174 | | }; |
175 | | |
176 | | struct DecodableType |
177 | | { |
178 | | public: |
179 | 0 | static constexpr CommandId GetCommandId() { return Commands::SetElectricalAlarmThresholds::Id; } |
180 | 0 | static constexpr ClusterId GetClusterId() { return Clusters::ElectricalAlarm::Id; } |
181 | | static constexpr bool kIsFabricScoped = false; |
182 | | |
183 | | Optional<int64_t> overVoltageThreshold; |
184 | | Optional<int64_t> underVoltageThreshold; |
185 | | Optional<int64_t> overFrequencyThreshold; |
186 | | Optional<int64_t> underFrequencyThreshold; |
187 | | Optional<int64_t> overPowerThreshold; |
188 | | Optional<int64_t> underPowerThreshold; |
189 | | Optional<int64_t> overCurrentThreshold; |
190 | | Optional<int64_t> underCurrentThreshold; |
191 | | Optional<int64_t> powerImportThreshold; |
192 | | Optional<int64_t> powerExportThreshold; |
193 | | |
194 | | CHIP_ERROR Decode(TLV::TLVReader & reader); |
195 | | }; |
196 | | }; // namespace SetElectricalAlarmThresholds |
197 | | } // namespace Commands |
198 | | } // namespace ElectricalAlarm |
199 | | } // namespace Clusters |
200 | | } // namespace app |
201 | | } // namespace chip |