[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] how to achieve change values of parameters at ru
From: |
Sheshanandan KN |
Subject: |
Re: [Discuss-gnuradio] how to achieve change values of parameters at runtime |
Date: |
Sun, 14 Jun 2009 12:32:25 +0530 |
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.
Shesh
On Sun, Jun 14, 2009 at 12:19 PM, Sheshanandan
KN<address@hidden> wrote:
> 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)
>
>
> tx = my_top_block()
>
>
> On Fri, Jun 12, 2009 at 9:58 PM, Eric Blossom<address@hidden> wrote:
>> On Thu, Jun 11, 2009 at 01:44:24PM +0530, Sheshanandan KN wrote:
>>> hi all,
>>> could anyone please let me know how to change the value of a parameter
>>> already initialized to a different value at runtime?
>>>
>>> I guess usage of lock() and unlock() will work. But not sure how to go
>>> about this?
>>>
>>
>> You're not being very specific, which makes it hard for anybody to be
>> of assistance to you.
>>
>> Please see http://gnuradio.org/trac/wiki/ReportingErrors and try again.
>>
>> Eric
>>
>