You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since QMI_RpcProxy could also be the client for a QMI_RpcObject, we must define the __enter__ and __exit__ methods in QMI_RpcProxy and throw the NotImplementedError, so when a client uses the with statement they are are made aware of the fact that the QMI_RpcObject does not support context management.
Modules to be created
n/a
Modules to be modified
qmi.core.rpc
qmi.core.instrument
Tests to be created/updated
unittests
Documentation to be updated
n/a
Hardware
n/a
The text was updated successfully, but these errors were encountered:
Description
By adding these two methods an instrument class can provide its own Context manager without needing the wrapping call to open_close().
Proposal:
Add enter and exit method to QMI_Instrument.
Also add them to the RPC proxy
Then you can do the following:
Since
QMI_RpcProxy
could also be the client for aQMI_RpcObject
, we must define the__enter__
and__exit__
methods inQMI_RpcProxy
and throw theNotImplementedError
, so when a client uses thewith
statement they are are made aware of the fact that theQMI_RpcObject
does not support context management.Modules to be created
Modules to be modified
qmi.core.rpc
qmi.core.instrument
Tests to be created/updated
Documentation to be updated
Hardware
The text was updated successfully, but these errors were encountered: