Add modes to phosphor-fan-control

phosphor-fan-control can behave differently based
on its command line arguments

--init:  Set fans to full speed, delay for a
         configurable amount of time to allow fans to ramp up,
         start the fan control ready target, and then exit.

--control:  Start the control algorithm.  Never exits.
            Will be started as part of the fan control ready target.

Change-Id: I453daf8cc05a5c85a19c098e1cca64cac2ad9520
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
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 @@
 {
     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 @@
          * _zoneLayouts data.
          *
          * @param[in] bus - The dbus object
+         * @param[in] mode - The control mode
          */
-        Manager(sdbusplus::bus::bus& bus);
+        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.
+         */
+        void doInit();
 
     private:
 
         /**
+         * Starts the obmc-fan-control-ready dbus target
+         */
+        void startFanControlReadyTarget();
+
+        /**
          * The dbus object
          */
         sdbusplus::bus::bus& _bus;
@@ -56,6 +81,13 @@
          * 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;
 };