Example #1
0
    def __init__(self, fifoIn):

        self.fifoIn = fifoIn

        self.finished = threading.Event()
        self.thd = None

        # event => callback
        self._dispatch = {}
        self._dispatch[oc_message.getId("LOG.RAW")] = self.logRaw
        self._dispatch[oc_message.getId("CONNECTION.INFO")] = self.connectionInfo
        self._dispatch[oc_message.getId("CONNECTION.CLOSE")] = self.connectionClose
        self._dispatch[oc_message.getId("APP.LOG")] = self.appLog
        self._dispatch[oc_message.getId("APP.CRITICALERROR")] = self.appCriticalError
        self._dispatch[oc_message.getId("APP.DROPFIFO")] = self.appDropFifo

        self._dispatch[oc_message.getId("PARSEUR.ITEM")] = self.parseurItem
Example #2
0
 def __init__(self, fifoIn, gui_logctrl, gui_int, gui_des):
     
     self.fifoIn             = fifoIn 
     self._wxLogCtrl_log     = gui_logctrl
     self._wxTextCtrl_Int    = gui_int
     self._wxDesCtrl_Des     = gui_des       
  
     self.finished = threading.Event()
     self.thd = None
     
     # event => callback
     self._dispatch = {}
     self._dispatch[ oc_message.getId("LOG.RAW") ]              = self.logRaw
     self._dispatch[ oc_message.getId("LOGCTRL.AUTOSCROLL") ]   = self.logctrlAutoscroll
     self._dispatch[ oc_message.getId("LOGCTRL.CLEAR") ]        = self.logctrlClear
     self._dispatch[ oc_message.getId("LOGCTRL.WRITEFILE") ]    = self.logctrlWriteFile
     self._dispatch[ oc_message.getId("CONNECTION.INFO") ]      = self.connectionInfo
     self._dispatch[ oc_message.getId("CONNECTION.CLOSE") ]     = self.connectionClose
     self._dispatch[ oc_message.getId("APP.LOG") ]              = self.appLog
     self._dispatch[ oc_message.getId("APP.CRITICALERROR") ]    = self.appCriticalError
     self._dispatch[ oc_message.getId("APP.DROPFIFO") ]         = self.appDropFifo
     
     self._dispatch[ oc_message.getId("PARSEUR.ITEM") ]         = self.parseurItem
     
     
     self._dispatch[ oc_message.getId("EXPORT.TXT") ]         = self.export_txt
     
     
     
     
     # wx.log
     self.wxLogTextCtrl = wx.LogTextCtrl(self._wxTextCtrl_Int)
     self.wxLogTextCtrl.AddTraceMask("general")
     wx.Log_SetActiveTarget(self.wxLogTextCtrl)
     wx.Log_SetVerbose()