discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] question about routing data


From: Kevin Reid
Subject: Re: [Discuss-gnuradio] question about routing data
Date: Sun, 4 Oct 2015 10:39:42 -0700

On Oct 4, 2015, at 9:19, Przemek Lewandowski <address@hidden> wrote:

> Kevin, one more small question 
> 
> if I want to have for example 3 inputs and 3 outputs, and 2 gui chooser 
> widgets - for choosing input and output. what will change ?

That would be something like

  [[output_chooser == i and input_chooser == j
    for j in xrange(3)]
   for i in xrange(3)]

The outer array corresponds to the outputs and each of the inner arrays 
corresponds to the inputs.

> problem is that I dont know when expression "[[chooser == i for i in 
> xrange(3)]]"  is invoked. I tryied to do a function instead of this 
> expression but it was only invoked once.

It's evaluated whenever one of the inputs changes in a way GRC knows about. For 
example, one of the inputs to that expression is "chooser", and GRC knows 
"chooser" is a GUI widget that produces a value, so it reevaluates the 
expression whenever the GUI widget is used.

If you look at the code GRC generates for your block (.py), you can see the 
methods it produces to keep everything updated. It's a bit verbose, but very 
direct.

-- 
Kevin Reid                                  <http://switchb.org/kpreid/>




reply via email to

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