blob: f4e2182124a1b69544deb54c6d7ba10109fe02a4 [file] [log] [blame]
George Liuee1c19e2021-04-01 15:02:57 +08001#include "config.h"
2
3#ifdef MONITOR_OPERATIONAL_STATUS
4#include "operational-status-monitor.hpp"
5#else
Dhruvaraj Subhashchandran59b86cd2017-04-13 00:19:44 -05006#include "fru-fault-monitor.hpp"
George Liuee1c19e2021-04-01 15:02:57 +08007#endif
Dhruvaraj Subhashchandran59b86cd2017-04-13 00:19:44 -05008
9int main(void)
10{
11 /** @brief Dbus constructs used by Fault Monitor */
12 sdbusplus::bus::bus bus = sdbusplus::bus::new_default();
13
George Liuee1c19e2021-04-01 15:02:57 +080014#ifdef MONITOR_OPERATIONAL_STATUS
15 phosphor::led::Operational::status::monitor::Monitor monitor(bus);
16#else
Dhruvaraj Subhashchandran59b86cd2017-04-13 00:19:44 -050017 phosphor::led::fru::fault::monitor::Add monitor(bus);
George Liuee1c19e2021-04-01 15:02:57 +080018#endif
Dhruvaraj Subhashchandran59b86cd2017-04-13 00:19:44 -050019 /** @brief Wait for client requests */
20 while (true)
21 {
22 /** @brief process dbus calls / signals discarding unhandled */
23 bus.process_discard();
24 bus.wait();
25 }
26 return 0;
27}