summaryrefslogtreecommitdiffstats
path: root/control/manager.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'control/manager.hpp')
-rw-r--r--control/manager.hpp34
1 files changed, 33 insertions, 1 deletions
diff --git a/control/manager.hpp b/control/manager.hpp
index 7f8baa3..675dfb8 100644
--- a/control/manager.hpp
+++ b/control/manager.hpp
@@ -23,6 +23,17 @@ class Manager
{
public:
+ /**
+ * The mode the manager will run in:
+ * - init - only do the initialization steps
+ * - control - run normal control algorithms
+ */
+ enum class Mode
+ {
+ init,
+ control
+ };
+
Manager() = delete;
Manager(const Manager&) = delete;
Manager(Manager&&) = default;
@@ -36,12 +47,26 @@ class Manager
* _zoneLayouts data.
*
* @param[in] bus - The dbus object
+ * @param[in] mode - The control mode
+ */
+ Manager(sdbusplus::bus::bus& bus,
+ Mode mode);
+
+ /**
+ * Does the fan control inititialization, which is
+ * setting fans to full, delaying so they
+ * can get there, and starting a target.
*/
- Manager(sdbusplus::bus::bus& bus);
+ void doInit();
private:
/**
+ * Starts the obmc-fan-control-ready dbus target
+ */
+ void startFanControlReadyTarget();
+
+ /**
* The dbus object
*/
sdbusplus::bus::bus& _bus;
@@ -56,6 +81,13 @@ class Manager
* This is generated data.
*/
static const std::vector<ZoneGroup> _zoneLayouts;
+
+ /**
+ * The number of seconds to delay after
+ * fans get set to high speed on a power on
+ * to give them a chance to get there.
+ */
+ static const unsigned int _powerOnDelay;
};
OpenPOWER on IntegriCloud