Forum: GNU Radio A block with 2 inputs

Posted by Juan Daniel Fernandez Martinez (Guest)
on 2013-01-15 22:45
(Received via mailing list)
Hi everyone,
the example says:

-- A block with 2 inputs (float and double) and 1 output --

std::vector<int> input_sizes;
input_sizes.push_back(sizeof(float));
input_sizes.push_back(sizeof(double));

gnuradio::block("my block",
    gr_make_io_signaturev(2, 2, input_sizes),
    gr_make_io_signature(1, 1, sizeof(float)))

I am kind of new to c++, so I am not sure where to put the definition of 
the vector
and the "input_sizes.push_back" in the .cc file.

Thanks for your attention :)


________________________________

Este documento puede contener informacin privilegiada o confidencial. 
Por tanto, usar esta informacin y sus anexos para propsitos ajenos a los 
de la Universidad Icesi, divulgarla a personas a las cuales no se 
encuentre destinado este correo o reproducirla total o parcialmente, se 
encuentra prohibido en virtud de la legislacin vigente. La universidad 
no asumir responsabilidad sobre informacin, opiniones o criterios 
contenidos en este correo que no estn directamente relacionados con la 
Icesi. Si usted no es el destinatario autorizado o por error recibe este 
mensaje, por favor informe al remitente y posteriormente brrelo de su 
sistema sin conservar copia del mismo.
Posted by Josh Blum (Guest)
on 2013-01-15 22:51
(Received via mailing list)
On 01/15/2013 03:44 PM, Juan Daniel Fernandez Martinez wrote:
> Hi everyone,
> the example says:
>
> -- A block with 2 inputs (float and double) and 1 output --
>

make a static function get_input_sizes() that returns this:

> std::vector<int> input_sizes;
> input_sizes.push_back(sizeof(float));
> input_sizes.push_back(sizeof(double));
>

replace input_sizes with get_input_sizes()
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.