On Wed, Oct 30, 2013 at 7:36 PM, Arturo Rinaldi <arty.net2@gmail.com> wrote:
> Hi folks,
>
> is it possible to modify the input size at python level by using vectors ?
> What I specifically mean is that I want to build a hierachical block and
> giving it as input two vectors :
>
> class error_rate_vector_iif(gr.hier_block2):
>
> #init
> gr.hier_block2.__init__(
> self, 'error_rate_vector_iif',
> gr.io_signature(2, 2, gr.sizeof_int,
> gr.io_signature(1, 1, gr.sizeof_float),
> )
>
> So my question is, is there a way to use a sort of "fictional"
> gr.sizeofvector_int instead of gr.sizeof_int size in the definition of my
> python class ? Basically, I need to compare two vectors and increase a
> counter while a difference between their elements is spotted......can
> anybody help me ?
>
> thank you in advance as always
>
> Kind Regards,
>
> Arturo
If I'm understanding correctly, you should just be able to multiply
the gr.sizeof_int with the vector size (N):
gr.hier_block2.__init__(
self, 'error_rate_vector_iif',
gr.io_signature(2, 2, N*gr.sizeof_int),
gr.io_signature(1, 1, gr.sizeof_float),
)
Tom
_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
No comments:
Post a Comment