From 6add0b810bfd859ad21cb6b3f98b0bbfaa15aa62 Mon Sep 17 00:00:00 2001 From: Vishwanatha Subbanna Date: Fri, 21 Jul 2017 19:02:37 +0530 Subject: Use generated occ to sensor ID map Change-Id: I948cc33ef05c2c49353277f4d5df958012a9801f Signed-off-by: Vishwanatha Subbanna --- occ_sensor.mako.hpp | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100755 occ_sensor.mako.hpp (limited to 'occ_sensor.mako.hpp') diff --git a/occ_sensor.mako.hpp b/occ_sensor.mako.hpp new file mode 100755 index 0000000..b5fac53 --- /dev/null +++ b/occ_sensor.mako.hpp @@ -0,0 +1,31 @@ +## This file is a template. The comment below is emitted +## into the rendered file; feel free to edit this file. +// WARNING: Generated header. Do not edit! + + +#pragma once + +#include + +namespace open_power +{ +namespace occ +{ + +using instanceID = int; +using sensorID = uint8_t; +const std::map Status::sensorMap = { +\ +% for occ in occDict: +<% + instance = occ.get("Instance") + id = occ.get("SensorID") +%>\ +\ + { ${instance}, ${id} },\ + +% endfor +}; + +} // namespace occ +} // namespace open_power -- cgit v1.2.1