discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] Python block help


From: Zach Morris
Subject: Re: [Discuss-gnuradio] Python block help
Date: Fri, 26 May 2017 10:49:56 -0700 (MST)

That worked to create a general block, but I'm still having some trouble with
implementing the forecast(), consume() and produce() functions. 

The goal of the block is to discard elements in an input vector that are
below a certain threshold, and eventually update some statistics based on
the remaining elements. For a vector of 256 elements, there could be
anywhere between 0 and 256 outputs (the arbitrary ratio you mentioned).

The default forecast function has a 1:1 ratio:

Should I replace "noutput_items" with my "vector_length" parameter, ensuring
that we always get (for example) 256 inputs?

In the general_work function, I think we want to consume the entire input
vector once we figure out which elements are above the threshold:

I'm not sure about the produce function; do I need to tell the system how
many items I produce, or is that covered at the end of general_work:


Thank you kindly,

Zach




--
View this message in context: 
http://gnuradio.4.n7.nabble.com/Python-block-help-tp51706p64062.html
Sent from the GnuRadio mailing list archive at Nabble.com.



reply via email to

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