summaryrefslogtreecommitdiffstats
path: root/types.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'types.hpp')
-rw-r--r--types.hpp37
1 files changed, 36 insertions, 1 deletions
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 @@ struct Values
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>;
OpenPOWER on IntegriCloud