Пример #1
0
 def connect_server(self):
     server = self.ip_edit.text()
     rpc_port = self.rpc_port_edit.value()
     zmq_port = self.zmq_port_edit.value()
     trex_service: TrexService = Container.trex_service()
     try:
         trex_service.connect(server,
                              sync_port=rpc_port,
                              async_port=zmq_port)
         self.close()
     except Exception as e:
         print('failed to connect to TRex server:', traceback.format_exc())
         msg_box = QMessageBox()
         msg_box.setText('Can not connect to TRex server.')
         msg_box.exec()
Пример #2
0
 def __init__(self):
     super(MainWindow, self).__init__()
     self.trex_service: TrexService = Container.trex_service()
     self.trex_service.connected.connect(self.handle_connected)
     self.__init_ui()
Пример #3
0
 def __init__(self, parent):
     super(SystemInfoPage, self).__init__(parent)
     self.trex_service: TrexService = Container.trex_service()
     self.__init_ui()