MCPcopy Create free account
hub / github.com/LabPy/lantz / _find_interface

Method _find_interface

lantz/drivers/legacy/usbtmc.py:147–154  ·  view source on GitHub ↗
(self, dev, setting)

Source from the content-addressed store, hash-verified

145 timeout=self.TIMEOUT)
146
147 def _find_interface(self, dev, setting):
148 interfaces = find_interfaces(dev, bInterfaceClass=0xFE, bInterfaceSubClass=3)
149 if not interfaces:
150 raise InstrumentError('USB TMC interface not found.')
151 elif len(interfaces) > 1:
152 self.log_warning('More than one interface found, selecting first.')
153
154 return interfaces[0]
155
156 def send(self, command, termination=None, encoding=None):
157 if termination is None:

Callers

nothing calls this directly

Calls 3

find_interfacesFunction · 0.90
InstrumentErrorClass · 0.90
log_warningMethod · 0.80

Tested by

no test coverage detected