Forum: GNU Radio Using set_min_output_buffer() in Python block

Ae2ce7df10ec533269302ebedcfbdc71?d=identicon&s=25 David H. (david_h73)
on 2014-06-13 15:50
(Received via mailing list)
Dear All,

Is it possible to use set_min_output_buffer() in Python? I want to be
able to output more than 4096 items from a Python block during one call
to the work function. Is there a way to do this?

Regards,

David

________________________________

NOTE: The information in this email and any attachments may be
confidential and/or legally privileged. This message may be read, copied
and used only by the intended recipient. If you are not the intended
recipient, please destroy this message, delete any copies held on your
system and notify the sender immediately.

Toshiba Research Europe Limited, registered in England and Wales
(2519556). Registered Office 208 Cambridge Science Park, Milton Road,
Cambridge CB4 0GZ, England. Web: www.toshiba.eu/research/trl
B4ffbc711addde4c649b1ed526df6157?d=identicon&s=25 Martin Braun (Guest)
on 2014-06-13 20:47
(Received via mailing list)
On 13.06.2014 15:49, David Halls wrote:
> Dear All,
>
> Is it possible to use set_min_output_buffer() in Python? I want to be
> able to output more than 4096 items from a Python block during one call
> to the work function. Is there a way to do this?

Hey David,

sure, this function is available in Python. It's even in GRC, if you
want to create code to see how it's used.

M
Ae2ce7df10ec533269302ebedcfbdc71?d=identicon&s=25 David H. (david_h73)
on 2014-06-16 19:03
(Received via mailing list)
Hey Martin,

My calls using

self.set_min_output_buffer(4096*2)

and

self.set_min_noutput_items(4096)

fail at runtime. Perhaps I am missing some import statements?

"AttributeError: 'bsld_dec_butterfly_cfb' object has no attribute
'set_min_output_buffer'"

Regards,

David
________________________________________
From: discuss-gnuradio-bounces+david.halls=toshiba-trel.com@gnu.org
[discuss-gnuradio-bounces+david.halls=toshiba-trel.com@gnu.org] on
behalf of Martin Braun [martin.braun@ettus.com]
Sent: 13 June 2014 19:45
To: discuss-gnuradio@gnu.org
Subject: Re: [Discuss-gnuradio] Using set_min_output_buffer() in Python
block

On 13.06.2014 15:49, David Halls wrote:
> Dear All,
>
> Is it possible to use set_min_output_buffer() in Python? I want to be
> able to output more than 4096 items from a Python block during one call
> to the work function. Is there a way to do this?

Hey David,

sure, this function is available in Python. It's even in GRC, if you
want to create code to see how it's used.

M
> recipient, please destroy this message, delete any copies held on your
> safely by Mimecast.
> For more information please visit http://www.mimecast.com
> ------------------------------------------------------------------------
>
>
> _______________________________________________
> 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

________________________________

NOTE: The information in this email and any attachments may be
confidential and/or legally privileged. This message may be read, copied
and used only by the intended recipient. If you are not the intended
recipient, please destroy this message, delete any copies held on your
system and notify the sender immediately.

Toshiba Research Europe Limited, registered in England and Wales
(2519556). Registered Office 208 Cambridge Science Park, Milton Road,
Cambridge CB4 0GZ, England. Web: www.toshiba.eu/research/trl
739a038d5a03d5448114b3615e2caedc?d=identicon&s=25 Activecat K. (activecat_k)
on 2014-06-17 09:41
(Received via mailing list)
On Tue, Jun 17, 2014 at 1:02 AM, David Halls
<david.halls@toshiba-trel.com>
wrote:

> fail at runtime. Perhaps I am missing some import statements?
>
> "AttributeError: 'bsld_dec_butterfly_cfb' object has no attribute
> 'set_min_output_buffer'"
>
> Regards,
>
> David
>


