discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] Duplicate Packet Header Generator block


From: Alice Lo Valvo
Subject: Re: [Discuss-gnuradio] Duplicate Packet Header Generator block
Date: Tue, 5 Dec 2017 11:51:09 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0

Thank you!

It works!


Il 05/12/2017 11:32, Michael Dickens ha scritto:
Hi Alice - I'll try to address this 2nd issue, with the bad_weak_ptr.

When you have non-block classes that includes a base & children, you have to inform SWIG how to deal with the base and/or inheriting class (if I recall: technically for the destructor, but that's not the error & the SWIG code isn't obvious either). If you copy the 5 lines & tweak that section of code found in < https://github.com/gnuradio/gnuradio/blob/master/gr-digital/swig/packet_header.i > to read as needed for your class into your OOT's main SWIG file, it should fix the issue.

Hope this helps! - MLD

On Tue, Dec 5, 2017, at 05:09 AM, Alice Lo Valvo wrote:

I understood that my new block packet_header_gen (copy of packet_header_generator) wants gr::ofdm_allocator::packet_header_default_alix::sptr const &,std::string const &,

but header_formatter = digital.packet_header_ofdm((variable_0,), 1, length_tag_key, "frame_len", "packet_num",1,1,False) and packet_header_ofdm uses gr::digital::packet_header_default.
For this reason, I duplicate packet_header_ofdm in my project that uses gr::ofdm_allocator::packet_header_default_alix.
The error is this now:
Param - Formatter Object(header_formatter):
    Value "header_formatter.formatter()" cannot be evaluated:
    tr1::bad_weak_ptr
I searched this error on google, and I understood that it is related with shared_from_this.
Any ideas?

Thank you in advance,



reply via email to

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