control: Remove ZoneHandlers from JSON zone object
The ZoneHandlers will not be needed once the properties configured for a
JSON based zone object are parsed and set on the object. This was
something needed for YAML based zone objects to correctly configure
interfaces/properties on the zone objects since they came from a YAML
configuration file.
Change-Id: I4c8834b5711a459c6112d1880a44289a4eedc4bd
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
diff --git a/control/json/zone.cpp b/control/json/zone.cpp
index 3c3f0b3..485773c 100644
--- a/control/json/zone.cpp
+++ b/control/json/zone.cpp
@@ -261,11 +261,6 @@
"Configured property function not available");
}
auto zHandler = propFunc->second(property, persist);
- // Only add non-null zone handler functions
- if (zHandler)
- {
- _zoneHandlers.emplace_back(zHandler);
- }
}
}
}
diff --git a/control/json/zone.hpp b/control/json/zone.hpp
index 6f80aa5..9a0afb2 100644
--- a/control/json/zone.hpp
+++ b/control/json/zone.hpp
@@ -139,21 +139,6 @@
}
/**
- * @brief Get the configuration of zone interface handlers
- *
- * Interfaces hosted by a zone can optionally be configured to set their
- * property values and/or persistency. These interfaces must be supported
- * by the zone object they are configured for.
- *
- * @return List of zone interface handler functions that set an interface's
- * property values and persistency states
- */
- inline const auto& getZoneHandlers() const
- {
- return _zoneHandlers;
- }
-
- /**
* @brief Add a fan object to the zone
*
* @param[in] fan - Unique pointer to a fan object that will be moved into
@@ -242,12 +227,6 @@
/* Map of interfaces to persisted properties the zone hosts*/
std::map<std::string, std::vector<std::string>> _propsPersisted;
- /**
- * Zone interface handler functions for its
- * configured interfaces (OPTIONAL)
- */
- std::vector<ZoneHandler> _zoneHandlers;
-
/* Interface to property mapping of their associated handler function */
static const std::map<std::string, std::map<std::string, propHandler>>
_intfPropHandlers;
diff --git a/control/json_parser.cpp b/control/json_parser.cpp
index 29af22d..12c2c99 100644
--- a/control/json_parser.cpp
+++ b/control/json_parser.cpp
@@ -135,7 +135,7 @@
zoneDefs.emplace_back(std::make_tuple(
zoneNum, zone.second->getDefaultCeiling(),
zone.second->getDefaultFloor(), zone.second->getIncDelay(),
- zone.second->getDecInterval(), zone.second->getZoneHandlers(),
+ zone.second->getDecInterval(), std::vector<ZoneHandler>{},
std::move(fanDefs), std::move(speedEvents)));
}
}