discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] Softbits in gr-ieee 802.11 ?


From: Bastian Bloessl
Subject: Re: [Discuss-gnuradio] Softbits in gr-ieee 802.11 ?
Date: Sun, 21 Jan 2018 10:42:20 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0

Hi,

On 01/19/2018 10:30 PM, sumit kumar wrote:
Hi Michael, Yes I just made one and pushed everything.

https://github.com/sumitstop/MTSDR-gnuradio/commits/master

https://github.com/sumitstop/MTSDR-gr-ieee-80211/commits/master

I didn't test it, but I think you should declare the function virtual.

Best,
Bastian



My changes are in latest commit.

Thanks

On 19 January 2018 at 19:50, Michael Dickens <address@hidden <mailto:address@hidden>> wrote:

    __
    Hi sumit - Do you have a public repo, e.g. on GitHub, that we can
    review. It's virtually impossible to debug C++ issues like this
    without having the code. What you want to do is very possible; just
    a matter of getting all the methods in place precisely. - MLD

    On Fri, Jan 19, 2018, at 10:20 AM, sumit kumar wrote:
    hi..so it is not working somehow. Both builds were successful i.e.
    gnuradio build with the modifications and gr-ieee-80211 build with
    modifications.

    gnuradio recognizes my new function as a method of
    constellation_bpsk_sptr as you can see in the ipython screenshot



    However gr-ieee 80211 doesnt see it as you can see in the
    screenshot below. It sees only the decision_maker



    Please give me some more pointers to solve this



    On 19 January 2018 at 15:38, sumit kumar <address@hidden
    <mailto:address@hidden>> wrote:

        Ok a correction

        I declared it like this inside the constellations.h , now I am
        waiting for the compilation to finish

            class DIGITAL_API constellation_bpsk : public constellation
            {
            public:
              typedef boost::shared_ptr<constellation_bpsk> sptr;

              // public constructor
              static sptr make();

              ~constellation_bpsk();


              unsigned int decision_maker(const gr_complex *sample);
        *float decision_maker_soft(const gr_complex *sample);*


            protected:
              constellation_bpsk();
            };

        On 19 January 2018 at 15:08, sumit kumar <address@hidden
        <mailto:address@hidden>> wrote:

            Ok, so shall I do like this :

            In the file
            /gnuradio/gr-digital/include/gnuradio/digital/constellations.h
            under public section I declare my function as follows

            *class DIGITAL_API constellation*
            *      : public boost::enable_shared_from_this<constellation>*
            *    {*
            *    public:*
            **
            *float decision_maker_soft(const gr_complex *sample) = 0;*
            **
            *}*

            and In the file /gnuradio/gr-digital/lib/constellations.cc
            I add this

            *    float*
            *    constellation_bpsk::decision_maker_soft(const
            gr_complex *sample)*
            *    {*
            *      return (-4*real(*sample)); // LLR for BPSK*
            *    }*


            After this I recompile gnuradio and then recompile
            gr-ieee-80211.. right ?

            On 19 January 2018 at 14:51, Michael Dickens
            <address@hidden
            <mailto:address@hidden>> wrote:

                __
                The GR constellation programming uses a base class
                that defines the API that will be SWIG-ified back into
                Python. So the base class must contain your
                "*decision_maker_soft" *method. Then you overload it
                for any inheriting class such as "constellation_bpsk".
                Hope this helps! - MLD


                On Fri, Jan 19, 2018, at 8:43 AM, sumit kumar wrote:
                Actually I have to test it in a interference limited
                environment, I guess the soft demodulate will be
                needed. I saw your blog post about how you cleverly
                used your won constellations
                https://www.bastibl.net/constellation-objects/
                <https://www.bastibl.net/constellation-objects/>

                However when I try doing something like that, I get
                errors.

                For example, I defined my own function
                decision_maker_soft inside constellations_impl.h as
                follows

                class constellation_bpsk_impl : public constellation_bpsk
                {
                public:
                constellation_bpsk_impl();
                ~constellation_bpsk_impl();

                unsigned int decision_maker(const gr_complex *sample);
                *float decision_maker_soft(const gr_complex *sample);*
                };

                and then defined it in constellation_impl.cc as

                float
                constellation_bpsk_impl::decision_maker_soft(const
                gr_complex *sample) {
                return (-4*real(*sample));
                }

                But when I call my function like this

                mod->decision_maker_soft from ls.cc (least square
                equalizer cc file), it says mod object has no member
                decision_maker_soft

                Why does *mod* object not look my decision_maker_soft
                as it is a method of constellation_bpsk_impl ??

                What am I missing here ?

                I thought that mod object is looking your
                decision_maker inside constellations_impl, it shud
                see mine too...





-- Sumit Kumar





-- Sumit Kumar





-- Sumit Kumar





--
Sumit Kumar





reply via email to

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