summaryrefslogtreecommitdiffstats
path: root/presence/templates/fallback.mako.hpp
diff options
context:
space:
mode:
authorBrad Bishop <bradleyb@fuzziesquirrel.com>2017-06-13 13:31:24 -0400
committerPatrick Williams <patrick@stwcx.xyz>2017-08-02 20:18:19 +0000
commit5593560b1e1a7785a491d4650c4f3f61ffdaba90 (patch)
tree86ea09c93fb2632c0b50ef23b806868e88d99b71 /presence/templates/fallback.mako.hpp
parentbfb8160710d95d208f7cb1565a97c2a909459d0c (diff)
downloadphosphor-fan-presence-5593560b1e1a7785a491d4650c4f3f61ffdaba90.tar.gz
phosphor-fan-presence-5593560b1e1a7785a491d4650c4f3f61ffdaba90.zip
presence: New parser
Adopt an easy on the tongue acronym similar to other projects. Add a robust parser with support for sensors and policies. Sensors: gpio, tach Policies: fallback Add an example yaml file. Change-Id: I9158a0ce2a08ef6b7bb3f5d659ea0e0433af5b96 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'presence/templates/fallback.mako.hpp')
-rw-r--r--presence/templates/fallback.mako.hpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/presence/templates/fallback.mako.hpp b/presence/templates/fallback.mako.hpp
new file mode 100644
index 0000000..6469847
--- /dev/null
+++ b/presence/templates/fallback.mako.hpp
@@ -0,0 +1,7 @@
+std::make_unique<Fallback>(
+${indent(1)}ConfigFans::get()[${f.fan}],
+${indent(1)}std::vector<std::reference_wrapper<PresenceSensor>>{
+% for s in f.sensors:
+${indent(2)}*ConfigSensors::get()[${s}],
+% endfor
+${indent(1)}})\
OpenPOWER on IntegriCloud