summaryrefslogtreecommitdiffstats
path: root/sensorhandler.h
diff options
context:
space:
mode:
authorTom Joseph <tomjoseph@in.ibm.com>2017-09-07 00:43:16 +0530
committerTom Joseph <tomjoseph@in.ibm.com>2017-09-14 18:48:14 +0530
commite05b292b8451eaa3ffb7bb28df231e0e1ed008b8 (patch)
tree8dfaf8dc017f0ea336caa10243d95da21e84040f /sensorhandler.h
parent295f17e5257774f11d6c05ed6e00e28cb4039dbf (diff)
downloadphosphor-host-ipmid-e05b292b8451eaa3ffb7bb28df231e0e1ed008b8.tar.gz
phosphor-host-ipmid-e05b292b8451eaa3ffb7bb28df231e0e1ed008b8.zip
sensor: Map dbus info to sensor's reading field
Change-Id: I3e35bf78260b1fa29e992b00279f2dd166cd2fe1 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
Diffstat (limited to 'sensorhandler.h')
-rw-r--r--sensorhandler.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/sensorhandler.h b/sensorhandler.h
index 6ba5c34..ca30fb0 100644
--- a/sensorhandler.h
+++ b/sensorhandler.h
@@ -524,6 +524,16 @@ inline void setAssertionBytes(uint16_t value,
resp->assertOffset8_14 = static_cast<uint8_t>(value >> 8);
}
+/**
+ * @brief Set the scanning enabled bit in the response.
+ *
+ * @param[in/out] resp - get sensor reading response.
+ */
+inline void enableScanning(ipmi::sensor::GetReadingResponse* resp)
+{
+ resp->operation = 1 << 6;
+}
+
} // namespace sensor
} // namespace ipmi
OpenPOWER on IntegriCloud