def start(self,port,param): """/** Starts import the config file ( or other stream), and sets the parentrouter. If the port (evenDoor and evenBoard) need to send an evenData. */""" ret = Fport.start(self,port,param) if ret == RET_OK: return self.createRoom() return ret
def justDoIt(self,evenData): """/** Methods called by Fstarter */""" tmp = evenData.getCurrentDestination().getAction() if tmp.equals(gvActionEnd) or tmp.equals(gvActionError): self.setFreeEvenData(evenData) return RET_OK return Fport.justDoIt(self,evenData)
def justDoIt(self,evenData): """/** Methods called by Fstarter */""" self.evenDataA = evenData ret = Fport.justDoIt(self,evenData) if self.evenDataA: self.evenDataA.definePortAction(ACT_ERROR) self.sendEvenData(self.evenDataA) return ret
def end(self): ret = Fport.end(self) if ret == RET_OK and self.file <> None: try: self.file.close() except: return RET_CANNOTSAVE return ret
def start(self,port,node): ret = Fport.start(self,port,node) if ret == RET_OK: self.gotoChildren() if self.Find("filename",False) == RET_OK: str = self.getContent() try: self.file = file(str,"rw") except: return RET_CANNOTACCESS self.filename = str if file <> None: data = self.getFreeEvenData() data.definePortAction(ACT_GET,self.getString()) self.sendEvenData(data) else: return RET_CANNOTACCESS return ret
def sendEvenDataSys(self,evenData,portDestination = None): """/** Methods to enable all ports to sends evenDatas to a port */""" if (self.evenDataA == evenData): self.evenDataA = None Fport.sendEvenDataSys(self,evenData,portDestination)
def __str__(self): return "\t"+Fport.__str__(self)+\ "FportBkpEvenData - evenDataA : "+str(self.evenDataA)+"\n"
def __init__(self): Fport.__init__(self) # force constructor self.evenDataA = None #/** Backup of the evenDatas that need to be sends by sendEvenData */