def __init__(self,card_type,eng_cnst,chan,threshold):
     BaseRA.__init__(self,card_type,eng_cnst)
     assert chan != None, "Oracle must have channel ref at time of instantiation"
     self.chan = chan
     self.tput= None
     self.threshold = threshold
     self.name = 'OracleEngTput'
    def __init__(self):
        BaseRA.__init__(self,'intel','tx') # dummy parameters
        self.lltime = None
        self.lltable = None
        self.Rates = [6.0e6, 12.0e6, 18.0e6, 24.0e6, 36.0e6, 48.0e6, 54.0e6, 60.0e6]
        #self.modes = ['sm 3by3 GG','sm 2by3 DG','sm 2by2 DD','map 2by2 DD','sm 1by3 AG','map 2by1 DA','sm 1by2 AD','sm 1by1 AA']
        self.modes = ['sm 3by3 GG','sm 2by3 DG','sm 2by2 DD','sm 1by3 AG','sm 1by2 AD','sm 1by1 AA']
        self.calc_lossless_txtime()
        self.sort_lltime()

        self.curr_mcs= 7
        self.curr_mode= 'sm 3by3 GG'
        self.pkts_sent = 0

        self.avg_txtime = {}
        self.total_txtime = {}
        for mode in self.modes: self.avg_txtime[mode]=[-1 for m in range(0,8)]
        for mode in self.modes: self.total_txtime[mode]=[0 for m in range(0,8)]

        self.pkt_tries={}
        self.pkts_ackd={}
        self.consec_fails={}
        for mode in self.modes: self.pkt_tries[mode]=[0 for m in range(0,8)]
        for mode in self.modes: self.pkts_ackd[mode]=[0 for m in range(0,8)]
        for mode in self.modes: self.consec_fails[mode]=[0 for m in range(0,8)]

        # stale relevant variables
        self.stale_length = 100
        self.past_info = deque()
 def __init__(self,card_type,eng_cnst,predon=False):
     BaseRA.__init__(self,card_type,eng_cnst,predon)
     self.tput=None
     #self.file = open('Trace/max_tput_trace.dat','w')
     self.name = 'PPrMaxTput'
     self.MODS=['BPSK','QPSK','QAM16','QAM64']
     self.rate={'BPSK':13.0e6,'QPSK':26.0e6,'QAM16':52.0e6,'QAM64':78.0e6}
 def __init__(self,card_type,eng_cnst,chan):
     BaseRA.__init__(self,card_type,eng_cnst)
     self.tput=None
     #self.file = open('Trace/max_tput_trace.dat','w')
     self.name = 'OraclePPrMinEng'
     self.MODS=['BPSK','QPSK','QAM16','QAM64']
     self.rate={'BPSK':13.0e6,'QPSK':26.0e6,'QAM16':52.0e6,'QAM64':78.0e6}
     assert chan != None, "Oracle must have channel ref at time of instantiation"
     self.chan = chan
 def __init__(self, card_type, eng_cnst, chan, threshold):
     BaseRA.__init__(self, card_type, eng_cnst)
     self.tput = None
     # self.file = open('Trace/max_tput_trace.dat','w')
     self.name = "OraclePPrEngTput"
     self.MODS = ["BPSK", "QPSK", "QAM16", "QAM64"]
     self.rate = {"BPSK": 13.0e6, "QPSK": 26.0e6, "QAM16": 52.0e6, "QAM64": 78.0e6}
     self.threshold = threshold
     assert chan != None, "Oracle must have channel ref at time of instantiation"
     self.chan = chan
 def __init__(self,card_type,eng_cnst,predon=False):
     BaseRA.__init__(self,card_type,eng_cnst,predon)
     self.eff_snr= None
     self.mcs = None
     self.tput = None
     self.q = Qinverse()
     #self.th=[3,6.5,8,12.5,14.5,18,21,22.5]
     #self.th=[3, 5.36, 8.4, 12.06, 15.08, 19.9, 21.45, 23.17] #Tput
     self.th=[2.96, 5.96, 8.8, 12.4, 15.5, 20.22, 21.43, 23.08]  # 90% DR
     #self.file = open('Trace/eff_snr_trace.dat','w')
     self.name = 'EffSnrEng'
 def __init__(self,card_type,eng_cnst,chan):
     BaseRA.__init__(self,card_type,eng_cnst)
     assert chan != None, "Oracle must have channel ref at time of instantiation"
     self.chan = chan
     self.eff_snr= None
     self.mcs = None
     self.tput = None
     self.q = Qinverse()
     #self.th=[3,6.5,8,12.5,14.5,18,21,22.5]
     #self.th=[3, 5.36, 8.4, 12.06, 15.08, 19.9, 21.45, 23.17] #Tput
     self.th = [2.96, 5.96, 8.8, 12.4, 15.5, 20.22, 21.43, 23.08]  # 90% DR
     #self.file = open('Trace/eff_snr_trace.dat','w')
     self.name = 'OracleEffSnr'
 def __init__(self,card_type,eng_cnst,chan):
     BaseRA.__init__(self,card_type,eng_cnst)
     assert chan != None, "Oracle must have channel ref at time of instantiation"
     self.chan = chan
     self.name = 'OracleMaxTput'
 def __init__(self,card_type,eng_cnst,predon=False):
     BaseRA.__init__(self,card_type,eng_cnst,predon)
     self.subset_pers = None
     self.est_energy = None
     #self.file = open('Trace/min_energy_trace.dat','w')
     self.name = 'MinEng'
 def __init__(self,card_type,eng_cnst):
     BaseRA.__init__(self,card_type,eng_cnst)
     #self.file = open('Trace/samplerate_trace.dat','w')
     self.name = 'SampleRate'
     self.succ_hist=[]
     self.per = 0.0
 def __init__(self,card_type,eng_cnst,predon=False):
     BaseRA.__init__(self,card_type,eng_cnst,predon)
     self.tput=None
     #self.file = open('Trace/max_tput_trace.dat','w')
     self.name = 'MaxTput'
 def __init__(self,card_type,eng_cnst):
     BaseRA.__init__(self,card_type,eng_cnst)
     self.name = 'RxOracle'
 def __init__(self,card_type,eng_cnst,predon=False,threshold=0.9):
     BaseRA.__init__(self,card_type,eng_cnst,predon)
     self.est_energy = None
     self.tput=None
     self.threshold= threshold
     self.name = 'EngTput'