Monitor: Support hwmon service offline during startup
It is possible for fan-monitor to startup before the Hwmonitor service,
causing unhandled exceptions that block system initialization. This fix
catches the exception until a proper hwmon presence detector is
deployed.
If the exception is caught, this code change forces a re-subscription
during the poweron event to ensure tach sensors will receive published
updates upon resumption of the hwmon service.
Signed-off-by: Mike Capps <mikepcapps@gmail.com>
Change-Id: I8e696e747c432d7a6f696c5ccd9dab73abf7708f
diff --git a/monitor/system.hpp b/monitor/system.hpp
index a690567..328c958 100644
--- a/monitor/system.hpp
+++ b/monitor/system.hpp
@@ -186,12 +186,11 @@
json captureSensorData();
/**
- * @brief Builds a mapping for sensors to be identified
- * for a given service name.
+ * @brief creates a subscription (service->sensor) to take sensors
+ * on/offline when D-Bus starts/stops updating values
*
- * @return a map of service_name->[sensor1,sensor2...]
*/
- SensorMapType buildNameOwnerChangedMap() const;
+ void subscribeSensorsToServices();
/**
* @brief Retrieve the configured trust groups