Andrew Geissler | a90a31a | 2016-12-13 16:16:28 -0600 | [diff] [blame] | 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 | |
Andrew Geissler | 769a62f | 2019-12-06 13:36:08 -0600 | [diff] [blame] | 8 | int main() |
Andrew Geissler | a90a31a | 2016-12-13 16:16:28 -0600 | [diff] [blame] | 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 | |
Andrew Geissler | 769a62f | 2019-12-06 13:36:08 -0600 | [diff] [blame] | 18 | phosphor::state::manager::Chassis manager(bus, objPathInst.c_str()); |
Andrew Geissler | a90a31a | 2016-12-13 16:16:28 -0600 | [diff] [blame] | 19 | |
| 20 | bus.request_name(CHASSIS_BUSNAME); |
Nagaraju Goruganti | cb781fe | 2018-04-06 13:41:01 -0500 | [diff] [blame] | 21 | manager.startPOHCounter(); |
Andrew Geissler | a90a31a | 2016-12-13 16:16:28 -0600 | [diff] [blame] | 22 | |
| 23 | return 0; |
| 24 | } |