Changeset 390 for vtcross/trunk/src/cognitive_engines/DSA_CE/examples
- Timestamp:
- 07/29/09 00:31:04 (15 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
vtcross/trunk/src/cognitive_engines/DSA_CE/examples/gnuradio-examples/dsa.py
r389 r390 47 47 def send_pkt(self, payload='', eof=False): 48 48 return self.txpath.send_pkt(payload, eof) 49 49 50 def get_real_channel(channel): 51 52 real_channel = 1; 53 54 if channel == 1: 55 real_channel = 1 56 if channel == 2: 57 real_channel = 7 58 if channel == 3: 59 real_channel = 8 60 if channel == 4: 61 real_channel = 14 62 63 return real_channel 64 50 65 def get_freq(hop_freq,probe_level,absent_time): 51 66 … … 55 70 channel = 1 56 71 if hop_freq == 462712500: 57 channel = 772 channel = 2 58 73 if hop_freq == 467562500: 59 channel = 874 channel = 3 60 75 if hop_freq == 467712500: 61 channel = 1476 channel = 4 62 77 63 78 p = Parameter(1) … … 72 87 73 88 p = GetOptimalParameters(o,1,currentParameters,1); 74 print p[0].name, p[0].value 75 89 print p[0].value 90 91 channel = get_real_channel(int(p[0].value)) 92 76 93 if channel < 8: 77 94 hop_freq = float(1e6 * (462.5625+(channel-1)*0.025))#setting the centre freq frequency for sending packets … … 153 170 help="use file for packet contents") 154 171 155 172 transmit_path.add_options(parser_tx, expert_grp_tx) 156 173 157 174 for mod in mods.values(): … … 228 245 ch_energy = tb.rxpath.probe.level() #setting initial value 229 246 hop_freq = options_tx.tx_freq # = options_rx.rx_freq...same for tx and rx side 230 while running: 247 248 249 # Scan all channels first for inital data 250 251 while running: 231 252 232 253 ################################################sync mode####################################