Changeset 410 for vtcross/trunk/src/cognitive_engines/DSA_CE/examples
- Timestamp:
- 08/03/09 10:12:34 (15 years ago)
- Location:
- vtcross/trunk/src/cognitive_engines/DSA_CE/examples/gnuradio-examples
- Files:
-
- 1 added
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
vtcross/trunk/src/cognitive_engines/DSA_CE/examples/gnuradio-examples/benchmark_dsa.py
r409 r410 82 82 real_channel = 1; 83 83 84 if channel == 1:85 real_channel = 186 if channel == 2:87 real_channel = 788 if channel == 3:89 real_channel = 8 90 if channel == 4: 91 real_channel = 1484 get_channel = { 85 1: 1, 86 2: 7, 87 3: 8, 88 4: 14 89 } 90 91 real_channel = get_channel[channel] 92 92 93 93 return real_channel … … 107 107 108 108 if cross == True: 109 if hop_freq == 462562500: 110 channel = 1 111 if hop_freq == 462712500: 112 channel = 2 113 if hop_freq == 467562500: 114 channel = 3 115 if hop_freq == 467712500: 116 channel = 4 117 109 110 freq_channel = { 111 462562500: 1, 112 462712500: 2, 113 467562500: 3, 114 467712500: 4, 115 } 118 116 currentParameters = Parameter(1) 119 117 currentParameters[0].name = "channel" 120 currentParameters[0].value = channel118 currentParameters[0].value = freq_channel[hop_freq] 121 119 122 120 o = Observable(2) … … 136 134 else: 137 135 # Get the average communication time 138 average_time = get_average_time( channel, absent_time)136 average_time = get_average_time(freq_channel[hop_freq], absent_time) 139 137 o[1].value = average_time 140 138 o[1].name = "communication_time" … … 150 148 else: 151 149 channel = int(random.choice([1,7,8,14])) 152 153 150 154 151 if channel < 8: 155 152 hop_freq = float(1e6 * (462.5625+(channel-1)*0.025))#setting the centre freq frequency for sending packets