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)
| 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. |
no test coverage detected