Lines Matching +full:auto +full:- +full:string +full:- +full:detection

8  *     http://www.apache.org/licenses/LICENSE-2.0
26 #include <phosphor-logging/lg2.hpp>
33 #include <string>
46 const std::map<std::string, methodHandler> JsonConfig::_methods = {
48 const std::map<std::string, rpolicyHandler> JsonConfig::_rpolicies = {
51 const auto loggingPath = "/xyz/openbmc_project/logging";
52 const auto loggingCreateIface = "xyz.openbmc_project.Logging.Create";
66 for (auto& p : _policies) in start()
68 p->monitor(); in start()
90 for (auto& p : _policies) in sighupHandler()
92 p->monitor(); in sighupHandler()
111 for (auto& member : jsonConf) in process()
122 // Loop thru the configured methods of presence detection in process()
124 for (auto& method : member["methods"].items()) in process()
130 "FAN_NAME", member["name"].get<std::string>()); in process()
134 // The method type of fan presence detection in process()
136 auto type = method.value()["type"].get<std::string>(); in process()
138 auto func = _methods.find(type); in process()
142 auto sensor = func->second(fans.size(), method.value()); in process()
152 "FAN_NAME", member["name"].get<std::string>(), in process()
169 const auto& eeprom = member.at("eeprom"); in process()
176 "FAN_NAME", member["name"].get<std::string>()); in process()
182 eeprom["bus_address"].get<std::string>(), in process()
183 eeprom["driver_name"].get<std::string>(), in process()
187 auto fan = in process()
193 auto policy = in process()
209 if (std::any_of(_fans.begin(), _fans.end(), [](const auto& fan) { in process()
230 // The redundancy policy type for fan presence detection in getPolicy()
232 auto type = rpolicy["type"].get<std::string>(); in getPolicy()
234 auto func = _rpolicies.find(type); in getPolicy()
238 return func->second(fpolicy, std::move(eepromDevice)); in getPolicy()
251 * Methods of fan presence detection function definitions
255 // Get a constructed presence sensor for fan presence detection by tach
266 std::vector<std::string> sensors; in getTach()
267 for (auto& sensor : method["sensors"]) in getTach()
269 sensors.emplace_back(sensor.get<std::string>()); in getTach()
276 // Get a constructed presence sensor for fan presence detection by gpio
288 auto physpath = method["physpath"].get<std::string>(); in getGpio()
289 auto devpath = method["devpath"].get<std::string>(); in getGpio()
290 auto key = method["key"].get<unsigned int>(); in getGpio()
305 auto severity = in getGpio()
308 std::map<std::string, std::string> additionalData{ in getGpio()
323 "Call to create an error log for presence-sensor failure failed: {ERROR}", in getGpio()
334 * Redundancy policies for fan presence detection function definitions
343 for (auto& fanSensor : std::get<fanPolicySensorListPos>(fan)) in getAnyof()
357 for (auto& fanSensor : std::get<fanPolicySensorListPos>(fan)) in getFallback()