Lines Matching full:threshold

59     std::vector<thresholds::Threshold>& thresholdVector,
115 "Malformed threshold on configuration interface: '{INTERFACE}'",
140 const thresholds::Threshold& threshold,
149 [&, path, threshold, thresholdInterface,
154 return; // threshold not supported
162 lg2::error("No label in threshold configuration");
179 lg2::error("Malformed threshold in configuration");
187 if ((findThresholdLevel(severity) != threshold.level) ||
188 (findThresholdDirection(dir) != threshold.direction))
193 std::variant<double> value(threshold.value);
199 "Error setting threshold: '{ERROR_MESSAGE}'",
213 for (const auto& threshold : sensor->thresholds)
216 sensor->getThresholdInterface(threshold.level);
224 Sensor::propertyLevel(threshold.level, threshold.direction);
229 interface->set_property(property, threshold.value);
245 ChangeParam(Threshold whichThreshold, bool status, double value) :
246 threshold(whichThreshold), asserted(status), assertValue(value)
249 Threshold threshold;
262 for (auto& threshold : sensor->thresholds)
264 // Use "Schmitt trigger" logic to avoid threshold trigger spam,
265 // if value is noisy while hovering very close to a threshold.
266 // When a threshold is crossed, indicate true immediately,
269 if (threshold.direction == thresholds::Direction::HIGH)
271 if (value >= threshold.value)
273 thresholdChanges.emplace_back(threshold, true, value);
277 "Sensor name: {NAME}, high threshold: {THRESHOLD}, "
279 "NAME", sensor->name, "THRESHOLD", threshold.value,
283 else if (value < (threshold.value - threshold.hysteresis))
285 thresholdChanges.emplace_back(threshold, false, value);
293 else if (threshold.direction == thresholds::Direction::LOW)
295 if (value <= threshold.value)
297 thresholdChanges.emplace_back(threshold, true, value);
301 "Sensor name: {NAME}, low threshold: {THRESHOLD}, "
303 "NAME", sensor->name, "THRESHOLD", threshold.value,
307 else if (value > (threshold.value + threshold.hysteresis))
309 thresholdChanges.emplace_back(threshold, false, value);
319 lg2::error("Error determining threshold direction");
343 const Threshold& threshold, bool assert,
364 pair->first.level = threshold.level;
365 pair->first.direction = threshold.direction;
368 pair->second.async_wait([weakSensor, pair, threshold, assert,
390 assertThresholds(sensorPtr.get(), assertValue, threshold.level,
391 threshold.direction, assert);
402 assertThresholds(sensor, change.assertValue, change.threshold.level,
403 change.threshold.direction, change.asserted);
404 if (change.threshold.level == thresholds::Level::CRITICAL &&
438 if (change.threshold.direction == thresholds::Direction::LOW)
441 change.threshold, !change.asserted))
443 thresholdTimer.startTimer(weakSensor, change.threshold,
448 assertThresholds(sensor, change.assertValue, change.threshold.level,
449 change.threshold.direction, change.asserted);
493 std::vector<thresholds::Threshold>& thresholdVector,
533 lg2::info("Threshold: '{PATH}': '{VALUE}'", "PATH",
551 return std::string("xyz.openbmc_project.Sensor.Threshold.") +