blob: 5867e5122b1d24dca24ff46a9d2ca830ad7a00a9 [file] [log] [blame]
Josh D. Kingbdd9cb72016-12-19 11:13:43 -06001#include "config.h"
Andrew Geisslere426b582020-05-28 12:40:55 -05002
Josh D. Kingbdd9cb72016-12-19 11:13:43 -06003#include "bmc_state_manager.hpp"
4
Andrew Geisslere426b582020-05-28 12:40:55 -05005#include <sdbusplus/bus.hpp>
6
Andrew Geissler769a62f2019-12-06 13:36:08 -06007int main()
Josh D. Kingbdd9cb72016-12-19 11:13:43 -06008{
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 Geissler58a18012018-01-19 19:36:05 -080018 phosphor::state::manager::BMC manager(bus, objPathInst.c_str());
Josh D. Kingbdd9cb72016-12-19 11:13:43 -060019
20 bus.request_name(BMC_BUSNAME);
21
Andrew Geissler58a18012018-01-19 19:36:05 -080022 while (true)
Josh D. Kingbdd9cb72016-12-19 11:13:43 -060023 {
24 bus.process_discard();
25 bus.wait();
26 }
27
28 exit(EXIT_SUCCESS);
Josh D. Kingbdd9cb72016-12-19 11:13:43 -060029}