Re: [Discuss-gnuradio] Custom Blocks and Number of Items Per Port

2012-08-06 Thread Josh Blum
On 08/06/2012 09:44 AM, Alexander Olihovik wrote: > Will the unconsumed items on ports with a larger number of samples sent to > them be buffered up automatically, or do I need to do that myself? > i.e. If port 0 has 100 items, and port 1 has 300 items, and I consume 100 > items from each port, w

Re: [Discuss-gnuradio] Custom Blocks and Number of Items Per Port

2012-08-06 Thread Alexander Olihovik
Will the unconsumed items on ports with a larger number of samples sent to them be buffered up automatically, or do I need to do that myself? i.e. If port 0 has 100 items, and port 1 has 300 items, and I consume 100 items from each port, what happens to the remaining 200 items on port 1? Are they b

Re: [Discuss-gnuradio] Custom Blocks and Number of Items Per Port

2012-08-03 Thread Josh Blum
On 08/03/2012 02:16 PM, Alexander Olihovik wrote: > Ideally, I'd like to have 1 items on each port every time work() is > called, since my sink will be sending 10k snapshots of data to another > algorithm. > Right now, since I don't have that many items on each port, I'm looking for > the min

Re: [Discuss-gnuradio] Custom Blocks and Number of Items Per Port

2012-08-03 Thread Alexander Olihovik
Ideally, I'd like to have 1 items on each port every time work() is called, since my sink will be sending 10k snapshots of data to another algorithm. Right now, since I don't have that many items on each port, I'm looking for the minimum number of items on all ports, saving that number of items

Re: [Discuss-gnuradio] Custom Blocks and Number of Items Per Port

2012-08-03 Thread Martin Braun (CEL)
On Fri, Aug 03, 2012 at 02:23:39PM -0400, Alexander Olihovik wrote: > It seems as if the gr_sync_block is close to what Josh Blum refers to as an > Arbitrary Ratio Block in his Blocks Coding Guide. Read the guide again :) that's not at all what it is. This might also help: http://gnuradio.org/red

Re: [Discuss-gnuradio] Custom Blocks and Number of Items Per Port

2012-08-03 Thread Alexander Olihovik
It seems as if the gr_sync_block is close to what Josh Blum refers to as an Arbitrary Ratio Block in his Blocks Coding Guide. Do you think if I were to use the forecast() function and make all ninput_items_required[i] to be the same set amount, I would always have the same number of input_items[i]

Re: [Discuss-gnuradio] Custom Blocks and Number of Items Per Port

2012-08-03 Thread Martin Braun (CEL)
On Fri, Aug 03, 2012 at 01:38:38PM -0400, Alexander Olihovik wrote: > There are a few cases when input_items[0] doesn't equal input_items[1]. If > say, > len(input_items[0]) = 1000 and len(input_items[1]) = 1500, and I returned the > smaller of the two values, 1000, what would happen to the other

Re: [Discuss-gnuradio] Custom Blocks and Number of Items Per Port

2012-08-03 Thread Alexander Olihovik
There are a few cases when input_items[0] doesn't equal input_items[1]. If say, len(input_items[0]) = 1000 and len(input_items[1]) = 1500, and I returned the smaller of the two values, 1000, what would happen to the other 500 samples on port 1? Would they be buffered somewhere and then used the nex

Re: [Discuss-gnuradio] Custom Blocks and Number of Items Per Port

2012-08-01 Thread Tom Rondeau
On Wed, Aug 1, 2012 at 3:46 PM, Alexander Olihovik wrote: > Hi all! > I'm writing a custom sink block in Python with multiple input ports of all > the same data type. > I've been reading Josh's block coding guide, but I'm confused at one point: > The value returned by a block should be the number

[Discuss-gnuradio] Custom Blocks and Number of Items Per Port

2012-08-01 Thread Alexander Olihovik
Hi all! I'm writing a custom sink block in Python with multiple input ports of all the same data type. I've been reading Josh's block coding guide, but I'm confused at one point: The value returned by a block should be the number of items produced by that block. Is this to say that if I have multip