1 #include <phosphor-logging/log.hpp> 2 #include <exception> 3 #include "occ_manager.hpp" 4 #include "config.h" 5 6 int main(int argc, char* argv[]) 7 { 8 try 9 { 10 auto bus = sdbusplus::bus::new_default(); 11 bus.request_name(OCC_CONTROL_BUSNAME); 12 13 sdbusplus::server::manager::manager objManager(bus, 14 OCC_CONTROL_ROOT); 15 16 open_power::occ::Manager mgr(bus); 17 18 while (true) 19 { 20 bus.process_discard(); 21 bus.wait(); 22 } 23 } 24 catch (const std::exception& e) 25 { 26 using namespace phosphor::logging; 27 log<level::ERR>(e.what()); 28 return -1; 29 } 30 31 return 0; 32 } 33