Add safe mode to user interface
putting in code that puts safe mode onto dbus.
Tested: inject error that puts in safe mode, dbus CMD
to read dbus safeMode.
Signed-off-by: Sheldon Bailey <baileysh@us.ibm.com>
Change-Id: I48c5b41a48d0883a8d1e2916da8725391a7bcbc2
diff --git a/pldm.hpp b/pldm.hpp
index 945d7a1..40bc78b 100644
--- a/pldm.hpp
+++ b/pldm.hpp
@@ -58,9 +58,10 @@
explicit Interface(
std::function<bool(open_power::occ::instanceID, bool)> callBack,
std::function<void(open_power::occ::instanceID, bool)> sbeCallBack,
- EventPtr& event) :
+ std::function<void(bool)> safeModeCallBack, EventPtr& event) :
callBack(callBack),
- sbeCallBack(sbeCallBack), event(event),
+ sbeCallBack(sbeCallBack), safeModeCallBack(safeModeCallBack),
+ event(event),
pldmEventSignal(
open_power::occ::utils::getBus(),
MatchRules::type::signal() +
@@ -154,6 +155,11 @@
std::function<void(open_power::occ::instanceID, bool)> sbeCallBack =
nullptr;
+ /** @brief Callback handler to be invoked when the OCC is in SAFE Mode =
+ * true or when OCCs are in_service = false.
+ */
+ std::function<void(bool)> safeModeCallBack = nullptr;
+
/** @brief reference to sd_event wrapped in unique_ptr */
EventPtr& event;