Josh D. King | bdd9cb7 | 2016-12-19 11:13:43 -0600 | [diff] [blame] | 1 | #include <sdbusplus/bus.hpp> |
| 2 | #include "config.h" |
| 3 | #include "bmc_state_manager.hpp" |
| 4 | |
Josh D. King | bdd9cb7 | 2016-12-19 11:13:43 -0600 | [diff] [blame] | 5 | int main(int argc, char**) |
| 6 | { |
| 7 | auto bus = sdbusplus::bus::new_default(); |
| 8 | |
| 9 | // For now, we only have one instance of the BMC |
| 10 | // 0 is for the current instance |
| 11 | auto objPathInst = std::string(BMC_OBJPATH) + '0'; |
| 12 | |
| 13 | // Add sdbusplus ObjectManager. |
| 14 | sdbusplus::server::manager::manager objManager(bus, objPathInst.c_str()); |
| 15 | |
Andrew Geissler | 58a1801 | 2018-01-19 19:36:05 -0800 | [diff] [blame] | 16 | phosphor::state::manager::BMC manager(bus, objPathInst.c_str()); |
Josh D. King | bdd9cb7 | 2016-12-19 11:13:43 -0600 | [diff] [blame] | 17 | |
| 18 | bus.request_name(BMC_BUSNAME); |
| 19 | |
Andrew Geissler | 58a1801 | 2018-01-19 19:36:05 -0800 | [diff] [blame] | 20 | while (true) |
Josh D. King | bdd9cb7 | 2016-12-19 11:13:43 -0600 | [diff] [blame] | 21 | { |
| 22 | bus.process_discard(); |
| 23 | bus.wait(); |
| 24 | } |
| 25 | |
| 26 | exit(EXIT_SUCCESS); |
Josh D. King | bdd9cb7 | 2016-12-19 11:13:43 -0600 | [diff] [blame] | 27 | } |