[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gnuradio-discuss
Subject:    Re: [Discuss-gnuradio] Dynamically changing bandwidth of QT GUI Frequency Sink
From:       Derek Kozel <derek.kozel () ettus ! com>
Date:       2018-07-31 12:19:57
Message-ID: CAA+K=tuSWw7oog98Vjj4hE_w7+spuLqU6QNbesk+E8bKbo5rDw () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hi Jason,

I'd recommend adding a command to the message port to update the sample
rate or alternatively add support for the rate tag to the Frequency Sink
and have your OOT block emit a rate tag. I'll help get that change merged
if you can put up a pull request.
https://github.com/gnuradio/gnuradio/blob/219eae9a9c2ef7644450e71d19f8f54c1=
2e1f9cc/gr-uhd/lib/usrp_source_impl.cc#L673
https://github.com/gnuradio/gnuradio/blob/a0adcd3347c7ffd6ef3c42ce7705a2397=
8774d3b/gr-uhd/lib/usrp_source_impl.h#L29

Derek



On Tue, Jul 31, 2018 at 12:24 PM, Jason Hein <jason.hein@marconiedison.com>
wrote:

> Marcus,
>
> To clarify, assume I set the sample rate at build time with the samp_rate
> variable within the QT GUI Frequency Sink.  At run time, the bandwidth (x
> axis) is reflective of this samp_rate.  However, if I have a source block
> upstream that changes the sample rate via out of band means, I would like
> that source block to change the samp_rate of the QT GUI Frequency Sink
> programmatically.  I am able to change the frequency of the QT GUI
> Frequency Sink programmatically through the message port, but I haven't
> seen a way to change the samp_rate/bandwidth.
>
> Jason
>
> On Tue, Jul 31, 2018 at 5:56 AM, M=C3=BCller, Marcus (CEL) <mueller@kit.e=
du>
> wrote:
>
>> Hi Jason,
>> just to be sure to understand what you need:
>> Do you mean "zoom in x-axis"?
>> (because technically, the bandwidth of that display is always Nyquist,
>> i.e. defined by the sampling rate)
>>
>> Best regards,
>> Marcus
>>
>> On Mon, 2018-07-30 at 16:57 -0400, Jason Hein wrote:
>> > I have a GNU radio flow graph with a custom data source and I'd like t=
o
>> be able to change the bandwidth displayed on the QT GUI Frequency Sink
>> block dynamically.  Is there a way to do this programmatically?  The QT =
GUI
>> Frequency Sink block has a message port for programmatic changes to
>> frequency, but I don't see an equivalent means for changing bandwidth.  =
Is
>> there a way for an OOT block to get a reference to another block to call=
 a
>> public member function?
>>
>
>
> _______________________________________________
> Discuss-gnuradio mailing list
> Discuss-gnuradio@gnu.org
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>
>

[Attachment #5 (text/html)]

<div dir="ltr"><div>Hi Jason,<br><br></div><div>I&#39;d recommend adding a command to \
the message port to update the sample rate or alternatively add support for the rate \
tag to the Frequency Sink and have your OOT block emit a rate tag. I&#39;ll help get \
that change merged if you can put up a pull request.<br><a \
href="https://github.com/gnuradio/gnuradio/blob/219eae9a9c2ef7644450e71d19f8f54c12e1f9 \
cc/gr-uhd/lib/usrp_source_impl.cc#L673">https://github.com/gnuradio/gnuradio/blob/219e \
ae9a9c2ef7644450e71d19f8f54c12e1f9cc/gr-uhd/lib/usrp_source_impl.cc#L673</a><br><a \
href="https://github.com/gnuradio/gnuradio/blob/a0adcd3347c7ffd6ef3c42ce7705a23978774d \
3b/gr-uhd/lib/usrp_source_impl.h#L29">https://github.com/gnuradio/gnuradio/blob/a0adcd \
3347c7ffd6ef3c42ce7705a23978774d3b/gr-uhd/lib/usrp_source_impl.h#L29</a><br><br></div><div>Derek<br></div><div><br><br></div></div><div \
class="gmail_extra"><br><div class="gmail_quote">On Tue, Jul 31, 2018 at 12:24 PM, \
Jason Hein <span dir="ltr">&lt;<a href="mailto:jason.hein@marconiedison.com" \
target="_blank">jason.hein@marconiedison.com</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div dir="ltr">Marcus,<div><br></div><div>To clarify, assume \
I set the sample rate at build time with the samp_rate variable within the QT GUI \
Frequency Sink.   At run time, the bandwidth (x axis) is reflective of this \
samp_rate.   However, if I have a source block upstream that changes the sample rate \
via out of band means, I would like that source block to change the samp_rate of the \
QT GUI Frequency Sink programmatically.   I am able to change the frequency of the QT \
GUI Frequency Sink programmatically through the message port, but I haven&#39;t seen \
a way to change the samp_rate/bandwidth.</div><span class="HOEnZb"><font \
color="#888888"><div><br></div><div>Jason</div></font></span></div><div \
class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div \
class="gmail_quote">On Tue, Jul 31, 2018 at 5:56 AM, Müller, Marcus (CEL) <span \
dir="ltr">&lt;<a href="mailto:mueller@kit.edu" \
target="_blank">mueller@kit.edu</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex">Hi Jason,<br> just to be sure to understand what you \
need:<br> Do you mean &quot;zoom in x-axis&quot;?<br>
(because technically, the bandwidth of that display is always Nyquist,<br>
i.e. defined by the sampling rate)<br>
<br>
Best regards,<br>
Marcus<br>
<div class="m_5014100381224021925HOEnZb"><div class="m_5014100381224021925h5"><br>
On Mon, 2018-07-30 at 16:57 -0400, Jason Hein wrote:<br>
&gt; I have a GNU radio flow graph with a custom data source and I&#39;d like to be \
able to change the bandwidth displayed on the QT GUI Frequency Sink block \
dynamically.   Is there a way to do this programmatically?   The QT GUI Frequency \
Sink block has a message port for programmatic changes to frequency, but I don&#39;t \
see an equivalent means for changing bandwidth.   Is there a way for an OOT block to \
get a reference to another block to call a public member \
function?</div></div></blockquote></div><br></div> \
</div></div><br>______________________________<wbr>_________________<br> \
Discuss-gnuradio mailing list<br> <a \
href="mailto:Discuss-gnuradio@gnu.org">Discuss-gnuradio@gnu.org</a><br> <a \
href="https://lists.gnu.org/mailman/listinfo/discuss-gnuradio" rel="noreferrer" \
target="_blank">https://lists.gnu.org/mailman/<wbr>listinfo/discuss-gnuradio</a><br> \
<br></blockquote></div><br></div>



_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic