On Mon, May 01, 2006 at 10:49:20PM -0400, Garrett Mcgrath wrote: > Ok I've got my code all written and tested it using test data now the > problem is that I've derived my class from 'gr_block' which provides a > ninput_items and noutput_items object to the general work system when it's > called. I'm confused thou how do I actually utilize these values as my > number of output items isn't known upon input,it's a function of arguments > fed to the class and values in the vector (using a vector source) that is > used. The initial data becomes 4 times larger during encoding, this is then > expanded to generate sample points and create a square wave for the desired > length of time. This is then fed back as the result, it could be anywhere > from 20 times to 10,000 times larger. What exactly do I do (especially > concerning the 'consume' behavior for this situation)? > > Any help, advice or guidance on this topic would be fantastically helpful. > > -Garrett McGrath
Hi Garrett, It sounds like there's a bit of a "round-peg / square-hole" thing going on here. Sounds like you should partition your solution a bit differently than throwing it all in a single block. The blocks are designed to deal with a potentially infinite amount of data, though there are mechanisms for signaling something like "EOF". > The initial data becomes 4 times larger during encoding, this is then > expanded to generate sample points and create a square wave So far so good. This is straight forward stream processing. > for the desired length of time. You probably want to control the "desired length of time" either by controlling the amount of input you feed to the first part, or using gr.head to truncate the output after N samples. > This is then fed back as the result, it could be anywhere > from 20 times to 10,000 times larger. This seems like it's the output of the block, but I may be missing something. Can you post a link to a drawing of the flow you've got in mind? > What exactly do I do (especially concerning the 'consume' behavior > for this situation)? It sounds like the first part is an interpolator and should be derived from gr_sync_interpolator. Not sure about the rest. I don't have a grip on the big picture. Eric _______________________________________________ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org http://lists.gnu.org/mailman/listinfo/discuss-gnuradio