blob: 2bdcb36a3db3ec4e3aa2a8ea593e2cc485f9a9fe [file] [log] [blame]
Pavithra Barithaya319ebb32021-05-06 06:09:11 -05001#include "host_condition.hpp"
2
3namespace pldm
4{
5namespace dbus_api
6{
7
8Host::FirmwareCondition Host::currentFirmwareCondition() const
9{
10 bool hostRunning = false;
11
12 if (hostPdrObj != nullptr)
13 {
14 hostRunning = hostPdrObj.get()->isHostUp();
15 }
16
17 auto value = hostRunning ? Host::FirmwareCondition::Running
18 : Host::FirmwareCondition::Off;
19
20 return value;
21}
22
23} // namespace dbus_api
24} // namespace pldm