Lines Matching full:psu
137 std::find_if(psus.begin(), psus.end(), [&invpath](auto& psu) { in getPSUProperties() argument
138 return psu->getInventoryPath() == invpath; in getPSUProperties()
156 auto psu = std::make_unique<PowerSupply>( in getPSUProperties() local
159 psus.emplace_back(std::move(psu)); in getPSUProperties()
296 // A PSU became present, force the PSU validation to run. in psuPresenceChanged()
327 std::for_each(psus.begin(), psus.end(), [&driverName](auto& psu) { in populateDriverName() argument
328 if (!psu->getDriverName().empty()) in populateDriverName()
330 driverName = psu->getDriverName(); in populateDriverName()
335 [&driverName](auto& psu) { psu->setDriverName(driverName); }); in populateDriverName() argument
378 for (const auto& psu : psus) in validateConfig() local
380 if ((psu->hasInputFault() || psu->hasVINUVFault()) && psu->isPresent()) in validateConfig()
398 for (const auto& psu : psus) in validateConfig() local
400 if (!psu->isPresent()) in validateConfig()
405 psu->getInputVoltage(actualVoltage, inputVoltage); in validateConfig()
461 for (auto& psu : psus) in syncHistory() local
463 psu->clearSyncHistoryRequired(); in syncHistory()
470 std::any_of(psus.begin(), psus.end(), [](const auto& psu) { in analyze() argument
471 return psu->isSyncHistoryRequired(); in analyze()
478 for (auto& psu : psus) in analyze() local
480 psu->analyze(); in analyze()
485 // Only perform individual PSU analysis if power is on and a brownout has in analyze()
492 for (auto& psu : psus) in analyze() local
496 if (!psu->isFaultLogged() && !psu->isPresent() && in analyze()
501 // TODO check required PSU in analyze()
508 psu->getInventoryPath(); in analyze()
514 psu->setFaultLogged(); in analyze()
516 else if (!psu->isFaultLogged() && psu->isFaulted()) in analyze()
521 std::format("{:#04x}", psu->getStatusWord()); in analyze()
523 std::format("{:#02x}", psu->getMFRFault()); in analyze()
527 additionalData["FW_VERSION"] = psu->getFWVersion(); in analyze()
529 if (psu->hasCommFault()) in analyze()
532 std::format("{:#02x}", psu->getStatusCML()); in analyze()
536 psu->getDevicePath(); in analyze()
542 psu->setFaultLogged(); in analyze()
544 else if ((psu->hasInputFault() || psu->hasVINUVFault())) in analyze()
548 std::format("{:#02x}", psu->getStatusInput()); in analyze()
556 psu->getInventoryPath(); in analyze()
561 psu->setFaultLogged(); in analyze()
563 else if (psu->hasPSKillFault()) in analyze()
568 psu->setFaultLogged(); in analyze()
570 else if (psu->hasVoutOVFault()) in analyze()
574 std::format("{:#02x}", psu->getStatusVout()); in analyze()
577 psu->getInventoryPath(); in analyze()
583 psu->setFaultLogged(); in analyze()
585 else if (psu->hasIoutOCFault()) in analyze()
589 std::format("{:#02x}", psu->getStatusIout()); in analyze()
595 psu->setFaultLogged(); in analyze()
597 else if (psu->hasVoutUVFault() || psu->hasPS12VcsFault() || in analyze()
598 psu->hasPSCS12VFault()) in analyze()
602 std::format("{:#02x}", psu->getStatusVout()); in analyze()
605 psu->getInventoryPath(); in analyze()
611 psu->setFaultLogged(); in analyze()
616 else if (psu->hasFanFault() && !powerFaultOccurring) in analyze()
620 std::format("{:#02x}", psu->getStatusTemperature()); in analyze()
622 std::format("{:#02x}", psu->getStatusFans12()); in analyze()
625 psu->getInventoryPath(); in analyze()
631 psu->setFaultLogged(); in analyze()
633 else if (psu->hasTempFault()) in analyze()
637 std::format("{:#02x}", psu->getStatusTemperature()); in analyze()
640 psu->getInventoryPath(); in analyze()
646 psu->setFaultLogged(); in analyze()
648 else if (psu->hasMFRFault()) in analyze()
660 psu->getInventoryPath(); in analyze()
666 psu->setFaultLogged(); in analyze()
669 else if (psu->hasPgoodFault() && !powerFaultOccurring) in analyze()
673 psu->getInventoryPath(); in analyze()
679 psu->setFaultLogged(); in analyze()
693 for (const auto& psu : psus) in analyzeBrownout() local
695 if (psu->isPresent()) in analyzeBrownout()
698 if (psu->hasACFault()) in analyzeBrownout()
702 else if (psu->hasPgoodFault()) in analyzeBrownout()
714 // already been logged, at least one PSU has seen an AC fail, and all in analyzeBrownout()
716 // at least one PSU is present. in analyzeBrownout()
745 // If a brownout was previously logged but at least one PSU is not in analyzeBrownout()
850 [](const auto& psu) { return psu->isPresent(); }); in updateMissingPSUs() argument
854 for (const auto& psu : psus) in updateMissingPSUs() local
856 auto psuModel = psu->getModelName(); in updateMissingPSUs()
857 auto psuShortName = psu->getShortName(); in updateMissingPSUs()
858 auto psuInventoryPath = psu->getInventoryPath(); in updateMissingPSUs()
861 auto psuPresent = psu->isPresent(); in updateMissingPSUs()