summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fan_enclosure.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/fan_enclosure.cpp b/fan_enclosure.cpp
index 2bed251..b2ea9f7 100644
--- a/fan_enclosure.cpp
+++ b/fan_enclosure.cpp
@@ -70,7 +70,17 @@ void FanEnclosure::updInventory()
ObjectMap invObj = getObjectMap();
//Get inventory manager service name from mapper
std::string invService = getInvService();
- //TODO Update inventory for this fan
+ // Update inventory for this fan
+ auto invMsg = bus.new_method_call(invService.c_str(),
+ INVENTORY_PATH,
+ INVENTORY_INTF,
+ "Notify");
+ invMsg.append(std::move(invObj));
+ auto invMgrResponseMsg = bus.call(invMsg);
+ if (invMgrResponseMsg.is_method_error())
+ {
+ //TODO Handle error in notify call
+ }
}
void FanEnclosure::addSensor(
OpenPOWER on IntegriCloud