From 766f8545fd3eb5010f5a262aa398f3a11dcc07d7 Mon Sep 17 00:00:00 2001 From: Matthew Barth Date: Tue, 29 Jan 2019 12:44:13 -0600 Subject: Store and access zone object properties Properties on the zone object require their event data to be stored for retrieval when their value changes, which allows the use of the current event handlers to update the cached value and trigger the event actions. When any event is initialized, any signals where the match string is empty performs a lookup for each group member to determine if they are on the zone object. Each member found to be on the zone object is then stored with the that event's data. Tested: Verified event data is stored for members on the zone object Verified event initialization correctly accesses zone object member's event data Change-Id: Id34f60eb12330428eeb1041de4e9bd1a4a686f21 Signed-off-by: Matthew Barth --- control/functor.hpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'control/functor.hpp') diff --git a/control/functor.hpp b/control/functor.hpp index b96f650..71607c5 100644 --- a/control/functor.hpp +++ b/control/functor.hpp @@ -106,12 +106,7 @@ struct PropertyChanged { try { - auto service = zone.getService(_path, _iface); - auto val = util::SDBusPlus::getProperty(bus, - service, - _path, - _iface, - _property); + auto val = zone.getPropertyByName(_path, _iface, _property); _handler(zone, std::forward(val)); } catch (const sdbusplus::exception::SdBusError&) -- cgit v1.2.1