diff options
author | Jaghathiswari Rankappagounder Natarajan <jaghu@google.com> | 2019-02-12 13:22:55 -0800 |
---|---|---|
committer | Jaghathiswari Rankappagounder Natarajan <jaghu@google.com> | 2019-02-15 21:48:56 +0000 |
commit | 9c11894eb919034fb7841520aea3f476783a85c6 (patch) | |
tree | 7d3b244ea082418317608fad7877de59bb549bb1 /scripts/writeentity.mako.cpp | |
parent | 0780df105bdd00184de29f48e9946bebfc5b5fb2 (diff) | |
download | phosphor-host-ipmid-9c11894eb919034fb7841520aea3f476783a85c6.tar.gz phosphor-host-ipmid-9c11894eb919034fb7841520aea3f476783a85c6.zip |
Add support for Entity Association Record
Adding support for Entity Association Record (SDR type - 0x08h)
This patch includes:
1) Entity Association Record yaml file example
2) Entity Assocation Record related script and mako file changes
3) Adding Entity Association Record in get_sdr IPMI command response
From the host, tested that entity association records can be fetched
Change-Id: I9cf598e5d27d2e8c6751bbaae2176e7c976974b1
Tested: Yes
Signed-off-by: Jaghathiswari Rankappagounder Natarajan <jaghu@google.com>
Diffstat (limited to 'scripts/writeentity.mako.cpp')
-rw-r--r-- | scripts/writeentity.mako.cpp | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/scripts/writeentity.mako.cpp b/scripts/writeentity.mako.cpp new file mode 100644 index 0000000..9de11a0 --- /dev/null +++ b/scripts/writeentity.mako.cpp @@ -0,0 +1,34 @@ +## This file is a template. The comment below is emitted +## into the rendered file; feel free to edit this file. +// !!! WARNING: This is a GENERATED Code..Please do NOT Edit !!! + +#include "types.hpp" +using namespace ipmi::sensor; + +extern const EntityInfoMap entities = { +% for key in entityDict.iterkeys(): +{${key},{ +<% + entity = entityDict[key] + containerEntityId = entity["containerEntityId"] + containerEntityInstance = entity["containerEntityInstance"] + isList = entity["isList"] + isLinked = entity["isLinked"] + entityId1 = entity["entityId1"] + entityInstance1 = entity["entityInstance1"] + entityId2 = entity["entityId2"] + entityInstance2 = entity["entityInstance2"] + entityId3 = entity["entityId3"] + entityInstance3 = entity["entityInstance3"] + entityId4 = entity["entityId4"] + entityInstance4 = entity["entityInstance4"] +%> + ${containerEntityId},${containerEntityInstance},${isList},${isLinked},{ + std::make_pair(${entityId1}, ${entityInstance1}), + std::make_pair(${entityId2}, ${entityInstance2}), + std::make_pair(${entityId3}, ${entityInstance3}), + std::make_pair(${entityId4}, ${entityInstance4}) } + +}}, +% endfor +}; |