xref: /openbmc/phosphor-host-ipmid/scripts/inventorysensor.cpp.mako (revision c84add583a4989f2c1f4b950a0a204111afd3723)
1*c84add58SJayanth Othayoth## This file is a template.  The comment below is emitted
2*c84add58SJayanth Othayoth## into the rendered file; feel free to edit this file.
3*c84add58SJayanth Othayoth
4*c84add58SJayanth Othayoth// !!! WARNING: This is a GENERATED Code..Please do NOT Edit !!!
5*c84add58SJayanth Othayoth
6*c84add58SJayanth Othayoth#include <ipmid/types.hpp>
7*c84add58SJayanth Othayothusing namespace ipmi::sensor;
8*c84add58SJayanth Othayoth
9*c84add58SJayanth Othayothextern const InvObjectIDMap __attribute__((init_priority(101))) invSensors = {
10*c84add58SJayanth Othayoth% for key in sensorDict.keys():
11*c84add58SJayanth Othayoth   % if key:
12*c84add58SJayanth Othayoth{"${key}",
13*c84add58SJayanth Othayoth    {
14*c84add58SJayanth Othayoth<%
15*c84add58SJayanth Othayoth       objectPath = sensorDict[key]
16*c84add58SJayanth Othayoth       sensorID = objectPath["sensorID"]
17*c84add58SJayanth Othayoth       sensorType = objectPath["sensorType"]
18*c84add58SJayanth Othayoth       eventReadingType = objectPath["eventReadingType"]
19*c84add58SJayanth Othayoth       offset = objectPath["offset"]
20*c84add58SJayanth Othayoth%>
21*c84add58SJayanth Othayoth        ${sensorID},${sensorType},${eventReadingType},${offset}
22*c84add58SJayanth Othayoth    }
23*c84add58SJayanth Othayoth},
24*c84add58SJayanth Othayoth   % endif
25*c84add58SJayanth Othayoth% endfor
26*c84add58SJayanth Othayoth};
27