blob: 2bdcb36a3db3ec4e3aa2a8ea593e2cc485f9a9fe [file] [log] [blame]
#include "host_condition.hpp"
namespace pldm
{
namespace dbus_api
{
Host::FirmwareCondition Host::currentFirmwareCondition() const
{
bool hostRunning = false;
if (hostPdrObj != nullptr)
{
hostRunning = hostPdrObj.get()->isHostUp();
}
auto value = hostRunning ? Host::FirmwareCondition::Running
: Host::FirmwareCondition::Off;
return value;
}
} // namespace dbus_api
} // namespace pldm