blob: 4eb47ae0e65b99e381a9db7ab2c288a9e640da12 [file] [log] [blame]
Patrick Venture09791852018-04-17 17:40:00 -07001#include "hwmon.hpp"
2
3namespace hwmon {
4
5bool getAttributes(const std::string& type, Attributes& attributes)
6{
7 // *INDENT-OFF*
8 auto a = std::find_if(
9 typeAttrMap.begin(),
10 typeAttrMap.end(),
11 [&](const auto & e)
12 {
13 return type == getHwmonType(e);
14 });
15 // *INDENT-ON*
16
17 if (a == typeAttrMap.end())
18 {
19 return false;
20 }
21
22 attributes = *a;
23 return true;
24}
25
26} // namespace hwmon