12345678910111213141516171819202122232425262728 |
- <?php
- /**
- * Created by PhpStorm.
- * User: robin
- * Date: 11/24/15
- * Time: 12:49 AM
- */
-
- namespace App\Http\Business\Sensors;
-
- use App\Http\DBO\SensorsValueDbo;
-
- class DummySensor extends AbstractSensor
- {
- /**
- * @return SensorsValueDbo
- */
- public function getValue()
- {
- $data = $this->_sensor->getData();
- $min = isset($data["Minimum"]) ? $data["Minimum"] : 0;
- $max = isset($data["Maximum"]) ? $data["Maximum"] : 42;
-
- $value = new SensorsValueDbo();
- $value->setValue(rand($min, $max));
- return $value;
- }
- }
|