summaryrefslogtreecommitdiffstats
path: root/extensions/openpower-pels/manager.hpp
diff options
context:
space:
mode:
authorMatt Spinler <spinler@us.ibm.com>2019-09-11 12:36:07 -0500
committerMatt Spinler <spinler@us.ibm.com>2019-09-27 14:26:15 -0500
commitc8705e2bfcc7582fb7dc89ac1598489712c006f3 (patch)
treeee5feecbbd9379d23f9d5f17e51bd8ea721bbff6 /extensions/openpower-pels/manager.hpp
parentb666433986470ba76ed7357ea026db39ad0b404b (diff)
downloadphosphor-logging-c8705e2bfcc7582fb7dc89ac1598489712c006f3.tar.gz
phosphor-logging-c8705e2bfcc7582fb7dc89ac1598489712c006f3.zip
PEL: Interface to collect system data
There are PEL fields that contain information that must be obtained from various places throughout the BMC, such as the machine type/model/SN from VPD, a few types of codes levels, etc. Create a DataInterface class that will provide the APIs for collecting this information. It has an abstract base class so that its functions can be mocked to return specific data in test cases. This commit provides APIs to read and present the machine type-model and machine serial number. These will be used in the FailingMTM and ExtendedUserHeader PEL sections. Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: Iec41fea8d9510ba711475154f019bd59f0028d2e
Diffstat (limited to 'extensions/openpower-pels/manager.hpp')
-rw-r--r--extensions/openpower-pels/manager.hpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/extensions/openpower-pels/manager.hpp b/extensions/openpower-pels/manager.hpp
index 3134f23..49ac8bf 100644
--- a/extensions/openpower-pels/manager.hpp
+++ b/extensions/openpower-pels/manager.hpp
@@ -1,6 +1,6 @@
#pragma once
-#include "elog_entry.hpp"
+#include "data_interface.hpp"
#include "log_manager.hpp"
#include "paths.hpp"
#include "repository.hpp"
@@ -30,8 +30,10 @@ class Manager
*
* @param[in] logManager - internal::Manager object
*/
- explicit Manager(internal::Manager& logManager) :
- _logManager(logManager), _repo(getPELRepoPath())
+ explicit Manager(phosphor::logging::internal::Manager& logManager,
+ std::unique_ptr<DataInterfaceBase>&& dataIface) :
+ _logManager(logManager),
+ _repo(getPELRepoPath()), _dataIface(std::move(dataIface))
{
}
@@ -104,6 +106,11 @@ class Manager
* @brief The PEL repository object
*/
Repository _repo;
+
+ /**
+ * @brief The API the PEL sections use to gather data
+ */
+ std::unique_ptr<DataInterfaceBase> _dataIface;
};
} // namespace pels
OpenPOWER on IntegriCloud