You are here

public function SensorResult::setStatus in Monitoring 7

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

Sets sensor status.

Parameters

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

Overrides SensorResultInterface::setStatus

2 calls to SensorResult::setStatus()
SensorResult::assessComparison in lib/Drupal/monitoring/Result/SensorResult.php
Performs comparison of expected and actual sensor values.
SensorResult::assessThresholds in lib/Drupal/monitoring/Result/SensorResult.php
Deal with thresholds.

File

lib/Drupal/monitoring/Result/SensorResult.php, line 348
Contains \Drupal\monitoring\Result\SensorResult.

Class

SensorResult
Generic container for the sensor result.

Namespace

Drupal\monitoring\Result

Code

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