Add definition of SDR type 3.
SDR type 3 is based on Event-only sensor record of IPMI interface
specification second generation.
Signed-off-by: Hao Jiang <jianghao@google.com>
Change-Id: I30158b8f851f8e056be3518b35aeb43671f92bc7
diff --git a/sensorhandler.hpp b/sensorhandler.hpp
index 8780235..ea9fa3c 100644
--- a/sensorhandler.hpp
+++ b/sensorhandler.hpp
@@ -189,6 +189,7 @@
enum SensorDataRecordType
{
SENSOR_DATA_FULL_RECORD = 0x1,
+ SENSOR_DATA_EVENT_RECORD = 0x3,
SENSOR_DATA_FRU_RECORD = 0x11,
SENSOR_DATA_ENTITY_RECORD = 0x8,
};
@@ -339,6 +340,24 @@
char id_string[FULL_RECORD_ID_STR_MAX_LENGTH];
} __attribute__((packed));
+/** @struct SensorDataEventRecord
+ *
+ * Event Only Sensor Record(body) - SDR Type 3
+ */
+struct SensorDataEventRecordBody
+{
+ uint8_t entity_id;
+ uint8_t entity_instance;
+ uint8_t sensor_type;
+ uint8_t event_reading_type;
+ uint8_t sensor_record_sharing_1;
+ uint8_t sensor_record_sharing_2;
+ uint8_t reserved;
+ uint8_t oem_reserved;
+ uint8_t id_string_info;
+ char id_string[FULL_RECORD_ID_STR_MAX_LENGTH];
+} __attribute__((packed));
+
/** @struct SensorDataFruRecordBody
*
* FRU Device Locator Record(body) - SDR Type 11
@@ -605,6 +624,17 @@
SensorDataFullRecordBody body;
} __attribute__((packed));
+/** @struct SensorDataEventRecord
+ *
+ * Event Only Sensor Record - SDR Type 3
+ */
+struct SensorDataEventRecord
+{
+ SensorDataRecordHeader header;
+ SensorDataRecordKey key;
+ SensorDataEventRecordBody body;
+} __attribute__((packed));
+
/** @struct SensorDataFruRecord
*
* FRU Device Locator Record - SDR Type 11