public function SensorResult::setExpectedValue in Monitoring 7
Same name and namespace in other branches
- 8 src/Result/SensorResult.php \Drupal\monitoring\Result\SensorResult::setExpectedValue()
Sets sensor expected value.
Set to NULL if you want to prevent the default sensor result assessment. Use 0/FALSE values instead.
In case an interval is expected, do not set the expected value, thresholds are used instead.
The expected value is not considered when thresholds are configured.
Parameters
mixed $value:
Overrides SensorResultInterface::setExpectedValue
File
- lib/
Drupal/ monitoring/ Result/ SensorResult.php, line 362 - Contains \Drupal\monitoring\Result\SensorResult.
Class
- SensorResult
- Generic container for the sensor result.
Namespace
Drupal\monitoring\ResultCode
public function setExpectedValue($sensor_value) {
$this
->setResultData('sensor_expected_value', $sensor_value);
}