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)
| 145 | return self.recv(*recv_args) |
| 146 | |
| 147 | def parse_query(self, command, *, |
| 148 | send_args=(None, None), recv_args=(None, None), |
| 149 | format=None): |
| 150 | """Send query to the instrument, parse the output using format |
| 151 | and return the answer. |
| 152 | |
| 153 | .. seealso:: TextualMixin.query and stringparser |
| 154 | """ |
| 155 | ans = self.query(command, send_args=send_args, recv_args=recv_args) |
| 156 | if format: |
| 157 | parser = self.PARSERS.setdefault(format, ParseProcessor(format)) |
| 158 | ans = parser(ans) |
| 159 | return ans |