Esempio n. 1
0
 def setUp(self):
     self.symbols = Symbols.generateSymbols()
     self.identifiers = Symbols.generateIdentifiers()
     self.frames = Frames.generate()
     
     simulator = TwoOfFiveSimulator()
     simulator.addSymbols(symbols=Symbols.generateSymbols(),identifiers=Symbols.generateIdentifiers())
     simulator.addFrames(frames=Frames.generate())
     self.simulator = simulator
Esempio n. 2
0
def generateSequence(timeStamp):
    sim = TwoOfFiveSimulator()
    sim.addSymbols(symbols=Symbols.generateSymbols(),identifiers=Symbols.generateIdentifiers())

    sequence = [sim.identifiers[-1]]

    for i in range(random.randint(0,10)):
        sequence.append(sim.symbols[i])
        
    pulses,timeStamp = sim.make(sequence,timeStamp)

    return pulses,timeStamp
Esempio n. 3
0
def generateSequence(timeStamp):
    sim = TwoOfFiveSimulator()
    sim.addSymbols(symbols=Symbols.generateSymbols(),
                   identifiers=Symbols.generateIdentifiers())

    sequence = [sim.identifiers[-1]]

    for i in range(random.randint(0, 10)):
        sequence.append(sim.symbols[i])

    pulses, timeStamp = sim.make(sequence, timeStamp)

    return pulses, timeStamp