summaryrefslogtreecommitdiffstats
path: root/sensorhandler.h
diff options
context:
space:
mode:
authorTom Joseph <tomjoseph@in.ibm.com>2018-02-16 09:59:57 +0530
committerTom Joseph <tomjoseph@in.ibm.com>2018-03-01 05:34:21 +0000
commitdc212b235dbf0251f5da787316f629d615ede997 (patch)
treeff5fd67b8527375cd06e24c072fccc6bb162f8b6 /sensorhandler.h
parent13b87a3ee204a79d5c31dfc0c3540fb207006833 (diff)
downloadphosphor-host-ipmid-dc212b235dbf0251f5da787316f629d615ede997.tar.gz
phosphor-host-ipmid-dc212b235dbf0251f5da787316f629d615ede997.zip
sensor: Updates to the get device sdr command implementation
Change-Id: Ibf5989b144ebe4ec75bd8d42c1d1167d7b16ecda Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
Diffstat (limited to 'sensorhandler.h')
-rw-r--r--sensorhandler.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/sensorhandler.h b/sensorhandler.h
index f5b5c94..4dd079d 100644
--- a/sensorhandler.h
+++ b/sensorhandler.h
@@ -527,6 +527,11 @@ inline uint8_t get_device_id_strlen(SensorDataFruRecordBody* body)
return body->deviceIDLen & LENGTH_MASK;
};
+inline void set_readable_mask(uint8_t mask, SensorDataFullRecordBody* body)
+{
+ body->discrete_reading_setting_mask[1] = mask & 0x3F;
+}
+
} // namespace body
// More types contained in section 43.17 Sensor Unit Type Codes,
@@ -537,6 +542,7 @@ enum SensorUnitTypeCodes
SENSOR_UNIT_DEGREES_C = 1,
SENSOR_UNIT_VOLTS = 4,
SENSOR_UNIT_AMPERES = 5,
+ SENSOR_UNIT_WATTS = 6,
SENSOR_UNIT_JOULES = 7,
SENSOR_UNIT_METERS = 34,
SENSOR_UNIT_REVOLUTIONS = 41,
OpenPOWER on IntegriCloud