Subversion Repositories ALCASAR

Rev

Rev 2976 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 2976 Rev 3037
Line 26... Line 26...
26
     */
26
     */
27
    public function __construct()
27
    public function __construct()
28
    {
28
    {
29
        parent::__construct();
29
        parent::__construct();
30
        if ((PSI_OS == 'WINNT') || defined('PSI_EMU_HOSTNAME')) {
30
        if ((PSI_OS == 'WINNT') || defined('PSI_EMU_HOSTNAME')) {
31
            $_wmi = CommonFunctions::initWMI('root\OpenHardwareMonitor', true);
31
            $_wmi = WINNT::initWMI('root\OpenHardwareMonitor', true);
32
            if ($_wmi) {
32
            if ($_wmi) {
33
                $tmpbuf = CommonFunctions::getWMI($_wmi, 'Sensor', array('Parent', 'Name', 'SensorType', 'Value'));
33
                $tmpbuf = WINNT::getWMI($_wmi, 'Sensor', array('Parent', 'Name', 'SensorType', 'Value'));
34
                if ($tmpbuf) foreach ($tmpbuf as $buffer) {
34
                if ($tmpbuf) foreach ($tmpbuf as $buffer) {
35
                    if (!isset($this->_buf[$buffer['SensorType']]) || !isset($this->_buf[$buffer['SensorType']][$buffer['Parent'].' '.$buffer['Name']])) { // avoid duplicates
35
                    if (!isset($this->_buf[$buffer['SensorType']]) || !isset($this->_buf[$buffer['SensorType']][$buffer['Parent'].' '.$buffer['Name']])) { // avoid duplicates
36
                        $this->_buf[$buffer['SensorType']][$buffer['Parent'].' '.$buffer['Name']] = $buffer['Value'];
36
                        $this->_buf[$buffer['SensorType']][$buffer['Parent'].' '.$buffer['Name']] = $buffer['Value'];
37
                    }
37
                    }
38
                }
38
                }
Line 103... Line 103...
103
    /**
103
    /**
104
     * get the information
104
     * get the information
105
     *
105
     *
106
     * @see PSI_Interface_Sensor::build()
106
     * @see PSI_Interface_Sensor::build()
107
     *
107
     *
108
     * @return Void
108
     * @return void
109
     */
109
     */
110
    public function build()
110
    public function build()
111
    {
111
    {
112
      $this->_temperature();
112
      $this->_temperature();
113
      $this->_voltage();
113
      $this->_voltage();