Skip to content

Commit 65821e9

Browse files
committed
Track lock status
1 parent 9b979c7 commit 65821e9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

vxi11/vxi11.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -530,6 +530,7 @@ def __init__(self, host, name = None, client_id = None, term_char = None):
530530
self.abort_port = 0
531531
self.link = None
532532
self.max_recv_size = 0
533+
self.locked = False
533534

534535
def __del__(self):
535536
if self.link is not None:
@@ -767,6 +768,8 @@ def lock(self):
767768
if error:
768769
raise Vxi11Exception(error, 'lock')
769770

771+
self.locked = True
772+
770773
def unlock(self):
771774
"Send unlock command"
772775
if self.link is None:
@@ -779,6 +782,8 @@ def unlock(self):
779782
if error:
780783
raise Vxi11Exception(error, 'unlock')
781784

785+
self.locked = False
786+
782787

783788
class InterfaceDevice(Device):
784789
"VXI-11 IEEE 488.1 interface device interface client"

0 commit comments

Comments
 (0)