summaryrefslogtreecommitdiffstats
path: root/bmc_state_manager_main.cpp
blob: d11d9528cf67cce763664b7b641b2829662f3392 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include <sdbusplus/bus.hpp>
#include "config.h"
#include "bmc_state_manager.hpp"

int main(int argc, char**)
{
    auto bus = sdbusplus::bus::new_default();

    // For now, we only have one instance of the BMC
    // 0 is for the current instance
    auto objPathInst = std::string(BMC_OBJPATH) + '0';

    // Add sdbusplus ObjectManager.
    sdbusplus::server::manager::manager objManager(bus, objPathInst.c_str());

    phosphor::state::manager::BMC manager(bus, objPathInst.c_str());

    bus.request_name(BMC_BUSNAME);

    while (true)
    {
        bus.process_discard();
        bus.wait();
    }

    exit(EXIT_SUCCESS);
}
OpenPOWER on IntegriCloud