Lines Matching full:threshold

59     std::vector<thresholds::Threshold>& thresholdVector,  in parseThresholdsFromConfig()
114 std::cerr << "Malformed threshold on configuration interface " in parseThresholdsFromConfig()
139 const thresholds::Threshold& threshold, in persistThreshold() argument
148 [&, path, threshold, thresholdInterface, in persistThreshold()
153 return; // threshold not supported in persistThreshold()
161 std::cerr << "No label in threshold configuration\n"; in persistThreshold()
178 std::cerr << "Malformed threshold in configuration\n"; in persistThreshold()
186 if ((findThresholdLevel(severity) != threshold.level) || in persistThreshold()
187 (findThresholdDirection(dir) != threshold.direction)) in persistThreshold()
192 std::variant<double> value(threshold.value); in persistThreshold()
198 << "Error setting threshold " << ec << "\n"; in persistThreshold()
211 for (const auto& threshold : sensor->thresholds) in updateThresholds() local
214 sensor->getThresholdInterface(threshold.level); in updateThresholds()
222 Sensor::propertyLevel(threshold.level, threshold.direction); in updateThresholds()
227 interface->set_property(property, threshold.value); in updateThresholds()
243 ChangeParam(Threshold whichThreshold, bool status, double value) : in ChangeParam()
244 threshold(whichThreshold), asserted(status), assertValue(value) in ChangeParam()
247 Threshold threshold; member
260 for (auto& threshold : sensor->thresholds) in checkThresholds() local
262 // Use "Schmitt trigger" logic to avoid threshold trigger spam, in checkThresholds()
263 // if value is noisy while hovering very close to a threshold. in checkThresholds()
264 // When a threshold is crossed, indicate true immediately, in checkThresholds()
267 if (threshold.direction == thresholds::Direction::HIGH) in checkThresholds()
269 if (value >= threshold.value) in checkThresholds()
271 thresholdChanges.emplace_back(threshold, true, value); in checkThresholds()
274 std::cerr << "Sensor " << sensor->name << " high threshold " in checkThresholds()
275 << threshold.value << " assert: value " << value in checkThresholds()
279 else if (value < (threshold.value - threshold.hysteresis)) in checkThresholds()
281 thresholdChanges.emplace_back(threshold, false, value); in checkThresholds()
289 else if (threshold.direction == thresholds::Direction::LOW) in checkThresholds()
291 if (value <= threshold.value) in checkThresholds()
293 thresholdChanges.emplace_back(threshold, true, value); in checkThresholds()
297 << "Sensor " << sensor->name << " low threshold " in checkThresholds()
298 << threshold.value << " assert: value " << sensor->value in checkThresholds()
302 else if (value > (threshold.value + threshold.hysteresis)) in checkThresholds()
304 thresholdChanges.emplace_back(threshold, false, value); in checkThresholds()
314 std::cerr << "Error determining threshold direction\n"; in checkThresholds()
336 const Threshold& threshold, bool assert, in startTimer() argument
357 pair->first.level = threshold.level; in startTimer()
358 pair->first.direction = threshold.direction; in startTimer()
361 pair->second.async_wait([weakSensor, pair, threshold, assert, in startTimer()
382 assertThresholds(sensorPtr.get(), assertValue, threshold.level, in startTimer()
383 threshold.direction, assert); in startTimer()
394 assertThresholds(sensor, change.assertValue, change.threshold.level, in checkThresholds()
395 change.threshold.direction, change.asserted); in checkThresholds()
396 if (change.threshold.level == thresholds::Level::CRITICAL && in checkThresholds()
430 if (change.threshold.direction == thresholds::Direction::LOW) in checkThresholdsPowerDelay()
433 change.threshold, !change.asserted)) in checkThresholdsPowerDelay()
435 thresholdTimer.startTimer(weakSensor, change.threshold, in checkThresholdsPowerDelay()
440 assertThresholds(sensor, change.assertValue, change.threshold.level, in checkThresholdsPowerDelay()
441 change.threshold.direction, change.asserted); in checkThresholdsPowerDelay()
485 std::vector<thresholds::Threshold>& thresholdVector, in parseThresholdsFromAttr()
525 std::cout << "Threshold: " << attrPath << ": " << *val in parseThresholdsFromAttr()
543 return std::string("xyz.openbmc_project.Sensor.Threshold.") + in getInterface()