GNU Radio Manual and C++ API Reference 3.8.5.0
The Free & Open Software Radio Ecosystem
 
Loading...
Searching...
No Matches
cpmmod_bc.h
Go to the documentation of this file.
1/* -*- c++ -*- */
2/*
3 * Copyright 2010,2012 Free Software Foundation, Inc.
4 *
5 * This file is part of GNU Radio
6 *
7 * GNU Radio is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 3, or (at your option)
10 * any later version.
11 *
12 * GNU Radio is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with GNU Radio; see the file COPYING. If not, write to
19 * the Free Software Foundation, Inc., 51 Franklin Street,
20 * Boston, MA 02110-1301, USA.
21 */
22
23#ifndef INCLUDED_DIGITAL_CPMMOD_BC_H
24#define INCLUDED_DIGITAL_CPMMOD_BC_H
25
26#include <gnuradio/analog/cpm.h>
29
30namespace gr {
31namespace digital {
32
33/*!
34 * \brief Generic CPM modulator
35 * \ingroup modulators_blk
36 *
37 * \details
38 * Examples:
39 * - Setting h = 0.5, L = 1, type = LREC yields MSK.
40 * - Setting h = 0.5, type = GAUSSIAN and beta = 0.3 yields GMSK
41 * as used in GSM.
42 *
43 * The input of this block are symbols from an M-ary alphabet
44 * +/-1, +/-3, ..., +/-(M-1). Usually, M = 2 and therefore, the
45 * valid inputs are +/-1.
46 * The modulator will silently accept any other inputs, though.
47 * The output is the phase-modulated signal.
48 */
49class DIGITAL_API cpmmod_bc : virtual public hier_block2
50{
51public:
52 // gr::digital::cpmmod_bc::sptr
53 typedef boost::shared_ptr<cpmmod_bc> sptr;
54
55 /*!
56 * Make CPM modulator block.
57 *
58 * \param type The modulation type. Can be one of LREC, LRC, LSRC, TFM
59 * or GAUSSIAN. See gr_cpm::phase_response() for a
60 * detailed description.
61 * \param h The modulation index. \f$ h \cdot \pi\f$ is the maximum
62 * phase change that can occur between two symbols, i.e., if
63 * you only send ones, the phase will increase by \f$ h \cdot
64 * \pi\f$ every \p samples_per_sym samples. Set this to 0.5
65 * for Minimum Shift Keying variants.
66 * \param samples_per_sym Samples per symbol.
67 * \param L The length of the phase duration in symbols. For L=1, this
68 * yields full- response CPM symbols, for L > 1,
69 * partial-response.
70 * \param beta For LSRC, this is the rolloff factor. For Gaussian
71 * pulses, this is the 3 dB time-bandwidth product.
72 */
74 float h,
75 int samples_per_sym,
76 int L,
77 double beta = 0.3);
78
79 /*!
80 * Make GMSK modulator block.
81 *
82 * The type is GAUSSIAN and the modulation index for GMSK is
83 * 0.5. This are populated automatically by this factory
84 * function.
85 *
86 * \param samples_per_sym Samples per symbol.
87 * \param L The length of the phase duration in symbols. For L=1, this
88 * yields full- response CPM symbols, for L > 1,
89 * partial-response.
90 * \param beta For LSRC, this is the rolloff factor. For Gaussian
91 * pulses, this is the 3 dB time-bandwidth product.
92 */
93 static sptr make_gmskmod_bc(int samples_per_sym = 2, int L = 4, double beta = 0.3);
94
95 //! Return the phase response FIR taps
96 virtual std::vector<float> taps() const = 0;
97
98 //! Return the type of CPM modulator
99 virtual int type() const = 0;
100
101 //! Return the modulation index of the modulator.
102 virtual float index() const = 0;
103
104 //! Return the number of samples per symbol
105 virtual int samples_per_sym() const = 0;
106
107 //! Return the length of the phase duration (in symbols)
108 virtual int length() const = 0;
109
110 //! Return the value of beta for the modulator
111 virtual double beta() const = 0;
112};
113
114} /* namespace digital */
115} /* namespace gr */
116
117#endif /* INCLUDED_DIGITAL_CPMMOD_BC_H */
cpm_type
Definition cpm.h:37
Generic CPM modulator.
Definition cpmmod_bc.h:50
virtual double beta() const =0
Return the value of beta for the modulator.
virtual int type() const =0
Return the type of CPM modulator.
virtual std::vector< float > taps() const =0
Return the phase response FIR taps.
static sptr make_gmskmod_bc(int samples_per_sym=2, int L=4, double beta=0.3)
virtual int length() const =0
Return the length of the phase duration (in symbols)
static sptr make(analog::cpm::cpm_type type, float h, int samples_per_sym, int L, double beta=0.3)
boost::shared_ptr< cpmmod_bc > sptr
Definition cpmmod_bc.h:53
virtual int samples_per_sym() const =0
Return the number of samples per symbol.
virtual float index() const =0
Return the modulation index of the modulator.
Hierarchical container class for gr::block's and gr::hier_block2's.
Definition hier_block2.h:46
#define DIGITAL_API
Definition gr-digital/include/gnuradio/digital/api.h:30
GNU Radio logging wrapper for log4cpp library (C++ port of log4j)
Definition basic_block.h:46