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 =

Thanks

Jon

PS I attached the C++ code to be through.

Attachment: energy_detector_sink_f_impl.cc
Description: Binary data

_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to