summaryrefslogtreecommitdiffstats
path: root/control/functor.hpp
Commit message (Collapse)AuthorAgeFilesLines
* Remove property change traceMatthew Barth2018-05-091-5/+0
| | | | | | | | | | | | | | Fan control is required to be configured for all possible temperature sensors within a machine type, however not every configuration of that machine type contains all of those sensors. The trace removed here was filling the journal with unnecessary entries for sensors that are expected to not be present. Tested: Journal entry is not longer traced Change-Id: Iccb85ae7e9463ee03522ce4efde6410ed14a76ca Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
* Throw custom exceptions on D-Bus method failuresMatt Spinler2018-05-091-4/+2
| | | | | | | | | | | | | | | | | | | | | All 3 fan applications - control, monitor, and presence have cases where it is expected that a getProperty call may fail because a sensor is missing. While the applications already handle this, the InternalFailure exception that was being thrown by the underlying call generates log entries that make it look like something bad happened. The custom exceptions now being thrown do not log anything on creation, but store all of the failing information so that any callers could still log the info if they wanted to. Tested: Boot a water cooled Witherspoon and see the fan presence and monitor applications not look like they are failing. Boot a system without the fan hwmon running, and see fan-control-init still show the fails. Change-Id: Ifd8ad6e3deb492bbaf33f12c7258125dce1e5ea8 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
* Add InterfacesRemoved signal handlingMatthew Barth2018-03-301-0/+80
| | | | | | | | | | | | | | | When an InterfacesRemoved signal is received for a subscribed object path, each interface returned is checked against the interface which was defined for each object on the event. When these are equal, the interface (and all associated properties) are removed from the shared cache of event properties. Tested: Manually added an InterfacesRemoved signal Verified interface was removed from object path in cache Change-Id: I348d82f14e0cfba2b18a81a9f54c6cb06b586797 Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
* Minimize service name mapper lookupsMatthew Barth2018-03-121-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | Retrieve the service names from the cached dataset within the zone for a path and interface, updating the cache when not found. This is used when initializing property values and service name owners. Additional performance enhancements to use `GetSubTree` prior to processing a set speed event will be included under openbmc/openbmc#2911. This will keep unnecessary `GetSubTree` lookups from occurring for paths/interfaces that don't exist to further improve upon initializing properties fan control is defined to use. Tested: First path updates service name cache for all paths sharing the same interface First missing interface on a path updates service name cache for all paths sharing that interface Verify mapper lookups for X number of paths sharing the same interface is reduced to (X-(X-1)) NameOwnerChanged events read/update the same set of service name cache Change-Id: Ia235b36ba5ae8cda38342d7521f3d87080c2970a Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
* Add path to trace for missing propertyMatthew Barth2017-12-111-1/+2
| | | | | | | | When a property can not be found after receiving a property changed signal include the path for the property on the journal entry. Change-Id: Ie0151b943914e02d38bf89760f8a16dc530aa89e Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
* Update string compares on signal messagesMatthew Barth2017-12-041-4/+3
| | | | | | | | Resulting from a code review, remove the use of strcmp when comparing a string to a const char* Change-Id: Idcd3f99bf7ca0151f5f1b97c7ccc54d6e8c56f8e Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
* Fill in NameOwnerChanged signal supportMatthew Barth2017-11-171-2/+36
| | | | | | | | | | A NameOwnerChanged signal message provides three strings containing the service name that has changed along with its old service owner name and new service owner name. These names are then passed along to the handler to find/update the group associated with the changed owner name. Change-Id: I7d67883b010fec5b282bd00a4dcc29629486af00 Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
* Stub NameOwnerChanged signal supportMatthew Barth2017-11-171-0/+69
| | | | | | | | | NameOwnerChanged signals will be used within fan control to configure set speed events for when services providing parameters to the fan control application have unexpectedly terminated. Change-Id: I04f3c7ca2842732e33dc94b0280ad4483f7f1286 Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
* Update event initializationMatthew Barth2017-11-171-48/+88
| | | | | | | | | | | | | | | | Using a null dbus message to the event signal will perform the necessary steps to initialize the event parameters using the given signal handler's function directly. i.e.) In the case for subscribing to PropertiesChanged signals, initially the given property must be read. When the PropertiesChanged signal struct is given a null message, it finds the property, reads the value, and then can perform the given signal handler function directly. This produces the same functional path as receiving a PropertiesChanged signal containing the property value within the message. Change-Id: I35575cfff66eb0305156be786cb1f5536d42bb1c Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
* Add support to handle InterfacesAdded signalsMatthew Barth2017-08-071-0/+94
| | | | | | | | | | | | | | | | | | | | Set speed events can not subscribe to InterfaceAdded signals for properties that are created after fan control initializes the event. Fan control subscribes to property changed signals for all events upon startup where any properties that do not exist are unable to be subscribed to and be notified when their property changes. Therefore, subscribing to the InterfacesAdded signals for properties as well allows any property defined within a set speed event that may not exist upon starting the fan control application get added or updated when the interface it resides on is added. When a subscribed InterfacesAdded signal is caught, the same setProperty handler function will be used to add the property value for the object path, interface, and property name defined to be subscribed to for property change signals. Change-Id: If6fe97288140b83e2e2d735fdf61d52de1ec2e88 Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
* Add setting zone speed actionMatthew Barth2017-05-311-0/+13
| | | | | | | | Enable an action to be defined that sets the zone to a given speed when a number of properties are set to a given value Change-Id: I5252a20a24bdb14dee63080f2c08b080c82ad7e8 Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
* Add property changed signal handlerMatthew Barth2017-05-311-0/+109
Enable the control application to handle property changed signals to set or update a cached set of these properties Change-Id: Ib84ffe1e801ee7dd85d17fdbb122d124d307dbd3 Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
OpenPOWER on IntegriCloud