summaryrefslogtreecommitdiffstats
path: root/sdbusplus.hpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix std::variant usageWilliam A. Kennington III2018-11-061-2/+2
| | | | | | | | We need to use the std::get() interface instead of the mapbox .get() member interface for variant compatibility. Change-Id: I6c7843ea0cb765332457273867b5df6b78ca72a2 Signed-off-by: William A. Kennington III <wak@google.com>
* Handle SdBusError exceptionsMatthew Barth2018-07-171-5/+10
| | | | | | | | | | When the SdBusError exception was added, all sdbusplus::bus::call function use required this exception be handled appropriately in each case where it could occur. These changes are the result of handling the possibility of this exception correctly within the fan applications. Change-Id: I6ecef3008412b299a4fedbb13716f656cfbf1a90 Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
* Throw DBusPropertyError for all property accessesMatthew Barth2018-05-171-7/+92
| | | | | | | | | | | | | On all get/set property functions, when an error occurs performing the access of a property, throw a DBusPropertyError exception containing the identifying parameters of the property. Tested: DBusPropertyError exception occurs on failing to set a property DBusPropertyError exception occurs on failing to get a property Change-Id: I9882d62d75153b4320a8d4a21ba7a52efbdd0af2 Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
* Add set property functions without mapper lookupMatthew Barth2018-05-171-0/+44
| | | | | | | | Tested: Property set with provided service name Change-Id: I158d33f85602f48d1dfe8baa7ce54eec6e8f8296 Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
* Call method and return functionMatthew Barth2018-05-171-0/+21
| | | | | | | | | | | | Add a function that calls a method and returns the response message without checking for an error. Its up to the user of this function to check if response.is_method_error() exists and handle accordingly. Tested: Method is called and raw response is returned Change-Id: I6678a78d8cfb32d2d13dba7cb48719fd26eccebc Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
* Throw custom exceptions on D-Bus method failuresMatt Spinler2018-05-091-24/+92
| | | | | | | | | | | | | | | | | | | | | 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 methods to return property variantMatthew Barth2018-05-031-0/+77
| | | | | | | | | | | | Create methods to return a property variant for use where the overloaded comparison operations are needed against a property value stored as a variant. Tested: A property is looked up and returned as the given variant type Change-Id: Iab557781a3ab9e33d3595ad69db5544a25efe2eb Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
* Get a property without service name lookupMatthew Barth2018-03-121-0/+40
| | | | | | | | | | | Expand on the current getProperty functions to allow a service name to be passed in so a mapper lookup is not necessary. Tested: A property value is read from a message where the service is given Change-Id: Ia0450163744c9f89a26a053ec2cfb44ae761426d Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
* Add GetSubTree method for single interfaceMatthew Barth2018-03-061-0/+38
| | | | | | | | | | | | Perform a GetSubTree mapper call and return the mapper response structure as is for a single interface over a given path subtree depth. Tested: Returned subtree structure matches mapper structure for an interface Returned subtree data matches mapper data for an interface Change-Id: If6b66433a331ac20633ac99c458eb5edb653bff2 Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
* Allow existing bus connectionsBrad Bishop2017-08-031-6/+129
| | | | | | | | Overload the wrapper methods in sdbusplus.hpp for clients that already have a bus connection. Change-Id: I662385e6afe52179293ccbd41212d208e34bfbc5 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* whitespace fixesBrad Bishop2017-08-031-42/+42
| | | | | Change-Id: Ibce6f79d4f4efb4a1605afc2958dd543f54ae726 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* sdbusplus: Add PropertiesChanged type aliasBrad Bishop2017-07-181-0/+4
| | | | | | | | Add an alias to cut down on typing when using properties changed signal callbacks. Change-Id: I494d58006cbc136fc2f1d9395039a4535922f35e Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Add sdbusplus wrapperBrad Bishop2017-07-081-0/+195
Facilitate mocking. Avoid sdbusplus::bus::bus reference proliferation. Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com> Change-Id: I0a55fa178a96af4fd63f249cde0a129b7007731f
OpenPOWER on IntegriCloud