Josh D. King | bdd9cb7 | 2016-12-19 11:13:43 -0600 | [diff] [blame] | 1 | #include "config.h" |
Andrew Geissler | e426b58 | 2020-05-28 12:40:55 -0500 | [diff] [blame] | 2 | |
Josh D. King | bdd9cb7 | 2016-12-19 11:13:43 -0600 | [diff] [blame] | 3 | #include "bmc_state_manager.hpp" |
| 4 | |
Andrew Geissler | e426b58 | 2020-05-28 12:40:55 -0500 | [diff] [blame] | 5 | #include <sdbusplus/bus.hpp> |
| 6 | |
Andrew Geissler | 769a62f | 2019-12-06 13:36:08 -0600 | [diff] [blame] | 7 | int main() |
Josh D. King | bdd9cb7 | 2016-12-19 11:13:43 -0600 | [diff] [blame] | 8 | { |
| 9 | auto bus = sdbusplus::bus::new_default(); |
| 10 | |
| 11 | // For now, we only have one instance of the BMC |
| 12 | // 0 is for the current instance |
| 13 | auto objPathInst = std::string(BMC_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::BMC manager(bus, objPathInst.c_str()); |
Josh D. King | bdd9cb7 | 2016-12-19 11:13:43 -0600 | [diff] [blame] | 19 | |
| 20 | bus.request_name(BMC_BUSNAME); |
| 21 | |
Andrew Geissler | 58a1801 | 2018-01-19 19:36:05 -0800 | [diff] [blame] | 22 | while (true) |
Josh D. King | bdd9cb7 | 2016-12-19 11:13:43 -0600 | [diff] [blame] | 23 | { |
| 24 | bus.process_discard(); |
| 25 | bus.wait(); |
| 26 | } |
| 27 | |
| 28 | exit(EXIT_SUCCESS); |
Josh D. King | bdd9cb7 | 2016-12-19 11:13:43 -0600 | [diff] [blame] | 29 | } |