def __init__(self, device): """Initialize Hardware""" try: # Get a handle to the IO device self.FILE = os.open(device, os.O_RDWR) except OSError as e: raise OscopeError("Error opening device: " + str(e)) Scope.__init__(self, n_chans=2)
def __init__(self, nienet_host, pad=5, tmo=11, port=5000, points=5000): '''Initialize Hardware''' self.l = l = EnetLib(nienet_host, port) try: self.ud = ud = l.ibdev(pad=pad, tmo=tmo) except socket.error as e: raise OscopeError("Error connecting to device: " + str(e)) Scope.__init__(self, n_chans=4) # Set memory depth default (Note: For some reason this does not work on the first capture!, previous value is used instead) self.setMemorySize(str(points)) # Maybe wait until the next trigger before data can be captured?
def __init__(self, nienet_host, pad=5, tmo=11, port=5000, points=5000): '''Initialize Hardware''' self.l = l = EnetLib(nienet_host, port) try: self.ud = ud = l.ibdev(pad=pad, tmo=tmo) except socket.error as e: raise OscopeError("Error connecting to device: " + str(e)) Scope.__init__(self, n_chans=4) # Set memory depth default (Note: For some reason this does not work on the first capture!, previous value is used instead) self.setMemorySize( str(points) ) # Maybe wait until the next trigger before data can be captured?