blob: 27965e0a867aa1f4f329b6d4ee0e05e6bfc1ccc2 (
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
28
29
30
31
32
|
#include <cstdlib>
#include <iostream>
#include <exception>
#include <sdbusplus/bus.hpp>
#include "config.h"
#include "chassis_state_manager.hpp"
int main(int argc, char *argv[])
{
auto bus = sdbusplus::bus::new_default();
// For now, we only have one instance of the chassis
auto objPathInst = std::string{CHASSIS_OBJPATH} + '0';
// Add sdbusplus ObjectManager.
sdbusplus::server::manager::manager objManager(bus, objPathInst.c_str());
phosphor::state::manager::Chassis manager(bus,
CHASSIS_BUSNAME,
objPathInst.c_str());
bus.request_name(CHASSIS_BUSNAME);
while(true)
{
bus.process_discard();
bus.wait();
}
return 0;
}
|