discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] question about set_output_multiple


From: Marcus Müller
Subject: Re: [Discuss-gnuradio] question about set_output_multiple
Date: Mon, 15 Jun 2015 09:17:57 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0

Hello David,

Problem 1:

your "error: expected..." looks like there's something small wrong with
your C++ syntax; would you mind sharing the code of your constructor (or
at least the signature and the lines containing set_output_multiple)?
Generally, "int tamano" declares the variable tamano as integere -- I
think you might be fine if you just delete the "int".

Problem 2:
SWIG can be hard. But usually, if you created the stub for your block
using "gr_modtool add", then everything will be alright, and all the
methods defined in include/your_block_name.h will be available to
python, as long as they are easily wrappable (this mostly means that you
used basic parameter types only).

Best regards,
Marcus

On 06/15/2015 04:51 AM, dcardona wrote:
> Hello
>
> I'm trying to create a block whose number of outputs is the number of
> inputs, which i'm setting as a parameter of the block(named tamano),+ n,
> being n a parameter of the block too.
> For example, if i use a vector sources block of size 16 as the input of my
> block, and n = 3, the output should be of size 19.
> According to what i have read, i should use the set_output_multiple() to
> achieve this.
>
> Problem 1:
> But i don't know what is the correct way to do this, or where to set it.
> I was doing it by writing: set_output_multiple(int tamano + n) at the
> constructor, but i'm having an error: error: expected primary-expression
> before ‘int’.
>
> Problem 2:
> I am trying to create this block with a c++ code and i don't know how to use
> SWIG, i don't know if i should convert the c++ code into a python code using
> SWIG and then copy it into the .cpp file generated, or if i copy the c++
> code into it and then SWIG converts it to a python code using some commands
> in the terminal.
>
> Could the problem 1 has something to do with the fact that I am trying to
> create this block with a c++ code?
>
> Thank you very much.
>
> David.
>
>
>
> --
> View this message in context: 
> http://gnuradio.4.n7.nabble.com/question-about-set-output-multiple-tp54173.html
> Sent from the GnuRadio mailing list archive at Nabble.com.
>
> _______________________________________________
> Discuss-gnuradio mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio




reply via email to

[Prev in Thread] Current Thread [Next in Thread]