Hi all,
Please ignore the previous mail. It is not complete. It was sent accidently.
Thanks Eric... I will be more specific about the problem.... here it is...
I am trying to combine the spectrum sense and ODFM Tx code together
using multi flow graph concept. I idea is to sense the spectrum for
occupancy and if free, use that frequency for OFDM transmission. So
far I have achieved the connection between spectrum sense flow graph
and the OFDM Tx flow graph. I am taking both the spectrum sense
parameters and OFDM Tx parameters together at the time of
initialization.
The code is working fine performing the spectrum sense and ofdm
transmission. But the frequency at which the OFDM transmission is
happening is not at the frequency sensed to be free. Instead it is
happening at the initialized frequency (--tx-freq parameter). I want
this parameter to be changed at runtime. I have given following piece
of code for the same:
class my_top_block(gr.top_block)
self.sp_sense = spectrum_sense()
self.ofdm_tx = ofdm_transmit()
self.connect(ofdm_tx)
self.connect(sp_sense)
tx = my_top_block()
Now, in the main program, I do something like this:
if power < threshold:
print 'spectrum is free'
tx.ofdm_tx._tx_freq = m.center_freq
Then I perform ofdm transmission. But the last statement here has no
effect in the execution. Please let me know what is the mistake with
this kind of change of parameter value. I am looking to have this kind
of runtime change in value of parameter.