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