def __init__(self, parent=None): QtCore.QObject.__init__(self, parent) # Set defaults self.command = None self.test_mode = False # HAL Client self.HALClient = tcpClient.TCPClient(port=9900, server_name="HAL", verbose=False) # Kilroy Client self.kilroyClient = tcpClient.TCPClient(port=9500, server_name="Kilroy", verbose=False)
def processMessage(self, message): if message.isType("start"): self.hal_client = tcpClient.TCPClient(port = 9000, server_name = "HAL", verbose = False) self.hal_client.messageReceived.connect(self.handleMessageReceived) self.hal_client.startCommunication() super().processMessage(message)
def __init__(self, **kwds): super().__init__(**kwds) # Create client self.client = tcpClient.TCPClient(port=9500, server_name="Test") self.client.messageReceived.connect(self.handleMessageReceived) self.client.startCommunication() self.message_ID = 1 self.sendTestMessage()
def __init__(self, **kwds): super().__init__(**kwds) self.busy = False self.current_message = None # # Back stops breaking connections if a module fails # # to do this for some reason. # # # self.watch_dog_timer = QtCore.QTimer(self) # self.watch_dog_timer.setSingleShot(True) # self.watch_dog_timer.timeout.connect(self.handleWatchDogTimer) # self.watch_dog_timer_delay = 1000 self.tcp_client = tcpClient.TCPClient(parent=self, port=9000, server_name="hal", verbose=True) # self.tcp_client.comLostConnection.connect(self.handleDisconnect) self.tcp_client.messageReceived.connect(self.handleMessageReceived)
def __init__(self, parameters): QtCore.QObject.__init__(self) self.curr_objective = None self.curr_x = 0.0 self.curr_y = 0.0 self.directory = parameters.get("directory") self.fake_got_settings = False self.fake_objective = 1 self.filename = parameters.get("image_filename") self.goto = False self.got_settings = False self.messages = [] self.waiting_for_response = False self.tcp_client = tcpClient.TCPClient(parent=self, port=9900, server_name="hal", verbose=True) self.tcp_client.comLostConnection.connect(self.handleDisconnect) self.tcp_client.messageReceived.connect(self.handleMessageReceived) self.connected = False