示例#1
0
    def _find_interface(self, dev, setting):
        interfaces = find_interfaces(dev, bInterfaceClass=0xFE, bInterfaceSubClass=3)
        if not interfaces:
            raise InstrumentError('USB TMC interface not found.')
        elif len(interfaces) > 1:
            self.log_warning('More than one interface found, selecting first.')

        return interfaces[0]
示例#2
0
    def _find_interface(self, dev, setting):
        interfaces = find_interfaces(dev,
                                     bInterfaceClass=0xFE,
                                     bInterfaceSubClass=3)
        if not interfaces:
            raise errors.InstrumentError('USB TMC interface not found.')
        elif len(interfaces) > 1:
            self.log_warning('More than one interface found, selecting first.')

        return interfaces[0]
示例#3
0
 def is_usbtmc(dev):
     if custom_match and not custom_match(dev):
         return False
     return bool(
         find_interfaces(dev, bInterfaceClass=0xfe, bInterfaceSubClass=3))
示例#4
0
 def is_usbtmc(dev):
     if custom_match and not custom_match(dev):
         return False
     return bool(find_interfaces(dev, bInterfaceClass=0xfe, bInterfaceSubClass=3))