/web/acc/phpsysinfo/includes/to/device/class.CpuDevice.inc.php |
---|
0,0 → 1,394 |
<?php |
/** |
* CpuDevice 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.CpuDevice.inc.php 411 2010-12-28 22:32:52Z Jacky672 $ |
* @link http://phpsysinfo.sourceforge.net |
*/ |
/** |
* CpuDevice 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 CpuDevice |
{ |
/** |
* model of the cpu |
* |
* @var String |
*/ |
private $_model = ""; |
/** |
* speed of the cpu in hertz |
* |
* @var Integer |
*/ |
private $_cpuSpeed = 0; |
/** |
* max speed of the cpu in hertz |
* |
* @var Integer |
*/ |
private $_cpuSpeedMax = 0; |
/** |
* min speed of the cpu in hertz |
* |
* @var Integer |
*/ |
private $_cpuSpeedMin = 0; |
/** |
* cache size in bytes, if available |
* |
* @var Integer |
*/ |
private $_cache = null; |
/** |
* virtualization, if available |
* |
* @var String |
*/ |
private $_virt = null; |
/** |
* busspeed in hertz, if available |
* |
* @var Integer |
*/ |
private $_busSpeed = null; |
/** |
* bogomips of the cpu, if available |
* |
* @var Integer |
*/ |
private $_bogomips = null; |
/** |
* temperature of the cpu, if available |
* |
* @var Integer |
*/ |
private $_temp = null; |
/** |
* vendorid, if available |
* |
* @var String |
*/ |
private $_vendorid = null; |
/** |
* current load in percent of the cpu, if available |
* |
* @var Integer |
*/ |
private $_load = null; |
/** |
* Returns $_model. |
* |
* @see Cpu::$_model |
* |
* @return String |
*/ |
public function getModel() |
{ |
return $this->_model; |
} |
/** |
* Sets $_model. |
* |
* @param String $model cpumodel |
* |
* @see Cpu::$_model |
* |
* @return Void |
*/ |
public function setModel($model) |
{ |
$this->_model = $model; |
} |
/** |
* Returns $_cpuSpeed. |
* |
* @see Cpu::$_cpuSpeed |
* |
* @return Integer |
*/ |
public function getCpuSpeed() |
{ |
return $this->_cpuSpeed; |
} |
/** |
* Sets $_cpuSpeed. |
* |
* @param Integer $cpuSpeed cpuspeed |
* |
* @see Cpu::$_cpuSpeed |
* |
* @return Void |
*/ |
public function setCpuSpeed($cpuSpeed) |
{ |
$this->_cpuSpeed = $cpuSpeed; |
} |
/** |
* Returns $_cpuSpeedMax. |
* |
* @see Cpu::$_cpuSpeedMAx |
* |
* @return Integer |
*/ |
public function getCpuSpeedMax() |
{ |
return $this->_cpuSpeedMax; |
} |
/** |
* Sets $_cpuSpeedMax. |
* |
* @param Integer $cpuSpeedMax cpuspeedmax |
* |
* @see Cpu::$_cpuSpeedMax |
* |
* @return Void |
*/ |
public function setCpuSpeedMax($cpuSpeedMax) |
{ |
$this->_cpuSpeedMax = $cpuSpeedMax; |
} |
/** |
* Returns $_cpuSpeedMin. |
* |
* @see Cpu::$_cpuSpeedMin |
* |
* @return Integer |
*/ |
public function getCpuSpeedMin() |
{ |
return $this->_cpuSpeedMin; |
} |
/** |
* Sets $_cpuSpeedMin. |
* |
* @param Integer $cpuSpeedMin cpuspeedmin |
* |
* @see Cpu::$_cpuSpeedMin |
* |
* @return Void |
*/ |
public function setCpuSpeedMin($cpuSpeedMin) |
{ |
$this->_cpuSpeedMin = $cpuSpeedMin; |
} |
/** |
* Returns $_cache. |
* |
* @see Cpu::$_cache |
* |
* @return Integer |
*/ |
public function getCache() |
{ |
return $this->_cache; |
} |
/** |
* Sets $_cache. |
* |
* @param Integer $cache cache size |
* |
* @see Cpu::$_cache |
* |
* @return Void |
*/ |
public function setCache($cache) |
{ |
$this->_cache = $cache; |
} |
/** |
* Returns $_virt. |
* |
* @see Cpu::$_virt |
* |
* @return String |
*/ |
public function getVirt() |
{ |
return $this->_virt; |
} |
/** |
* Sets $_virt. |
* |
* @param string $virt |
* |
* @see Cpu::$_virt |
* |
* @return Void |
*/ |
public function setVirt($virt) |
{ |
$this->_virt = $virt; |
} |
/** |
* Returns $_busSpeed. |
* |
* @see Cpu::$_busSpeed |
* |
* @return Integer |
*/ |
public function getBusSpeed() |
{ |
return $this->_busSpeed; |
} |
/** |
* Sets $_busSpeed. |
* |
* @param Integer $busSpeed busspeed |
* |
* @see Cpu::$_busSpeed |
* |
* @return Void |
*/ |
public function setBusSpeed($busSpeed) |
{ |
$this->_busSpeed = $busSpeed; |
} |
/** |
* Returns $_bogomips. |
* |
* @see Cpu::$_bogomips |
* |
* @return Integer |
*/ |
public function getBogomips() |
{ |
return $this->_bogomips; |
} |
/** |
* Sets $_bogomips. |
* |
* @param Integer $bogomips bogompis |
* |
* @see Cpu::$_bogomips |
* |
* @return Void |
*/ |
public function setBogomips($bogomips) |
{ |
$this->_bogomips = $bogomips; |
} |
/** |
* Returns $_temp. |
* |
* @see Cpu::$_temp |
* |
* @return Integer |
*/ |
/* |
public function getTemp() |
{ |
return $this->_temp; |
} |
*/ |
/** |
* Sets $_temp. |
* |
* @param Integer $temp temperature |
* |
* @see Cpu::$_temp |
* |
* @return Void |
*/ |
/* |
public function setTemp($temp) |
{ |
$this->_temp = $temp; |
} |
*/ |
/** |
* Returns $_vendorid. |
* |
* @see Cpu::$_vendorid |
* |
* @return String |
*/ |
public function getVendorId() |
{ |
return $this->_vendorid; |
} |
/** |
* Sets $_vendorid. |
* |
* @param string $vendorid |
* |
* @see Cpu::$_vendorid |
* |
* @return Void |
*/ |
public function setVendorId($vendorid) |
{ |
$this->_vendorid = $vendorid; |
} |
/** |
* Returns $_load. |
* |
* @see CpuDevice::$_load |
* |
* @return Integer |
*/ |
public function getLoad() |
{ |
return $this->_load; |
} |
/** |
* Sets $_load. |
* |
* @param Integer $load load percent |
* |
* @see CpuDevice::$_load |
* |
* @return Void |
*/ |
public function setLoad($load) |
{ |
$this->_load = $load; |
} |
} |
/web/acc/phpsysinfo/includes/to/device/class.DiskDevice.inc.php |
---|
0,0 → 1,339 |
<?php |
/** |
* DiskDevice 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.DiskDevice.inc.php 252 2009-06-17 13:06:44Z bigmichi1 $ |
* @link http://phpsysinfo.sourceforge.net |
*/ |
/** |
* DiskDevice 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 DiskDevice |
{ |
/** |
* name of the disk device |
* |
* @var String |
*/ |
private $_name = ""; |
/** |
* type of the filesystem on the disk device |
* |
* @var String |
*/ |
private $_fsType = ""; |
/** |
* diskspace that is free in bytes |
* |
* @var Integer |
*/ |
private $_free = 0; |
/** |
* diskspace that is used in bytes |
* |
* @var Integer |
*/ |
private $_used = 0; |
/** |
* total diskspace |
* |
* @var Integer |
*/ |
private $_total = 0; |
/** |
* mount point of the disk device if available |
* |
* @var String |
*/ |
private $_mountPoint = null; |
/** |
* additional options of the device, like mount options |
* |
* @var String |
*/ |
private $_options = null; |
/** |
* inodes usage in percent if available |
* |
* @var |
*/ |
private $_percentInodesUsed = null; |
/** |
* ignore mode |
* |
* @var Ignore |
*/ |
private $_ignore = 0; |
/** |
* Returns PercentUsed calculated when function is called from internal values |
* |
* @see DiskDevice::$_total |
* @see DiskDevice::$_used |
* |
* @return Integer |
*/ |
public function getPercentUsed() |
{ |
if ($this->_total > 0) { |
return round($this->_used / $this->_total * 100); |
} else { |
return 0; |
} |
} |
/** |
* Returns $_PercentInodesUsed. |
* |
* @see DiskDevice::$_PercentInodesUsed |
* |
* @return Integer |
*/ |
public function getPercentInodesUsed() |
{ |
return $this->_percentInodesUsed; |
} |
/** |
* Sets $_PercentInodesUsed. |
* |
* @param Integer $percentInodesUsed inodes percent |
* |
* @see DiskDevice::$_PercentInodesUsed |
* |
* @return Void |
*/ |
public function setPercentInodesUsed($percentInodesUsed) |
{ |
$this->_percentInodesUsed = $percentInodesUsed; |
} |
/** |
* Returns $_free. |
* |
* @see DiskDevice::$_free |
* |
* @return Integer |
*/ |
public function getFree() |
{ |
return $this->_free; |
} |
/** |
* Sets $_free. |
* |
* @param Integer $free free bytes |
* |
* @see DiskDevice::$_free |
* |
* @return Void |
*/ |
public function setFree($free) |
{ |
$this->_free = $free; |
} |
/** |
* Returns $_fsType. |
* |
* @see DiskDevice::$_fsType |
* |
* @return String |
*/ |
public function getFsType() |
{ |
return $this->_fsType; |
} |
/** |
* Sets $_fsType. |
* |
* @param String $fsType filesystemtype |
* |
* @see DiskDevice::$_fsType |
* |
* @return Void |
*/ |
public function setFsType($fsType) |
{ |
$this->_fsType = $fsType; |
} |
/** |
* Returns $_mountPoint. |
* |
* @see DiskDevice::$_mountPoint |
* |
* @return String |
*/ |
public function getMountPoint() |
{ |
return $this->_mountPoint; |
} |
/** |
* Sets $_mountPoint. |
* |
* @param String $mountPoint mountpoint |
* |
* @see DiskDevice::$_mountPoint |
* |
* @return Void |
*/ |
public function setMountPoint($mountPoint) |
{ |
$this->_mountPoint = $mountPoint; |
} |
/** |
* Returns $_name. |
* |
* @see DiskDevice::$_name |
* |
* @return String |
*/ |
public function getName() |
{ |
return $this->_name; |
} |
/** |
* Sets $_name. |
* |
* @param String $name device name |
* |
* @see DiskDevice::$_name |
* |
* @return Void |
*/ |
public function setName($name) |
{ |
$this->_name = $name; |
} |
/** |
* Returns $_options. |
* |
* @see DiskDevice::$_options |
* |
* @return String |
*/ |
public function getOptions() |
{ |
return $this->_options; |
} |
/** |
* Sets $_options. |
* |
* @param String $options additional options |
* |
* @see DiskDevice::$_options |
* |
* @return Void |
*/ |
public function setOptions($options) |
{ |
$this->_options = $options; |
} |
/** |
* Returns $_total. |
* |
* @see DiskDevice::$_total |
* |
* @return Integer |
*/ |
public function getTotal() |
{ |
return $this->_total; |
} |
/** |
* Sets $_total. |
* |
* @param Integer $total total bytes |
* |
* @see DiskDevice::$_total |
* |
* @return Void |
*/ |
public function setTotal($total) |
{ |
$this->_total = $total; |
} |
/** |
* Returns $_used. |
* |
* @see DiskDevice::$_used |
* |
* @return Integer |
*/ |
public function getUsed() |
{ |
return $this->_used; |
} |
/** |
* Sets $_used. |
* |
* @param Integer $used used bytes |
* |
* @see DiskDevice::$_used |
* |
* @return Void |
*/ |
public function setUsed($used) |
{ |
$this->_used = $used; |
} |
/** |
* Returns $_ignore. |
* |
* @see DiskDevice::$_ignore |
* |
* @return Integer |
*/ |
public function getIgnore() |
{ |
return $this->_ignore; |
} |
/** |
* Sets $_ignore. |
* |
* @see DiskDevice::$_ignore |
* |
* @return Void |
*/ |
public function setIgnore($ignore) |
{ |
$this->_ignore = $ignore; |
} |
} |
/web/acc/phpsysinfo/includes/to/device/class.HWDevice.inc.php |
---|
0,0 → 1,245 |
<?php |
/** |
* HWDevice 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.HWDevice.inc.php 255 2009-06-17 13:39:41Z bigmichi1 $ |
* @link http://phpsysinfo.sourceforge.net |
*/ |
/** |
* HWDevice 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 HWDevice |
{ |
/** |
* name of the device |
* |
* @var String |
*/ |
private $_name = ""; |
/** |
* capacity of the device, if not available it will be null |
* |
* @var Integer |
*/ |
private $_capacity = null; |
/** |
* manufacturer of the device, if not available it will be null |
* |
* @var Integer |
*/ |
private $_manufacturer = null; |
/** |
* product of the device, if not available it will be null |
* |
* @var Integer |
*/ |
private $_product = null; |
/** |
* serial number of the device, if not available it will be null |
* |
* @var Integer |
*/ |
private $_serial = null; |
/** |
* count of the device |
* |
* @var Integer |
*/ |
private $_count = 1; |
/** |
* compare a given device with the internal one |
* |
* @param HWDevice $dev device that should be compared |
* |
* @return boolean |
*/ |
public function equals(HWDevice $dev) |
{ |
if ($dev->getName() === $this->_name |
&& $dev->getCapacity() === $this->_capacity |
&& $dev->getManufacturer() === $this->_manufacturer |
&& $dev->getProduct() === $this->_product |
&& $dev->getSerial() === $this->_serial) { |
return true; |
} else { |
return false; |
} |
} |
/** |
* Returns $_name. |
* |
* @see HWDevice::$_name |
* |
* @return String |
*/ |
public function getName() |
{ |
return $this->_name; |
} |
/** |
* Sets $_name. |
* |
* @param String $name device name |
* |
* @see HWDevice::$_name |
* |
* @return Void |
*/ |
public function setName($name) |
{ |
$this->_name = $name; |
} |
/** |
* Returns $_manufacturer. |
* |
* @see HWDevice::$_manufacturer |
* |
* @return String |
*/ |
public function getManufacturer() |
{ |
return $this->_manufacturer; |
} |
/** |
* Sets $_manufacturer. |
* |
* @param String $manufacturer manufacturer name |
* |
* @see HWDevice::$_manufacturer |
* |
* @return Void |
*/ |
public function setManufacturer($manufacturer) |
{ |
$this->_manufacturer = $manufacturer; |
} |
/** |
* Returns $_product. |
* |
* @see HWDevice::$_product |
* |
* @return String |
*/ |
public function getProduct() |
{ |
return $this->_product; |
} |
/** |
* Sets $_product. |
* |
* @param String $product product name |
* |
* @see HWDevice::$_product |
* |
* @return Void |
*/ |
public function setProduct($product) |
{ |
$this->_product = $product; |
} |
/** |
* Returns $_serial. |
* |
* @see HWDevice::$_serial |
* |
* @return String |
*/ |
public function getSerial() |
{ |
return $this->_serial; |
} |
/** |
* Sets $_serial. |
* |
* @param String $serial serial number |
* |
* @see HWDevice::$_serial |
* |
* @return Void |
*/ |
public function setSerial($serial) |
{ |
$this->_serial = $serial; |
} |
/** |
* Returns $_capacity. |
* |
* @see HWDevice::$_capacity |
* |
* @return Integer |
*/ |
public function getCapacity() |
{ |
return $this->_capacity; |
} |
/** |
* Sets $_capacity. |
* |
* @param Integer $capacity device capacity |
* |
* @see HWDevice::$_capacity |
* |
* @return Void |
*/ |
public function setCapacity($capacity) |
{ |
$this->_capacity = $capacity; |
} |
/** |
* Returns $_count. |
* |
* @see HWDevice::$_count |
* |
* @return Integer |
*/ |
public function getCount() |
{ |
return $this->_count; |
} |
/** |
* Sets $_count. |
* |
* @param Integer $count device count |
* |
* @see HWDevice::$_count |
* |
* @return Void |
*/ |
public function setCount($count) |
{ |
$this->_count = $count; |
} |
} |
/web/acc/phpsysinfo/includes/to/device/class.NetDevice.inc.php |
---|
0,0 → 1,225 |
<?php |
/** |
* NetDevice 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.NetDevice.inc.php 547 2012-03-22 09:44:38Z namiltd $ |
* @link http://phpsysinfo.sourceforge.net |
*/ |
/** |
* NetDevice 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 NetDevice |
{ |
/** |
* name of the device |
* |
* @var String |
*/ |
private $_name = ""; |
/** |
* transmitted bytes |
* |
* @var Integer |
*/ |
private $_txBytes = 0; |
/** |
* received bytes |
* |
* @var Integer |
*/ |
private $_rxBytes = 0; |
/** |
* counted error packages |
* |
* @var Integer |
*/ |
private $_errors = 0; |
/** |
* counted droped packages |
* |
* @var Integer |
*/ |
private $_drops = 0; |
/** |
* string with info |
* |
* @var String |
*/ |
private $_info = null; |
/** |
* Returns $_drops. |
* |
* @see NetDevice::$_drops |
* |
* @return Integer |
*/ |
public function getDrops() |
{ |
return $this->_drops; |
} |
/** |
* Sets $_drops. |
* |
* @param Integer $drops dropped packages |
* |
* @see NetDevice::$_drops |
* |
* @return Void |
*/ |
public function setDrops($drops) |
{ |
$this->_drops = $drops; |
} |
/** |
* Returns $_errors. |
* |
* @see NetDevice::$_errors |
* |
* @return Integer |
*/ |
public function getErrors() |
{ |
return $this->_errors; |
} |
/** |
* Sets $_errors. |
* |
* @param Integer $errors error packages |
* |
* @see NetDevice::$_errors |
* |
* @return Void |
*/ |
public function setErrors($errors) |
{ |
$this->_errors = $errors; |
} |
/** |
* Returns $_name. |
* |
* @see NetDevice::$_name |
* |
* @return String |
*/ |
public function getName() |
{ |
return $this->_name; |
} |
/** |
* Sets $_name. |
* |
* @param String $name device name |
* |
* @see NetDevice::$_name |
* |
* @return Void |
*/ |
public function setName($name) |
{ |
$this->_name = $name; |
} |
/** |
* Returns $_rxBytes. |
* |
* @see NetDevice::$_rxBytes |
* |
* @return Integer |
*/ |
public function getRxBytes() |
{ |
return $this->_rxBytes; |
} |
/** |
* Sets $_rxBytes. |
* |
* @param Integer $rxBytes received bytes |
* |
* @see NetDevice::$_rxBytes |
* |
* @return Void |
*/ |
public function setRxBytes($rxBytes) |
{ |
$this->_rxBytes = $rxBytes; |
} |
/** |
* Returns $_txBytes. |
* |
* @see NetDevice::$_txBytes |
* |
* @return Integer |
*/ |
public function getTxBytes() |
{ |
return $this->_txBytes; |
} |
/** |
* Sets $_txBytes. |
* |
* @param Integer $txBytes transmitted bytes |
* |
* @see NetDevice::$_txBytes |
* |
* @return Void |
*/ |
public function setTxBytes($txBytes) |
{ |
$this->_txBytes = $txBytes; |
} |
/** |
* Returns $_info. |
* |
* @see NetDevice::$_info |
* |
* @return String |
*/ |
public function getInfo() |
{ |
return $this->_info; |
} |
/** |
* Sets $_info. |
* |
* @param String $info info string |
* |
* @see NetDevice::$_info |
* |
* @return Void |
*/ |
public function setInfo($info) |
{ |
$this->_info = $info; |
} |
} |
/web/acc/phpsysinfo/includes/to/device/class.SensorDevice.inc.php |
---|
0,0 → 1,192 |
<?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 Integer |
*/ |
private $_value = 0; |
/** |
* maximum value of the sensor |
* |
* @var Integer |
*/ |
private $_max = null; |
/** |
* minimum value of the sensor |
* |
* @var Integer |
*/ |
private $_min = null; |
/** |
* event of the sensor |
* |
* @var String |
*/ |
private $_event = ""; |
/** |
* Returns $_max. |
* |
* @see Sensor::$_max |
* |
* @return Integer |
*/ |
public function getMax() |
{ |
return $this->_max; |
} |
/** |
* Sets $_max. |
* |
* @param Integer $max maximum value |
* |
* @see Sensor::$_max |
* |
* @return Void |
*/ |
public function setMax($max) |
{ |
$this->_max = $max; |
} |
/** |
* Returns $_min. |
* |
* @see Sensor::$_min |
* |
* @return Integer |
*/ |
public function getMin() |
{ |
return $this->_min; |
} |
/** |
* Sets $_min. |
* |
* @param Integer $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 Integer |
*/ |
public function getValue() |
{ |
return $this->_value; |
} |
/** |
* Sets $_value. |
* |
* @param Integer $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; |
} |
} |
/web/acc/phpsysinfo/includes/to/device/class.UPSDevice.inc.php |
---|
0,0 → 1,555 |
<?php |
/** |
* UPSDevice 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.UPSDevice.inc.php 262 2009-06-22 10:48:33Z bigmichi1 $ |
* @link http://phpsysinfo.sourceforge.net |
*/ |
/** |
* UPSDevice 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 UPSDevice |
{ |
/** |
* name of the ups |
* |
* @var String |
*/ |
private $_name = ""; |
/** |
* model of the ups |
* |
* @var String |
*/ |
private $_model = ""; |
/** |
* mode of the ups |
* |
* @var String |
*/ |
private $_mode = ""; |
/** |
* last start time |
* |
* @var String |
*/ |
private $_startTime = ""; |
/** |
* status of the ups |
* |
* @var String |
*/ |
private $_status = ""; |
/** |
* temperature of the ups |
* |
* @var Integer |
*/ |
private $_temperatur = null; |
/** |
* outages count |
* |
* @var Integer |
*/ |
private $_outages = null; |
/** |
* date of last outtage |
* |
* @var String |
*/ |
private $_lastOutage = null; |
/** |
* date of last outage finish |
* |
* @var String |
*/ |
private $_lastOutageFinish = null; |
/** |
* line volt |
* |
* @var Integer |
*/ |
private $_lineVoltage = null; |
/** |
* line freq |
* |
* @var Integer |
*/ |
private $_lineFrequency = null; |
/** |
* current load of the ups in percent |
* |
* @var Integer |
*/ |
private $_load = null; |
/** |
* battery installation date |
* |
* @var String |
*/ |
private $_batteryDate = null; |
/** |
* current battery volt |
* |
* @var Integer |
*/ |
private $_batteryVoltage = null; |
/** |
* current charge in percent of the battery |
* |
* @var Integer |
*/ |
private $_batterCharge = null; |
/** |
* time left |
* |
* @var String |
*/ |
private $_timeLeft = null; |
/** |
* Returns $_batterCharge. |
* |
* @see UPSDevice::$_batterCharge |
* |
* @return integer |
*/ |
public function getBatterCharge() |
{ |
return $this->_batterCharge; |
} |
/** |
* Sets $_batterCharge. |
* |
* @param Integer $batterCharge battery charge |
* |
* @see UPSDevice::$_batterCharge |
* |
* @return void |
*/ |
public function setBatterCharge($batterCharge) |
{ |
$this->_batterCharge = $batterCharge; |
} |
/** |
* Returns $_batteryDate. |
* |
* @see UPSDevice::$_batteryDate |
* |
* @return String |
*/ |
public function getBatteryDate() |
{ |
return $this->_batteryDate; |
} |
/** |
* Sets $_batteryDate. |
* |
* @param object $batteryDate battery date |
* |
* @see UPSDevice::$_batteryDate |
* |
* @return Void |
*/ |
public function setBatteryDate($batteryDate) |
{ |
$this->_batteryDate = $batteryDate; |
} |
/** |
* Returns $_batteryVoltage. |
* |
* @see UPSDevice::$_batteryVoltage |
* |
* @return Integer |
*/ |
public function getBatteryVoltage() |
{ |
return $this->_batteryVoltage; |
} |
/** |
* Sets $_batteryVoltage. |
* |
* @param Integer $batteryVoltage battery volt |
* |
* @see UPSDevice::$_batteryVoltage |
* |
* @return Void |
*/ |
public function setBatteryVoltage($batteryVoltage) |
{ |
$this->_batteryVoltage = $batteryVoltage; |
} |
/** |
* Returns $_lastOutage. |
* |
* @see UPSDevice::$_lastOutage |
* |
* @return String |
*/ |
public function getLastOutage() |
{ |
return $this->_lastOutage; |
} |
/** |
* Sets $_lastOutage. |
* |
* @param String $lastOutage last Outage |
* |
* @see UPSDevice::$lastOutage |
* |
* @return Void |
*/ |
public function setLastOutage($lastOutage) |
{ |
$this->_lastOutage = $lastOutage; |
} |
/** |
* Returns $_lastOutageFinish. |
* |
* @see UPSDevice::$_lastOutageFinish |
* |
* @return String |
*/ |
public function getLastOutageFinish() |
{ |
return $this->_lastOutageFinish; |
} |
/** |
* Sets $_lastOutageFinish. |
* |
* @param String $lastOutageFinish last outage finish |
* |
* @see UPSDevice::$_lastOutageFinish |
* |
* @return Void |
*/ |
public function setLastOutageFinish($lastOutageFinish) |
{ |
$this->_lastOutageFinish = $lastOutageFinish; |
} |
/** |
* Returns $_lineVoltage. |
* |
* @see UPSDevice::$_lineVoltage |
* |
* @return Integer |
*/ |
public function getLineVoltage() |
{ |
return $this->_lineVoltage; |
} |
/** |
* Sets $_lineVoltage. |
* |
* @param Integer $lineVoltage line voltage |
* |
* @see UPSDevice::$_lineVoltage |
* |
* @return Void |
*/ |
public function setLineVoltage($lineVoltage) |
{ |
$this->_lineVoltage = $lineVoltage; |
} |
/** |
* Returns $_lineFrequency. |
* |
* @see UPSDevice::$_lineFrequency |
* |
* @return Integer |
*/ |
public function getLineFrequency() |
{ |
return $this->_lineFrequency; |
} |
/** |
* Sets $_lineFrequency. |
* |
* @param Integer $lineFrequency line frequency |
* |
* @see UPSDevice::$_lineFrequency |
* |
* @return Void |
*/ |
public function setLineFrequency($lineFrequency) |
{ |
$this->_lineFrequency = $lineFrequency; |
} |
/** |
* Returns $_load. |
* |
* @see UPSDevice::$_load |
* |
* @return Integer |
*/ |
public function getLoad() |
{ |
return $this->_load; |
} |
/** |
* Sets $_load. |
* |
* @param Integer $load current load |
* |
* @see UPSDevice::$_load |
* |
* @return Void |
*/ |
public function setLoad($load) |
{ |
$this->_load = $load; |
} |
/** |
* Returns $_mode. |
* |
* @see UPSDevice::$_mode |
* |
* @return String |
*/ |
public function getMode() |
{ |
return $this->_mode; |
} |
/** |
* Sets $_mode. |
* |
* @param String $mode mode |
* |
* @see UPSDevice::$_mode |
* |
* @return Void |
*/ |
public function setMode($mode) |
{ |
$this->_mode = $mode; |
} |
/** |
* Returns $_model. |
* |
* @see UPSDevice::$_model |
* |
* @return String |
*/ |
public function getModel() |
{ |
return $this->_model; |
} |
/** |
* Sets $_model. |
* |
* @param String $model model |
* |
* @see UPSDevice::$_model |
* |
* @return Void |
*/ |
public function setModel($model) |
{ |
$this->_model = $model; |
} |
/** |
* Returns $_name. |
* |
* @see UPSDevice::$_name |
* |
* @return String |
*/ |
public function getName() |
{ |
return $this->_name; |
} |
/** |
* Sets $_name. |
* |
* @param String $name name |
* |
* @see UPSDevice::$_name |
* |
* @return Void |
*/ |
public function setName($name) |
{ |
$this->_name = $name; |
} |
/** |
* Returns $_outages. |
* |
* @see UPSDevice::$_outages |
* |
* @return Integer |
*/ |
public function getOutages() |
{ |
return $this->_outages; |
} |
/** |
* Sets $_outages. |
* |
* @param Integer $outages outages count |
* |
* @see UPSDevice::$_outages |
* |
* @return Void |
*/ |
public function setOutages($outages) |
{ |
$this->_outages = $outages; |
} |
/** |
* Returns $_startTime. |
* |
* @see UPSDevice::$_startTime |
* |
* @return String |
*/ |
public function getStartTime() |
{ |
return $this->_startTime; |
} |
/** |
* Sets $_startTime. |
* |
* @param String $startTime startTime |
* |
* @see UPSDevice::$_startTime |
* |
* @return Void |
*/ |
public function setStartTime($startTime) |
{ |
$this->_startTime = $startTime; |
} |
/** |
* Returns $_status. |
* |
* @see UPSDevice::$_status |
* |
* @return String |
*/ |
public function getStatus() |
{ |
return $this->_status; |
} |
/** |
* Sets $_status. |
* |
* @param String $status status |
* |
* @see UPSDevice::$_status |
* |
* @return Void |
*/ |
public function setStatus($status) |
{ |
$this->_status = $status; |
} |
/** |
* Returns $_temperatur. |
* |
* @see UPSDevice::$_temperatur |
* |
* @return Integer |
*/ |
public function getTemperatur() |
{ |
return $this->_temperatur; |
} |
/** |
* Sets $_temperatur. |
* |
* @param Integer $temperatur temperature |
* |
* @see UPSDevice::$_temperatur |
* |
* @return Void |
*/ |
public function setTemperatur($temperatur) |
{ |
$this->_temperatur = $temperatur; |
} |
/** |
* Returns $_timeLeft. |
* |
* @see UPSDevice::$_timeLeft |
* |
* @return String |
*/ |
public function getTimeLeft() |
{ |
return $this->_timeLeft; |
} |
/** |
* Sets $_timeLeft. |
* |
* @param String $timeLeft time left |
* |
* @see UPSDevice::$_timeLeft |
* |
* @return Void |
*/ |
public function setTimeLeft($timeLeft) |
{ |
$this->_timeLeft = $timeLeft; |
} |
} |