blob: 40a3d4ddc8526f369c901d381f087a336ffbd9ca [file] [log] [blame]
Carol Wang71230ef2020-02-18 17:39:49 +08001#include <cstdlib>
2#include <iostream>
3#include <exception>
4#include <sdbusplus/bus.hpp>
5#include "config.h"
6#include "scheduled_host_transition.hpp"
7
8int main()
9{
10 auto bus = sdbusplus::bus::new_default();
11
12 // For now, we only have one instance of the host
13 auto objPathInst = std::string{HOST_OBJPATH} + '0';
14
15 // Add sdbusplus ObjectManager.
16 sdbusplus::server::manager::manager objManager(bus, objPathInst.c_str());
17
18 phosphor::state::manager::ScheduledHostTransition manager(
19 bus, objPathInst.c_str());
20
21 bus.request_name(SCHEDULED_HOST_TRANSITION_BUSNAME);
22
23 while (true)
24 {
25 bus.process_discard();
26 bus.wait();
27 }
28 return 0;
29}