def open(self, **kwargs): if hasattr(self, "socket"): return self.socket = initialize_connection(self.host, self.port, **kwargs) self.socket.sendall(b"ARTIQ management\n") endian = self._read(1) if endian == b"e": self.endian = "<" elif endian == b"E": self.endian = ">" else: raise IOError("Incorrect reply from device: expected e/E.")
def open(self): if hasattr(self, "socket"): return self.socket = initialize_connection(self.host, self.port) self.socket.sendall(b"ARTIQ coredev\n") endian = self._read(1) if endian == b"e": self.endian = "<" elif endian == b"E": self.endian = ">" else: raise IOError("Incorrect reply from device: expected e/E.") self.unpack_int32 = struct.Struct(self.endian + "l").unpack self.unpack_int64 = struct.Struct(self.endian + "q").unpack self.unpack_float64 = struct.Struct(self.endian + "d").unpack self.pack_header = struct.Struct(self.endian + "lB").pack self.pack_int32 = struct.Struct(self.endian + "l").pack self.pack_int64 = struct.Struct(self.endian + "q").pack self.pack_float64 = struct.Struct(self.endian + "d").pack
def open(self, **kwargs): if hasattr(self, "socket"): return self.socket = initialize_connection(self.host, self.port, **kwargs) self.socket.sendall(b"ARTIQ coredev\n")
def open(self, **kwargs): if hasattr(self, "socket"): return self.socket = initialize_connection(self.host, self.port, **kwargs) self.socket.sendall(b"ARTIQ management\n")