MCPcopy Create free account
hub / github.com/LabPy/lantz / parse_query

Method parse_query

lantz/messagebased.py:347–359  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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.

Callers

nothing calls this directly

Calls 2

queryMethod · 0.95
ParseProcessorClass · 0.85

Tested by

no test coverage detected