discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Discuss-gnuradio] How to change PSK roll-off during runtime (or an arbi


From: Matthias Weber
Subject: [Discuss-gnuradio] How to change PSK roll-off during runtime (or an arbitrary parameter)
Date: Mon, 17 Aug 2015 16:38:08 +0200
User-agent: SOGoMail 2.2.17a

Hi all!

Thank you for contributing to gnuradio and providing new users like me with 
help.

I have read and worked through some of the guided tutorials. However I come to 
a point now where it seems that own Python code has to be written. 
Unfortunately I am more like a C++ guy and would appreciate it if someone could 
give me some advice.

Let us please take a look at the QPSK transmitter example of tutorial 6 [1]. It 
gives a nice example and you can play around with the parameters of the PSK Mod 
block in gnuradio-companion. What we would like to do is to change the roll-off 
factor during runtime using a Qt GUI Range element (i.e. a slider control) to 
demonstrate its effect. As the associated parameter is not underlined in the 
properties dialogue I wonder how this can be done during runtime.

When looking at the generated sourcecode it can be seen that an instance of 
`digital.psk.psk_mod` is created in `__init__` method and stored in element 
`self.digital_psk_mod_0`. I tried to add code in the slider's callback function 
`def set_excess_bw_slider(self, excess_bw_slider)`. But it does not show 
changes in constellation and spectrum plot though printing debug messages like 
`RRC roll-off factor: 0.15` on the command line.

I tried:
- to access the excess_bw property of the digital.psk.psk_mod directly to be 
modified
- to create a new instance of digital.psk.psk_mod in the callback function and 
overwriting the original one
  (in C++ this would be bad practice probably leading to memory leaks and might 
be the same for Python)

I did not really find the documentation of the digital.psk.psk_mod class, 
except at [2]. And in the sources themselves [3].

A short hint where to take a closer look would be great!

Thank you in advance
Matthias


[1] 
https://raw.githubusercontent.com/gnuradio/gr-tutorial/master/examples/tutorial6/gr-tutorial-qpsk-tx.grc
[2] http://www.reynwar.net/gnuradio/sphinx/digital/blocks.html
[3] 
http://gnuradio.org/redmine/projects/gnuradio/repository/revisions/master/entry/gr-digital/python/digital/psk.py




reply via email to

[Prev in Thread] Current Thread [Next in Thread]