blob: c03eeac9f492011c4d28e02f7fc06d35e9a4816c [file] [log] [blame]
Josh D. Kingbdd9cb72016-12-19 11:13:43 -06001#include <sdbusplus/bus.hpp>
2#include "config.h"
3#include "bmc_state_manager.hpp"
4
Andrew Geissler769a62f2019-12-06 13:36:08 -06005int main()
Josh D. Kingbdd9cb72016-12-19 11:13:43 -06006{
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 Geissler58a18012018-01-19 19:36:05 -080016 phosphor::state::manager::BMC manager(bus, objPathInst.c_str());
Josh D. Kingbdd9cb72016-12-19 11:13:43 -060017
18 bus.request_name(BMC_BUSNAME);
19
Andrew Geissler58a18012018-01-19 19:36:05 -080020 while (true)
Josh D. Kingbdd9cb72016-12-19 11:13:43 -060021 {
22 bus.process_discard();
23 bus.wait();
24 }
25
26 exit(EXIT_SUCCESS);
Josh D. Kingbdd9cb72016-12-19 11:13:43 -060027}