1 #include <cstdlib> 2 #include <iostream> 3 #include <exception> 4 #include <sdbusplus/bus.hpp> 5 #include "config.h" 6 #include "host_state_manager.hpp" 7 8 int main(int argc, char *argv[]) 9 { 10 auto bus = sdbusplus::bus::new_default(); 11 12 // For now, we only have one instance of the host 13 auto objPathInst = std::string{HOST_OBJPATH} + '0'; 14 15 // Add sdbusplus ObjectManager. 16 sdbusplus::server::manager::manager objManager(bus, objPathInst.c_str()); 17 18 phosphor::state::manager::Host manager(bus, 19 HOST_BUSNAME, 20 objPathInst.c_str()); 21 22 bus.request_name(HOST_BUSNAME); 23 24 while(true) 25 { 26 bus.process_discard(); 27 bus.wait(); 28 } 29 return 0; 30 } 31