control: Load JSON configured groups and events
Load the JSON configured groups and events, removing the remaining
references to the YAML based groups, triggers, and actions types. JSON
configured groups are loaded and provided to each event so that they can
eventually be copied and updated for the specifics of the event.
Change-Id: If713809b2865b5fe84b7bbb5a086cd49ba7fe55c
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
diff --git a/control/json/manager.hpp b/control/json/manager.hpp
index 506c8c0..2d75977 100644
--- a/control/json/manager.hpp
+++ b/control/json/manager.hpp
@@ -16,6 +16,8 @@
#pragma once
#include "action.hpp"
+#include "config_base.hpp"
+#include "event.hpp"
#include "group.hpp"
#include "json_config.hpp"
#include "profile.hpp"
@@ -42,15 +44,6 @@
/* Application name to be appended to the path for loading a JSON config file */
constexpr auto confAppName = "control";
-/**
- * Configuration object key to uniquely map to the configuration object
- * Pair constructed of:
- * std::string = Configuration object's name
- * std::vector<std::string> = List of profiles the configuration object
- * is included in
- */
-using configKey = std::pair<std::string, std::vector<std::string>>;
-
/* Type of timers supported */
enum class TimerType
{
@@ -266,6 +259,9 @@
/* List of zones configured */
std::map<configKey, std::unique_ptr<Zone>> _zones;
+ /* List of events configured */
+ std::map<configKey, std::unique_ptr<Event>> _events;
+
/**
* @brief Parse and set the configured profiles from the profiles JSON file
*