SunnySrivastava1984 | b59fd09 | 2020-02-03 09:58:56 -0600 | [diff] [blame^] | 1 | #include "config.h" |
| 2 | |
| 3 | #include "manager.hpp" |
| 4 | |
| 5 | #include "parser.hpp" |
| 6 | |
| 7 | #include <exception> |
| 8 | #include <iostream> |
| 9 | #include <vector> |
| 10 | |
| 11 | namespace openpower |
| 12 | { |
| 13 | namespace vpd |
| 14 | { |
| 15 | namespace manager |
| 16 | { |
| 17 | Manager::Manager(sdbusplus::bus::bus&& bus, const char* busName, |
| 18 | const char* objPath, const char* iFace) : |
| 19 | ServerObject<ManagerIface>(bus, objPath), |
| 20 | _bus(std::move(bus)), _manager(_bus, objPath) |
| 21 | { |
| 22 | _bus.request_name(busName); |
| 23 | } |
| 24 | |
| 25 | void Manager::run() |
| 26 | { |
| 27 | while (true) |
| 28 | { |
| 29 | try |
| 30 | { |
| 31 | _bus.process_discard(); |
| 32 | // wait for event |
| 33 | _bus.wait(); |
| 34 | } |
| 35 | catch (const std::exception& e) |
| 36 | { |
| 37 | std::cerr << e.what() << "\n"; |
| 38 | } |
| 39 | } |
| 40 | } |
| 41 | |
| 42 | void Manager::writeKeyword(const sdbusplus::message::object_path path, |
| 43 | const std::string recordName, |
| 44 | const std::string keyword, const Binary value) |
| 45 | { |
| 46 | // implement the interface to write keyword VPD data |
| 47 | } |
| 48 | |
| 49 | std::vector<sdbusplus::message::object_path> |
| 50 | Manager::getFRUsByUnexpandedLocationCode(const std::string locationCode, |
| 51 | const uint16_t nodeNumber) |
| 52 | { |
| 53 | // implement the interface |
| 54 | } |
| 55 | |
| 56 | std::vector<sdbusplus::message::object_path> |
| 57 | Manager::getFRUsByExpandedLocationCode(const std::string locationCode) |
| 58 | { |
| 59 | // implement the interface |
| 60 | } |
| 61 | |
| 62 | std::string Manager::getExpandedLocationCode(const std::string locationCode, |
| 63 | const uint16_t nodeNumber) |
| 64 | { |
| 65 | // implement the interface |
| 66 | } |
| 67 | } // namespace manager |
| 68 | } // namespace vpd |
| 69 | } // namespace openpower |