示例#1
0
class CreateEventInformationTable(component):
    def __init__(self):
        super(CreateEventInformationTable,self).__init__()
        self.serialiser = SerialiseEITSection()
        
    def shutdown(self):
        while self.dataReady("control"):
            msg = self.recv("control")
            self.send(msg,"signal")
            if isinstance(msg, (shutdownMicroprocess, producerFinished)):
                return True
        return False

    def main(self):
        while not self.shutdown():
            
            while self.dataReady("inbox"):
                section = self.recv("inbox")
                serialisedSection = self.serialiser.serialise(section)
                self.send(serialisedSection,"outbox")
            
            self.pause()
            yield 1
示例#2
0
 def __init__(self):
     super(CreateEventInformationTable,self).__init__()
     self.serialiser = SerialiseEITSection()