blob: 449bea38a33644f4254ecc9985777dfad83dc9c7 [file] [log] [blame]
Deepak Kodihalli6b492fb2017-03-18 01:09:28 -05001#include <phosphor-logging/log.hpp>
2#include <exception>
Vishwanatha Subbanna2180b2d2017-06-28 14:05:57 +05303#include "occ_manager.hpp"
4#include "config.h"
Deepak Kodihalli92a63412017-03-17 05:01:00 -05005
6int main(int argc, char* argv[])
7{
Deepak Kodihalli6b492fb2017-03-18 01:09:28 -05008 try
Deepak Kodihalli92a63412017-03-17 05:01:00 -05009 {
Deepak Kodihallifd358d12017-05-08 07:11:22 -050010 auto bus = sdbusplus::bus::new_default();
Vishwanatha Subbanna2180b2d2017-06-28 14:05:57 +053011 bus.request_name(OCC_CONTROL_BUSNAME);
Deepak Kodihallifd358d12017-05-08 07:11:22 -050012
13 sdbusplus::server::manager::manager objManager(bus,
Vishwanatha Subbanna2180b2d2017-06-28 14:05:57 +053014 OCC_CONTROL_ROOT);
Deepak Kodihallifd358d12017-05-08 07:11:22 -050015
Vishwanatha Subbanna2180b2d2017-06-28 14:05:57 +053016 open_power::occ::Manager mgr(bus);
Deepak Kodihallifd358d12017-05-08 07:11:22 -050017
18 while (true)
19 {
20 bus.process_discard();
21 bus.wait();
22 }
Deepak Kodihalli6b492fb2017-03-18 01:09:28 -050023 }
24 catch (const std::exception& e)
25 {
26 using namespace phosphor::logging;
27 log<level::ERR>(e.what());
28 return -1;
Deepak Kodihalli92a63412017-03-17 05:01:00 -050029 }
30
31 return 0;
32}