blob: f34ab6866b54a37ca7a2a6c0410a2bd28b4a2d0b [file] [log] [blame]
SunnySrivastava1984b59fd092020-02-03 09:58:56 -06001#include "config.h"
2
3#include "manager.hpp"
4
5#include "parser.hpp"
6
7#include <exception>
8#include <iostream>
9#include <vector>
10
11namespace openpower
12{
13namespace vpd
14{
15namespace manager
16{
17Manager::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
25void 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
42void 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
49std::vector<sdbusplus::message::object_path>
50 Manager::getFRUsByUnexpandedLocationCode(const std::string locationCode,
51 const uint16_t nodeNumber)
52{
53 // implement the interface
54}
55
56std::vector<sdbusplus::message::object_path>
57 Manager::getFRUsByExpandedLocationCode(const std::string locationCode)
58{
59 // implement the interface
60}
61
62std::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