Changeset 373

Show
Ignore:
Timestamp:
07/26/09 21:16:23 (15 years ago)
Author:
sriram
Message:

Changing the threshold

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • vtcross/branches/sriram/benchmark_txrxnode2.py

    r369 r373  
    184184        ################################################sync mode#################################### 
    185185        if mode == "sync": 
    186                 if sync_status != "True": 
     186                #sync_status="False" 
     187                if sync_status != "True": 
    187188                        #print "inside while" 
    188189                        ch = int(random.choice([1,7,8,14])) 
     
    191192                        else: 
    192193                                hop_freq = float(1e6 * (467.5625+(ch-8)*0.025))#setting the centre freq frequency for sending packets 
    193                         print "hop freq is",hop_freq,"@@@@\n" 
     194                        #print "hop freq is",hop_freq,"@@@@\n" 
    194195                         
    195196                        tb.txpath.set_freq(hop_freq) 
    196197                        tb.rxpath.set_freq(hop_freq) 
    197198                        ch_energy = tb.rxpath.probe.level() #check if primary user is present 
    198                         print "channel energy is ",ch_energy,"\n" 
    199                         if int(ch_energy) > 1.50e8: #if primary user is there then dont transmit on this channel 
     199                        #if int(ch_energy) > 1.0e7: 
     200                        print "hop freq is ",hop_freq," and channel energy is ",ch_energy,"\n" 
     201                        if int(ch_energy) > 2e7: #if primary user is there then dont transmit on this channel 
    200202                                continue 
    201                         time.sleep(0.05) 
     203                        time.sleep(0.1) 
    202204                else: 
    203205                        print "sync channel is found...channel ",ch,"\n" 
     
    250252                time.sleep(0.2) 
    251253                ch_energy = tb.rxpath.probe.level() #check if primary user is present 
    252                 if int(ch_energy) > 1.50e8: #if primary user is there then dont transmit on this channel 
     254                print "channel energy is ",ch_energy,"\n" 
     255                if int(ch_energy) > 2e7: #if primary user is there then dont transmit on this channel 
    253256                        mode = "sync" 
    254257                        continue