Using set_min_output_buffer() in Python block

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

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

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: [email protected]n.invalid
[[email protected]n.invalid] on
behalf of Martin B. [[email protected]]
Sent: 13 June 2014 19:45
To: [email protected]
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
[email protected]
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Discuss-gnuradio mailing list
[email protected]
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

On Tue, Jun 17, 2014 at 1:02 AM, David Halls
[email protected]
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.

http://gnuradio.4.n7.nabble.com/self-set-min-noutput-items-is-not-a-valid-python-command-in-gnuradio-td46731.html

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


From: Activecat [[email protected]]
Sent: 17 June 2014 08:39
To: [email protected]
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
<[email protected]mailto:[email protected]> 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.

http://gnuradio.4.n7.nabble.com/self-set-min-noutput-items-is-not-a-valid-python-command-in-gnuradio-td46731.html

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(40962) 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

On Tue, Jun 17, 2014 at 6:16 PM, David Halls
[email protected]
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.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs