GNU Radio's CDMA Package

Public Types | Public Member Functions | Static Public Member Functions | List of all members
gr::cdma::flag_gen Class Referenceabstract

This block either passes through the input stream (assumed to be zeros or ones) when its internal state is acq=1, or it outputs a stream of zeros with periodic ones (with given period) when its internal state is acq=0. More...

`#include <flag_gen.h>`

Inheritance diagram for gr::cdma::flag_gen:
[legend]

## Public Types
typedef boost::shared_ptr< flag_gen > | sptr

## Public Member Functions
virtual void | set_acq (int acq)=0

## Static Public Member Functions
static sptr | make (int period, int acq)
| Return a shared_ptr to a new instance of cdma::flag_gen. More...

## Detailed Description

This block either passes through the input stream (assumed to be zeros or ones) when its internal state is acq=1, or it outputs a stream of zeros with periodic ones (with given period) when its internal state is acq=0.

The purpose of this block is to be used right after the timing/frequency acquisition block. The timing/frequency acquisition block outputs a stream of 0s and 1s, with 1s indicating the begining of a cdma frame.
When the system is in acquisition mode (acq=1), the flag_gen block just passes through its input stream, which comes from the timing/frequency acquisition block.
When the system is in tracking mode (acq=0), the timing/frequency acquisition block is not supposed to produce any meaningful output flags. In this case, the flag_gen block produces periodical flags (with given period equal to the frame length) starting from the last flag produced by the timing/frequency acquisition block, in order to provide timing information for the remaining of the system.
For example, when period is 4 the input and output streams will look like:
acq:---—>111111000000000...
input:-—>010100000000000...
output:-->010100010001000...
where the first 1 in the input and output is for example due to a false acquisition.

## Member Typedef Documentation

## ◆ sptr

typedef boost::shared_ptr<flag_gen> gr::cdma::flag_gen::sptr

## Member Function Documentation

## ◆ make()

static sptr gr::cdma::flag_gen::make | ( | int | period,
|  | int | acq
| ) |  |
| static

Return a shared_ptr to a new instance of cdma::flag_gen.

To avoid accidental use of raw pointers, cdma::flag_gen's constructor is in a private implementation class. cdma::flag_gen::make is the public interface for creating new instances.

Parameters

  acq | the mode selector. Takes values {0, 1}.
  period | the period of output flags when acq=0.

## ◆ set_acq()

virtual void gr::cdma::flag_gen::set_acq | ( | int | acq | ) |
| pure virtual

Implemented in gr::cdma::flag_gen_impl.

The documentation for this class was generated from the following file:

- flag_gen.h