Create empty action groups
This introduces the framework for set speed events to have the groups
within an event assign directly on the event action. When a group is
defined directly to an action, it will be used in place of the group(s)
on the event. This allows a single event, driven by trigger(s), to call
multiple actions on different groups with differing parameters to those
actions.
Change-Id: I5c648d912641b3006a77eab27457e3ddb220c2ad
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
diff --git a/control/templates/defs.mako b/control/templates/defs.mako
index 5356677..3a68e99 100644
--- a/control/templates/defs.mako
+++ b/control/templates/defs.mako
@@ -60,6 +60,7 @@
%endfor
%endfor
},
+{Group{},
std::vector<Action>{
%for a in event['action']:
%if len(a['parameters']) != 0:
@@ -76,7 +77,7 @@
%endfor
),
%endfor
-},
+}},
std::vector<Trigger>{
%if ('timer' in event['triggers']) and \
(event['triggers']['timer'] is not None):
diff --git a/control/templates/fan_zone_defs.mako.cpp b/control/templates/fan_zone_defs.mako.cpp
index eaac9e3..59b302d 100644
--- a/control/templates/fan_zone_defs.mako.cpp
+++ b/control/templates/fan_zone_defs.mako.cpp
@@ -111,6 +111,7 @@
%endfor
%endfor
},
+ {Group{},
std::vector<Action>{
%for i, a in enumerate(event['pc']['pcact']):
%if len(a['params']) != 0:
@@ -158,7 +159,7 @@
%else:
),
%endif
- },
+ }},
std::vector<Trigger>{
%if ('timer' in event['pc']['triggers']) and \
(event['pc']['triggers']['timer'] is not None):