Thursday, March 15, 2018

Re: [Discuss-gnuradio] Vector average with decimate block

Hi Glen,

you can't be a complete failure. Else you wouldn't be part of this
community :) and you very certainly wouldn't be writing GNU Radio
blocks after only four weeks!

Quick look at your work:

out = output_items[0]
# get the number of input vectors
n = len( input_items)
print 'Number of work input vectors: ',n

hey, what's good for output_items is good for input_items, too!
Point I'm trying to make: "output_items" is in the end a container of
all output streams; remember, blocks can have multiple output streams.
You have exactly one, so you take that by saying
out = output_items[0]

Same goes for input_items; you want the first one, so use
input_items[0] instead of input_items.

Hope that helps a bit!

Best regards,
Marcus

On Thu, 2018-03-15 at 16:23 -0400, Glen I Langston wrote:
> Hello GnuRadio fans,
>
> I'm afraid I'm a complete failure at creating my own vector average
> with decimate block. This is my 4th week at this endeavor...
>
> I've run through a number of c++ and python web examples and each time am getting
> hung up somewhere.
>
> I've been following the examples from many gnu radio
> web sites and trying to get them to complete
>
> Including:
> https://wiki.gnuradio.org/index.php/OutOfTreeModules
>
> I got the C++ example to work but could not get the python qa test to pass.
>
> In any case, the vector average with decimate must be an easy example
> but I can not get the qa part to work.
>
> Is there anyone out there who could create the very rudimentary
> vector average with decimate that they could share?
>
> Please find my code attached. The python part is simple.
> The QA part is not running yet.
>
> I've started with:
>
> gr_modtool create vave
> cd gr-vave
> gr_modtool add -t decimator -l python vave
>
>
>
> _______________________________________________
> Discuss-gnuradio mailing list
> Discuss-gnuradio@gnu.org
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

No comments:

Post a Comment