blob: 360851c62e2477d713c25ed5f288f278b4ef7574 [file] [log] [blame]
Matt Spinler8f5e6112021-01-15 10:44:32 -06001#pragma once
2
Tao Linf2e94222023-10-31 17:38:17 +08003#include "dbusUtils.hpp"
4
Matt Spinler8f5e6112021-01-15 10:44:32 -06005#include <xyz/openbmc_project/Sensor/Threshold/Critical/server.hpp>
6#include <xyz/openbmc_project/Sensor/Threshold/HardShutdown/server.hpp>
Matt Spinlerb306b032021-02-01 10:05:46 -06007#include <xyz/openbmc_project/Sensor/Threshold/PerformanceLoss/server.hpp>
Matt Spinler8f5e6112021-01-15 10:44:32 -06008#include <xyz/openbmc_project/Sensor/Threshold/SoftShutdown/server.hpp>
9#include <xyz/openbmc_project/Sensor/Threshold/Warning/server.hpp>
Amithash Prasad7d2f3232025-06-02 20:31:48 -070010#include <xyz/openbmc_project/Sensor/Value/server.hpp>
Matt Spinler8f5e6112021-01-15 10:44:32 -060011
Tao Linf2e94222023-10-31 17:38:17 +080012const constexpr char* entityManagerBusName =
13 "xyz.openbmc_project.EntityManager";
14namespace phosphor::virtual_sensor
Matt Spinler8f5e6112021-01-15 10:44:32 -060015{
16
17template <typename... T>
Patrick Williams8e11ccc2022-07-22 19:26:57 -050018using ServerObject = typename sdbusplus::server::object_t<T...>;
Matt Spinler8f5e6112021-01-15 10:44:32 -060019
Patrick Williamsfdb826d2021-01-20 14:37:53 -060020namespace threshold_ns =
21 sdbusplus::xyz::openbmc_project::Sensor::Threshold::server;
Amithash Prasad7d2f3232025-06-02 20:31:48 -070022using Unit = sdbusplus::xyz::openbmc_project::Sensor::server::Value::Unit;
Patrick Williamsfdb826d2021-01-20 14:37:53 -060023using CriticalObject = ServerObject<threshold_ns::Critical>;
24using WarningObject = ServerObject<threshold_ns::Warning>;
25using SoftShutdownObject = ServerObject<threshold_ns::SoftShutdown>;
26using HardShutdownObject = ServerObject<threshold_ns::HardShutdown>;
Matt Spinlerb306b032021-02-01 10:05:46 -060027using PerformanceLossObject = ServerObject<threshold_ns::PerformanceLoss>;
Matt Spinler8f5e6112021-01-15 10:44:32 -060028
29template <typename T>
Patrick Williamsfdb826d2021-01-20 14:37:53 -060030struct Threshold;
Matt Spinler8f5e6112021-01-15 10:44:32 -060031
Rashmica Gupta1dff7dc2021-07-27 19:43:31 +100032struct Hysteresis
33{
34 double highHysteresis;
35 double lowHysteresis;
36 auto getHighHysteresis()
37 {
38 return this->highHysteresis;
39 }
40
41 auto getLowHysteresis()
42 {
43 return this->lowHysteresis;
44 }
45
46 auto setHighHysteresis(double value)
47 {
48 this->highHysteresis = value;
49 }
50
51 auto setLowHysteresis(double value)
52 {
53 this->lowHysteresis = value;
54 }
55};
56
Matt Spinler8f5e6112021-01-15 10:44:32 -060057template <>
Rashmica Gupta1dff7dc2021-07-27 19:43:31 +100058struct Threshold<WarningObject> : public WarningObject, public Hysteresis
Matt Spinler8f5e6112021-01-15 10:44:32 -060059{
Patrick Williamsfdb826d2021-01-20 14:37:53 -060060 static constexpr auto name = "Warning";
61 using WarningObject::WarningObject;
Tao Lin91799db2022-07-27 21:02:20 +080062 /** @brief sdbusplus bus client connection. */
Patrick Williams83e3ac32022-11-26 09:41:58 -060063 sdbusplus::bus_t& bus;
Tao Lin91799db2022-07-27 21:02:20 +080064 std::string objPath;
Amithash Prasad7d2f3232025-06-02 20:31:48 -070065 Unit units;
Tao Lin91799db2022-07-27 21:02:20 +080066
67 /** @brief Virtual sensor path/interface in entityManagerDbus.
68 * This 3 value is used to set thresholds
69 */
70 std::string entityPath;
71 std::string entityInterfaceHigh;
72 std::string entityInterfaceLow;
73
74 /** @brief Constructor to put object onto bus at a dbus path.
75 * @param[in] bus - Bus to attach to.
76 * @param[in] path - Path to attach at.
Amithash Prasad7d2f3232025-06-02 20:31:48 -070077 * @param[in] units - units
Tao Lin91799db2022-07-27 21:02:20 +080078 */
Amithash Prasad7d2f3232025-06-02 20:31:48 -070079 Threshold(sdbusplus::bus_t& bus, const char* path, Unit units) :
80 WarningObject(bus, path), bus(bus), objPath(std::string(path)),
81 units(units)
Tao Lin91799db2022-07-27 21:02:20 +080082 {}
Patrick Williamsfdb826d2021-01-20 14:37:53 -060083
84 auto high()
Matt Spinler8f5e6112021-01-15 10:44:32 -060085 {
Tao Lin91799db2022-07-27 21:02:20 +080086 return WarningObject::warningHigh();
Matt Spinler8f5e6112021-01-15 10:44:32 -060087 }
Patrick Williamsfdb826d2021-01-20 14:37:53 -060088 auto low()
Matt Spinler8f5e6112021-01-15 10:44:32 -060089 {
Tao Lin91799db2022-07-27 21:02:20 +080090 return WarningObject::warningLow();
Matt Spinler8f5e6112021-01-15 10:44:32 -060091 }
92
Patrick Williamsfdb826d2021-01-20 14:37:53 -060093 template <typename... Args>
94 auto alarmHigh(Args... args)
Matt Spinler8f5e6112021-01-15 10:44:32 -060095 {
Patrick Williamsfdb826d2021-01-20 14:37:53 -060096 return warningAlarmHigh(std::forward<Args>(args)...);
Matt Spinler8f5e6112021-01-15 10:44:32 -060097 }
98
Patrick Williamsfdb826d2021-01-20 14:37:53 -060099 template <typename... Args>
100 auto alarmLow(Args... args)
Matt Spinler8f5e6112021-01-15 10:44:32 -0600101 {
Patrick Williamsfdb826d2021-01-20 14:37:53 -0600102 return warningAlarmLow(std::forward<Args>(args)...);
Matt Spinler8f5e6112021-01-15 10:44:32 -0600103 }
George Hung4294e6d2021-04-14 20:58:21 +0800104
105 template <typename... Args>
106 auto alarmHighSignalAsserted(Args... args)
107 {
108 return warningHighAlarmAsserted(std::forward<Args>(args)...);
109 }
110
111 template <typename... Args>
112 auto alarmHighSignalDeasserted(Args... args)
113 {
114 return warningHighAlarmDeasserted(std::forward<Args>(args)...);
115 }
116
117 template <typename... Args>
118 auto alarmLowSignalAsserted(Args... args)
119 {
120 return warningLowAlarmAsserted(std::forward<Args>(args)...);
121 }
122
123 template <typename... Args>
124 auto alarmLowSignalDeasserted(Args... args)
125 {
126 return warningLowAlarmDeasserted(std::forward<Args>(args)...);
127 }
Tao Lin91799db2022-07-27 21:02:20 +0800128
129 /** @brief Set value of WarningHigh */
130 virtual double warningHigh(double value)
131 {
Matt Spinlera291ce12023-02-06 15:12:44 -0600132 if (!entityPath.empty() && !entityInterfaceHigh.empty())
133 {
134 // persistThreshold
135 setDbusProperty(bus, entityManagerBusName, entityPath,
136 entityInterfaceHigh, "Value", value);
137 }
Tao Lin91799db2022-07-27 21:02:20 +0800138 return WarningObject::warningHigh(value);
139 }
140
141 /** @brief Set value of WarningLow */
142 virtual double warningLow(double value)
143 {
Matt Spinlera291ce12023-02-06 15:12:44 -0600144 if (!entityPath.empty() && !entityInterfaceLow.empty())
145 {
146 // persistThreshold
147 setDbusProperty(bus, entityManagerBusName, entityPath,
148 entityInterfaceLow, "Value", value);
149 }
Tao Lin91799db2022-07-27 21:02:20 +0800150 return WarningObject::warningLow(value);
151 }
152
153 /** @brief Set the entitymanager interface corresponding to virtualsensor
154 * warningLow
155 */
156 void setEntityInterfaceLow(const std::string& interfaceLow)
157 {
158 entityInterfaceLow = interfaceLow;
159 }
160
161 /** @brief Set the entitymanager interface corresponding to virtualsensor
162 * warningHigh
163 */
164 void setEntityInterfaceHigh(const std::string& interfaceHigh)
165 {
166 entityInterfaceHigh = interfaceHigh;
167 }
168
169 /** @brief Set the entitymanager path corresponding to virtualsensor warning
170 */
171 void setEntityPath(const std::string& path)
172 {
173 entityPath = path;
174 }
Matt Spinler8f5e6112021-01-15 10:44:32 -0600175};
176
177template <>
Rashmica Gupta1dff7dc2021-07-27 19:43:31 +1000178struct Threshold<CriticalObject> : public CriticalObject, public Hysteresis
Matt Spinler8f5e6112021-01-15 10:44:32 -0600179{
Patrick Williamsfdb826d2021-01-20 14:37:53 -0600180 static constexpr auto name = "Critical";
Tao Lin91799db2022-07-27 21:02:20 +0800181
182 /** @brief sdbusplus bus client connection. */
Patrick Williams83e3ac32022-11-26 09:41:58 -0600183 sdbusplus::bus_t& bus;
Tao Lin91799db2022-07-27 21:02:20 +0800184 std::string objPath;
Amithash Prasad7d2f3232025-06-02 20:31:48 -0700185 Unit units;
Tao Lin91799db2022-07-27 21:02:20 +0800186
187 /** @brief Virtual sensor path/interface in entityManagerDbus.
188 * This 3 value is used to set thresholds
189 */
190 std::string entityPath;
191 std::string entityInterfaceHigh;
192 std::string entityInterfaceLow;
193
Patrick Williamsfdb826d2021-01-20 14:37:53 -0600194 using CriticalObject::CriticalObject;
195
Tao Lin91799db2022-07-27 21:02:20 +0800196 /** @brief Constructor to put object onto bus at a dbus path.
197 * @param[in] bus - Bus to attach to.
198 * @param[in] path - Path to attach at.
Amithash Prasad7d2f3232025-06-02 20:31:48 -0700199 * @param[in] units - units
Tao Lin91799db2022-07-27 21:02:20 +0800200 */
Amithash Prasad7d2f3232025-06-02 20:31:48 -0700201 Threshold(sdbusplus::bus_t& bus, const char* path, Unit units) :
202 CriticalObject(bus, path), bus(bus), objPath(std::string(path)),
203 units(units)
Tao Lin91799db2022-07-27 21:02:20 +0800204 {}
205
Patrick Williamsfdb826d2021-01-20 14:37:53 -0600206 auto high()
Matt Spinler8f5e6112021-01-15 10:44:32 -0600207 {
Tao Lin91799db2022-07-27 21:02:20 +0800208 return CriticalObject::criticalHigh();
Matt Spinler8f5e6112021-01-15 10:44:32 -0600209 }
Patrick Williamsfdb826d2021-01-20 14:37:53 -0600210 auto low()
Matt Spinler8f5e6112021-01-15 10:44:32 -0600211 {
Tao Lin91799db2022-07-27 21:02:20 +0800212 return CriticalObject::criticalLow();
Matt Spinler8f5e6112021-01-15 10:44:32 -0600213 }
214
Patrick Williamsfdb826d2021-01-20 14:37:53 -0600215 template <typename... Args>
216 auto alarmHigh(Args... args)
Matt Spinler8f5e6112021-01-15 10:44:32 -0600217 {
Patrick Williamsfdb826d2021-01-20 14:37:53 -0600218 return criticalAlarmHigh(std::forward<Args>(args)...);
Matt Spinler8f5e6112021-01-15 10:44:32 -0600219 }
220
Patrick Williamsfdb826d2021-01-20 14:37:53 -0600221 template <typename... Args>
222 auto alarmLow(Args... args)
Matt Spinler8f5e6112021-01-15 10:44:32 -0600223 {
Patrick Williamsfdb826d2021-01-20 14:37:53 -0600224 return criticalAlarmLow(std::forward<Args>(args)...);
Matt Spinler8f5e6112021-01-15 10:44:32 -0600225 }
George Hung4294e6d2021-04-14 20:58:21 +0800226
227 template <typename... Args>
228 auto alarmHighSignalAsserted(Args... args)
229 {
230 return criticalHighAlarmAsserted(std::forward<Args>(args)...);
231 }
232
233 template <typename... Args>
234 auto alarmHighSignalDeasserted(Args... args)
235 {
236 return criticalHighAlarmDeasserted(std::forward<Args>(args)...);
237 }
238
239 template <typename... Args>
240 auto alarmLowSignalAsserted(Args... args)
241 {
242 return criticalLowAlarmAsserted(std::forward<Args>(args)...);
243 }
244
245 template <typename... Args>
246 auto alarmLowSignalDeasserted(Args... args)
247 {
248 return criticalLowAlarmDeasserted(std::forward<Args>(args)...);
249 }
Tao Lin91799db2022-07-27 21:02:20 +0800250
251 /** @brief Set value of CriticalHigh */
252 virtual double criticalHigh(double value)
253 {
254 // persistThreshold
Matt Spinlera291ce12023-02-06 15:12:44 -0600255 if (!entityPath.empty() && !entityInterfaceHigh.empty())
256 {
257 setDbusProperty(bus, entityManagerBusName, entityPath,
258 entityInterfaceHigh, "Value", value);
259 }
Tao Lin91799db2022-07-27 21:02:20 +0800260 return CriticalObject::criticalHigh(value);
261 }
262
263 /** @brief Set value of CriticalLow */
264 virtual double criticalLow(double value)
265 {
Matt Spinlera291ce12023-02-06 15:12:44 -0600266 if (!entityPath.empty() && !entityInterfaceLow.empty())
267 {
268 setDbusProperty(bus, entityManagerBusName, entityPath,
269 entityInterfaceLow, "Value", value);
270 }
Tao Lin91799db2022-07-27 21:02:20 +0800271 return CriticalObject::criticalLow(value);
272 }
273
274 /** @brief Set the entitymanager interface corresponding to virtualsensor
275 * criticalLow
276 */
277 void setEntityInterfaceLow(const std::string& interfaceLow)
278 {
279 entityInterfaceLow = interfaceLow;
280 }
281
282 /** @brief Set the entitymanager interface corresponding to virtualsensor
283 * criticalLow
284 */
285 void setEntityInterfaceHigh(const std::string& interfaceHigh)
286 {
287 entityInterfaceHigh = interfaceHigh;
288 }
289
290 /** @brief Set the entitymanager path corresponding to virtualsensor warning
291 */
292 void setEntityPath(const std::string& path)
293 {
294 entityPath = path;
295 }
Matt Spinler8f5e6112021-01-15 10:44:32 -0600296};
297
298template <>
Rashmica Gupta1dff7dc2021-07-27 19:43:31 +1000299struct Threshold<SoftShutdownObject> :
300 public SoftShutdownObject,
301 public Hysteresis
Matt Spinler8f5e6112021-01-15 10:44:32 -0600302{
Patrick Williamsfdb826d2021-01-20 14:37:53 -0600303 static constexpr auto name = "SoftShutdown";
304 using SoftShutdownObject::SoftShutdownObject;
Amithash Prasad7d2f3232025-06-02 20:31:48 -0700305 /** @brief sdbusplus bus client connection. */
306 sdbusplus::bus_t& bus;
307 std::string objPath;
308 Unit units;
309
310 /** @brief Constructor to put object onto bus at a dbus path.
311 * @param[in] bus - Bus to attach to.
312 * @param[in] path - Path to attach at.
313 * @param[in] units - units
314 */
315 Threshold(sdbusplus::bus_t& bus, const char* path, Unit units) :
316 SoftShutdownObject(bus, path), bus(bus), objPath(std::string(path)),
317 units(units)
318 {}
Patrick Williamsfdb826d2021-01-20 14:37:53 -0600319
320 auto high()
Matt Spinler8f5e6112021-01-15 10:44:32 -0600321 {
Patrick Williamsfdb826d2021-01-20 14:37:53 -0600322 return softShutdownHigh();
Matt Spinler8f5e6112021-01-15 10:44:32 -0600323 }
Patrick Williamsfdb826d2021-01-20 14:37:53 -0600324 auto low()
Matt Spinler8f5e6112021-01-15 10:44:32 -0600325 {
Patrick Williamsfdb826d2021-01-20 14:37:53 -0600326 return softShutdownLow();
Matt Spinler8f5e6112021-01-15 10:44:32 -0600327 }
328
Patrick Williamsfdb826d2021-01-20 14:37:53 -0600329 template <typename... Args>
330 auto alarmHigh(Args... args)
Matt Spinler8f5e6112021-01-15 10:44:32 -0600331 {
Patrick Williamsfdb826d2021-01-20 14:37:53 -0600332 return softShutdownAlarmHigh(std::forward<Args>(args)...);
Matt Spinler8f5e6112021-01-15 10:44:32 -0600333 }
334
Patrick Williamsfdb826d2021-01-20 14:37:53 -0600335 template <typename... Args>
336 auto alarmLow(Args... args)
Matt Spinler8f5e6112021-01-15 10:44:32 -0600337 {
Patrick Williamsfdb826d2021-01-20 14:37:53 -0600338 return softShutdownAlarmLow(std::forward<Args>(args)...);
Matt Spinler8f5e6112021-01-15 10:44:32 -0600339 }
George Hung4294e6d2021-04-14 20:58:21 +0800340
341 template <typename... Args>
342 auto alarmHighSignalAsserted(Args... args)
343 {
344 return softShutdownHighAlarmAsserted(std::forward<Args>(args)...);
345 }
346
347 template <typename... Args>
348 auto alarmHighSignalDeasserted(Args... args)
349 {
350 return softShutdownHighAlarmDeasserted(std::forward<Args>(args)...);
351 }
352
353 template <typename... Args>
354 auto alarmLowSignalAsserted(Args... args)
355 {
356 return softShutdownLowAlarmAsserted(std::forward<Args>(args)...);
357 }
358
359 template <typename... Args>
360 auto alarmLowSignalDeasserted(Args... args)
361 {
362 return softShutdownLowAlarmDeasserted(std::forward<Args>(args)...);
363 }
Matt Spinler8f5e6112021-01-15 10:44:32 -0600364};
365
366template <>
Rashmica Gupta1dff7dc2021-07-27 19:43:31 +1000367struct Threshold<HardShutdownObject> :
368 public HardShutdownObject,
369 public Hysteresis
Matt Spinler8f5e6112021-01-15 10:44:32 -0600370{
Patrick Williamsfdb826d2021-01-20 14:37:53 -0600371 static constexpr auto name = "HardShutdown";
Amithash Prasad7d2f3232025-06-02 20:31:48 -0700372 /** @brief sdbusplus bus client connection. */
373 sdbusplus::bus_t& bus;
374 std::string objPath;
375 Unit units;
376
Patrick Williamsfdb826d2021-01-20 14:37:53 -0600377 using HardShutdownObject::HardShutdownObject;
378
Amithash Prasad7d2f3232025-06-02 20:31:48 -0700379 /** @brief Constructor to put object onto bus at a dbus path.
380 * @param[in] bus - Bus to attach to.
381 * @param[in] path - Path to attach at.
382 * @param[in] units - units
383 */
384 Threshold(sdbusplus::bus_t& bus, const char* path, Unit units) :
385 HardShutdownObject(bus, path), bus(bus), objPath(std::string(path)),
386 units(units)
387 {}
388
Patrick Williamsfdb826d2021-01-20 14:37:53 -0600389 auto high()
Matt Spinler8f5e6112021-01-15 10:44:32 -0600390 {
Patrick Williamsfdb826d2021-01-20 14:37:53 -0600391 return hardShutdownHigh();
Matt Spinler8f5e6112021-01-15 10:44:32 -0600392 }
Patrick Williamsfdb826d2021-01-20 14:37:53 -0600393 auto low()
Matt Spinler8f5e6112021-01-15 10:44:32 -0600394 {
Patrick Williamsfdb826d2021-01-20 14:37:53 -0600395 return hardShutdownLow();
Matt Spinler8f5e6112021-01-15 10:44:32 -0600396 }
397
Patrick Williamsfdb826d2021-01-20 14:37:53 -0600398 template <typename... Args>
399 auto alarmHigh(Args... args)
Matt Spinler8f5e6112021-01-15 10:44:32 -0600400 {
Patrick Williamsfdb826d2021-01-20 14:37:53 -0600401 return hardShutdownAlarmHigh(std::forward<Args>(args)...);
Matt Spinler8f5e6112021-01-15 10:44:32 -0600402 }
403
Patrick Williamsfdb826d2021-01-20 14:37:53 -0600404 template <typename... Args>
405 auto alarmLow(Args... args)
Matt Spinler8f5e6112021-01-15 10:44:32 -0600406 {
Patrick Williamsfdb826d2021-01-20 14:37:53 -0600407 return hardShutdownAlarmLow(std::forward<Args>(args)...);
Matt Spinler8f5e6112021-01-15 10:44:32 -0600408 }
George Hung4294e6d2021-04-14 20:58:21 +0800409
410 template <typename... Args>
411 auto alarmHighSignalAsserted(Args... args)
412 {
413 return hardShutdownHighAlarmAsserted(std::forward<Args>(args)...);
414 }
415
416 template <typename... Args>
417 auto alarmHighSignalDeasserted(Args... args)
418 {
419 return hardShutdownHighAlarmDeasserted(std::forward<Args>(args)...);
420 }
421
422 template <typename... Args>
423 auto alarmLowSignalAsserted(Args... args)
424 {
425 return hardShutdownLowAlarmAsserted(std::forward<Args>(args)...);
426 }
427
428 template <typename... Args>
429 auto alarmLowSignalDeasserted(Args... args)
430 {
431 return hardShutdownLowAlarmDeasserted(std::forward<Args>(args)...);
432 }
Matt Spinler8f5e6112021-01-15 10:44:32 -0600433};
434
Matt Spinlerb306b032021-02-01 10:05:46 -0600435template <>
Rashmica Gupta1dff7dc2021-07-27 19:43:31 +1000436struct Threshold<PerformanceLossObject> :
437 public PerformanceLossObject,
438 public Hysteresis
Matt Spinlerb306b032021-02-01 10:05:46 -0600439{
440 static constexpr auto name = "PerformanceLoss";
Amithash Prasad7d2f3232025-06-02 20:31:48 -0700441 /** @brief sdbusplus bus client connection. */
442 sdbusplus::bus_t& bus;
443 std::string objPath;
444 Unit units;
445
Matt Spinlerb306b032021-02-01 10:05:46 -0600446 using PerformanceLossObject::PerformanceLossObject;
Rashmica Gupta1dff7dc2021-07-27 19:43:31 +1000447 double performanceLossHighHysteresis;
448 double performanceLossLowHysteresis;
Matt Spinlerb306b032021-02-01 10:05:46 -0600449
Amithash Prasad7d2f3232025-06-02 20:31:48 -0700450 /** @brief Constructor to put object onto bus at a dbus path.
451 * @param[in] bus - Bus to attach to.
452 * @param[in] path - Path to attach at.
453 * @param[in] units - units
454 */
455 Threshold(sdbusplus::bus_t& bus, const char* path, Unit units) :
456 PerformanceLossObject(bus, path), bus(bus), objPath(std::string(path)),
457 units(units)
458 {}
459
Matt Spinlerb306b032021-02-01 10:05:46 -0600460 auto high()
461 {
462 return performanceLossHigh();
463 }
464 auto low()
465 {
466 return performanceLossLow();
467 }
468
469 template <typename... Args>
470 auto alarmHigh(Args... args)
471 {
472 return performanceLossAlarmHigh(std::forward<Args>(args)...);
473 }
474
475 template <typename... Args>
476 auto alarmLow(Args... args)
477 {
478 return performanceLossAlarmLow(std::forward<Args>(args)...);
479 }
George Hung4294e6d2021-04-14 20:58:21 +0800480
481 template <typename... Args>
482 auto alarmHighSignalAsserted(Args... args)
483 {
484 return performanceLossHighAlarmAsserted(std::forward<Args>(args)...);
485 }
486
487 template <typename... Args>
488 auto alarmHighSignalDeasserted(Args... args)
489 {
490 return performanceLossHighAlarmDeasserted(std::forward<Args>(args)...);
491 }
492
493 template <typename... Args>
494 auto alarmLowSignalAsserted(Args... args)
495 {
496 return performanceLossLowAlarmAsserted(std::forward<Args>(args)...);
497 }
498
499 template <typename... Args>
500 auto alarmLowSignalDeasserted(Args... args)
501 {
502 return performanceLossLowAlarmDeasserted(std::forward<Args>(args)...);
503 }
Matt Spinlerb306b032021-02-01 10:05:46 -0600504};
505
Tao Linf2e94222023-10-31 17:38:17 +0800506} // namespace phosphor::virtual_sensor