blob: 30112a48d54f8a9b2e1def43ae16d616061130c2 [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
Andrew Geissler769a62f2019-12-06 13:36:08 -06008int main()
Andrew Geisslera90a31a2016-12-13 16:16:28 -06009{
10 auto bus = sdbusplus::bus::new_default();
11
12 // For now, we only have one instance of the chassis
13 auto objPathInst = std::string{CHASSIS_OBJPATH} + '0';
14
15 // Add sdbusplus ObjectManager.
16 sdbusplus::server::manager::manager objManager(bus, objPathInst.c_str());
17
Andrew Geissler769a62f2019-12-06 13:36:08 -060018 phosphor::state::manager::Chassis manager(bus, objPathInst.c_str());
Andrew Geisslera90a31a2016-12-13 16:16:28 -060019
20 bus.request_name(CHASSIS_BUSNAME);
Nagaraju Goruganticb781fe2018-04-06 13:41:01 -050021 manager.startPOHCounter();
Andrew Geisslera90a31a2016-12-13 16:16:28 -060022
23 return 0;
24}