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 18:03:05 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0

Hi David,
yes, your .cc verified: your C++ was just syntactically incorrect:

       void set_output_multiple(int tamano + n);

won't work. To call a method or function, you don't use it's full
signature, but just its name with the parameters filled in, so that line
must read
    set_output_multiple(tamano+n);

and you should then not implement a output_multiple nested function
(this won't have any effect, by the way).
> Also, I set:   int n;
>       ninput_items_required[0] = noutput_items - n;
This will define a local variable "n" which hides the parameter "n" that
you get; remove the "int n;" line! If you need "n" to be saved from your
constructors call, you must define it in the header and assign the
class's "n" in the constructor. You do that wrong for "tamano", too.

To be completely honest, you seem to be a little lost when it comes to
C++; maybe you should look a bit harder at how other blocks in GNU
Radio's source code tree do that (you can use "grep -r 'pattern' ." in
your GNU Radio source code tree to find things like occurences of
set_output_multiple) and more importantly read a C++ tutorial before
diving right into GNU Radio.

Best regards,
Marcus
On 06/15/2015 05:23 PM, dcardona wrote:
> Hello Marcus
>
> Thank you for your response
>
> Before, I was setting the set_output_multiple at the constructor in the .cc
> file and i was getting the error I said before 
> Then, I set it in the .h file and I had no error.
>
> Is it correct to set it in the .h file? Here are both the .cc and the . h
> files. 
>
> In the .cc file, the set_output_multiple is commented.
>
> Codificador_bf_impl.h
> <http://gnuradio.4.n7.nabble.com/file/n54187/Codificador_bf_impl.h>  
> Codificador_bf_impl.cc
> <http://gnuradio.4.n7.nabble.com/file/n54187/Codificador_bf_impl.cc>  
>
> Also, I set:   int n;
>       ninput_items_required[0] = noutput_items - n;
> at the forecast method. I did this for the reason i explained before; If i
> have for example 16 items at the in put, i need to have 16 + n items at the
> output. Is this configured right?
>
> Another question: This is about the ninput_items.  How should I set it for
> my requirements? I suppose this ninput_items should depend of "tamano",
> which is the size of the input stream.
> Should I use ninput_items instead of tamano in the code? And if this right,
> should I set set_output_multiple(int ninput_items + n) instead of
> set_output_multiple(int tamano + n)?
>
> PD: In the .cc file you can take a look at the c++ code for the chaotic
> coding if you like. And if you are interested, i can send you the c++ code
> that gives those values of "zmean3", "zmean6", "secuencias3" and
> "secuencias6" and the paper where the theory of this coding method is
> specified.
>
> Thank you very much.
>
> David
>
>
>
>
> --
> View this message in context: 
> http://gnuradio.4.n7.nabble.com/question-about-set-output-multiple-tp54173p54187.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]