You are here

public function SensorResult::setStatus in Monitoring 8

Same name and namespace in other branches
  1. 7 lib/Drupal/monitoring/Result/SensorResult.php \Drupal\monitoring\Result\SensorResult::setStatus()

Sets sensor status.

Parameters

string $status: One of SensorResultInterface::STATUS_* constants.

Overrides SensorResultInterface::setStatus

3 calls to SensorResult::setStatus()
SensorResult::assessComparison in src/Result/SensorResult.php
Performs comparison of expected and actual sensor values.
SensorResult::assessThresholds in src/Result/SensorResult.php
Deal with thresholds.
SensorResult::compile in src/Result/SensorResult.php
Compiles added status messages sets the status.

File

src/Result/SensorResult.php, line 388

Class

SensorResult
Generic container for the sensor result.

Namespace

Drupal\monitoring\Result

Code

public function setStatus($sensor_status) {
  $this
    ->setResultData('sensor_status', $sensor_status);
}