1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225
|
<?php
/**
* SensorDevice TO class
*
* PHP version 5
*
* @category PHP
* @package PSI_TO
* @author Michael Cramer <BigMichi1@users.sourceforge.net>
* @copyright 2009 phpSysInfo
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License version 2, or (at your option) any later version
* @version SVN: $Id: class.SensorDevice.inc.php 592 2012-07-03 10:55:51Z namiltd $
* @link http://phpsysinfo.sourceforge.net
*/
/**
* SensorDevice TO class
*
* @category PHP
* @package PSI_TO
* @author Michael Cramer <BigMichi1@users.sourceforge.net>
* @copyright 2009 phpSysInfo
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License version 2, or (at your option) any later version
* @version Release: 3.0
* @link http://phpsysinfo.sourceforge.net
*/
class SensorDevice
{
/**
* name of the sensor
*
* @var string
*/
private $_name = "";
/**
* current value of the sensor
*
* @var int
*/
private $_value = 0;
/**
* maximum value of the sensor
*
* @var int
*/
private $_max = null;
/**
* minimum value of the sensor
*
* @var int
*/
private $_min = null;
/**
* event of the sensor
*
* @var string
*/
private $_event = "";
/**
* unit of values of the sensor
*
* @var string
*/
private $_unit = "";
/**
* Returns $_max.
*
* @see Sensor::$_max
*
* @return int
*/
public function getMax()
{
return $this->_max;
}
/**
* Sets $_max.
*
* @param int $max maximum value
*
* @see Sensor::$_max
*
* @return void
*/
public function setMax($max)
{
$this->_max = $max;
}
/**
* Returns $_min.
*
* @see Sensor::$_min
*
* @return int
*/
public function getMin()
{
return $this->_min;
}
/**
* Sets $_min.
*
* @param int $min minimum value
*
* @see Sensor::$_min
*
* @return void
*/
public function setMin($min)
{
$this->_min = $min;
}
/**
* Returns $_name.
*
* @see Sensor::$_name
*
* @return String
*/
public function getName()
{
return $this->_name;
}
/**
* Sets $_name.
*
* @param String $name sensor name
*
* @see Sensor::$_name
*
* @return void
*/
public function setName($name)
{
$this->_name = $name;
}
/**
* Returns $_value.
*
* @see Sensor::$_value
*
* @return int
*/
public function getValue()
{
return $this->_value;
}
/**
* Sets $_value.
*
* @param int $value current value
*
* @see Sensor::$_value
*
* @return void
*/
public function setValue($value)
{
$this->_value = $value;
}
/**
* Returns $_event.
*
* @see Sensor::$_event
*
* @return String
*/
public function getEvent()
{
return $this->_event;
}
/**
* Sets $_event.
*
* @param String $event sensor event
*
* @see Sensor::$_event
*
* @return void
*/
public function setEvent($event)
{
$this->_event = $event;
}
/**
* Returns $_unit.
*
* @see Sensor::$_unit
*
* @return String
*/
public function getUnit()
{
return $this->_unit;
}
/**
* Sets $_unit.
*
* @param String $unit sensor unit
*
* @see Sensor::$_unit
*
* @return void
*/
public function setUnit($unit)
{
$this->_unit = $unit;
}
}
|