* Mon May 12 2025 Brian Read <brianr@koozali.org> 11.0.0-1.sme

- Adding SM2 panel [SME: 13004]
- Upgrade to phpsysinfo 3.4.4
- Add code to delete inline styles and add css to make it look better.
- version saved / built uses the static version, which means no drops downs and choices.
This commit is contained in:
2025-05-14 16:14:01 +01:00
parent 80b1da5fa5
commit c8ce77259d
952 changed files with 51341 additions and 28699 deletions

View File

@@ -8,7 +8,7 @@
* @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
* @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.MBInfo.inc.php 253 2009-06-17 13:07:50Z bigmichi1 $
* @link http://phpsysinfo.sourceforge.net
*/
@@ -19,7 +19,7 @@
* @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
* @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
*/
@@ -30,7 +30,7 @@ class MBInfo
*
* @see SensorDevice
*
* @var Array
* @var array
*/
private $_mbTemp = array();
@@ -39,7 +39,7 @@ class MBInfo
*
* @see SensorDevice
*
* @var Array
* @var array
*/
private $_mbFan = array();
@@ -48,7 +48,7 @@ class MBInfo
*
* @see SensorDevice
*
* @var Array
* @var array
*/
private $_mbVolt = array();
@@ -57,7 +57,7 @@ class MBInfo
*
* @see SensorDevice
*
* @var Array
* @var array
*/
private $_mbPower = array();
@@ -66,19 +66,32 @@ class MBInfo
*
* @see SensorDevice
*
* @var Array
* @var array
*/
private $_mbCurrent = array();
/**
* array with SensorDevices for other
*
* @see SensorDevice
*
* @var array
*/
private $_mbOther = array();
/**
* Returns $_mbFan.
*
* @see System::$_mbFan
*
* @return Array
* @return array
*/
public function getMbFan()
{
if (defined('PSI_SORT_SENSORS_LIST') && PSI_SORT_SENSORS_LIST) {
usort($this->_mbFan, array('CommonFunctions', 'name_natural_compare'));
}
return $this->_mbFan;
}
@@ -89,7 +102,7 @@ class MBInfo
*
* @see System::$_mbFan
*
* @return Void
* @return void
*/
public function setMbFan($mbFan)
{
@@ -101,21 +114,25 @@ class MBInfo
*
* @see System::$_mbTemp
*
* @return Array
* @return array
*/
public function getMbTemp()
{
if (defined('PSI_SORT_SENSORS_LIST') && PSI_SORT_SENSORS_LIST) {
usort($this->_mbTemp, array('CommonFunctions', 'name_natural_compare'));
}
return $this->_mbTemp;
}
/**
* Sets $_mbTemp.
*
* @param Sensor $mbTemp temp device
* @param SensorDevice $mbTemp temp device
*
* @see System::$_mbTemp
*
* @return Void
* @return void
*/
public function setMbTemp($mbTemp)
{
@@ -127,21 +144,25 @@ class MBInfo
*
* @see System::$_mbVolt
*
* @return Array
* @return array
*/
public function getMbVolt()
{
if (defined('PSI_SORT_SENSORS_LIST') && PSI_SORT_SENSORS_LIST) {
usort($this->_mbVolt, array('CommonFunctions', 'name_natural_compare'));
}
return $this->_mbVolt;
}
/**
* Sets $_mbVolt.
*
* @param Sensor $mbVolt voltage device
* @param SensorDevice $mbVolt voltage device
*
* @see System::$_mbVolt
*
* @return Void
* @return void
*/
public function setMbVolt($mbVolt)
{
@@ -153,49 +174,88 @@ class MBInfo
*
* @see System::$_mbPower
*
* @return Array
* @return array
*/
public function getMbPower()
{
if (defined('PSI_SORT_SENSORS_LIST') && PSI_SORT_SENSORS_LIST) {
usort($this->_mbPower, array('CommonFunctions', 'name_natural_compare'));
}
return $this->_mbPower;
}
/**
* Sets $_mbPower.
*
* @param Sensor $mbPower power device
* @param SensorDevice $mbPower power device
*
* @see System::$_mbPower
*
* @return Void
* @return void
*/
public function setMbPower($mbPower)
{
array_push($this->_mbPower, $mbPower);
}
/**
* Returns $_mbCurrent.
*
* @see System::$_mbCurrent
*
* @return Array
* @return array
*/
public function getMbCurrent()
{
if (defined('PSI_SORT_SENSORS_LIST') && PSI_SORT_SENSORS_LIST) {
usort($this->_mbCurrent, array('CommonFunctions', 'name_natural_compare'));
}
return $this->_mbCurrent;
}
/**
* Sets $_mbCurrent.
*
* @param Sensor $mbCurrent current device
* @param SensorDevice $mbCurrent current device
*
* @see System::$_mbCurrent
*
* @return Void
* @return void
*/
public function setMbCurrent($mbCurrent)
{
array_push($this->_mbCurrent, $mbCurrent);
}
/**
* Returns $_mbOther.
*
* @see System::$_mbOther
*
* @return array
*/
public function getMbOther()
{
if (defined('PSI_SORT_SENSORS_LIST') && PSI_SORT_SENSORS_LIST) {
usort($this->_mbOther, array('CommonFunctions', 'name_natural_compare'));
}
return $this->_mbOther;
}
/**
* Sets $_mbOther.
*
* @param SensorDevice $mbOther other device
*
* @see System::$_mbOther
*
* @return void
*/
public function setMbOther($mbOther)
{
array_push($this->_mbOther, $mbOther);
}
}

View File

@@ -8,7 +8,7 @@
* @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
* @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.System.inc.php 255 2009-06-17 13:39:41Z bigmichi1 $
* @link http://phpsysinfo.sourceforge.net
*/
@@ -19,7 +19,7 @@
* @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
* @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
*/
@@ -28,70 +28,70 @@ class System
/**
* name of the host where phpSysInfo runs
*
* @var String
* @var string
*/
private $_hostname = "localhost";
/**
* ip of the host where phpSysInfo runs
*
* @var String
* @var string
*/
private $_ip = "127.0.0.1";
/**
* detailed Information about the kernel
* detailed information about the kernel
*
* @var String
* @var string
*/
private $_kernel = "Unknown";
/**
* name of the distribution
*
* @var String
* @var string
*/
private $_distribution = "Unknown";
/**
* icon of the distribution (must be available in phpSysInfo)
*
* @var String
* @var string
*/
private $_distributionIcon = "unknown.png";
/**
* detailed Information about the machine name
*
* @var String
* @var string
*/
private $_machine = "";
/**
* time in sec how long the system is running
*
* @var Integer
* @var int
*/
private $_uptime = 0;
/**
* count of users that are currently logged in
*
* @var Integer
* @var int
*/
private $_users = 0;
/**
* load of the system
*
* @var String
* @var string
*/
private $_load = "";
/**
* load of the system in percent (all cpus, if more than one)
*
* @var Integer
* @var int
*/
private $_loadPercent = null;
@@ -100,7 +100,7 @@ class System
*
* @see CpuDevice
*
* @var Array
* @var array
*/
private $_cpus = array();
@@ -109,7 +109,7 @@ class System
*
* @see NetDevice
*
* @var Array
* @var array
*/
private $_netDevices = array();
@@ -118,7 +118,7 @@ class System
*
* @see HWDevice
*
* @var Array
* @var array
*/
private $_pciDevices = array();
@@ -127,7 +127,7 @@ class System
*
* @see HWDevice
*
* @var Array
* @var array
*/
private $_ideDevices = array();
@@ -136,7 +136,7 @@ class System
*
* @see HWDevice
*
* @var Array
* @var array
*/
private $_scsiDevices = array();
@@ -145,7 +145,7 @@ class System
*
* @see HWDevice
*
* @var Array
* @var array
*/
private $_usbDevices = array();
@@ -154,7 +154,7 @@ class System
*
* @see HWDevice
*
* @var Array
* @var array
*/
private $_tbDevices = array();
@@ -163,58 +163,76 @@ class System
*
* @see HWDevice
*
* @var Array
* @var array
*/
private $_i2cDevices = array();
/**
* array with NVMe devices
*
* @see HWDevice
*
* @var array
*/
private $_nvmeDevices = array();
/**
* array with Mem devices
*
* @see HWDevice
*
* @var array
*/
private $_memDevices = array();
/**
* array with disk devices
*
* @see DiskDevice
*
* @var Array
* @var array
*/
private $_diskDevices = array();
/**
* free memory in bytes
*
* @var Integer
* @var int
*/
private $_memFree = 0;
/**
* total memory in bytes
*
* @var Integer
* @var int
*/
private $_memTotal = 0;
/**
* used memory in bytes
*
* @var Integer
* @var int
*/
private $_memUsed = 0;
/**
* used memory by applications in bytes
*
* @var Integer
* @var int
*/
private $_memApplication = null;
/**
* used memory for buffers in bytes
*
* @var Integer
* @var int
*/
private $_memBuffer = null;
/**
* used memory for cache in bytes
*
* @var Integer
* @var int
*/
private $_memCache = null;
@@ -223,25 +241,39 @@ class System
*
* @see DiskDevice
*
* @var Array
* @var array
*/
private $_swapDevices = array();
/**
* array of types of processes
*
* @var Array
* @var array
*/
private $_processes = array();
/**
* array with Virtualizer information
*
* @var array
*/
private $_virtualizer = array();
/**
* operating system type
*
* @var string
*/
private $_OS = "";
/**
* remove duplicate Entries and Count
*
* @param Array $arrDev list of HWDevices
* @param array $arrDev list of HWDevices
*
* @see HWDevice
*
* @return Array
* @return array
*/
public static function removeDupsAndCount($arrDev)
{
@@ -273,7 +305,7 @@ class System
* @see System::_memUsed
* @see System::_memTotal
*
* @return Integer
* @return int
*/
public function getMemPercentUsed()
{
@@ -290,7 +322,7 @@ class System
* @see System::_memApplication
* @see System::_memTotal
*
* @return Integer
* @return int
*/
public function getMemPercentApplication()
{
@@ -311,7 +343,7 @@ class System
* @see System::_memCache
* @see System::_memTotal
*
* @return Integer
* @return int
*/
public function getMemPercentCache()
{
@@ -336,7 +368,7 @@ class System
* @see System::_memBuffer
* @see System::_memTotal
*
* @return Integer
* @return int
*/
public function getMemPercentBuffer()
{
@@ -367,7 +399,7 @@ class System
* @see System::_swapDevices
* @see DiskDevice::getFree()
*
* @return Integer
* @return int
*/
public function getSwapFree()
{
@@ -389,7 +421,7 @@ class System
* @see System::_swapDevices
* @see DiskDevice::getTotal()
*
* @return Integer
* @return int
*/
public function getSwapTotal()
{
@@ -411,7 +443,7 @@ class System
* @see System::_swapDevices
* @see DiskDevice::getUsed()
*
* @return Integer
* @return int
*/
public function getSwapUsed()
{
@@ -433,7 +465,7 @@ class System
* @see System::getSwapUsed()
* @see System::getSwapTotal()
*
* @return Integer
* @return int
*/
public function getSwapPercentUsed()
{
@@ -467,7 +499,7 @@ class System
*
* @see System::$_distribution
*
* @return Void
* @return void
*/
public function setDistribution($distribution)
{
@@ -493,7 +525,7 @@ class System
*
* @see System::$_distributionIcon
*
* @return Void
* @return void
*/
public function setDistributionIcon($distributionIcon)
{
@@ -519,7 +551,7 @@ class System
*
* @see System::$_hostname
*
* @return Void
* @return void
*/
public function setHostname($hostname)
{
@@ -545,7 +577,7 @@ class System
*
* @see System::$_ip
*
* @return Void
* @return void
*/
public function setIp($ip)
{
@@ -571,7 +603,7 @@ class System
*
* @see System::$_kernel
*
* @return Void
* @return void
*/
public function setKernel($kernel)
{
@@ -597,7 +629,7 @@ class System
*
* @see System::$_load
*
* @return Void
* @return void
*/
public function setLoad($load)
{
@@ -609,7 +641,7 @@ class System
*
* @see System::$_loadPercent
*
* @return Integer
* @return int
*/
public function getLoadPercent()
{
@@ -619,11 +651,11 @@ class System
/**
* Sets $_loadPercent.
*
* @param Integer $loadPercent load percent
* @param int $loadPercent load percent
*
* @see System::$_loadPercent
*
* @return Void
* @return void
*/
public function setLoadPercent($loadPercent)
{
@@ -645,11 +677,11 @@ class System
/**
* Sets $_machine.
*
* @param Interger $machine machine
* @param string $machine machine
*
* @see System::$_machine
*
* @return Void
* @return void
*/
public function setMachine($machine)
{
@@ -661,7 +693,7 @@ class System
*
* @see System::$_uptime
*
* @return Integer
* @return int
*/
public function getUptime()
{
@@ -671,11 +703,11 @@ class System
/**
* Sets $_uptime.
*
* @param Interger $uptime uptime
* @param integer $uptime uptime
*
* @see System::$_uptime
*
* @return Void
* @return void
*/
public function setUptime($uptime)
{
@@ -687,7 +719,7 @@ class System
*
* @see System::$_users
*
* @return Integer
* @return int
*/
public function getUsers()
{
@@ -697,11 +729,11 @@ class System
/**
* Sets $_users.
*
* @param Integer $users user count
* @param int $users user count
*
* @see System::$_users
*
* @return Void
* @return void
*/
public function setUsers($users)
{
@@ -713,7 +745,7 @@ class System
*
* @see System::$_cpus
*
* @return Array
* @return array
*/
public function getCpus()
{
@@ -723,12 +755,12 @@ class System
/**
* Sets $_cpus.
*
* @param Cpu $cpus cpu device
* @param CpuDevice $cpus cpu device
*
* @see System::$_cpus
* @see CpuDevice
*
* @return Void
* @return void
*/
public function setCpus($cpus)
{
@@ -740,10 +772,14 @@ class System
*
* @see System::$_netDevices
*
* @return Array
* @return array
*/
public function getNetDevices()
{
if (defined('PSI_SORT_NETWORK_INTERFACES_LIST') && PSI_SORT_NETWORK_INTERFACES_LIST) {
usort($this->_netDevices, array('CommonFunctions', 'name_natural_compare'));
}
return $this->_netDevices;
}
@@ -755,7 +791,7 @@ class System
* @see System::$_netDevices
* @see NetDevice
*
* @return Void
* @return void
*/
public function setNetDevices($netDevices)
{
@@ -767,7 +803,7 @@ class System
*
* @see System::$_pciDevices
*
* @return Array
* @return array
*/
public function getPciDevices()
{
@@ -782,7 +818,7 @@ class System
* @see System::$_pciDevices
* @see HWDevice
*
* @return Void
* @return void
*/
public function setPciDevices($pciDevices)
{
@@ -794,7 +830,7 @@ class System
*
* @see System::$_ideDevices
*
* @return Array
* @return array
*/
public function getIdeDevices()
{
@@ -809,7 +845,7 @@ class System
* @see System::$_ideDevices
* @see HWDevice
*
* @return Void
* @return void
*/
public function setIdeDevices($ideDevices)
{
@@ -821,7 +857,7 @@ class System
*
* @see System::$_scsiDevices
*
* @return Array
* @return array
*/
public function getScsiDevices()
{
@@ -836,7 +872,7 @@ class System
* @see System::$_scsiDevices
* @see HWDevice
*
* @return Void
* @return void
*/
public function setScsiDevices($scsiDevices)
{
@@ -848,7 +884,7 @@ class System
*
* @see System::$_usbDevices
*
* @return Array
* @return array
*/
public function getUsbDevices()
{
@@ -863,7 +899,7 @@ class System
* @see System::$_usbDevices
* @see HWDevice
*
* @return Void
* @return void
*/
public function setUsbDevices($usbDevices)
{
@@ -875,7 +911,7 @@ class System
*
* @see System::$_tbDevices
*
* @return Array
* @return array
*/
public function getTbDevices()
{
@@ -890,7 +926,7 @@ class System
* @see System::$_tbDevices
* @see HWDevice
*
* @return Void
* @return void
*/
public function setTbDevices($tbDevices)
{
@@ -902,7 +938,7 @@ class System
*
* @see System::$_i2cDevices
*
* @return Array
* @return array
*/
public function getI2cDevices()
{
@@ -917,19 +953,73 @@ class System
* @see System::$_i2cDevices
* @see HWDevice
*
* @return Void
* @return void
*/
public function setI2cDevices($i2cDevices)
{
array_push($this->_i2cDevices, $i2cDevices);
}
/**
* Returns $_nvmeDevices.
*
* @see System::$_nvmeDevices
*
* @return array
*/
public function getNvmeDevices()
{
return $this->_nvmeDevices;
}
/**
* Sets $_nvmeDevices.
*
* @param HWDevice $nvmeDevices NVMe device
*
* @see System::$_nvmeDevices
* @see HWDevice
*
* @return void
*/
public function setNvmeDevices($nvmeDevices)
{
array_push($this->_nvmeDevices, $nvmeDevices);
}
/**
* Returns $_memDevices.
*
* @see System::$_memDevices
*
* @return array
*/
public function getMemDevices()
{
return $this->_memDevices;
}
/**
* Sets $_memDevices.
*
* @param HWDevice $memDevices mem device
*
* @see System::$_memDevices
* @see HWDevice
*
* @return void
*/
public function setMemDevices($memDevices)
{
array_push($this->_memDevices, $memDevices);
}
/**
* Returns $_diskDevices.
*
* @see System::$_diskDevices
*
* @return Array
* @return array
*/
public function getDiskDevices()
{
@@ -956,7 +1046,7 @@ class System
*
* @see System::$_memApplication
*
* @return Integer
* @return int
*/
public function getMemApplication()
{
@@ -966,11 +1056,11 @@ class System
/**
* Sets $_memApplication.
*
* @param Integer $memApplication application memory
* @param int $memApplication application memory
*
* @see System::$_memApplication
*
* @return Void
* @return void
*/
public function setMemApplication($memApplication)
{
@@ -982,7 +1072,7 @@ class System
*
* @see System::$_memBuffer
*
* @return Integer
* @return int
*/
public function getMemBuffer()
{
@@ -992,11 +1082,11 @@ class System
/**
* Sets $_memBuffer.
*
* @param Integer $memBuffer buffer memory
* @param int $memBuffer buffer memory
*
* @see System::$_memBuffer
*
* @return Void
* @return void
*/
public function setMemBuffer($memBuffer)
{
@@ -1008,7 +1098,7 @@ class System
*
* @see System::$_memCache
*
* @return Integer
* @return int
*/
public function getMemCache()
{
@@ -1018,11 +1108,11 @@ class System
/**
* Sets $_memCache.
*
* @param Integer $memCache cache memory
* @param int $memCache cache memory
*
* @see System::$_memCache
*
* @return Void
* @return void
*/
public function setMemCache($memCache)
{
@@ -1034,7 +1124,7 @@ class System
*
* @see System::$_memFree
*
* @return Integer
* @return int
*/
public function getMemFree()
{
@@ -1044,11 +1134,11 @@ class System
/**
* Sets $_memFree.
*
* @param Integer $memFree free memory
* @param int $memFree free memory
*
* @see System::$_memFree
*
* @return Void
* @return void
*/
public function setMemFree($memFree)
{
@@ -1060,7 +1150,7 @@ class System
*
* @see System::$_memTotal
*
* @return Integer
* @return int
*/
public function getMemTotal()
{
@@ -1070,11 +1160,11 @@ class System
/**
* Sets $_memTotal.
*
* @param Integer $memTotal total memory
* @param int $memTotal total memory
*
* @see System::$_memTotal
*
* @return Void
* @return void
*/
public function setMemTotal($memTotal)
{
@@ -1086,7 +1176,7 @@ class System
*
* @see System::$_memUsed
*
* @return Integer
* @return int
*/
public function getMemUsed()
{
@@ -1096,11 +1186,11 @@ class System
/**
* Sets $_memUsed.
*
* @param Integer $memUsed used memory
* @param int $memUsed used memory
*
* @see System::$_memUsed
*
* @return Void
* @return void
*/
public function setMemUsed($memUsed)
{
@@ -1112,7 +1202,7 @@ class System
*
* @see System::$_swapDevices
*
* @return Array
* @return array
*/
public function getSwapDevices()
{
@@ -1127,7 +1217,7 @@ class System
* @see System::$_swapDevices
* @see DiskDevice
*
* @return Void
* @return void
*/
public function setSwapDevices($swapDevices)
{
@@ -1139,7 +1229,7 @@ class System
*
* @see System::$_processes
*
* @return Array
* @return array
*/
public function getProcesses()
{
@@ -1153,7 +1243,7 @@ class System
*
* @see System::$_processes
*
* @return Void
* @return void
*/
public function setProcesses($processes)
{
@@ -1164,4 +1254,64 @@ class System
}
*/
}
/**
* Returns $_virtualizer.
*
* @see System::$_virtualizer
*
* @return array
*/
public function getVirtualizer()
{
return $this->_virtualizer;
}
/**
* Sets $_virtualizer.
*
* @param String $virtualizer virtualizername
* @param Bool|String $value true, false or virtualizername to replace
*
* @see System::$_virtualizer
*
* @return void
*/
public function setVirtualizer($virtualizer, $value = true)
{
if (!isset($this->_virtualizer[$virtualizer])) {
if (is_bool($value)) {
$this->_virtualizer[$virtualizer] = $value;
} else { // replace the virtualizer with another
$this->_virtualizer[$virtualizer] = true;
$this->_virtualizer[$value] = false;
}
}
}
/**
* Returns $_OS.
*
* @see System::$_OS
*
* @return string
*/
public function getOS()
{
return $this->_OS;
}
/**
* Sets $_OS.
*
* @param $os operating system type
*
* @see System::$_OS
*
* @return void
*/
public function setOS($OS)
{
$this->_OS = $OS;
}
}

View File

@@ -8,7 +8,7 @@
* @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
* @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.UPSInfo.inc.php 329 2009-09-07 11:21:44Z bigmichi1 $
* @link http://phpsysinfo.sourceforge.net
*/
@@ -19,7 +19,7 @@
* @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
* @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
*/
@@ -30,7 +30,7 @@ class UPSInfo
*
* @see UPSDevice
*
* @var Array
* @var array
*/
private $_upsDevices = array();
@@ -39,7 +39,7 @@ class UPSInfo
*
* @see UPSInfo::$_upsDevices
*
* @return Array
* @return array
*/
public function getUpsDevices()
{
@@ -53,7 +53,7 @@ class UPSInfo
*
* @see UPSInfo::$_upsDevices
*
* @return Void
* @return void
*/
public function setUpsDevices($upsDevices)
{

View File

@@ -8,7 +8,7 @@
* @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
* @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
*/
@@ -19,7 +19,7 @@
* @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
* @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
*/
@@ -28,123 +28,215 @@ class CpuDevice
/**
* model of the cpu
*
* @var String
* @var string
*/
private $_model = "";
/**
* cpu voltage
*
* @var Float
*/
private $_voltage = 0;
/**
* speed of the cpu in hertz
*
* @var Integer
* @var int
*/
private $_cpuSpeed = 0;
/**
* max speed of the cpu in hertz
*
* @var Integer
* @var int
*/
private $_cpuSpeedMax = 0;
/**
* min speed of the cpu in hertz
*
* @var Integer
* @var int
*/
private $_cpuSpeedMin = 0;
/**
* cache size in bytes, if available
*
* @var Integer
* @var int
*/
private $_cache = null;
/**
* virtualization, if available
*
* @var String
* @var string
*/
private $_virt = null;
/**
* busspeed in hertz, if available
*
* @var Integer
* @var int
*/
private $_busSpeed = null;
/**
* temperature of the cpu, if available
*
* @var Integer
*/
private $_temp = null;
/**
* bogomips of the cpu, if available
*
* @var Integer
* @var int
*/
private $_bogomips = null;
/**
* temperature of the cpu, if available
*
* @var int
*/
private $_temp = null;
/**
* vendorid, if available
*
* @var string
*/
private $_vendorid = null;
/**
* current load in percent of the cpu, if available
*
* @var Integer
* @var int
*/
private $_load = null;
/**
* Returns $_bogomips.
* Returns $_model.
*
* @see Cpu::$_bogomips
* @see Cpu::$_model
*
* @return Integer
* @return String
*/
public function getBogomips()
public function getModel()
{
return $this->_bogomips;
return $this->_model;
}
/**
* Sets $_bogomips.
* Sets $_model.
*
* @param Integer $bogomips bogompis
* @param String $model cpumodel
*
* @see Cpu::$_bogomips
* @see Cpu::$_model
*
* @return Void
* @return void
*/
public function setBogomips($bogomips)
public function setModel($model)
{
$this->_bogomips = $bogomips;
$this->_model = $model;
}
/**
* Returns $_busSpeed.
* Returns $_voltage.
*
* @see Cpu::$_busSpeed
* @see Cpu::$_voltage
*
* @return Integer
* @return Float
*/
public function getBusSpeed()
public function getVoltage()
{
return $this->_busSpeed;
return $this->_voltage;
}
/**
* Sets $_busSpeed.
* Sets $_voltage.
*
* @param Integer $busSpeed busspeed
* @param int $voltage voltage
*
* @see Cpu::$_busSpeed
* @see Cpu::$_voltage
*
* @return Void
* @return void
*/
public function setBusSpeed($busSpeed)
public function setVoltage($voltage)
{
$this->_busSpeed = $busSpeed;
$this->_voltage = $voltage;
}
/**
* Returns $_cpuSpeed.
*
* @see Cpu::$_cpuSpeed
*
* @return int
*/
public function getCpuSpeed()
{
return $this->_cpuSpeed;
}
/**
* Sets $_cpuSpeed.
*
* @param int $cpuSpeed cpuspeed
*
* @see Cpu::$_cpuSpeed
*
* @return void
*/
public function setCpuSpeed($cpuSpeed)
{
$this->_cpuSpeed = $cpuSpeed;
}
/**
* Returns $_cpuSpeedMax.
*
* @see Cpu::$_cpuSpeedMAx
*
* @return int
*/
public function getCpuSpeedMax()
{
return $this->_cpuSpeedMax;
}
/**
* Sets $_cpuSpeedMax.
*
* @param int $cpuSpeedMax cpuspeedmax
*
* @see Cpu::$_cpuSpeedMax
*
* @return void
*/
public function setCpuSpeedMax($cpuSpeedMax)
{
$this->_cpuSpeedMax = $cpuSpeedMax;
}
/**
* Returns $_cpuSpeedMin.
*
* @see Cpu::$_cpuSpeedMin
*
* @return int
*/
public function getCpuSpeedMin()
{
return $this->_cpuSpeedMin;
}
/**
* Sets $_cpuSpeedMin.
*
* @param int $cpuSpeedMin cpuspeedmin
*
* @see Cpu::$_cpuSpeedMin
*
* @return void
*/
public function setCpuSpeedMin($cpuSpeedMin)
{
$this->_cpuSpeedMin = $cpuSpeedMin;
}
/**
@@ -152,7 +244,7 @@ class CpuDevice
*
* @see Cpu::$_cache
*
* @return Integer
* @return int
*/
public function getCache()
{
@@ -162,11 +254,11 @@ class CpuDevice
/**
* Sets $_cache.
*
* @param Integer $cache cache size
* @param int $cache cache size
*
* @see Cpu::$_cache
*
* @return Void
* @return void
*/
public function setCache($cache)
{
@@ -188,11 +280,11 @@ class CpuDevice
/**
* Sets $_virt.
*
* @param String $_virt
* @param string $virt
*
* @see Cpu::$_virt
*
* @return Void
* @return void
*/
public function setVirt($virt)
{
@@ -200,107 +292,55 @@ class CpuDevice
}
/**
* Returns $_cpuSpeed.
* Returns $_busSpeed.
*
* @see Cpu::$_cpuSpeed
* @see Cpu::$_busSpeed
*
* @return Integer
* @return int
*/
public function getCpuSpeed()
public function getBusSpeed()
{
return $this->_cpuSpeed;
return $this->_busSpeed;
}
/**
* Returns $_cpuSpeedMax.
* Sets $_busSpeed.
*
* @see Cpu::$_cpuSpeedMAx
* @param int $busSpeed busspeed
*
* @return Integer
* @see Cpu::$_busSpeed
*
* @return void
*/
public function getCpuSpeedMax()
public function setBusSpeed($busSpeed)
{
return $this->_cpuSpeedMax;
$this->_busSpeed = $busSpeed;
}
/**
* Returns $_cpuSpeedMin.
* Returns $_bogomips.
*
* @see Cpu::$_cpuSpeedMin
* @see Cpu::$_bogomips
*
* @return Integer
* @return int
*/
public function getCpuSpeedMin()
public function getBogomips()
{
return $this->_cpuSpeedMin;
return $this->_bogomips;
}
/**
* Sets $_cpuSpeed.
* Sets $_bogomips.
*
* @param Integer $cpuSpeed cpuspeed
* @param int $bogomips bogompis
*
* @see Cpu::$_cpuSpeed
* @see Cpu::$_bogomips
*
* @return Void
* @return void
*/
public function setCpuSpeed($cpuSpeed)
public function setBogomips($bogomips)
{
$this->_cpuSpeed = $cpuSpeed;
}
/**
* Sets $_cpuSpeedMax.
*
* @param Integer $cpuSpeedMax cpuspeedmax
*
* @see Cpu::$_cpuSpeedMax
*
* @return Void
*/
public function setCpuSpeedMax($cpuSpeedMax)
{
$this->_cpuSpeedMax = $cpuSpeedMax;
}
/**
* Sets $_cpuSpeedMin.
*
* @param Integer $cpuSpeedMin cpuspeedmin
*
* @see Cpu::$_cpuSpeedMin
*
* @return Void
*/
public function setCpuSpeedMin($cpuSpeedMin)
{
$this->_cpuSpeedMin = $cpuSpeedMin;
}
/**
* 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;
$this->_bogomips = $bogomips;
}
/**
@@ -308,33 +348,63 @@ class CpuDevice
*
* @see Cpu::$_temp
*
* @return Integer
* @return int
*/
/*
public function getTemp()
{
return $this->_temp;
}
*/
/**
* Sets $_temp.
*
* @param Integer $temp temperature
* @param int $temp temperature
*
* @see Cpu::$_temp
*
* @return Void
* @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 = trim(preg_replace('/[\s!]/', '', $vendorid));
}
/**
* Returns $_load.
*
* @see CpuDevice::$_load
*
* @return Integer
* @return int
*/
public function getLoad()
{
@@ -344,11 +414,11 @@ class CpuDevice
/**
* Sets $_load.
*
* @param Integer $load load percent
* @param int $load load percent
*
* @see CpuDevice::$_load
*
* @return Void
* @return void
*/
public function setLoad($load)
{

View File

@@ -8,7 +8,7 @@
* @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
* @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
*/
@@ -19,7 +19,7 @@
* @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
* @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
*/
@@ -28,71 +28,78 @@ class DiskDevice
/**
* name of the disk device
*
* @var String
* @var string
*/
private $_name = "";
/**
* type of the filesystem on the disk device
*
* @var String
* @var string
*/
private $_fsType = "";
/**
* diskspace that is free in bytes
*
* @var Integer
* @var int
*/
private $_free = 0;
/**
* diskspace that is used in bytes
*
* @var Integer
* @var int
*/
private $_used = 0;
/**
* total diskspace
*
* @var Integer
* @var int
*/
private $_total = 0;
/**
* mount point of the disk device if available
*
* @var String
* @var string
*/
private $_mountPoint = null;
/**
* additional options of the device, like mount options
*
* @var String
* @var string
*/
private $_options = null;
/**
* inodes usage in percent if available
*
* @var
* @var int
*/
private $_percentInodesUsed = null;
/**
* ignore mode
*
* @var int
*/
private $_ignore = 0;
/**
* Returns PercentUsed calculated when function is called from internal values
*
* @see DiskDevice::$_total
* @see DiskDevice::$_used
*
* @return Integer
* @return int
*/
public function getPercentUsed()
{
if ($this->_total > 0) {
return round($this->_used / $this->_total * 100);
return 100 - min(floor($this->_free / $this->_total * 100), 100);
} else {
return 0;
}
@@ -103,7 +110,7 @@ class DiskDevice
*
* @see DiskDevice::$_PercentInodesUsed
*
* @return Integer
* @return int
*/
public function getPercentInodesUsed()
{
@@ -113,11 +120,11 @@ class DiskDevice
/**
* Sets $_PercentInodesUsed.
*
* @param Integer $percentInodesUsed inodes percent
* @param int $percentInodesUsed inodes percent
*
* @see DiskDevice::$_PercentInodesUsed
*
* @return Void
* @return void
*/
public function setPercentInodesUsed($percentInodesUsed)
{
@@ -129,7 +136,7 @@ class DiskDevice
*
* @see DiskDevice::$_free
*
* @return Integer
* @return int
*/
public function getFree()
{
@@ -139,11 +146,11 @@ class DiskDevice
/**
* Sets $_free.
*
* @param Integer $free free bytes
* @param int $free free bytes
*
* @see DiskDevice::$_free
*
* @return Void
* @return void
*/
public function setFree($free)
{
@@ -155,7 +162,7 @@ class DiskDevice
*
* @see DiskDevice::$_fsType
*
* @return String
* @return string
*/
public function getFsType()
{
@@ -169,7 +176,7 @@ class DiskDevice
*
* @see DiskDevice::$_fsType
*
* @return Void
* @return void
*/
public function setFsType($fsType)
{
@@ -181,7 +188,7 @@ class DiskDevice
*
* @see DiskDevice::$_mountPoint
*
* @return String
* @return string
*/
public function getMountPoint()
{
@@ -191,11 +198,11 @@ class DiskDevice
/**
* Sets $_mountPoint.
*
* @param String $mountPoint mountpoint
* @param string $mountPoint mountpoint
*
* @see DiskDevice::$_mountPoint
*
* @return Void
* @return void
*/
public function setMountPoint($mountPoint)
{
@@ -207,7 +214,7 @@ class DiskDevice
*
* @see DiskDevice::$_name
*
* @return String
* @return string
*/
public function getName()
{
@@ -217,11 +224,11 @@ class DiskDevice
/**
* Sets $_name.
*
* @param String $name device name
* @param string $name device name
*
* @see DiskDevice::$_name
*
* @return Void
* @return void
*/
public function setName($name)
{
@@ -233,7 +240,7 @@ class DiskDevice
*
* @see DiskDevice::$_options
*
* @return String
* @return string
*/
public function getOptions()
{
@@ -243,11 +250,11 @@ class DiskDevice
/**
* Sets $_options.
*
* @param String $options additional options
* @param string $options additional options
*
* @see DiskDevice::$_options
*
* @return Void
* @return void
*/
public function setOptions($options)
{
@@ -259,7 +266,7 @@ class DiskDevice
*
* @see DiskDevice::$_total
*
* @return Integer
* @return int
*/
public function getTotal()
{
@@ -269,11 +276,11 @@ class DiskDevice
/**
* Sets $_total.
*
* @param Integer $total total bytes
* @param int $total total bytes
*
* @see DiskDevice::$_total
*
* @return Void
* @return void
*/
public function setTotal($total)
{
@@ -285,7 +292,7 @@ class DiskDevice
*
* @see DiskDevice::$_used
*
* @return Integer
* @return int
*/
public function getUsed()
{
@@ -295,14 +302,38 @@ class DiskDevice
/**
* Sets $_used.
*
* @param Integer $used used bytes
* @param int $used used bytes
*
* @see DiskDevice::$_used
*
* @return Void
* @return void
*/
public function setUsed($used)
{
$this->_used = $used;
}
/**
* Returns $_ignore.
*
* @see DiskDevice::$_ignore
*
* @return int
*/
public function getIgnore()
{
return $this->_ignore;
}
/**
* Sets $_ignore.
*
* @see DiskDevice::$_ignore
*
* @return void
*/
public function setIgnore($ignore)
{
$this->_ignore = $ignore;
}
}

View File

@@ -8,7 +8,7 @@
* @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
* @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
*/
@@ -19,7 +19,7 @@
* @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
* @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
*/
@@ -28,21 +28,56 @@ class HWDevice
/**
* name of the device
*
* @var String
* @var string
*/
private $_name = "";
/**
* capacity of the device, if not available it will be null
*
* @var Integer
* @var int
*/
private $_capacity = null;
/**
* manufacturer of the device, if not available it will be null
*
* @var int
*/
private $_manufacturer = null;
/**
* product of the device, if not available it will be null
*
* @var int
*/
private $_product = null;
/**
* serial number of the device, if not available it will be null
*
* @var string
*/
private $_serial = null;
/**
* speed of the device, if not available it will be null
*
* @var Float
*/
private $_speed = null;
/**
* voltage of the device, if not available it will be null
*
* @var Float
*/
private $_voltage = null;
/**
* count of the device
*
* @var Integer
* @var int
*/
private $_count = 1;
@@ -55,39 +90,18 @@ class HWDevice
*/
public function equals(HWDevice $dev)
{
if ($dev->getName() === $this->_name && $dev->getCapacity() === $this->_capacity) {
if ($dev->getName() === $this->_name
&& $dev->getCapacity() === $this->_capacity
&& $dev->getManufacturer() === $this->_manufacturer
&& $dev->getProduct() === $this->_product
&& $dev->getSerial() === $this->_serial
&& $dev->getSpeed() === $this->_speed) {
return true;
} else {
return false;
}
}
/**
* 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 $_name.
*
@@ -107,19 +121,175 @@ class HWDevice
*
* @see HWDevice::$_name
*
* @return Void
* @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 $_speed.
*
* @see HWDevice::$_speed
*
* @return Float
*/
public function getSpeed()
{
return $this->_speed;
}
/**
* Sets $_speed.
*
* @param Float $speed speed
*
* @see HWDevice::$_speed
*
* @return void
*/
public function setSpeed($speed)
{
$this->_speed = $speed;
}
/**
* Returns $_voltage.
*
* @see HWDevice::$_voltage
*
* @return Float
*/
public function getVoltage()
{
return $this->_voltage;
}
/**
* Sets $_voltage.
*
* @param Float $voltage voltage
*
* @see HWDevice::$_voltage
*
* @return void
*/
public function setVoltage($voltage)
{
$this->_voltage = $voltage;
}
/**
* Returns $_capacity.
*
* @see HWDevice::$_capacity
*
* @return int
*/
public function getCapacity()
{
return $this->_capacity;
}
/**
* Sets $_capacity.
*
* @param int $capacity device capacity
*
* @see HWDevice::$_capacity
*
* @return void
*/
public function setCapacity($capacity)
{
$this->_capacity = $capacity;
}
/**
* Returns $_count.
*
* @see HWDevice::$_count
*
* @return Integer
* @return int
*/
public function getCount()
{
@@ -129,11 +299,11 @@ class HWDevice
/**
* Sets $_count.
*
* @param Integer $count device count
* @param int $count device count
*
* @see HWDevice::$_count
*
* @return Void
* @return void
*/
public function setCount($count)
{

View File

@@ -8,7 +8,7 @@
* @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
* @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
*/
@@ -19,7 +19,7 @@
* @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
* @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
*/
@@ -28,51 +28,72 @@ class NetDevice
/**
* name of the device
*
* @var String
* @var string
*/
private $_name = "";
/**
* transmitted bytes
*
* @var Integer
* @var int
*/
private $_txBytes = 0;
/**
* received bytes
*
* @var Integer
* @var int
*/
private $_rxBytes = 0;
/**
* counted error packages
*
* @var Integer
* @var int
*/
private $_errors = 0;
/**
* counted droped packages
*
* @var Integer
* @var int
*/
private $_drops = 0;
/**
* string with info
*
* @var String
* @var string
*/
private $_info = null;
/**
* string with bridge
*
* @var string
*/
private $_bridge = null;
/**
* transmitted bytes rate
*
* @var int
*/
private $_txRate = null;
/**
* received bytes rate
*
* @var int
*/
private $_rxRate = null;
/**
* Returns $_drops.
*
* @see NetDevice::$_drops
*
* @return Integer
* @return int
*/
public function getDrops()
{
@@ -82,11 +103,11 @@ class NetDevice
/**
* Sets $_drops.
*
* @param Integer $drops dropped packages
* @param int $drops dropped packages
*
* @see NetDevice::$_drops
*
* @return Void
* @return void
*/
public function setDrops($drops)
{
@@ -98,7 +119,7 @@ class NetDevice
*
* @see NetDevice::$_errors
*
* @return Integer
* @return int
*/
public function getErrors()
{
@@ -108,11 +129,11 @@ class NetDevice
/**
* Sets $_errors.
*
* @param Integer $errors error packages
* @param int $errors error packages
*
* @see NetDevice::$_errors
*
* @return Void
* @return void
*/
public function setErrors($errors)
{
@@ -138,7 +159,7 @@ class NetDevice
*
* @see NetDevice::$_name
*
* @return Void
* @return void
*/
public function setName($name)
{
@@ -150,7 +171,7 @@ class NetDevice
*
* @see NetDevice::$_rxBytes
*
* @return Integer
* @return int
*/
public function getRxBytes()
{
@@ -160,11 +181,11 @@ class NetDevice
/**
* Sets $_rxBytes.
*
* @param Integer $rxBytes received bytes
* @param int $rxBytes received bytes
*
* @see NetDevice::$_rxBytes
*
* @return Void
* @return void
*/
public function setRxBytes($rxBytes)
{
@@ -176,7 +197,7 @@ class NetDevice
*
* @see NetDevice::$_txBytes
*
* @return Integer
* @return int
*/
public function getTxBytes()
{
@@ -186,11 +207,11 @@ class NetDevice
/**
* Sets $_txBytes.
*
* @param Integer $txBytes transmitted bytes
* @param int $txBytes transmitted bytes
*
* @see NetDevice::$_txBytes
*
* @return Void
* @return void
*/
public function setTxBytes($txBytes)
{
@@ -216,10 +237,88 @@ class NetDevice
*
* @see NetDevice::$_info
*
* @return Void
* @return void
*/
public function setInfo($info)
{
$this->_info = $info;
}
/**
* Returns $_bridge.
*
* @see NetDevice::$_bridge
*
* @return String
*/
public function getBridge()
{
return $this->_bridge;
}
/**
* Sets $_bridge.
*
* @param String $bridge bridge string
*
* @see NetDevice::$_bridge
*
* @return void
*/
public function setBridge($bridge)
{
$this->_bridge = $bridge;
}
/**
* Returns $_rxRate.
*
* @see NetDevice::$_rxRate
*
* @return int
*/
public function getRxRate()
{
return $this->_rxRate;
}
/**
* Sets $_rxRate.
*
* @param int $rxRate received bytes rate
*
* @see NetDevice::$_rxRate
*
* @return void
*/
public function setRxRate($rxRate)
{
$this->_rxRate = $rxRate;
}
/**
* Returns $_txRate.
*
* @see NetDevice::$_txRate
*
* @return int
*/
public function getTxRate()
{
return $this->_txRate;
}
/**
* Sets $_txRate.
*
* @param int $txRate transmitted bytes rate
*
* @see NetDevice::$_txRate
*
* @return void
*/
public function setTxRate($txRate)
{
$this->_txRate = $txRate;
}
}

View File

@@ -8,7 +8,7 @@
* @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
* @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
*/
@@ -19,7 +19,7 @@
* @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
* @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
*/
@@ -28,44 +28,51 @@ class SensorDevice
/**
* name of the sensor
*
* @var String
* @var string
*/
private $_name = "";
/**
* current value of the sensor
*
* @var Integer
* @var int
*/
private $_value = 0;
/**
* maximum value of the sensor
*
* @var Integer
* @var int
*/
private $_max = null;
/**
* minimum value of the sensor
*
* @var Integer
* @var int
*/
private $_min = null;
/**
* event of the sensor
*
* @var String
* @var string
*/
private $_event = "";
/**
* unit of values of the sensor
*
* @var string
*/
private $_unit = "";
/**
* Returns $_max.
*
* @see Sensor::$_max
*
* @return Integer
* @return int
*/
public function getMax()
{
@@ -75,11 +82,11 @@ class SensorDevice
/**
* Sets $_max.
*
* @param Integer $max maximum value
* @param int $max maximum value
*
* @see Sensor::$_max
*
* @return Void
* @return void
*/
public function setMax($max)
{
@@ -91,7 +98,7 @@ class SensorDevice
*
* @see Sensor::$_min
*
* @return Integer
* @return int
*/
public function getMin()
{
@@ -101,11 +108,11 @@ class SensorDevice
/**
* Sets $_min.
*
* @param Integer $min minimum value
* @param int $min minimum value
*
* @see Sensor::$_min
*
* @return Void
* @return void
*/
public function setMin($min)
{
@@ -131,7 +138,7 @@ class SensorDevice
*
* @see Sensor::$_name
*
* @return Void
* @return void
*/
public function setName($name)
{
@@ -143,7 +150,7 @@ class SensorDevice
*
* @see Sensor::$_value
*
* @return Integer
* @return int
*/
public function getValue()
{
@@ -153,11 +160,11 @@ class SensorDevice
/**
* Sets $_value.
*
* @param Integer $value current value
* @param int $value current value
*
* @see Sensor::$_value
*
* @return Void
* @return void
*/
public function setValue($value)
{
@@ -183,10 +190,36 @@ class SensorDevice
*
* @see Sensor::$_event
*
* @return Void
* @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;
}
}

View File

@@ -8,7 +8,7 @@
* @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
* @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
*/
@@ -19,7 +19,7 @@
* @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
* @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
*/
@@ -28,121 +28,128 @@ class UPSDevice
/**
* name of the ups
*
* @var String
* @var string
*/
private $_name = "";
/**
* model of the ups
*
* @var String
* @var string
*/
private $_model = "";
/**
* mode of the ups
*
* @var String
* @var string
*/
private $_mode = "";
/**
* last start time
*
* @var String
* @var string
*/
private $_startTime = "";
/**
* status of the ups
*
* @var String
* @var string
*/
private $_status = "";
/**
* temperature of the ups
*
* @var Integer
* @var string
*/
private $_temperatur = null;
/**
* outages count
*
* @var Integer
* @var int
*/
private $_outages = null;
/**
* date of last outtage
*
* @var String
* @var string
*/
private $_lastOutage = null;
/**
* date of last outage finish
*
* @var String
* @var string
*/
private $_lastOutageFinish = null;
/**
* line volt
*
* @var Integer
* @var float
*/
private $_lineVoltage = null;
/**
* line freq
*
* @var Integer
* @var int
*/
private $_lineFrequency = null;
/**
* current load of the ups in percent
*
* @var Integer
* @var float
*/
private $_load = null;
/**
* battery installation date
*
* @var String
* @var string
*/
private $_batteryDate = null;
/**
* current battery volt
*
* @var Integer
* @var float
*/
private $_batteryVoltage = null;
/**
* current charge in percent of the battery
*
* @var Integer
* @var float
*/
private $_batterCharge = null;
/**
* time left
*
* @var String
* @var string
*/
private $_timeLeft = null;
/**
* beeper enabled or disabled
*
* @var string
*/
private $_beeperStatus = null;
/**
* Returns $_batterCharge.
*
* @see UPSDevice::$_batterCharge
*
* @return integer
* @return float
*/
public function getBatterCharge()
{
@@ -152,7 +159,7 @@ class UPSDevice
/**
* Sets $_batterCharge.
*
* @param Integer $batterCharge battery charge
* @param float $batterCharge battery charge
*
* @see UPSDevice::$_batterCharge
*
@@ -182,7 +189,7 @@ class UPSDevice
*
* @see UPSDevice::$_batteryDate
*
* @return Void
* @return void
*/
public function setBatteryDate($batteryDate)
{
@@ -194,7 +201,7 @@ class UPSDevice
*
* @see UPSDevice::$_batteryVoltage
*
* @return Integer
* @return float
*/
public function getBatteryVoltage()
{
@@ -204,11 +211,11 @@ class UPSDevice
/**
* Sets $_batteryVoltage.
*
* @param object $batteryVoltage battery volt
* @param float $batteryVoltage battery volt
*
* @see UPSDevice::$_batteryVoltage
*
* @return Void
* @return void
*/
public function setBatteryVoltage($batteryVoltage)
{
@@ -234,7 +241,7 @@ class UPSDevice
*
* @see UPSDevice::$lastOutage
*
* @return Void
* @return void
*/
public function setLastOutage($lastOutage)
{
@@ -260,7 +267,7 @@ class UPSDevice
*
* @see UPSDevice::$_lastOutageFinish
*
* @return Void
* @return void
*/
public function setLastOutageFinish($lastOutageFinish)
{
@@ -272,7 +279,7 @@ class UPSDevice
*
* @see UPSDevice::$_lineVoltage
*
* @return Integer
* @return float
*/
public function getLineVoltage()
{
@@ -282,11 +289,11 @@ class UPSDevice
/**
* Sets $_lineVoltage.
*
* @param Integer $lineVoltage line voltage
* @param float $lineVoltage line voltage
*
* @see UPSDevice::$_lineVoltage
*
* @return Void
* @return void
*/
public function setLineVoltage($lineVoltage)
{
@@ -298,7 +305,7 @@ class UPSDevice
*
* @see UPSDevice::$_lineFrequency
*
* @return Integer
* @return int
*/
public function getLineFrequency()
{
@@ -308,11 +315,11 @@ class UPSDevice
/**
* Sets $_lineFrequency.
*
* @param Integer $lineFrequency line frequency
* @param int $lineFrequency line frequency
*
* @see UPSDevice::$_lineFrequency
*
* @return Void
* @return void
*/
public function setLineFrequency($lineFrequency)
{
@@ -324,7 +331,7 @@ class UPSDevice
*
* @see UPSDevice::$_load
*
* @return Integer
* @return float
*/
public function getLoad()
{
@@ -334,11 +341,11 @@ class UPSDevice
/**
* Sets $_load.
*
* @param Integer $load current load
* @param float $load current load
*
* @see UPSDevice::$_load
*
* @return Void
* @return void
*/
public function setLoad($load)
{
@@ -364,7 +371,7 @@ class UPSDevice
*
* @see UPSDevice::$_mode
*
* @return Void
* @return void
*/
public function setMode($mode)
{
@@ -390,7 +397,7 @@ class UPSDevice
*
* @see UPSDevice::$_model
*
* @return Void
* @return void
*/
public function setModel($model)
{
@@ -416,7 +423,7 @@ class UPSDevice
*
* @see UPSDevice::$_name
*
* @return Void
* @return void
*/
public function setName($name)
{
@@ -428,7 +435,7 @@ class UPSDevice
*
* @see UPSDevice::$_outages
*
* @return Integer
* @return int
*/
public function getOutages()
{
@@ -438,11 +445,11 @@ class UPSDevice
/**
* Sets $_outages.
*
* @param Integer $outages outages count
* @param int $outages outages count
*
* @see UPSDevice::$_outages
*
* @return Void
* @return void
*/
public function setOutages($outages)
{
@@ -468,7 +475,7 @@ class UPSDevice
*
* @see UPSDevice::$_startTime
*
* @return Void
* @return void
*/
public function setStartTime($startTime)
{
@@ -494,7 +501,7 @@ class UPSDevice
*
* @see UPSDevice::$_status
*
* @return Void
* @return void
*/
public function setStatus($status)
{
@@ -506,7 +513,7 @@ class UPSDevice
*
* @see UPSDevice::$_temperatur
*
* @return Integer
* @return string
*/
public function getTemperatur()
{
@@ -516,11 +523,11 @@ class UPSDevice
/**
* Sets $_temperatur.
*
* @param Integer $temperatur temperature
* @param string $temperatur temperature
*
* @see UPSDevice::$_temperatur
*
* @return Void
* @return void
*/
public function setTemperatur($temperatur)
{
@@ -546,10 +553,36 @@ class UPSDevice
*
* @see UPSDevice::$_timeLeft
*
* @return Void
* @return void
*/
public function setTimeLeft($timeLeft)
{
$this->_timeLeft = $timeLeft;
}
/**
* Returns $_beeperStatus.
*
* @see UPSDevice::$_beeperStatus
*
* @return String
*/
public function getBeeperStatus()
{
return $this->_beeperStatus;
}
/**
* Sets $_beeperStatus.
*
* @param String $beeperStatus beeper status
*
* @see UPSDevice::$_beeperStatus
*
* @return void
*/
public function setBeeperStatus($beeperStatus)
{
$this->_beeperStatus = $beeperStatus;
}
}