blob: c78eea4d61cc3f960ddc5b342deb7310cc65c0fc [file] [log] [blame]
Andrew Geisslera90a31a2016-12-13 16:16:28 -06001#include "config.h"
Andrew Geisslere426b582020-05-28 12:40:55 -05002
Andrew Geisslera90a31a2016-12-13 16:16:28 -06003#include "chassis_state_manager.hpp"
4
Andrew Geisslere426b582020-05-28 12:40:55 -05005#include <sdbusplus/bus.hpp>
6
7#include <cstdlib>
8#include <exception>
9#include <iostream>
10
Andrew Geissler769a62f2019-12-06 13:36:08 -060011int main()
Andrew Geisslera90a31a2016-12-13 16:16:28 -060012{
13 auto bus = sdbusplus::bus::new_default();
14
15 // For now, we only have one instance of the chassis
16 auto objPathInst = std::string{CHASSIS_OBJPATH} + '0';
17
18 // Add sdbusplus ObjectManager.
19 sdbusplus::server::manager::manager objManager(bus, objPathInst.c_str());
20
Andrew Geissler769a62f2019-12-06 13:36:08 -060021 phosphor::state::manager::Chassis manager(bus, objPathInst.c_str());
Andrew Geisslera90a31a2016-12-13 16:16:28 -060022
23 bus.request_name(CHASSIS_BUSNAME);
Nagaraju Goruganticb781fe2018-04-06 13:41:01 -050024 manager.startPOHCounter();
Andrew Geisslera90a31a2016-12-13 16:16:28 -060025
26 return 0;
27}