blob: 13f266790e82b992acc32cd2440b1752e0800126 [file] [log] [blame]
Andrew Geissler36529022016-11-29 15:23:54 -06001#include <cstdlib>
2#include <iostream>
3#include <exception>
4#include <sdbusplus/bus.hpp>
5#include "config.h"
6#include "host_state_manager.hpp"
7
8int main(int argc, char *argv[])
9{
10 auto bus = sdbusplus::bus::new_default();
11
Andrew Geissler1cb8b702016-12-13 13:33:06 -060012 // For now, we only have one instance of the host
13 auto objPathInst = std::string{OBJPATH} + '0';
14
Andrew Geissler36529022016-11-29 15:23:54 -060015 phosphor::state::manager::Host manager(bus,
16 BUSNAME,
Andrew Geissler1cb8b702016-12-13 13:33:06 -060017 objPathInst.c_str());
18
Andrew Geissler36529022016-11-29 15:23:54 -060019 // Add sdbusplus ObjectManager.
Andrew Geissler1cb8b702016-12-13 13:33:06 -060020 sdbusplus::server::manager::manager objManager(bus, objPathInst.c_str());
Andrew Geissler36529022016-11-29 15:23:54 -060021
22 bus.request_name(BUSNAME);
23
24 while(true)
25 {
26 bus.process_discard();
27 bus.wait();
28 }
29 return 0;
30}