Esempio n. 1
0
    def __init__(self,jitter=1.0/10.0):
        #init variables

        #get the symbols
        self.symbols = generateSymbols()
        #get the identifiers
        self.identifiers = generateIdentifiers()
        #attach the symbols to the simulator
        self.jitter = jitter
Esempio n. 2
0
    def __init__(self, jitter=1.0 / 10.0):
        #init variables

        #get the symbols
        self.symbols = generateSymbols()
        #get the identifiers
        self.identifiers = generateIdentifiers()
        #attach the symbols to the simulator
        self.jitter = jitter
Esempio n. 3
0
 def setUp(self):
     self.symbols = generateSymbols()
     self.identifiers = generateIdentifiers()
     self.frames = generate()
Esempio n. 4
0
 def setup(self):
     self.sim = TwoOfFiveSimulator()
     self.sim.addSymbols(symbols=generateSymbols(),identifiers=generateIdentifiers())
Esempio n. 5
0
 def __init__(self):
     self.frames = generate()
     self.identifiers = generateIdentifiers()
     self.symbols = generateSymbols()
Esempio n. 6
0
from symbol_generation import generateSymbols, generateIdentifiers

symbols = generateSymbols()
identifiers = generateIdentifiers()

test_frame1_data = [symbols[0], symbols[1]]
test_frame1 = [identifiers[0], symbols[0], symbols[1]]

test_sequence1 = [
    identifiers[0],
    symbols[10],
    symbols[0],
    symbols[8],
    identifiers[0],
    symbols[11],
    symbols[1],
    symbols[27],
    identifiers[0],
    symbols[12],
    symbols[0],
    symbols[15],
    identifiers[0],
    symbols[13],
    symbols[10],
    identifiers[0],
]

test_sequence2 = [
    symbols[10],
    symbols[0],
    symbols[8],
Esempio n. 7
0
 def setUp(self):
     self.symbols = system_symbols
     self.identifiers = generateIdentifiers()
     self.decoder = Decoder()
Esempio n. 8
0
from helper import smart_datetime as datetime
from helper import smart_timedelta as timedelta


#not sure why this is still here
def to_float(dt):
    return float(dt.hour * 60 * 60) + float(dt.minute * 60) + float(
        dt.second) + float(dt.microsecond / 1000000.0)


modulus = 0.5

toDelta = lambda t: timedelta(0, t)

system_symbols = generateSymbols()
system_identifiers = generateIdentifiers()


def make(system_symbols,
         symbols,
         time_stamp,
         modulus=0.5,
         ratio=2.0,
         debug=True):
    newSymbols = []

    for s in symbols:  #create random symbols if their values aren't defined
        if s.value is not None:
            newSymbols.append(s)
        else:
            newSymbols.append(system_symbols[random.randint(0, 99)])
Esempio n. 9
0
from symbol_generation import generateSymbols, generateIdentifiers

symbols = generateSymbols()
identifiers = generateIdentifiers()

test_frame1_data = [symbols[0],symbols[1]]
test_frame1 = [identifiers[0],symbols[0],symbols[1]]

test_sequence1 = [
    identifiers[0],
    symbols[10],
    symbols[0],
    symbols[8],
    identifiers[0],
    symbols[11],
    symbols[1],
    symbols[27],
    identifiers[0],
    symbols[12],
    symbols[0],
    symbols[15],
    identifiers[0],
    symbols[13],
    symbols[10],
    identifiers[0],
    ]


test_sequence2 = [
    symbols[10],
    symbols[0],
Esempio n. 10
0
 def __init__(self):
     self.frames = generate()
     self.identifiers = generateIdentifiers()
     self.symbols = generateSymbols()
Esempio n. 11
0
 def setUp(self):
     self.symbols = system_symbols
     self.identifiers = generateIdentifiers()
     self.decoder = Decoder()
Esempio n. 12
0
#we need to work with floats for comparison

from helper import smart_datetime as datetime
from helper import smart_timedelta as timedelta

#not sure why this is still here
def to_float(dt):
    return float(dt.hour*60*60) + float(dt.minute*60) + float(dt.second) + float(dt.microsecond/1000000.0)

modulus = 0.5

toDelta = lambda t: timedelta(0,t)

system_symbols = generateSymbols()
system_identifiers = generateIdentifiers()

def make(system_symbols,symbols,time_stamp,modulus=0.5,ratio=2.0,debug=True):
        newSymbols = [] 

        for s in symbols: #create random symbols if their values aren't defined
            if s.value is not None:
                newSymbols.append(s)
            else:
                newSymbols.append(system_symbols[random.randint(0,99)])
                
        bars = []
        for nS in newSymbols: #accumulate all of the bars
                bars.extend(nS.bars)

        pulses = []