Esempio n. 1
0
class Conveyer(Unit):
    def _onInit(self):
        self.connect(SignalType.PREPARE_TO_PACK, self._onPrepareToPack)
        self.collector = Collector()
        self.waste = []
        pass

    @checkUnitForwardLinkExist
    def _onPrepareToPack(self, dummy):
        self.pushUnit(self.collector)
        return True
        pass

    def getResult(self):
        return self.collector.getResult()
        pass

    def getWaste(self):
        return self.collector.getWaste()
        pass
    pass
Esempio n. 2
0
 def _onInit(self):
     self.connect(SignalType.PREPARE_TO_PACK, self._onPrepareToPack)
     self.collector = Collector()
     self.waste = []
     pass