QueryInterface open/close in context managers + SocketInterface.
Created originally on Bitbucket by jsalort (Julien Salort)
Was already merged in Bitbucket before import, marked as merged by the import user
Source changeset not longer availableat the time of import. Commit listwill look empty
-
Changes to
QueryInterface
:- do not open interface in
__init__
or rely on__del__
to close - create new private methods
_open
,_close
,_read
,_write
, and public methodsopen
,close
,read
,write
which maintains a booleanopened
, and call the private methods accordingly (checks if interface is opened before reading or writing, avoid calling_open
twice, etc.). Users should call the public methods. New interfaces only need to implement to private methods in the general case. - open/close with context managers. New interfaces do not need to reimplement
__enter__
and__exit__
, except if they want to do something additional (like printing the instrument identification string).
- do not open interface in
-
Create
SocketInterface
for network devices. ChangeVISADriver
to useSocketInterface
when__init__
is called with a string instead of an Interface object, ifdefault_port
attribute is defined. -
Add implementation for Cryocon 24C temperature controller. Use
SocketInterface
by default. -
Fix Lauda driver to prevent sending writes in
__init__
-
Fix Pfeiffer MaxiGauge to prevent sending writes in
__init__
-
Rename Stanford DS360 with similar name as SR830