dbus-sdr: Add sensor type entity
Adding sensor type entity to support SEL.
Using this patch to enable log to SEL.
Tested Log:
~# ipmitool sel elist -v
Loading IANA PEN Registry...
Running Get VSO Capabilities my_addr 0x20, transit 0, target 0
Invalid completion code received: Invalid command
Discovered IPMB address 0x0
SEL Record ID : 0001
Record Type : 02
Timestamp : 00:20:29 GMT 00:20:29 GMT
Generator ID : 0020
EvM Revision : 04
Sensor Type : Entity Presence
Sensor Number : 07
Event Type : Sensor-specific Discrete
Event Direction : Assertion Event
Event Data : 00ffff
Description : Present
Signed-off-by: Duke Du <Duke.Du@quantatw.com>
Change-Id: I78c4fb083e8550eded0a85b30ba9a0667350981b
diff --git a/include/dbus-sdr/sdrutils.hpp b/include/dbus-sdr/sdrutils.hpp
index 1af65bc..c4b7cfa 100644
--- a/include/dbus-sdr/sdrutils.hpp
+++ b/include/dbus-sdr/sdrutils.hpp
@@ -313,6 +313,7 @@
memory = 0x0c,
buttons = 0x14,
watchdog2 = 0x23,
+ entity = 0x25,
};
enum class SensorEventTypeCodes : uint8_t
@@ -348,8 +349,9 @@
{"buttons", std::make_pair(SensorTypeCodes::buttons,
SensorEventTypeCodes::sensorSpecified)},
{"watchdog", std::make_pair(SensorTypeCodes::watchdog2,
- SensorEventTypeCodes::sensorSpecified)}}};
-
+ SensorEventTypeCodes::sensorSpecified)},
+ {"entity", std::make_pair(SensorTypeCodes::entity,
+ SensorEventTypeCodes::sensorSpecified)}}};
std::string getSensorTypeStringFromPath(const std::string& path);
uint8_t getSensorTypeFromPath(const std::string& path);