Andrew Geissler | a90a31a | 2016-12-13 16:16:28 -0600 | [diff] [blame] | 1 | #include "config.h" |
Andrew Geissler | e426b58 | 2020-05-28 12:40:55 -0500 | [diff] [blame] | 2 | |
Andrew Geissler | a90a31a | 2016-12-13 16:16:28 -0600 | [diff] [blame] | 3 | #include "chassis_state_manager.hpp" |
| 4 | |
Andrew Geissler | e426b58 | 2020-05-28 12:40:55 -0500 | [diff] [blame] | 5 | #include <sdbusplus/bus.hpp> |
| 6 | |
| 7 | #include <cstdlib> |
| 8 | #include <exception> |
| 9 | #include <iostream> |
| 10 | |
Andrew Geissler | 769a62f | 2019-12-06 13:36:08 -0600 | [diff] [blame] | 11 | int main() |
Andrew Geissler | a90a31a | 2016-12-13 16:16:28 -0600 | [diff] [blame] | 12 | { |
| 13 | auto bus = sdbusplus::bus::new_default(); |
| 14 | |
| 15 | // For now, we only have one instance of the chassis |
| 16 | auto objPathInst = std::string{CHASSIS_OBJPATH} + '0'; |
| 17 | |
| 18 | // Add sdbusplus ObjectManager. |
| 19 | sdbusplus::server::manager::manager objManager(bus, objPathInst.c_str()); |
| 20 | |
Andrew Geissler | 769a62f | 2019-12-06 13:36:08 -0600 | [diff] [blame] | 21 | phosphor::state::manager::Chassis manager(bus, objPathInst.c_str()); |
Andrew Geissler | a90a31a | 2016-12-13 16:16:28 -0600 | [diff] [blame] | 22 | |
| 23 | bus.request_name(CHASSIS_BUSNAME); |
Nagaraju Goruganti | cb781fe | 2018-04-06 13:41:01 -0500 | [diff] [blame] | 24 | manager.startPOHCounter(); |
Andrew Geissler | a90a31a | 2016-12-13 16:16:28 -0600 | [diff] [blame] | 25 | |
| 26 | return 0; |
| 27 | } |