summaryrefslogtreecommitdiffstats
path: root/sensorhandler.h
diff options
context:
space:
mode:
authorTom Joseph <tomjoseph@in.ibm.com>2018-02-16 09:14:45 +0530
committerTom Joseph <tomjoseph@in.ibm.com>2018-03-01 05:34:21 +0000
commit0ac0dd232627d9c44e53d41e2e6509a0471f013d (patch)
tree2a49fa53ade1346f14795e673c2c1a261f97620f /sensorhandler.h
parent0a1301c141809fc8441abee5415c791ce894f068 (diff)
downloadphosphor-host-ipmid-0ac0dd232627d9c44e53d41e2e6509a0471f013d.tar.gz
phosphor-host-ipmid-0ac0dd232627d9c44e53d41e2e6509a0471f013d.zip
sensor: Refactor get sensor thresholds command
Using GetManagedObjects to get the thresholds could take upto 15~20 sec for the core temperatures. The time taken to fetch threshold properties via GetManagedObjects is proportional to the number of objects under the path. Since the dbus object path is available in the yaml it is performant to read the threshold properties directly. Change-Id: Ic22d8f4d73d8ce4eabdffd6fc7af23f73b981f66 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
Diffstat (limited to 'sensorhandler.h')
-rw-r--r--sensorhandler.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/sensorhandler.h b/sensorhandler.h
index e32405d..f5b5c94 100644
--- a/sensorhandler.h
+++ b/sensorhandler.h
@@ -241,8 +241,13 @@ inline void set_owner_lun_channel(uint8_t channel, SensorDataRecordKey* key)
*/
struct GetSensorThresholdsResponse
{
- uint8_t validMask; //Indicates which values are valid
- uint8_t data[6]; //Container for threshold values
+ uint8_t validMask; //!< valid mask
+ uint8_t lowerNonCritical; //!< lower non-critical threshold
+ uint8_t lowerCritical; //!< lower critical threshold
+ uint8_t lowerNonRecoverable;//!< lower non-recoverable threshold
+ uint8_t upperNonCritical; //!< upper non-critical threshold
+ uint8_t upperCritical; //!< upper critical threshold
+ uint8_t upperNonRecoverable;//!< upper non-recoverable threshold
} __attribute__((packed));
// Body - full record
OpenPOWER on IntegriCloud