Send query to the instrument, parse the output using format and return the answer. .. seealso:: TextualMixin.query and stringparser
(self, command, *,
send_args=(None, None), recv_args=(None, None),
format=None)
| 345 | return self.read(*recv_args) |
| 346 | |
| 347 | def parse_query(self, command, *, |
| 348 | send_args=(None, None), recv_args=(None, None), |
| 349 | format=None): |
| 350 | """Send query to the instrument, parse the output using format |
| 351 | and return the answer. |
| 352 | |
| 353 | .. seealso:: TextualMixin.query and stringparser |
| 354 | """ |
| 355 | ans = self.query(command, send_args=send_args, recv_args=recv_args) |
| 356 | if format: |
| 357 | parser = _PARSERS_CACHE.setdefault(format, ParseProcessor(format)) |
| 358 | ans = parser(ans) |
| 359 | return ans |
| 360 | |
| 361 | def write(self, command, termination=None, encoding=None): |
| 362 | """Send command to the instrument. |
nothing calls this directly
no test coverage detected