Send high/low alarm signal when sensor reading exceeds threshold

The change to the xyz.openbmc_project.Sensor.Threshold.Warning and
xyz.openbmc_project.Sensor.Threshold.Critical interface that add
the new signals WarningHighAlarmAsserted, WarningHighAlarmDeasserted,
WarningLowAlarmAsserted, WarningLowAlarmDeasserted,
CriticalHighAlarmAsserted, CriticalHighAlarmDeasserted,
CriticalLowAlarmAsserted and CriticalLowAlarmDeasserted.

When sensor reading exceeds the threshold, hwmon would send the signal
with the sensor reading value at that time.

Tested:
Use dbus-monitor command to check the signal is captured, when hwmon
send signals.

Signed-off-by: Duke Du <Duke.Du@quantatw.com>
Change-Id: Ibf050b8bcff128cf77fd103c6d2bd1f30700b27b
diff --git a/mainloop.cpp b/mainloop.cpp
index 3e7e0bf..ecceee5 100644
--- a/mainloop.cpp
+++ b/mainloop.cpp
@@ -59,6 +59,22 @@
 decltype(
     Thresholds<WarningObject>::alarmHi) Thresholds<WarningObject>::alarmHi =
     &WarningObject::warningAlarmHigh;
+decltype(Thresholds<WarningObject>::getAlarmLow)
+    Thresholds<WarningObject>::getAlarmLow = &WarningObject::warningAlarmLow;
+decltype(Thresholds<WarningObject>::getAlarmHigh)
+    Thresholds<WarningObject>::getAlarmHigh = &WarningObject::warningAlarmHigh;
+decltype(Thresholds<WarningObject>::assertLowSignal)
+    Thresholds<WarningObject>::assertLowSignal =
+        &WarningObject::warningLowAlarmAsserted;
+decltype(Thresholds<WarningObject>::assertHighSignal)
+    Thresholds<WarningObject>::assertHighSignal =
+        &WarningObject::warningHighAlarmAsserted;
+decltype(Thresholds<WarningObject>::deassertLowSignal)
+    Thresholds<WarningObject>::deassertLowSignal =
+        &WarningObject::warningLowAlarmDeasserted;
+decltype(Thresholds<WarningObject>::deassertHighSignal)
+    Thresholds<WarningObject>::deassertHighSignal =
+        &WarningObject::warningHighAlarmDeasserted;
 
 // Initialization for Critical Objects
 decltype(Thresholds<CriticalObject>::setLo) Thresholds<CriticalObject>::setLo =
@@ -75,6 +91,23 @@
 decltype(
     Thresholds<CriticalObject>::alarmHi) Thresholds<CriticalObject>::alarmHi =
     &CriticalObject::criticalAlarmHigh;
+decltype(Thresholds<CriticalObject>::getAlarmLow)
+    Thresholds<CriticalObject>::getAlarmLow = &CriticalObject::criticalAlarmLow;
+decltype(Thresholds<CriticalObject>::getAlarmHigh)
+    Thresholds<CriticalObject>::getAlarmHigh =
+        &CriticalObject::criticalAlarmHigh;
+decltype(Thresholds<CriticalObject>::assertLowSignal)
+    Thresholds<CriticalObject>::assertLowSignal =
+        &CriticalObject::criticalLowAlarmAsserted;
+decltype(Thresholds<CriticalObject>::assertHighSignal)
+    Thresholds<CriticalObject>::assertHighSignal =
+        &CriticalObject::criticalHighAlarmAsserted;
+decltype(Thresholds<CriticalObject>::deassertLowSignal)
+    Thresholds<CriticalObject>::deassertLowSignal =
+        &CriticalObject::criticalLowAlarmDeasserted;
+decltype(Thresholds<CriticalObject>::deassertHighSignal)
+    Thresholds<CriticalObject>::deassertHighSignal =
+        &CriticalObject::criticalHighAlarmDeasserted;
 
 void updateSensorInterfaces(InterfaceMap& ifaces, SensorValueType value)
 {