Ejemplo n.º 1
0
 def __init__(self, I2A_address, I2PE_address):
     self.node = zmqNode('User')
     self.node.target = self
     self.node.logging = True
     self.apparatus = APE_Interfaces.ApparatusInterface(self.node)
     self.apparatus.defaultBlocking = False
     self.executor = APE_Interfaces.ExecutorInterface(self.node)
     self.User = Devices.User_Consol('User')
     self.connect2A(I2A_address)
     self.connect2PE(I2PE_address)
     self.node.start_listening()
Ejemplo n.º 2
0
 def __init__(self, PE2L_address, PE2A_address, PE2G_address):
     # Create the node and set its target to ProcExec
     self.node = zmqNode('procexec')
     self.node.target = self
     self.node.logging = True
     # creates an executor
     self.executor = Core.Executor()
     self.executor.node = self.node
     self.proclist = []
     # Create an interface for the apparatus and assign it to the executor
     self.apparatus = APE_Interfaces.ApparatusInterface(self.node)
     # connect to launcher, apparatus, and gui process
     self.connect2L(PE2L_address)
     self.connect2A(PE2A_address)
     self.connect2G(PE2G_address)
     self.node.start_listening()
Ejemplo n.º 3
0
 def __init__(self, A2L_address, A2PE_address, A2G_address):
     # Create the node and set its target to Appa
     self.node = zmqNode('appa')
     self.node.target = self
     self.node.logging = True
     # Create a black Apparatus
     self.apparatus = Core.Apparatus()
     # Create an interface for the executor and assign it to the apparatus
     self.executor = APE_Interfaces.ExecutorInterface(self.node)
     self.executor.localDefault = False
     self.apparatus.executor = self.executor
     # Connect to the gui, launcher, and procexec process
     self.connect2L(A2L_address)
     self.connect2PE(A2PE_address)
     self.connect2G(A2G_address)
     self.node.start_listening()
Ejemplo n.º 4
0
    def __init__(self, G2L_address, G2A_address, G2PE_address):
        # Create the node
        self.node = zmqNode('gui')
        self.node.logging = True
        # self.User = Devices.User_GUI('User')
        # Create an interface for the executor and apparatus
        # assigns them to the gui
        self.apparatus = APE_Interfaces.ApparatusInterface(self.node)
        self.executor = APE_Interfaces.ExecutorInterface(self.node)
        # connect to launcher, apparatus, and procexec
        self.connect2A(G2A_address)
        self.connect2PE(G2PE_address)
        self.connect2L(G2L_address)
        self.GUI = ''
        # sets the target to be the GUI
        self.node.target = self
        # sets the interface apparatus to the apparatus in the GUI

        self.node.start_listening()
        self.startGUI()
Ejemplo n.º 5
0
    def initUI(self):
        # sets up the window with 4 push buttons
        self.setWindowTitle('Start Up Window')
        self.startAPEbtn = QPushButton('Start APE', self)
        self.startAPEbtn.move(0, 10)
        self.startAPEbtn.clicked.connect(self.startAPE)
        self.closeAPEbtn = QPushButton('Close APE', self)
        self.closeAPEbtn.move(0, 40)
        self.closeAPEbtn.setEnabled(False)
        self.closeAPEbtn.clicked.connect(self.closeAPE)
        self.startGUIbtn = QPushButton('Start GUI', self)
        self.startGUIbtn.move(100, 10)
        self.startGUIbtn.setEnabled(False)
        self.startGUIbtn.clicked.connect(self.startGUI)
        self.closeGUIbtn = QPushButton('Close GUI', self)
        self.closeGUIbtn.move(100, 40)
        self.closeGUIbtn.setEnabled(False)
        self.closeGUIbtn.clicked.connect(self.closeGUI)
        self.closeLauncherbtn = QPushButton('Close Launcher', self)
        self.closeLauncherbtn.move(50, 70)
        self.closeLauncherbtn.clicked.connect(self.closeLauncher)
        # creates the node and start logging
        self.node = zmqNode('launcher')
        self.node.logging = True
        self.node.start_listening()
        # Set addresses
        port = 5575
        self.L2A_address = "tcp://127.0.0.1:" + str(port)
        self.L2PE_address = "tcp://127.0.0.1:" + str(port + 1)
        self.L2G_address = "tcp://127.0.0.1:" + str(port + 2)
        self.A2PE_address = "tcp://127.0.0.1:" + str(port + 3)
        self.A2G_address = "tcp://127.0.0.1:" + str(port + 4)
        self.G2PE_address = "tcp://127.0.0.1:" + str(port + 5)
        self.connect2A()
        self.connect2PE()
        self.connect2G()
        # Process holders
        self.proc_Appa = None
        self.proc_ProcExec = None

        self._start_check_timer()
Ejemplo n.º 6
0
 def __init__(self):
     self.node = zmqNode()
     self.node.target = self