blob: 27965e0a867aa1f4f329b6d4ee0e05e6bfc1ccc2 [file] [log] [blame]
Andrew Geisslera90a31a2016-12-13 16:16:28 -06001#include <cstdlib>
2#include <iostream>
3#include <exception>
4#include <sdbusplus/bus.hpp>
5#include "config.h"
6#include "chassis_state_manager.hpp"
7
8
9int main(int argc, char *argv[])
10{
11 auto bus = sdbusplus::bus::new_default();
12
13 // For now, we only have one instance of the chassis
14 auto objPathInst = std::string{CHASSIS_OBJPATH} + '0';
15
16 // Add sdbusplus ObjectManager.
17 sdbusplus::server::manager::manager objManager(bus, objPathInst.c_str());
18
19 phosphor::state::manager::Chassis manager(bus,
20 CHASSIS_BUSNAME,
21 objPathInst.c_str());
22
23 bus.request_name(CHASSIS_BUSNAME);
24
25 while(true)
26 {
27 bus.process_discard();
28 bus.wait();
29 }
30
31 return 0;
32}