Re: [Discuss-gnuradio] self.set_min_noutput_items() is not a valid python command in gnuradio ?

2014-03-08 Thread Marcus Müller
Hi activecat, The scheduler might be confused if he asked for less than iFactor samples, because then your forecast tells him you need 0 input to produce that... The joys of Integer division Can you modify it so that it always demands at least 1 input? -- Sent from my Android device with K-9

Re: [Discuss-gnuradio] self.set_min_noutput_items() is not a valid python command in gnuradio ?

2014-03-08 Thread Marcus Müller
Hi activecat, The scheduler might be confused if he asked for less than iFactor samples, because then your forecast tells him you need 0 input to produce that... The joys of Integer division Can you modify it so that it always demands at least 1 input? -- Sent from my Android device with K-9

Re: [Discuss-gnuradio] self.set_min_noutput_items() is not a valid python command in gnuradio ?

2014-03-08 Thread Marcus Müller
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Hi activecat, The scheduler might be confused if he asked for less than iFactor samples, because then your forecast tells him you need 0 input to produce that... Integer division - -- Sent from my Android device with K-9 Mail. Please excuse my

Re: [Discuss-gnuradio] self.set_min_noutput_items() is not a valid python command in gnuradio ?

2014-03-08 Thread Activecat
Dear Marcus, Sure, I have changed it, as follows: void quadrator_upconverter_impl::forecast (int noutput_items, gr_vector_int ninput_items_required) { ninput_items_required[0] = std::min( 1, noutput_items / d_iFactor ); } This tested has no effect to the flow graph; the block still

Re: [Discuss-gnuradio] self.set_min_noutput_items() is not a valid python command in gnuradio ?

2014-03-08 Thread Marcus Müller
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Activecat, your std::min should be a std::max :) would you try with that? On 08.03.2014 12:30, Activecat wrote: BTW I thought it is redundant to do this change, because as long as set_min_noutput_items(d_iFactor) works on the fly, the

Re: [Discuss-gnuradio] self.set_min_noutput_items() is not a valid python command in gnuradio ?

2014-03-08 Thread Activecat
Dear Marcus, Meanwhile, as you had advised, I had tried to see the parameters that forecast() and general_work() are called with. Refer below verbose message. When the flow chart started, the initial values are samp_rate=32k, change_rate=64; hence d_iFactor = 32k/64 = 500. At line 24 the

Re: [Discuss-gnuradio] self.set_min_noutput_items() is not a valid python command in gnuradio ?

2014-03-07 Thread Marcus Müller
Hi Activecat, to answer question 1): grepping for min_noutput_items instantly shows that in gnuradio-runtime/lib/block_executor.cc line 299, your block's min_noutput_items() is called every iteration. If there isn't enough space, the block thread sleeps until there is more. So yes, it works

Re: [Discuss-gnuradio] self.set_min_noutput_items() is not a valid python command in gnuradio ?

2014-03-07 Thread Activecat
Dear Marcus, 1). The line 299 of gnuradio-runtime/lib/block_executor.cc is: noutput_items = min_available_space(d, m-output_multiple(), m-min_noutput_items()); If this line shows that set_min_output_items() works on the fly, does this also shows set_out_multiple() works on the fly?

Re: [Discuss-gnuradio] self.set_min_noutput_items() is not a valid python command in gnuradio ?

2014-03-07 Thread Marcus Müller
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Activecat, On 08.03.2014 03:34, Activecat wrote: Dear Marcus, 1). The line 299 of gnuradio-runtime/lib/block_executor.cc is: noutput_items = min_available_space(d, m-output_multiple(), m-min_noutput_items()); If this line shows that

Re: [Discuss-gnuradio] self.set_min_noutput_items() is not a valid python command in gnuradio ?

2014-03-07 Thread Activecat
Dear Marcus, This is the forecast, I believe it is correct. void quadrator_upconverter_impl::forecast (int noutput_items, gr_vector_int ninput_items_required) { ninput_items_required[0] = noutput_items / d_iFactor; } Note: d_iFactor is the instantaneous interpolation factor.

Re: [Discuss-gnuradio] self.set_min_noutput_items() is not a valid python command in gnuradio ?

2014-03-06 Thread Activecat
Dear Sir, Let me explain the reason of why to use the function: set_min_noutput_items(). I am creating a custom interpolator block. Says, the interpolation factor is 1000. Hence it is important to call set_output_multiple(1000). Meanwhile, for this block the interpolation factor depends on

[Discuss-gnuradio] self.set_min_noutput_items() is not a valid python command in gnuradio ?

2014-03-05 Thread Activecat
Dear Sir, In c++ we have: set_min_noutput_items() What is it equivalent syntax in python ? I try this: self.set_min_noutput_items() Error message: AttributeError: 'quadrator_upconverter_python1' object has no attribute 'set_min_noutput_items' Note: The self.set_output_multiple() in python