MCPcopy Index your code
hub / github.com/LabPy/lantz / read

Method read

lantz/messagebased.py:378–388  ·  view source on GitHub ↗

Receive string from instrument. :param termination: termination character (overrides class default) :type termination: str :param encoding: encoding to transform bytes to string (overrides class default) :return: string encoded from received bytes

(self, termination=None, encoding=None)

Source from the content-addressed store, hash-verified

376 return self.resource.write(command, termination, encoding)
377
378 def read(self, termination=None, encoding=None):
379 """Receive string from instrument.
380
381 :param termination: termination character (overrides class default)
382 :type termination: str
383 :param encoding: encoding to transform bytes to string (overrides class default)
384 :return: string encoded from received bytes
385 """
386 ret = self.resource.read(termination, encoding)
387 self.log_debug('Read {!r}', ret)
388 return ret

Callers 3

queryMethod · 0.95
readFunction · 0.45
extract_snippetsFunction · 0.45

Calls 1

log_debugMethod · 0.80

Tested by

no test coverage detected