def connect_labrad(self): from labrad.units import WithUnit from labrad.types import Error from common.clients.connection import connection self.WithUnit = WithUnit self.Error = Error self.cxn_global = connection() yield self.cxn_global.connect(cl.global_address, password=cl.global_password, tls_mode='off') self.context_global = yield self.cxn_global.context() try: yield self.subscribe_tracker() except Exception as e: self.setDisabled(True) yield None self.cxn_global.add_on_connect('SD Tracker Global', self.reinitialize_tracker) self.cxn_global.add_on_disconnect('SD Tracker Global', self.disable) self.connect_layout() if self.cxn is None: self.cxn = connection() yield self.cxn.connect() self.context = yield self.cxn.context() try: yield self.subscribe_vault() except Exception as e: yield None self.cxn.add_on_connect('Data Vault', self.subscribe_vault) self.cxn.add_on_disconnect('Data Vault', self.disconnect_vault)
def connect_labrad(self): from labrad.units import WithUnit from labrad.types import Error from common.clients.connection import connection self.WithUnit = WithUnit self.Error = Error self.cxn_global = connection() yield self.cxn_global.connect(cl.global_address, password = cl.global_password, tls_mode = 'off') self.context_global = yield self.cxn_global.context() try: yield self.subscribe_tracker() except Exception as e: self.setDisabled(True) yield None self.cxn_global.add_on_connect('SD Tracker Global', self.reinitialize_tracker) self.cxn_global.add_on_disconnect('SD Tracker Global', self.disable) self.connect_layout() if self.cxn is None: self.cxn = connection() yield self.cxn.connect() self.context = yield self.cxn.context() try: yield self.subscribe_vault() except Exception as e: yield None self.cxn.add_on_connect('Data Vault', self.subscribe_vault) self.cxn.add_on_disconnect('Data Vault', self.disconnect_vault)
def __init__(self, reactor, clipboard = None, cxn = None, parent = None): super(auto_gadget, self).__init__() self.reactor = reactor #self.cxn = cxn self.cxn = connection() self.cxn.connect() print self.cxn self.setup_labrad() self.load_ion = QPushButton('Load Ion') self.load_ion_threshold.setText("Test") self.load_ion.clicked.connect(self.load_ion_func) self.setup_experiment = QPushButton('Setup Experiment') self.setup_experiment.clicked.connect(self.setup_experiment_func) # set layout self.layout = QGridLayout() self.layout.addWidget(self.load_ion, 0, 0) self.layout.addWidget(self.load_ion_threshold, 0, 1) self.layout.addWidget(self.setup_experiment, 1, 0) self.setLayout(self.layout)
def connect_labrad(self): if self.cxn is None: from common.clients import connection self.cxn = connection.connection() yield self.cxn.connect() self.context = yield self.cxn.context() try: yield self.subscribe_data_vault() except Exception, e: print e self.setDisabled(True)
def __init__(self, cxn=None, parent=None): QtGui.QWidget.__init__(self, parent) # Initialize # self.reactor = reactor self.cxn = cxn self.power = 0 from common.clients.connection import connection self.cxn = connection() # connection() self.connect_labrad()
def connect_labrad(self): if self.cxn is None: from common.clients import connection self.cxn = connection.connection() yield self.cxn.connect() self.context = yield self.cxn.context() try: yield self.subscribe_data_vault() except Exception,e: print e self.setDisabled(True)
def connect(self): from labrad.units import WithUnit from labrad.types import Error self.WithUnit = WithUnit self.Error = Error if self.cxn is None: self.cxn = connection() yield self.cxn.connect() self.context = yield self.cxn.context() try: yield self.initialize_gui() except Exception, e: print e self.setDisabled(True)
def connect(self): from labrad.units import WithUnit from labrad.types import Error self.WithUnit = WithUnit self.Error = Error if self.cxn is None: self.cxn = connection() yield self.cxn.connect() self.context = yield self.cxn.context() try: self.connect_layout() except Exception, e: print e self.setDisabled(True)
def connect_labrad(self): if self.cxn is None: from common.clients import connection self.cxn = connection.connection() yield self.cxn.connect() self.context = yield self.cxn.context() try: yield self.subscribe_data_vault() except Exception: self.setDisabled(True) try: yield self.subscribe_parameter_vault() except Exception, e: print 'Not Initially Connected to ParameterVault', e self.setDisabled(True)
def connect(self): from labrad.units import WithUnit from labrad.types import Error self.WithUnit = WithUnit self.Error = Error if self.cxn is None: self.cxn = connection() yield self.cxn.connect() self.context = yield self.cxn.context() try: yield self.initializeGUI() yield self.setupListeners() except Exception, e: print 'ENDCAP_CONTROL: DAC not available' self.setDisabled(True)
def connect(self): from labrad.units import WithUnit from labrad.types import Error self.WithUnit = WithUnit self.Error = Error if self.cxn is None: self.cxn = connection() yield self.cxn.connect() self.context = yield self.cxn.context() try: yield self.initializeGUI() yield self.setupListeners() except Exception, e: print 'Compensation control: DAC not available' self.setDisabled(True)
def connect(self): from labrad.units import WithUnit from labrad.types import Error self.WithUnit = WithUnit self.Error = Error if self.cxn is None: self.cxn = connection() yield self.cxn.connect() self.context = yield self.cxn.context() try: yield self.initializeGUI() self.connect_layout() yield self.setupListeners() except Exception, e: print e print 'Electrode client: Electrode Diagonalization not available' self.setDisabled(True)
def connect_labrad(self): from labrad.units import WithUnit from labrad.types import Error self.WithUnit = WithUnit self.Error = Error if self.cxn is None: from common.clients.connection import connection self.cxn = connection() yield self.cxn.connect() self.context = yield self.cxn.context() try: yield self.subscribe_tracker() except Exception as e: self.setDisabled(True) self.cxn.add_on_connect('SD Tracker', self.reinitialize_tracker) self.cxn.add_on_disconnect('SD Tracker', self.disable) self.connect_layout()
def connect_labrad(self): from common.clients.connection import connection cxn = connection() yield cxn.connect() self.create_layout(cxn)