Lines Matching full:threshold
112 "Invalid threshold direction specified in entity manager"); in getThresholdType()
133 "Invalid threshold severity specified in entity manager"); in getSeverityField()
145 "Invalid threshold severity specified in entity manager"); in getSeverityField()
167 auto threshold = getThresholdType(direction, severity); in parseThresholds() local
168 thresholds[threshold] = value; in parseThresholds()
174 thresholds[threshold + "Hysteresis"] = hysteresis; in parseThresholds()
179 thresholds[threshold + "Direction"] = entityInterface; in parseThresholds()
227 /* Get threshold values if defined in config */ in initVirtualSensor()
228 auto threshold = sensorConfig.value("Threshold", empty); in initVirtualSensor() local
230 createThresholds(threshold, objPath); in initVirtualSensor()
384 /* Each threshold is on it's own interface with a number as a suffix in initVirtualSensor()
479 void VirtualSensor::createThresholds(const Json& threshold, in createThresholds() argument
482 if (threshold.empty()) in createThresholds()
486 // Only create the threshold interfaces if in createThresholds()
488 if (threshold.contains("CriticalHigh") || threshold.contains("CriticalLow")) in createThresholds()
491 std::make_unique<Threshold<CriticalObject>>(bus, objPath.c_str()); in createThresholds()
493 if (threshold.contains("CriticalHigh")) in createThresholds()
496 threshold.value("CriticalHighDirection", "")); in createThresholds()
497 debug("Sensor Threshold:{NAME} = intf:{INTF}", "NAME", objPath, in createThresholds()
498 "INTF", threshold.value("CriticalHighDirection", "")); in createThresholds()
500 if (threshold.contains("CriticalLow")) in createThresholds()
503 threshold.value("CriticalLowDirection", "")); in createThresholds()
504 debug("Sensor Threshold:{NAME} = intf:{INTF}", "NAME", objPath, in createThresholds()
505 "INTF", threshold.value("CriticalLowDirection", "")); in createThresholds()
509 debug("Sensor Threshold:{NAME} = path:{PATH}", "NAME", objPath, "PATH", in createThresholds()
512 criticalIface->criticalHigh(threshold.value( in createThresholds()
514 criticalIface->criticalLow(threshold.value( in createThresholds()
517 threshold.value("CriticalHighHysteresis", defaultHysteresis)); in createThresholds()
519 threshold.value("CriticalLowHysteresis", defaultHysteresis)); in createThresholds()
522 if (threshold.contains("WarningHigh") || threshold.contains("WarningLow")) in createThresholds()
525 std::make_unique<Threshold<WarningObject>>(bus, objPath.c_str()); in createThresholds()
527 if (threshold.contains("WarningHigh")) in createThresholds()
530 threshold.value("WarningHighDirection", "")); in createThresholds()
531 debug("Sensor Threshold:{NAME} = intf:{INTF}", "NAME", objPath, in createThresholds()
532 "INTF", threshold.value("WarningHighDirection", "")); in createThresholds()
534 if (threshold.contains("WarningLow")) in createThresholds()
537 threshold.value("WarningLowDirection", "")); in createThresholds()
538 debug("Sensor Threshold:{NAME} = intf:{INTF}", "NAME", objPath, in createThresholds()
539 "INTF", threshold.value("WarningLowDirection", "")); in createThresholds()
543 debug("Sensor Threshold:{NAME} = path:{PATH}", "NAME", objPath, "PATH", in createThresholds()
546 warningIface->warningHigh(threshold.value( in createThresholds()
548 warningIface->warningLow(threshold.value( in createThresholds()
551 threshold.value("WarningHighHysteresis", defaultHysteresis)); in createThresholds()
553 threshold.value("WarningLowHysteresis", defaultHysteresis)); in createThresholds()
556 if (threshold.contains("HardShutdownHigh") || in createThresholds()
557 threshold.contains("HardShutdownLow")) in createThresholds()
559 hardShutdownIface = std::make_unique<Threshold<HardShutdownObject>>( in createThresholds()
562 hardShutdownIface->hardShutdownHigh(threshold.value( in createThresholds()
564 hardShutdownIface->hardShutdownLow(threshold.value( in createThresholds()
567 threshold.value("HardShutdownHighHysteresis", defaultHysteresis)); in createThresholds()
569 threshold.value("HardShutdownLowHysteresis", defaultHysteresis)); in createThresholds()
572 if (threshold.contains("SoftShutdownHigh") || in createThresholds()
573 threshold.contains("SoftShutdownLow")) in createThresholds()
575 softShutdownIface = std::make_unique<Threshold<SoftShutdownObject>>( in createThresholds()
578 softShutdownIface->softShutdownHigh(threshold.value( in createThresholds()
580 softShutdownIface->softShutdownLow(threshold.value( in createThresholds()
583 threshold.value("SoftShutdownHighHysteresis", defaultHysteresis)); in createThresholds()
585 threshold.value("SoftShutdownLowHysteresis", defaultHysteresis)); in createThresholds()
588 if (threshold.contains("PerformanceLossHigh") || in createThresholds()
589 threshold.contains("PerformanceLossLow")) in createThresholds()
591 perfLossIface = std::make_unique<Threshold<PerformanceLossObject>>( in createThresholds()
594 perfLossIface->performanceLossHigh(threshold.value( in createThresholds()
596 perfLossIface->performanceLossLow(threshold.value( in createThresholds()
598 perfLossIface->setHighHysteresis(threshold.value( in createThresholds()
601 threshold.value("PerformanceLossLowHysteresis", defaultHysteresis)); in createThresholds()