blob: d11d9528cf67cce763664b7b641b2829662f3392 [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
Josh D. Kingbdd9cb72016-12-19 11:13:43 -06005int 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 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}