Add default floor speed support

Change-Id: Id2d3b362e79e7a8c2330181f68ae11e43f84e2fd
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
diff --git a/control/gen-fan-zone-defs.py b/control/gen-fan-zone-defs.py
index 20c1534..eb33956 100755
--- a/control/gen-fan-zone-defs.py
+++ b/control/gen-fan-zone-defs.py
@@ -49,6 +49,7 @@
             ZoneDefinition{
                 ${zone['num']},
                 ${zone['full_speed']},
+                ${zone['default_floor']},
                 std::vector<FanDefinition>{
                 %for fan in zone['fans']:
                     FanDefinition{
@@ -294,6 +295,8 @@
 
             zone['full_speed'] = z['full_speed']
 
+            zone['default_floor'] = z['default_floor']
+
             # 'cooling_profiles' is optional (use 'all' instead)
             if ('cooling_profiles' not in z) or \
                     (z['cooling_profiles'] is None):
diff --git a/control/types.hpp b/control/types.hpp
index de56186..6e99950 100644
--- a/control/types.hpp
+++ b/control/types.hpp
@@ -58,10 +58,12 @@
 
 constexpr auto zoneNumPos = 0;
 constexpr auto fullSpeedPos = 1;
-constexpr auto fanListPos = 2;
-constexpr auto setSpeedEventsPos = 3;
+constexpr auto floorSpeedPos = 2;
+constexpr auto fanListPos = 3;
+constexpr auto setSpeedEventsPos = 4;
 using ZoneDefinition = std::tuple<size_t,
-                                  unsigned int,
+                                  uint64_t,
+                                  uint64_t,
                                   std::vector<FanDefinition>,
                                   std::vector<SetSpeedEvent>>;
 
diff --git a/control/zone.cpp b/control/zone.cpp
index a57174d..1a299e2 100644
--- a/control/zone.cpp
+++ b/control/zone.cpp
@@ -31,7 +31,8 @@
            const ZoneDefinition& def) :
     _bus(bus),
     _fullSpeed(std::get<fullSpeedPos>(def)),
-    _zoneNum(std::get<zoneNumPos>(def))
+    _zoneNum(std::get<zoneNumPos>(def)),
+    _defFloorSpeed(std::get<floorSpeedPos>(def))
 {
     auto& fanDefs = std::get<fanListPos>(def);
 
diff --git a/control/zone.hpp b/control/zone.hpp
index 1af0c22..c524397 100644
--- a/control/zone.hpp
+++ b/control/zone.hpp
@@ -113,6 +113,16 @@
                     _properties[object][interface][property]);
         };
 
+        /**
+         * @brief Get the default floor speed
+         *
+         * @return - The defined default floor speed
+         */
+        inline auto getDefFloor()
+        {
+            return _defFloorSpeed;
+        };
+
     private:
 
         /**
@@ -131,6 +141,11 @@
         const size_t _zoneNum;
 
         /**
+         * The default floor speed for the zone
+         */
+        const uint64_t _defFloorSpeed;
+
+        /**
          * Automatic fan control active state
          */
         bool _isActive = true;