Commit f7d6a7f4 authored by Tammo Jan Dijkema's avatar Tammo Jan Dijkema
Browse files

Instantiate hpib port on first use

parent df524331
import hpib
from hpib import HpibDevice
_port = hpib.PrologixGpibUsb()
import threading
class CamrasHpibDevice(HpibDevice):
"""Wrapper around HPIB commands"""
_CamrasHpibDevice__port = None
_CamrasHpibDevice__port_lock = threading.Lock()
def __init__(self, address):
if not CamrasHpibDevice._CamrasHpibDevice__port:
with CamrasHpibDevice._CamrasHpibDevice__port_lock:
_port = hpib.PrologixGpibUsb()
super(CamrasHpibDevice, self).__init__(address, _port)
self.__frequency = 0
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment