diff options
author | Matthew Barth <msbarth@us.ibm.com> | 2017-02-20 16:15:00 -0600 |
---|---|---|
committer | Matthew Barth <msbarth@us.ibm.com> | 2017-03-15 13:46:31 -0500 |
commit | 398257a1d26c3591f534168900c271d9541bc4ad (patch) | |
tree | a510d70b9b7655d2909c24e355ae6e8923355be2 | |
parent | 736d1432e8b9d4c44b06e529e3c8cea1efe0b32e (diff) | |
download | phosphor-fan-presence-398257a1d26c3591f534168900c271d9541bc4ad.tar.gz phosphor-fan-presence-398257a1d26c3591f534168900c271d9541bc4ad.zip |
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 <msbarth@us.ibm.com>
-rw-r--r-- | fan_enclosure.cpp | 12 |
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( |