Re: [Discuss-gnuradio] zero ninput_items_required[0]

2013-10-22 Thread Marcus Müller
To be completely clear: In your original post you stated that your block really behaves like a sync_interpolator/decimator. Yet, you're reinventing the wheel by copying the wheel into your code. DO NOT just copy code to you not-sync block from sync_block if you

Re: [Discuss-gnuradio] zero ninput_items_required[0]

2013-10-22 Thread Nemanja Savic
Well, I still didn't try with interpolator, cause it seems that it will work. I'd rather try to make it with general block and also learn more about how the stuff work. That's why I said that I used principles used for interpolator. Ok, I am now tracking number of produces items and it works ok, fr

Re: [Discuss-gnuradio] zero ninput_items_required[0]

2013-10-22 Thread Martin Braun (CEL)
On Tue, Oct 22, 2013 at 02:20:04PM +0200, Nemanja Savic wrote: > Hello guys again! > > > Based on Martins suggestion and Marucs' explanation I copied some principles > from sync_interpolator and situation looks much better. I used function > set_output_multiple and set_relative rate and now the o

Re: [Discuss-gnuradio] zero ninput_items_required[0]

2013-10-22 Thread Martin Braun (CEL)
On Tue, Oct 22, 2013 at 02:22:20PM +0200, Nemanja Savic wrote: > Or maybe the question should be like this: on which parameter to rely when > making general work function, number of iput items or number of output items? As I just said, in a sync_interpolator, you're not using general_work(), and y

Re: [Discuss-gnuradio] zero ninput_items_required[0]

2013-10-22 Thread Nemanja Savic
Or maybe the question should be like this: on which parameter to rely when making general work function, number of iput items or number of output items? On Tue, Oct 22, 2013 at 2:20 PM, Nemanja Savic wrote: > Hello guys again! > > Based on Martins suggestion and Marucs' explanation I copied som

Re: [Discuss-gnuradio] zero ninput_items_required[0]

2013-10-22 Thread Nemanja Savic
Hello guys again! Based on Martins suggestion and Marucs' explanation I copied some principles from sync_interpolator and situation looks much better. I used function set_output_multiple and set_relative rate and now the outcome of calling forecast function is much better. For example, for symbol

Re: [Discuss-gnuradio] zero ninput_items_required[0]

2013-10-21 Thread Marcus Müller
Hm, I don't know why this should really happen before your source's work function is called. But basically, maybe this is part of GNU Radio trying to figure out how to assign buffers; I haven't dived very deep into that aspect of the runtime. However, since

Re: [Discuss-gnuradio] zero ninput_items_required[0]

2013-10-20 Thread Nemanja Savic
Thank you Marcus very much. I would like to ask some more questions. For me it looks like the problem is at very begining when source has not produced any output, and it looks like forecast of my block is called before the work functino of the source? How should one cope with this? By checking if r

Re: [Discuss-gnuradio] zero ninput_items_required[0]

2013-10-19 Thread Marcus Müller
Hi Nemanja, Considering following flowgraph, assume your block is A, and assume all blocks work with the same itemsize. good question, but basically, when running, when A is done with a run of work, it's thread notifies blocks "upstream" (B in

Re: [Discuss-gnuradio] zero ninput_items_required[0]

2013-10-18 Thread Nemanja Savic
Thank you Martin, I will try with the sync_decimator, but it is also important for me to unterstand what's happening here. So, I have vector source -> throttle -> fsk_modulator -> scope sink. Vector source generates 8 symbols. From where scheduler starts, from source or from the sink? And why it di

Re: [Discuss-gnuradio] zero ninput_items_required[0]

2013-10-18 Thread Martin Braun (CEL)
On Fri, Oct 18, 2013 at 02:32:48PM +0200, Nemanja Savic wrote: > The body of my forecast function is: > > ninput_items_required[0] = noutput_items * d_sym_rate / d_sampling_freq; > printf("ninput_items_required %d, noutput_items %d\n", ninput_items_required > [0], noutput_items); If d_sym_rate an

[Discuss-gnuradio] zero ninput_items_required[0]

2013-10-18 Thread Nemanja Savic
Hi list, I am designing very simple FSK modulator. The principle of operation is following: based on symbol value nco generates baseband signa. The problem is somewhere in my forecast function, but I can't figure out where, probably because of misunderstanfing of something. The body of my forecas