Esempio n. 1
0
 def simulation(self, app, valgrind):
     simconfig = app.project.get_simconfig()
     if simconfig.parameters_values is None:
         if not app.open_simconfig_dialog():
             return
     sprocess, port = app.run_simulated_program(
         self.get_executable_filename(), self.get_directory(), simconfig,
         valgrind)
     if sprocess is None:
         return
     simulation = app.new_simulation()
     simulation.quit_on_shutdown = True
     simulation.set_callback(
         "inited",
         lambda: app.window.add_tab(simview.SimViewTab(self, simulation)))
     simulation.set_callback("shutdown", lambda: sprocess.shutdown())
     simulation.connect("localhost", port)
Esempio n. 2
0
 def project_builded():
     sprocess, port = self.run_simulated_program(
         build_config.get_executable_filename(),
         self.project.get_directory(), simconfig, valgrind)
     if sprocess is None:
         return
     simulation = self.new_simulation()
     simulation.init_control_sequence = simconfig.sequence
     simulation.quit_on_shutdown = True
     simulation.set_callback(
         "inited", lambda: self.window.add_tab(
             simview.SimViewTab(self,
                                simulation,
                                mainmenu_groups=("project", "screenshot"
                                                 ))))
     simulation.set_callback("shutdown", lambda: sprocess.shutdown())
     simulation.connect("localhost", port)
Esempio n. 3
0
 def inited():
     self.console_write("Connected\n", "success")
     self.window.add_tab(simview.SimViewTab(self,
                                            simulation,
                                            "{0}:{1}".format(host, port)))