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

Method write

lantz/messagebased.py:361–376  ·  view source on GitHub ↗

Send command to the instrument. :param command: command to be sent to the instrument. :type command: string. :param termination: termination character to override class defined default. :param encoding: encoding to transform string to byt

(self, command, termination=None, encoding=None)

Source from the content-addressed store, hash-verified

359 return ans
360
361 def write(self, command, termination=None, encoding=None):
362 """Send command to the instrument.
363
364 :param command: command to be sent to the instrument.
365 :type command: string.
366
367 :param termination: termination character to override class defined
368 default.
369 :param encoding: encoding to transform string to bytes to override class
370 defined default.
371
372 :return: number of bytes sent.
373
374 """
375 self.log_debug('Writing {!r}', command)
376 return self.resource.write(command, termination, encoding)
377
378 def read(self, termination=None, encoding=None):
379 """Receive string from instrument.

Callers 5

queryMethod · 0.95
mainFunction · 0.45
write_fileFunction · 0.45
list_driversFunction · 0.45
mainFunction · 0.45

Calls 1

log_debugMethod · 0.80

Tested by

no test coverage detected