discuss-gnuradio
[Top][All Lists]
Advanced

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

[Discuss-gnuradio] Performing callback function in GRC


From: Florian Schlembach
Subject: [Discuss-gnuradio] Performing callback function in GRC
Date: Mon, 27 May 2013 14:54:08 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130510 Thunderbird/17.0.6

I am trying to build a flow graph in GNU Radio Companion consisting of a USRP source block and a FFT sink. During runtime, I would like to send a user settings register to the USRP. Fortunately, everything is already employed so I only need to build some sort of variable control. By now, that already works out quite well using the WX GUI Widgets. A user settings command basically be send to the USRP using the

void set_user_register(const uint8_t addr, const uint32_t data, size_t mboard)

function that is part of the USRP source block. When changing the two variables $user_reg_addr and $user_reg_data, GRC invokes the callback function that I have defined in the file gnuradio/gr-uhd/grc/gen_uhd_usrp_blocks.py:

<callback>set_user_register(\$user_reg_addr, \$user_reg_data,uhd.ALL_MBOARDS)</callback>

If I now change either $user_reg_addr or $user_reg_data, the callback function is executed, which is not intended. In turn, I first would like to execute the callback function after I have modified *both* variables.

Is there a convenient way to execute the callback function on a button click or something similar?




reply via email to

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