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

Method raw_recv

lantz/drivers/legacy/network.py:51–61  ·  view source on GitHub ↗

Receive raw bytes to the instrument. :param size: number of bytes to receive. :return: received bytes. :return type: bytes.

(self, size)

Source from the content-addressed store, hash-verified

49 raise LantzSocketTimeoutError(str(e))
50
51 def raw_recv(self, size):
52 """Receive raw bytes to the instrument.
53
54 :param size: number of bytes to receive.
55 :return: received bytes.
56 :return type: bytes.
57 """
58 try:
59 return self.socket.recv(size)
60 except socket.timeout as e:
61 raise LantzSocketTimeoutError(str(e))
62
63 def initialize(self):
64 self.log_debug('Opening port {}', self.host_port)

Callers

nothing calls this directly

Calls 2

recvMethod · 0.45

Tested by

no test coverage detected