summaryrefslogtreecommitdiffstats
path: root/sensordatahandler.hpp
diff options
context:
space:
mode:
authorTom Joseph <tomjoseph@in.ibm.com>2017-09-06 19:23:00 +0530
committerTom Joseph <tomjoseph@in.ibm.com>2017-09-14 18:48:00 +0530
commit816e92b59fa52dcd997099a81e2f43a3512fca1e (patch)
tree7329e332662cc0a969fd8234b50bfbbbf2224899 /sensordatahandler.hpp
parentcc941e150007d56b2d7f2fc0c8248e6d74dd659d (diff)
downloadphosphor-host-ipmid-816e92b59fa52dcd997099a81e2f43a3512fca1e.zip
phosphor-host-ipmid-816e92b59fa52dcd997099a81e2f43a3512fca1e.tar.gz
sensor: Add function to map dbus info to assertion status
Change-Id: I30aae9abd7905ae3299856d798d41e10859fed7f Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
Diffstat (limited to 'sensordatahandler.hpp')
-rw-r--r--sensordatahandler.hpp49
1 files changed, 49 insertions, 0 deletions
diff --git a/sensordatahandler.hpp b/sensordatahandler.hpp
index ca82666..3a66f48 100644
--- a/sensordatahandler.hpp
+++ b/sensordatahandler.hpp
@@ -44,6 +44,35 @@ AssertionSet getAssertionSet(const SetSensorReadingReq& cmdData);
*/
ipmi_ret_t updateToDbus(IpmiUpdateData& msg);
+namespace get
+{
+
+/**
+ * @brief Helper function to map the dbus info to sensor's assertion status
+ * for the get sensor reading command.
+ *
+ * @param[in] sensorInfo - Dbus info related to sensor.
+ * @param[in] path - Dbus object path.
+ * @param[in] interface - Dbus interface.
+ *
+ * @return Response for get sensor reading command.
+ */
+GetSensorResponse mapDbusToAssertion(const Info& sensorInfo,
+ const InstancePath& path,
+ const DbusInterface& interface);
+
+/**
+ * @brief Map the Dbus info to sensor's assertion status in the Get sensor
+ * reading command response.
+ *
+ * @param[in] sensorInfo - Dbus info related to sensor.
+ *
+ * @return Response for get sensor reading command.
+ */
+GetSensorResponse assertion(const Info& sensorInfo);
+
+} //namespace get
+
namespace set
{
@@ -201,5 +230,25 @@ ipmi_ret_t assertion(const SetSensorReadingReq& cmdData,
const Info& sensorInfo);
}//namespace notify
+
+namespace inventory
+{
+
+namespace get
+{
+
+/**
+ * @brief Map the Dbus info to sensor's assertion status in the Get sensor
+ * reading command response.
+ *
+ * @param[in] sensorInfo - Dbus info related to sensor.
+ *
+ * @return Response for get sensor reading command.
+ */
+GetSensorResponse assertion(const Info& sensorInfo);
+
+} // namespace get
+
+} // namespace inventory
}//namespace sensor
}//namespace ipmi
OpenPOWER on IntegriCloud