Have timers be a trigger type in microseconds
Extract and generate timers in microseconds for all event triggers and
actions that take a timer as a parameter.
Tested:
Timers are created on events with timer triggers defined
Inspect that generated timers are created in microseconds
No timer is created for events without a timer trigger
Change-Id: I345f247782779ef142fe0d569632be2b6c11f0c3
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
diff --git a/control/templates/fan_zone_defs.mako.cpp b/control/templates/fan_zone_defs.mako.cpp
index a4ba615..ad37579 100644
--- a/control/templates/fan_zone_defs.mako.cpp
+++ b/control/templates/fan_zone_defs.mako.cpp
@@ -156,8 +156,11 @@
%endif
},
TimerConf{
- ${event['pc']['pctime']['interval']},
- ${event['pc']['pctime']['type']}
+ %if ('timer' in event['pc']['triggers']) and \
+ (event['pc']['triggers']['timer'] is not None):
+ ${event['pc']['triggers']['pctime']['interval']},
+ ${event['pc']['triggers']['pctime']['type']}
+ %endif
},
std::vector<Signal>{
%for s in event['pc']['triggers']['pcsigs']: