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

Method query

lantz/drivers/kentech/hri.py:47–54  ·  view source on GitHub ↗

Send query to the instrument and return the answer. Set remote mode if needed.

(self, command, *, send_args=(None, None), recv_args=(None, None))

Source from the content-addressed store, hash-verified

45 'read_termination': '\n'}}
46
47 def query(self, command, *, send_args=(None, None), recv_args=(None, None)):
48 """Send query to the instrument and return the answer.
49 Set remote mode if needed.
50 """
51 if command and not self.recall('remote'):
52 self.log_info('Setting Remote.')
53 self.remote = True
54 return super().query(command, send_args=send_args, recv_args=recv_args)
55
56 def query_expect(self, command, read_termination=None, expected='ok'):
57 """Send a query and check that the answer contains the string.

Callers 15

rfgainMethod · 0.95
temperatureMethod · 0.95
getterFunction · 0.45
fitted_optionsMethod · 0.45
self_testMethod · 0.45
status_byteMethod · 0.45
event_status_regMethod · 0.45
event_status_enabledMethod · 0.45

Calls 2

recallMethod · 0.80
log_infoMethod · 0.80

Tested by

no test coverage detected