The class LinuxScanner in scanner.py is what scans /sys and returns a tuple of
(vendor id, product id, bcd, manufacturer, product name, serial number)
This tuple is used by the is_usb_connected methods defined in devices/interface.py to check if a device class matches one of the tuples returned by the scanner.
is_usb_connected also uses can_handle() which is typicall overridden in actual device drivers.
Finally, when an device is found its open() method is called which is responsible for mounting the device and setting the paths to the main memory/storage cvards of the device. See open_linux() in usbms/device.py
|