dbus-sdr: Add new sensor type codes
Add sensor type codes: power unit, memory, button, and watchdog2.
Signed-off-by: Scron Chang <Scron.Chang@quantatw.com>
Change-Id: Idbd5a22712e39dcd00947dd9cd878d90619dd7f4
diff --git a/include/dbus-sdr/sdrutils.hpp b/include/dbus-sdr/sdrutils.hpp
index 6b54417..d4ed6f5 100644
--- a/include/dbus-sdr/sdrutils.hpp
+++ b/include/dbus-sdr/sdrutils.hpp
@@ -250,6 +250,10 @@
current = 0x3,
fan = 0x4,
other = 0xB,
+ memory = 0x0c,
+ power_unit = 0x09,
+ buttons = 0x14,
+ watchdog2 = 0x23,
};
enum class SensorEventTypeCodes : uint8_t
@@ -273,7 +277,15 @@
{"fan_pwm", std::make_pair(SensorTypeCodes::fan,
SensorEventTypeCodes::threshold)},
{"power", std::make_pair(SensorTypeCodes::other,
- SensorEventTypeCodes::threshold)}}};
+ SensorEventTypeCodes::threshold)},
+ {"memory", std::make_pair(SensorTypeCodes::memory,
+ SensorEventTypeCodes::sensorSpecified)},
+ {"state", std::make_pair(SensorTypeCodes::power_unit,
+ SensorEventTypeCodes::sensorSpecified)},
+ {"buttons", std::make_pair(SensorTypeCodes::buttons,
+ SensorEventTypeCodes::sensorSpecified)},
+ {"watchdog", std::make_pair(SensorTypeCodes::watchdog2,
+ SensorEventTypeCodes::sensorSpecified)}}};
std::string getSensorTypeStringFromPath(const std::string& path);