diff options
Diffstat (limited to 'src/sdbusplus.hpp')
-rw-r--r-- | src/sdbusplus.hpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/sdbusplus.hpp b/src/sdbusplus.hpp index 7dbf44d..8afb8b5 100644 --- a/src/sdbusplus.hpp +++ b/src/sdbusplus.hpp @@ -30,6 +30,28 @@ class SDBusPlus } public: + /** @brief Invoke a method; ignore reply. */ + template <typename ...Args> + static void callMethodNoReply( + const std::string& busName, + const std::string& path, + const std::string& interface, + const std::string& method, + Args&& ... args) + { + auto reqMsg = getBus().new_method_call( + busName.c_str(), + path.c_str(), + interface.c_str(), + method.c_str()); + reqMsg.append(std::forward<Args>(args)...); + getBus().call_noreply(reqMsg); + + // TODO: openbmc/openbmc#1719 + // invoke these methods async, with a callback + // handler that checks for errors and logs. + } + /** @brief Invoke a method. */ template <typename ...Args> static auto callMethod( |