Lines Matching +full:count +full:- +full:threshold
8 * http://www.apache.org/licenses/LICENSE-2.0
22 #include <phosphor-logging/elog.hpp>
23 #include <phosphor-logging/lg2.hpp>
49 * @param[in] interface - the interface the property is on
50 * @param[in] propertName - the name of the property
51 * @param[in] path - the dbus path
52 * @param[in] bus - the dbus object
53 * @param[out] value - filled in with the property value
79 size_t method, size_t threshold, bool ignoreAboveMax, in TachSensor() argument
85 _offset(offset), _method(method), _threshold(threshold), in TachSensor()
111 // Until the parent Fan's monitor-ready timer expires, the in TachSensor()
112 // object can be functional with a missing D-bus sensor. in TachSensor()
119 [this](auto& msg) { this->handleTachChange(msg); }); in TachSensor()
133 [this](auto& msg) { this->handleTargetChange(msg); }); in TachSensor()
144 if (_method == MethodMode::count) in TachSensor()
214 uint64_t min = getTarget() * (100 - lowerDeviation) / 100; in getRange()
232 // for sensors using the count method, runs right before process() in processState()
251 case MethodMode::count: in resetMethod()
278 _errorTimer->restartOnce(std::chrono::seconds(*_errorDelay)); in setFunctional()
281 else if (_errorTimer->isEnabled()) in setFunctional()
283 _errorTimer->setEnabled(false); in setFunctional()
326 duration_cast<seconds>(getDelay(mode)).count()); in startTimer()
351 void TachSensor::setCounter(bool count) in setCounter() argument
353 if (count) in setCounter()
359 "Incremented error counter on {NAME} to {COUNTER} (threshold {THRESHOLD})", in setCounter()
360 "NAME", _name, "COUNTER", _counter, "THRESHOLD", _threshold); in setCounter()
367 --_counter; in setCounter()
369 "Decremented error counter on {NAME} to {COUNTER} (threshold {THRESHOLD})", in setCounter()
370 "NAME", _name, "COUNTER", _counter, "THRESHOLD", _threshold); in setCounter()
379 lg2::debug("Starting count timer on sensor {NAME}", "NAME", _name); in startCountTimer()
380 _countTimer->restart(std::chrono::seconds(_countInterval)); in startCountTimer()
386 if (_countTimer && _countTimer->isEnabled()) in stopCountTimer()
388 lg2::debug("Stopping count timer on tach sensor {NAME}.", "NAME", in stopCountTimer()
390 _countTimer->setEnabled(false); in stopCountTimer()