protected function usb()
    {
        $s = $this->_grabioreg('IOUSBDevice');
        $lines = preg_split("/\n/", $s, -1, PREG_SPLIT_NO_EMPTY);
        foreach ($lines as $line) {
                    $dev = new HWDevice();
                    if (!preg_match('/"USB Product Name" = "([^"]*)"/', $line, $ar_buf))
                       $ar_buf = preg_split("/[\s@]+/", $line, 19);
                    $dev->setName(trim($ar_buf[1]));
                    if (defined('PSI_SHOW_DEVICES_INFOS') && PSI_SHOW_DEVICES_INFOS) {
                        if (preg_match('/"USB Vendor Name" = "([^"]*)"/', $line, $ar_buf)) {
                            $dev->setManufacturer(trim($ar_buf[1]));
                        }
                        if (preg_match('/"USB Product Name" = "([^"]*)"/', $line, $ar_buf)) {
                            $dev->setProduct(trim($ar_buf[1]));
                        }
                        if (defined('PSI_SHOW_DEVICES_SERIAL') && PSI_SHOW_DEVICES_SERIAL
                           && preg_match('/"USB Serial Number" = "([^"]*)"/', $line, $ar_buf)) {
                            $dev->setSerial(trim($ar_buf[1]));
                        }
                    }
                    $this->sys->setUsbDevices($dev);
        }
    }
protected function usb()
    {
        $s = $this->_grabioreg('IOUSBDevice');
        $lines = preg_split("/\n/", $s, -1, PREG_SPLIT_NO_EMPTY);
        foreach ($lines as $line) {
                    $dev = new HWDevice();
                    if (!preg_match('/"USB Product Name" = "([^"]*)"/', $line, $ar_buf))
                       $ar_buf = preg_split("/[\s@]+/", $line, 19);
                    $dev->setName(trim($ar_buf[1]));
                    if (defined('PSI_SHOW_DEVICES_INFOS') && PSI_SHOW_DEVICES_INFOS) {
                        if (preg_match('/"USB Vendor Name" = "([^"]*)"/', $line, $ar_buf)) {
                            $dev->setManufacturer(trim($ar_buf[1]));
                        }
                        if (preg_match('/"USB Product Name" = "([^"]*)"/', $line, $ar_buf)) {
                            $dev->setProduct(trim($ar_buf[1]));
                        }
                        if (defined('PSI_SHOW_DEVICES_SERIAL') && PSI_SHOW_DEVICES_SERIAL
                           && preg_match('/"USB Serial Number" = "([^"]*)"/', $line, $ar_buf)) {
                            $dev->setSerial(trim($ar_buf[1]));
                        }
                    }
                    $this->sys->setUsbDevices($dev);
        }
    }
protected function usb ( ) { $ s = $ this -> _grabioreg ( 'IOUSBDevice' ) ; $ lines = preg_split ( "/\n/" , $ s , - 1 , PREG_SPLIT_NO_EMPTY ) ; foreach ( $ lines as $ line ) { $ dev = new HWDevice ( ) ; if ( ! preg_match ( '/"USB Product Name" = "([^"]*)"/' , $ line , $ ar_buf ) ) $ ar_buf = preg_split ( "/[\s@]+/" , $ line , 19 ) ; $ dev -> setName ( trim ( $ ar_buf [ 1 ] ) ) ; if ( defined ( 'PSI_SHOW_DEVICES_INFOS' ) && PSI_SHOW_DEVICES_INFOS ) { if ( preg_match ( '/"USB Vendor Name" = "([^"]*)"/' , $ line , $ ar_buf ) ) { $ dev -> setManufacturer ( trim ( $ ar_buf [ 1 ] ) ) ; } if ( preg_match ( '/"USB Product Name" = "([^"]*)"/' , $ line , $ ar_buf ) ) { $ dev -> setProduct ( trim ( $ ar_buf [ 1 ] ) ) ; } if ( defined ( 'PSI_SHOW_DEVICES_SERIAL' ) && PSI_SHOW_DEVICES_SERIAL && preg_match ( '/"USB Serial Number" = "([^"]*)"/' , $ line , $ ar_buf ) ) { $ dev -> setSerial ( trim ( $ ar_buf [ 1 ] ) ) ; } } $ this -> sys -> setUsbDevices ( $ dev ) ; } }
get the usb device information out of ioreg

@return void
get the usb device information out of ioreg