Monday, September 26, 2016

Re: [Discuss-gnuradio] Equalizer derived from ofdm_equalizer_1d_pilots: .base() not found.

So, I've tried the following:

1) Derive a class from ofdm_equalizer_base
2) Add the function get_base_ptr() to the derived class. This function returns a pointer to the derived class

Now, In grc, when passing the equalizer to ofdm_frame_equalizer_vcvc I've got the following error:

Param - Equalizer(equalizer):
    Value "payload_equalizer.get_base_ptr()" cannot be evaluated:
    tr1::bad_weak_ptr

I've looked for information about this error, and it seems that it appears when using shared_from_this() on an object which has no shared_ptr pointing to it. However, In my understanding, when the equalizer is created (function make), a shared_ptr is created.

Here my get_base_ptr() function:

    sptr get_base_ptr()
    {
      return boost::enable_shared_from_this<ofdm_my_equalizer>::shared_from_this();
    }

Any ideas?

Oscar

On Thu, Sep 22, 2016 at 12:16 PM, Oscar Sánchez <odsanchezg@gmail.com> wrote:
Hi all,

I'm testing some equalizers for OFDM. Thus, I've derived from ofdm_equalizer_1d_pilots so that I can then pass it to ofdm_frame_equalizer_vcvc.

By following this:

 http://gnuradio.org/redmine/projects/gnuradio/wiki/OutOfTreeModulesConfig

in CMakeLists.txt I have changed the line:

set(GR_REQUIRED_COMPONENTS RUNTIME)

to:

set(GR_REQUIRED_COMPONENTS RUNTIME DIGITAL)

In this way I'm able to compile and install my module correctly: grc recognizes my new equalizer.

However, when passing it to ofdm_frame_equalizer_vcvc, I've got the following error:

Param - Equalizer(equalizer):
    Value "payload_equalizer.base()" cannot be evaluated:
    'ofdm_my_equalizer' object has no attribute 'base'

But couldn't make it work in my case.

Regarding namespace, do I have to include "digital"? I was only able to compile with the following order:

namespace gr {
  namespace digital {
    namespace myofdm {

Could this be a source of problems?

Thanks in advance,

Oscar

No comments:

Post a Comment