Move signals to event triggers

Move the generation and initialization of signals to be included in the
available event triggers. The signal trigger consists of subscribing to
a given signal match where when the signal is received and handled, it
causes the event actions to be called.

Tested:
    All current event signals are still registered and received
    Speed changes occur based on temperature sensor change signals

Change-Id: Iab4ccabb50ad910d5d566bd8c1922109638bd760
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
diff --git a/control/templates/defs.mako b/control/templates/defs.mako
index 89e01ca..6308774 100644
--- a/control/templates/defs.mako
+++ b/control/templates/defs.mako
@@ -64,12 +64,12 @@
     make_trigger(trigger::timer(TimerConf{
     ${event['triggers']['timer']['interval']},
     ${event['triggers']['timer']['type']}
-    }))
+    })),
     %endif
-},
-std::vector<Signal>{
-%for s in event['triggers']['signals']:
-    Signal{
+    %if ('signals' in event['triggers']) and \
+        (event['triggers']['signals'] is not None):
+    %for s in event['triggers']['signals']:
+    make_trigger(trigger::signal(
         %if ('match' in s) and \
             (s['match'] is not None):
         match::${s['match']}(
@@ -87,7 +87,8 @@
         make_handler(\
         ${indent(genHandler(sig=s), 3)}\
         )
-    },
-%endfor
-}
+    )),
+    %endfor
+    %endif
+},
 </%def>\