summaryrefslogtreecommitdiffstats
path: root/hwmon.hpp
diff options
context:
space:
mode:
authorMatthew Barth <msbarth@us.ibm.com>2018-04-18 14:53:01 -0500
committerMatthew Barth <msbarth@us.ibm.com>2018-04-27 15:09:25 -0500
commit358193811e9769851e7f04816c3f5938f5a64f64 (patch)
tree86e371f05910e165d0f674d9738be2951be43531 /hwmon.hpp
parentd238e2325e4791af8a2823f1cf4cc3a3002a504f (diff)
downloadphosphor-hwmon-358193811e9769851e7f04816c3f5938f5a64f64.tar.gz
phosphor-hwmon-358193811e9769851e7f04816c3f5938f5a64f64.zip
Add status interface to sensors
When a fault sysfs file is present for a sensor, the OperationalStatus interface is attached to the sensor object. The functional property is initially set to the corresponding value read from the fault sysfs file when the sensor object is created. A follow-up commit will address updating the functional property based on reading the fault sysfs file during the polling interval. Tested: OperationalStatus interface created for sensors with fault files Interface not created for sensors without fault file Functional property set to correct value from sensor's fault file Change-Id: Id75b3711d048d4667d2173a3255512cf5482ab67 Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
Diffstat (limited to 'hwmon.hpp')
-rw-r--r--hwmon.hpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/hwmon.hpp b/hwmon.hpp
index 5319b69..5a7a90f 100644
--- a/hwmon.hpp
+++ b/hwmon.hpp
@@ -13,11 +13,13 @@ static constexpr auto cinput = "input";
static constexpr auto clabel = "label";
static constexpr auto ctarget = "target";
static constexpr auto cenable = "enable";
+static constexpr auto cfault = "fault";
static const std::string input = cinput;
static const std::string label = clabel;
static const std::string target = ctarget;
static const std::string enable = cenable;
+static const std::string fault = cfault;
}
namespace type
OpenPOWER on IntegriCloud