diff options
author | Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com> | 2017-06-29 18:35:00 +0530 |
---|---|---|
committer | Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com> | 2017-07-29 23:57:59 +0530 |
commit | ee4d83dfc7b6cf3b5979541ab5b1918b68e6bbdb (patch) | |
tree | 4d186ddf133d77880e857fccdddb71fcc155a6bf /occ_manager.hpp | |
parent | 554d60059e7d0b699b3cdcbe8de2c341613e9931 (diff) | |
download | openpower-occ-control-ee4d83dfc7b6cf3b5979541ab5b1918b68e6bbdb.tar.gz openpower-occ-control-ee4d83dfc7b6cf3b5979541ab5b1918b68e6bbdb.zip |
Add support to watch for OCC errors
Change-Id: I98d95020a2d01e281e5c8efa825d6b4bd4c6c160
Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>
Diffstat (limited to 'occ_manager.hpp')
-rw-r--r-- | occ_manager.hpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/occ_manager.hpp b/occ_manager.hpp index 48cd9c8..4430d74 100644 --- a/occ_manager.hpp +++ b/occ_manager.hpp @@ -32,10 +32,14 @@ struct Manager /** @brief Adds OCC pass-through and status objects on the bus * when corresponding CPU inventory is created. - * @param[in] bus - handle to the bus + * + * @param[in] bus - handle to the bus + * @param[in] event - Unique ptr reference to sd_event */ - Manager(sdbusplus::bus::bus& bus): - bus(bus) + Manager(sdbusplus::bus::bus& bus, + EventPtr& event) : + bus(bus), + event(event) { for (auto id = 0; id < MAX_CPUS; ++id) { @@ -50,7 +54,7 @@ struct Manager } /** @brief Callback that responds to cpu creation in the inventory - - * by creating the occ passthrough and status objects. + * by creating the needed objects. * * @param[in] msg - bus message * @@ -78,6 +82,7 @@ struct Manager statusObjects.emplace_back( std::make_unique<Status>( bus, + event, path.c_str())); // Create the power cap monitor object for master occ (0) @@ -94,6 +99,9 @@ struct Manager /** @brief reference to the bus */ sdbusplus::bus::bus& bus; + /** @brief reference to sd_event wrapped in unique_ptr */ + EventPtr& event; + /** @brief OCC pass-through objects */ std::vector<std::unique_ptr<PassThrough>> passThroughObjects; |