blob: 18708905b3cc196dd67d9fbe7250127d4801569e [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 Geisslera90a31a2016-12-13 16:16:28 -06008int main(int argc, char *argv[])
9{
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 Geissler58a18012018-01-19 19:36:05 -080018 phosphor::state::manager::Chassis manager(bus, CHASSIS_BUSNAME,
Andrew Geisslera90a31a2016-12-13 16:16:28 -060019 objPathInst.c_str());
20
21 bus.request_name(CHASSIS_BUSNAME);
Nagaraju Goruganticb781fe2018-04-06 13:41:01 -050022 manager.startPOHCounter();
Andrew Geisslera90a31a2016-12-13 16:16:28 -060023
24 return 0;
25}