Add to emit the threshold alarm signals

Emit the thresold alarm signals on sensor threshold interface:
https://gerrit.openbmc-project.xyz/39899

When the sensor reading exceeds the threshold, it'll send the
alarm signal with the sensor value

Tested:
Change the threshold to trigger the alarm signal:
busctl set-property xyz.openbmc_project.VirtualSensor
/xyz/openbmc_project/sensors/temperature/i2cool_0
xyz.openbmc_project.Sensor.Threshold.Critical CriticalHigh d 10

Monitor the signal by the following command:
dbus-monitor --system type=signal,member=CriticalHighAlarmAsserted

match the signal:
signal time=4282.318610 sender=:1.62 -> destination=(null destination)
serial=104431 path=/xyz/openbmc_project/sensors/temperature/i2cool_0;
interface=xyz.openbmc_project.Sensor.Threshold.Critical;
member=CriticalHighAlarmAsserted
   double 22

Signed-off-by: George Hung <george.hung@quantatw.com>
Change-Id: Iac19745ac8761435ff90bf7c8f7ff1ff14f26f05
2 files changed