From 636577f44fe3fc951538c1119ed0da8ac9a40932 Mon Sep 17 00:00:00 2001 From: "Edward A. James" Date: Fri, 6 Oct 2017 10:53:55 -0500 Subject: Add OCC present count detection and watch Add a Presence child class of Error to handle detecting the number of OCCs available. Add an instance of this Presence class if the Device detects that it is the master OCC, since the number of present OCCs is only reported by the master OCC. When a change to the number of OCCs reported is detected, compare with the number of OCCs determined to be active by the Manager, and if there is a mismatch, follow the usual error path (reset OCC, etc). Partially resolves openbmc/openbmc#2285 See https://gerrit.openbmc-project.xyz/#/c/7843/ Change-Id: Idbaca52b307992d9b01fe15439ab746ef6d64397 Signed-off-by: Edward A. James --- occ_manager.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'occ_manager.cpp') diff --git a/occ_manager.cpp b/occ_manager.cpp index 8b99b1f..7d51490 100644 --- a/occ_manager.cpp +++ b/occ_manager.cpp @@ -70,6 +70,7 @@ void Manager::createObjects(const std::string& occ) bus, event, path.c_str(), + *this, std::bind(std::mem_fn(&Manager::statusCallBack), this, std::placeholders::_1))); @@ -132,7 +133,8 @@ void Manager::initStatusObjects() std::make_unique( bus, event, - path.c_str())); + path.c_str(), + *this)); } } #endif -- cgit v1.2.1