sensor: Add function to map dbus info to assertion status

Change-Id: I30aae9abd7905ae3299856d798d41e10859fed7f
Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
diff --git a/types.hpp b/types.hpp
index ae88faa..330a8a6 100644
--- a/types.hpp
+++ b/types.hpp
@@ -6,7 +6,6 @@
 #include <string>
 
 #include <sdbusplus/server.hpp>
-#include "sensorhandler.h"
 
 namespace ipmi
 {
@@ -39,6 +38,42 @@
    Value deassert;
 };
 
+/**
+ * @struct SetSensorReadingReq
+ *
+ * IPMI Request data for Set Sensor Reading and Event Status Command
+ */
+struct SetSensorReadingReq
+{
+    uint8_t number;
+    uint8_t operation;
+    uint8_t reading;
+    uint8_t assertOffset0_7;
+    uint8_t assertOffset8_14;
+    uint8_t deassertOffset0_7;
+    uint8_t deassertOffset8_14;
+    uint8_t eventData1;
+    uint8_t eventData2;
+    uint8_t eventData3;
+} __attribute__((packed));
+
+/**
+ * @struct GetReadingResponse
+ *
+ * IPMI response data for Get Sensor Reading command.
+ */
+struct GetReadingResponse
+{
+    uint8_t reading;            //!< Sensor reading.
+    uint8_t operation;          //!< Sensor scanning status / reading state.
+    uint8_t assertOffset0_7;    //!< Discrete assertion states(0-7).
+    uint8_t assertOffset8_14;   //!< Discrete assertion states(8-14).
+} __attribute__((packed));
+
+constexpr auto inventoryRoot = "/xyz/openbmc_project/inventory";
+
+using GetSensorResponse = std::array<uint8_t, sizeof(GetReadingResponse)>;
+
 using OffsetValueMap = std::map<Offset,Values>;
 
 using DbusPropertyMap = std::map<DbusProperty,OffsetValueMap>;