blob: 8e0b8eee0b4788358b2c6db178f78c0598b0f01e [file] [log] [blame] [edit]
#include "sensors/hwmon.hpp"
namespace pldm
{
namespace sensor
{
bool getAttributes(uint8_t type, Attributes& attributes)
{
auto a =
std::find_if(typeAttrMap.begin(), typeAttrMap.end(),
[&](const auto& e) { return type == getHwmonType(e); });
if (a == typeAttrMap.end())
{
return false;
}
attributes = *a;
return true;
}
} // namespace sensor
} // namespace pldm