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

Method initialize

lantz/drivers/legacy/vxi11.py:305–318  ·  view source on GitHub ↗

Open connection to VXI-11 instrument

(self)

Source from the content-addressed store, hash-verified

303 self.link = None
304
305 def initialize(self):
306 """Open connection to VXI-11 instrument
307 """
308 super().initialize()
309 self.socket = self.client.sock
310 self.socket.connect((self.client.sock, self.client.port))
311
312 error, link, abort_port, max_recv_size = self.client.create_link(self.client_id, 0, self.lock_timeout, self.name.encode(self.ENCODING))
313
314 if error:
315 raise Vxi11Error("error creating link: %d" % error)
316
317 self.link = link
318 self.RECV_CHUNK = max_recv_size
319
320 def finalize(self):
321 """Close connection

Callers

nothing calls this directly

Calls 3

Vxi11ErrorClass · 0.85
create_linkMethod · 0.80
connectMethod · 0.45

Tested by

no test coverage detected