The "set_min_noutput_items()" is not yet a supported python statement
[1]
as per March 06, 2014.
Also, I believe this statement should be placed in the member functions
(constructor, work function, callback function etc) of your custom
block,
don't put it at the wrong place.
In alternative, you may want to replace it with "set_output_multiple()"
if
this is more appropriate.

1.
http://gnuradio.4.n7.nabble.com/self-set-min-noutp...
B4ffbc711addde4c649b1ed526df6157?d=identicon&s=25 Martin Braun (Guest)
on 2014-06-17 11:44
(Received via mailing list)
On 16.06.2014 19:02, David Halls wrote:
> fail at runtime. Perhaps I am missing some import statements?
>
> "AttributeError: 'bsld_dec_butterfly_cfb' object has no attribute
> 'set_min_output_buffer'"

Ah, I misunderstood. You want to use this on Python blocks, I thought
you just wanted to call it from Python (on C++ blocks). It it's not in
the gateway blocks, then it won't work in Python.

Cheers,
Martin
Ae2ce7df10ec533269302ebedcfbdc71?d=identicon&s=25 David H. (david_h73)
on 2014-06-17 12:17
(Received via mailing list)
________________________________________
> From: Activecat [activecat@gmail.com]
> Sent: 17 June 2014 08:39
> To: discuss-gnuradio@gnu.org
> Cc: David Halls
> Subject: Re: [Discuss-gnuradio] Using set_min_output_buffer() in Python block

> On Tue, Jun 17, 2014 at 1:02 AM, David Halls
<david.halls@toshiba-trel.com<mailto:david.halls@toshiba-trel.com>> wrote:
> Hey Martin,

> My calls using

> self.set_min_output_buffer(4096*2)

> and

> self.set_min_noutput_items(4096)

> fail at runtime. Perhaps I am missing some import statements?

> "AttributeError: 'bsld_dec_butterfly_cfb' object has no attribute
'set_min_output_buffer'"

> Regards,

> David


> The "set_min_noutput_items()" is not yet a supported python statement [1] as per
March 06, 2014.
> Also, I believe this statement should be placed in the member functions
(constructor, work function, callback function etc) of your custom block, don't
put it at the wrong place.
> In alternative, you may want to replace it with "set_output_multiple()" if this
is more appropriate.

> 1.
http://gnuradio.4.n7.nabble.com/self-set-min-noutp...




Thanks Activecat!!!!!!!!!!!!!!!!!! I had the problem that

"out_rc[0:len(rcABm)] = rcABm
ValueError: operands could not be broadcast together with shapes (4096)
(5376)"

where "out_rc = output_items[3]"

using set_output_multiple(4096*2) has resolved my problem by increasing
the length of the output buffer vector to 4096*2. I wonder if there is a
fixed limit as to how far I can stretch this? In the future I may want
my decoder to output even more than blocks in one go.

Regards,

David



________________________________

NOTE: The information in this email and any attachments may be
confidential and/or legally privileged. This message may be read, copied
and used only by the intended recipient. If you are not the intended
recipient, please destroy this message, delete any copies held on your
system and notify the sender immediately.

Toshiba Research Europe Limited, registered in England and Wales
(2519556). Registered Office 208 Cambridge Science Park, Milton Road,
Cambridge CB4 0GZ, England. Web: www.toshiba.eu/research/trl
739a038d5a03d5448114b3615e2caedc?d=identicon&s=25 Activecat K. (activecat_k)
on 2014-06-18 06:55
(Received via mailing list)
On Tue, Jun 17, 2014 at 6:16 PM, David Halls
<david.halls@toshiba-trel.com>
wrote:

> fixed limit as to how far I can stretch this? In the future I may want my
> decoder to output even more than blocks in one go.
>
>

In GRC graphical flowgraph there is a "Max Number of Output" setting
under
the "Options" block.
Documentation: The Max Number of Output is the maximum number of output
items allowed for any block in the flowgraph; to disable this set the
max_nouts equal to 0. Use this to adjust the maximum latency a flowgraph
can exhibit.

Besides this I guess there is no other limiting factor.
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.