Exemplo n.º 1
0
    def __init__(self, loop, txClbk, vehListClk, vehObjClk, cmdProcessClk,
                 prntr, settingsDir, isGUI, loadGUI):
        BaseModule.__init__(self, loop, txClbk, vehListClk, vehObjClk,
                            cmdProcessClk, prntr, settingsDir, isGUI, loadGUI)

        self.printedout = {}

        self.shortName = "intprint"
Exemplo n.º 2
0
    def __init__(self, loop, txClbk, vehListClk, vehObjClk, cmdProcessClk, prntr, settingsDir, wxapp):
        """
        Called by PaGS when a module is loaded 'module load xxx'
        """
        BaseModule.__init__(self, loop, txClbk, vehListClk, vehObjClk, cmdProcessClk, prntr, settingsDir, wxapp)

        # The short name of the module.
        self.shortName = ""
Exemplo n.º 3
0
    def __init__(self, loop, txClbk, vehListClk, vehObjClk, cmdProcessClk, prntr, settingsDir, isGUI, wxAppPersistMgr):
        BaseModule.__init__(self, loop, txClbk, vehListClk, vehObjClk, cmdProcessClk, prntr, settingsDir, isGUI, wxAppPersistMgr)

        self.shortName = "mode"
        self.commandDict = {"do": self.modeDo,
                            "list": self.listModes,
                            "arm": self.arm,
                            "disarm": self.disarm,
                            "reboot": self.reboot}

        # for detecting mode change
        self.lastMode = {}
Exemplo n.º 4
0
    def __init__(self, loop, txClbk, vehListClk, vehObjClk, cmdProcessClk,
                 prntr, settingsDir, isGUI, wxAppPersistMgr):
        BaseModule.__init__(self, loop, txClbk, vehListClk, vehObjClk,
                            cmdProcessClk, prntr, settingsDir, isGUI,
                            wxAppPersistMgr)
        self.tabs = []  # all the vehicles, one in each tab

        # commands
        self.shortName = "terminal"

        self.tabbar = []

        self.style_extensions = {
            # Tabs
            'tabbar': 'noinherit',
            'tabbar.tab': '',
            'tabbar.tab.active': 'bold noinherit reverse',
        }

        self.current_style = Style.from_dict(self.style_extensions)

        # make the screen
        self.hscreen = []
        self.hscreen.append(
            Window(height=1,
                   content=FormattedTextControl(self.tabbar,
                                                style='class:tabbar'),
                   align=WindowAlign.LEFT))
        self.hscreen.append(Window(height=1, char='-', style='class:line'))
        self.hscreen.append(Window(content=None, wrap_lines=True))
        self.hscreen.append(Window(height=1, char='-', style='class:line'))
        self.hscreen.append(Window(height=1, content=None))

        self.root_container = HSplit(self.hscreen)
        self.layout = Layout(self.root_container)

        self.application = Application(layout=self.layout,
                                       key_bindings=KB,
                                       full_screen=True,
                                       style=self.current_style)

        # event linkages
        self.application.nextTab = self.nextTab

        # initial layout
        self.tabbar.append(('class:tabbar.tab', ' {0} '.format("tmp")))
        self.tabbar.append(('class:tabbar', ' '))
        self.hscreen[0].content = FormattedTextControl(self.tabbar,
                                                       style='class:tabbar')
        self.hscreen[2].content = BufferControl(focusable=False)
        self.hscreen[4].content = BufferControl(focusable=True)

        asyncio.ensure_future(self.runUI())
Exemplo n.º 5
0
    def __init__(self, loop, txClbk, vehListClk, vehObjClk, cmdProcessClk, prntr, settingsDir, isGUI, wxAppPersistMgr):
        BaseModule.__init__(self, loop, txClbk, vehListClk, vehObjClk, cmdProcessClk, prntr, settingsDir, isGUI, wxAppPersistMgr)

        # The short name of the module.
        self.shortName = "status"
        self.commandDict = {"status": self.status}

        self.GUITasks = []

        if self.isGUI:
            from PaGS.modules.statusModule.statusModule_gui import StatusGUIFrame
            self.wxAppPersistMgr = wxAppPersistMgr
            self.statusframe = StatusGUIFrame(self.settingsDir, self.wxAppPersistMgr)
            self.statusframe.Show()
Exemplo n.º 6
0
    def __init__(self, loop, txClbk, vehListClk, vehObjClk, cmdProcessClk,
                 prntr, settingsDir, isGUI, loadGUI):
        BaseModule.__init__(self, loop, txClbk, vehListClk, vehObjClk,
                            cmdProcessClk, prntr, settingsDir, isGUI, loadGUI)

        self.pkts = 0
        # self.vehRef = {}
        self.theVeh = []
        self.printedout = {}

        self.calledStuff = {}

        self.shortName = "template"
        self.commandDict = {'do_stuff': self.stuff, "crash": self.crash}
Exemplo n.º 7
0
    def __init__(self, loop, txClbk, vehListClk, vehObjClk, cmdProcessClk,
                 prntr, settingsDir, isGUI, loadGUI):
        BaseModule.__init__(self, loop, txClbk, vehListClk, vehObjClk,
                            cmdProcessClk, prntr, settingsDir, isGUI, loadGUI)

        self.GUITasks = []

        self.shortName = "param"
        self.commandDict = {
            'download': self.startDownParam,
            'status': self.parmStatus,
            'show': self.show,
            'set': self.set,
            'save': self.save,
            'load': self.load
        }

        if self.isGUI:
            from PaGS.modules.paramModule.paramModule_gui import ParamGUIFrame
            self.loadGUI()
            self.vehTabs = {}
            self.paramframe = ParamGUIFrame(self.settingsDir)
            self.paramframe.Show()