control: Add fan configuration class framework
The fan class will contain the configuration for each fan to be
controlled within the system. A minimum of 1 fan is required to be
configured.
Tested:
Fan JSON configuration able to be loaded
Fan objects created, each with a name as configured
Change-Id: I5f90377453cf7d5d85e1c7c570325c2d97a6060b
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
diff --git a/control/json_parser.cpp b/control/json_parser.cpp
index 9b80706..5e43de0 100644
--- a/control/json_parser.cpp
+++ b/control/json_parser.cpp
@@ -15,6 +15,7 @@
*/
#include "json_parser.hpp"
+#include "json/fan.hpp"
#include "json/manager.hpp"
#include "json/profile.hpp"
#include "types.hpp"
@@ -30,6 +31,8 @@
// Profiles are optional
auto profiles = getConfig<json::Profile>(bus, true);
+ // Fans to be controlled
+ auto fans = getConfig<json::Fan>(bus);
// TODO Create zone groups after loading all JSON config files