From 70aafbb58d98c6ca5a049433db87493784ec587a Mon Sep 17 00:00:00 2001 From: Marri Devender Rao Date: Thu, 12 Apr 2018 01:11:48 -0500 Subject: Add SNMP event callback for error notification Added callback support for SNMP events. Parse the callback message and raise SNMP trap Clients specify the object paths to watch and callbacks to invoke in the config yaml. Change-Id: I105652f65e4e1c5354c934c88e4d59866540f71c Signed-off-by: Marri Devender Rao --- src/callback.hpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/callback.hpp') diff --git a/src/callback.hpp b/src/callback.hpp index 26cd2a1..e1e2325 100644 --- a/src/callback.hpp +++ b/src/callback.hpp @@ -33,6 +33,15 @@ class Callback * */ virtual void operator()(Context ctx) = 0; + + /** @brief Run the callback. + * @param[in] ctx - caller context + * Context could be Startup or Signal + * Startup: Callback is called as part of process startup. + * Signal: Callback is called as part of watch condition has been met. + * @param[in] msg - The sdbusplus signal message + */ + virtual void operator()(Context ctx, sdbusplus::message::message& msg){}; }; /** @class Conditional -- cgit v1.2.1