Well, as Nick said: no problemo. Go wild!
On Fri, 2019-03-08 at 06:52 -0800, Mark Gannet wrote:
> Thank you. Basically, I want to take something like the burst tagger
> block but copy the item from the 1st input to the output buffer only
> when a condition is met on the 2nd input rather than just append a
> tag to the stream. The number of times that condition is met will
> vary but should be between 100-1000 times per second.
>
> Mark
>
> On Wed, Mar 6, 2019 at 6:20 PM Nick Foster <bistromath@gmail.com>
> wrote:
> > Sure, no problem, use a gr::block. Just call consume() to tell the
> > scheduler how many items you consumed, and return the number of
> > samples you produced -- subject to the size of the output buffer.
> > general_work() gets the size of your input and output buffers from
> > ninput_items and noutput_items. Perfectly fine to return a smaller
> > value than requested.
> >
> > Nick
> >
> > On Wed, Mar 6, 2019 at 5:43 PM Mark Gannet <mgannet@gmail.com>
> > wrote:
> > > Is it possible to write a custom block that only copies items to
> > > the output buffer if they meet a certain criterion? I'm thinking
> > > of something like a "keep m of n" block but where there is no
> > > knowledge of the number of items that will be written to the
> > > output buffer when entering the work function.
> > >
> > > Thanks,
> > > Mark
> > > _______________________________________________
> > > Discuss-gnuradio mailing list
> > > Discuss-gnuradio@gnu.org
> > > https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>
> _______________________________________________
> Discuss-gnuradio mailing list
> Discuss-gnuradio@gnu.org
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
No comments:
Post a Comment