discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] Make Errors with Out of Tree Block


From: Martin Braun
Subject: Re: [Discuss-gnuradio] Make Errors with Out of Tree Block
Date: Sat, 10 May 2014 14:49:11 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0

On 05/10/2014 12:34 AM, Jonathan Fox wrote:
> I have an energy detector block and I am trying to gr_message with it:
> 
>     void energy_detector_sink_f_impl::send_to_message_q(float *buffer,
> int buffersz) {
>         gr_message_sprt msg = gr_make_message(0, sizeof(float),
> buffersz, sizeof(float)*buffersz);
>         memcpy(msg->msg(), buffer, sizeof(float) * buffersz);
>         d_msgq->insert_tail(msg);
>     }
> 
> and I get this error when I run the "make" command
> 
> /home/fox/git_repos/custom_modules/gr-specsense/lib/energy_detector_sink_f_impl.cc:
> In member function ‘void
> gr::specsense::energy_detector_sink_f_impl::send_to_message_q(float*, int)’:
> /home/fox/git_repos/custom_modules/gr-specsense/lib/energy_detector_sink_f_impl.cc:134:
> error: ‘gr_message_sprt’ was not declared in this scope
> /home/fox/git_repos/custom_modules/gr-specsense/lib/energy_detector_sink_f_impl.cc:134:
> error: expected ‘;’ before ‘msg’
> /home/fox/git_repos/custom_modules/gr-specsense/lib/energy_detector_sink_f_impl.cc:135:
> error: ‘msg’ was not declared in this scope
> make[2]: ***
> [lib/CMakeFiles/gnuradio-specsense.dir/energy_detector_sink_f_impl.cc.o]
> Error 1
> make[1]: *** [lib/CMakeFiles/gnuradio-specsense.dir/all] Error 2
> 
> What am I doing wrong here? I thought msg is getting declared with
> gr_message_sptr msg =

Maybe a sign to move away from message queues? :D

In any case, you have a typo in the code. Fix it and your errors should
go away.

M



reply via email to

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