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 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 chassis 13 auto objPathInst = std::string{CHASSIS_OBJPATH} + '0'; 14 15 // Add sdbusplus ObjectManager. 16 sdbusplus::server::manager::manager objManager(bus, objPathInst.c_str()); 17 18 phosphor::state::manager::Chassis manager(bus, CHASSIS_BUSNAME, 19 objPathInst.c_str()); 20 21 bus.request_name(CHASSIS_BUSNAME); 22 manager.startPOHCounter(); 23 24 return 0; 25 } 26