xref: /openbmc/phosphor-hwmon/hwmon.cpp (revision 043d32306e00484afc446a44789b61869ea14f84)
1 #include "hwmon.hpp"
2 
3 namespace hwmon
4 {
5 
6 bool getAttributes(const std::string& type, Attributes& attributes)
7 {
8     // *INDENT-OFF*
9     auto a =
10         std::find_if(typeAttrMap.begin(), typeAttrMap.end(),
11                      [&](const auto& e) { return type == getHwmonType(e); });
12     // *INDENT-ON*
13 
14     if (a == typeAttrMap.end())
15     {
16         return false;
17     }
18 
19     attributes = *a;
20     return true;
21 }
22 
23 } //  namespace hwmon
24