summaryrefslogtreecommitdiffstats
path: root/occ_status.hpp
diff options
context:
space:
mode:
authorEddie James <eajames@us.ibm.com>2017-09-14 13:17:17 -0500
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2017-12-12 04:48:00 +0000
commit482e31ff8e43e0fefbd697b1985795c4d35eec74 (patch)
tree9db1fcac3446e4d6221b8609e92f68a57d4bb0a0 /occ_status.hpp
parent30417a15fa35e26d5127f12e0a85c3fe74eff0d0 (diff)
downloadopenpower-occ-control-482e31ff8e43e0fefbd697b1985795c4d35eec74.tar.gz
openpower-occ-control-482e31ff8e43e0fefbd697b1985795c4d35eec74.zip
Add watches for throttling reported by the OCC
Add Error objects to watch the sysfs entries provided by the OCC hwmon driver that report various types of throttling. Also needed to add a boolean input to the Error callback interface. Resolves openbmc/openbmc#1821 Change-Id: I4425770a92ace0f73024b3dc4c577ce46957a62a Signed-off-by: Eddie James <eajames@us.ibm.com>
Diffstat (limited to 'occ_status.hpp')
-rw-r--r--occ_status.hpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/occ_status.hpp b/occ_status.hpp
index 55ee539..60134fb 100644
--- a/occ_status.hpp
+++ b/occ_status.hpp
@@ -70,7 +70,9 @@ class Status : public Interface
name + std::to_string(instance + 1),
#endif
manager,
- std::bind(&Status::deviceErrorHandler, this)),
+ *this,
+ std::bind(std::mem_fn(&Status::deviceErrorHandler), this,
+ std::placeholders::_1)),
hostControlSignal(
bus,
sdbusRule::type::signal() +
@@ -151,8 +153,11 @@ class Status : public Interface
**/
sdbusplus::bus::match_t hostControlSignal;
- /** @brief Callback handler when device errors are detected */
- void deviceErrorHandler();
+ /** @brief Callback handler when device errors are detected
+ *
+ * @param[in] error - True if an error is reported, false otherwise
+ */
+ void deviceErrorHandler(bool error);
/** @brief Callback function on host control signals
*
OpenPOWER on IntegriCloud