def run(self): ccddata = None with QtCore.QMutexLocker(self.mutex): self.stoped = False try: self.uart.open() except SerialException,e: self.getwrong_message = e self.emit(QtCore.SIGNAL("UartData"), ccddata,self.getwrong_message)
def isStop(self): with QtCore.QMutexLocker(self.mutex): return self.stoped
def stop(self): with QtCore.QMutexLocker(self.mutex): self.uart.close() self.getwrong_message = None self.stoped = True