def __init__(self, vendor=None, product=None, serial_number=None, **kwargs):
    super(USBTMC, self).__init__(vendor, product, serial_number, **kwargs)
    self.usb_intr_in = find_endpoint(self.usb_intf, usb.ENDPOINT_IN, usb.ENDPOINT_TYPE_INTERRUPT)
    self.usb_dev.reset()
    self.usb_dev.set_configuration()
    time.sleep(0.01)
    self._get_capabilities()
    self._btag = 0
    if (not (self.usb_recv_ep and self.usb_send_ep)):
        msg = 'TMC device must have both Bulk-In and Bulk-out endpoints.'
        raise ValueError(msg)
def __init__(self, vendor=None, product=None, serial_number=None, **kwargs):
    super(USBTMC, self).__init__(vendor, product, serial_number, **kwargs)
    self.usb_intr_in = find_endpoint(self.usb_intf, usb.ENDPOINT_IN, usb.ENDPOINT_TYPE_INTERRUPT)
    self.usb_dev.reset()
    self.usb_dev.set_configuration()
    time.sleep(0.01)
    self._get_capabilities()
    self._btag = 0
    if (not (self.usb_recv_ep and self.usb_send_ep)):
        msg = 'TMC device must have both Bulk-In and Bulk-out endpoints.'
        raise ValueError(msg)