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