Hi Nikita,

I'll jump into the general_work method here, directly:


        switch(d_state) {
        case SEARCH: {
                int i;
                for(i = 0; i < ninput; i++) {
                        if(in_cor[i] > d_threshold) {
                                if(d_plateau < MIN_PLATEAU) {
                                        d_plateau++;

                                } else {
                                        d_state = COPY;
…                                       break;
                                }
…               }
                consume_each(i);
                return 0;
        }
        case COPY: {
                int o = 0;
                while( o < ninput && o < noutput && d_copied < MAX_SAMPLES) {
                        if(in_cor[o] > d_threshold) {
                                if(d_plateau < MIN_PLATEAU) {
                                        d_plateau++;

                                // there's another frame
                                } else if(d_copied > MIN_GAP) {
                                        d_copied = 0;
                                        d_plateau = 0;
…                                       break;
                                }
…
                        out[o] = in[o] * exp(gr_complex(0, -d_freq_offset * 
d_copied));
                        o++;
                        d_copied++;
                }

                if(d_copied == MAX_SAMPLES) {
                        d_state = SEARCH;
                }
…
                consume_each(o);
                return o;
        }
        }

So, this is a pretty classical state machine approach: at every call of
general_work, the block is in either the COPY or the SEARCH state. We
only care about whether COPY also does a search operation, and, lo:

                        if(d_plateau < MIN_PLATEAU) {
                                        d_plateau++;

                                // there's another frame
                                } else if(d_copied > MIN_GAP) {
                                        d_copied = 0;
                                        d_plateau = 0;

is exactly that.

Best regards,
Marcus


On 12.04.2017 12:12, Nikita Airee wrote:
> Hello everyone,
>
> I was trying to understand how the synchronization in gr-ieee802-11
> actually works and went through:
>
> Bastian Bloessl, Michele Segata, Christoph Sommer and Falko Dressler,
> "An IEEE 802.11a/g/p OFDM Receiver for GNU Radio" 
>
> However, it seems that the Short Sync and many other blocks have
> developed further since then.
>
> From what I understand, the current sync_short.cc does the following:
>
> 1) searches for the peak normalized correlator o/p and compares with
> the set threshold
> 2) as enough number of simultaneous peaks are detected in correlator
> o/p, it moves onto the copy stage
>
> Here is where my doubt lies. Does the block keep looking for new
> frames while the old one is being copied? Also, what is MIN_GAP's
> function in the code and how is its value decided upon?
>
> Could you please clear up these doubts a little?
>
> Bests,
> Nikita Airee
>
>
>
>
> _______________________________________________
> Discuss-gnuradio mailing list
> [email protected]
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

_______________________________________________
Discuss-gnuradio mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to