From 398257a1d26c3591f534168900c271d9541bc4ad Mon Sep 17 00:00:00 2001 From: Matthew Barth Date: Mon, 20 Feb 2017 16:15:00 -0600 Subject: Update inventory with latest presence state Inventory is attempted to be updated with the current presence state, which is determined from all of the fan's sensor readings. Change-Id: Ic869cf5e5fdeada8d07b3deeabf347e40da3d8ba Signed-off-by: Matthew Barth --- fan_enclosure.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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( -- cgit v1.2.1