GNU Radio C++ API Reference: cpmmod_bc.h Source File

| GNU Radio C++ API Reference 3.10.12.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 * SPDX-License-Identifier: GPL-3.0-or-later
8 *
9 */
10
11#ifndef INCLUDED_DIGITAL_CPMMOD_BC_H
12#define INCLUDED_DIGITAL_CPMMOD_BC_H
13
14#include <gnuradio/analog/cpm.h>
15#include <gnuradio/digital/api.h>
16#include <gnuradio/hier_block2.h>
17
18namespace gr {
19namespace digital {
20
21/*!
22 * \brief Generic CPM modulator
23 * \ingroup modulators_blk
24 *
25 * \details
26 * Examples:
27 * - Setting h = 0.5, L = 1, type = LREC yields MSK.
28 * - Setting h = 0.5, type = GAUSSIAN and beta = 0.3 yields GMSK
29 * as used in GSM.
30 *
31 * The input of this block are symbols from an M-ary alphabet
32 * +/-1, +/-3, ..., +/-(M-1). Usually, M = 2 and therefore, the
33 * valid inputs are +/-1.
34 * The modulator will silently accept any other inputs, though.
35 * The output is the phase-modulated signal.
36 */
37 class DIGITAL_API cpmmod_bc : virtual public hier_block2
38{
39public:
40 // gr::digital::cpmmod_bc::sptr
41 typedef std::shared_ptr<cpmmod_bc> sptr;
42
43 /*!
44 * Make CPM modulator block.
45 *
46 * \param type The modulation type. Can be one of LREC, LRC, LSRC, TFM
47 * or GAUSSIAN. See gr_cpm::phase_response() for a
48 * detailed description.
49 * \param h The modulation index. \f$ h \cdot \pi\f$ is the maximum
50 * phase change that can occur between two symbols, i.e., if
51 * you only send ones, the phase will increase by \f$ h \cdot
52 * \pi\f$ every \p samples_per_sym samples. Set this to 0.5
53 * for Minimum Shift Keying variants.
54 * \param samples_per_sym Samples per symbol.
55 * \param L The length of the phase duration in symbols. For L=1, this
56 * yields full- response CPM symbols, for L > 1,
57 * partial-response.
58 * \param beta For LSRC, this is the rolloff factor. For Gaussian
59 * pulses, this is the 3 dB time-bandwidth product.
60 */
61 static sptr make(analog::cpm::cpm_type type,
62 float h,
63 int samples_per_sym,
64 int L,
65 double beta = 0.3);
66
67 /*!
68 * Make GMSK modulator block.
69 *
70 * The type is GAUSSIAN and the modulation index for GMSK is
71 * 0.5. This are populated automatically by this factory
72 * function.
73 *
74 * \param samples_per_sym Samples per symbol.
75 * \param L The length of the phase duration in symbols. For L=1, this
76 * yields full- response CPM symbols, for L > 1,
77 * partial-response.
78 * \param beta For LSRC, this is the rolloff factor. For Gaussian
79 * pulses, this is the 3 dB time-bandwidth product.
80 */
81 static sptr make_gmskmod_bc(int samples_per_sym = 2, int L = 4, double beta = 0.3);
82
83 //! Return the phase response FIR taps
84 virtual std::vector<float> taps() const = 0;
85
86 //! Return the type of CPM modulator
87 virtual int type() const = 0;
88
89 //! Return the modulation index of the modulator.
90 virtual float index() const = 0;
91
92 //! Return the number of samples per symbol
93 virtual int samples_per_sym() const = 0;
94
95 //! Return the length of the phase duration (in symbols)
96 virtual int length() const = 0;
97
98 //! Return the value of beta for the modulator
99 virtual double beta() const = 0;
100};
101
102} /* namespace digital */
103} /* namespace gr */
104
105#endif /* INCLUDED_DIGITAL_CPMMOD_BC_H */
gr::analog::cpm::cpm_type
cpm_type
Definition cpm.h:25
gr::digital::cpmmod_bc
Generic CPM modulator.
Definition cpmmod_bc.h:38
gr::digital::cpmmod_bc::beta
virtual double beta() const =0
Return the value of beta for the modulator.
gr::digital::cpmmod_bc::type
virtual int type() const =0
Return the type of CPM modulator.
gr::digital::cpmmod_bc::taps
virtual std::vector< float > taps() const =0
Return the phase response FIR taps.
gr::digital::cpmmod_bc::make_gmskmod_bc
static sptr make_gmskmod_bc(int samples_per_sym=2, int L=4, double beta=0.3)
gr::digital::cpmmod_bc::length
virtual int length() const =0
Return the length of the phase duration (in symbols).
gr::digital::cpmmod_bc::make
static sptr make(analog::cpm::cpm_type type, float h, int samples_per_sym, int L, double beta=0.3)
gr::digital::cpmmod_bc::samples_per_sym
virtual int samples_per_sym() const =0
Return the number of samples per symbol.
gr::digital::cpmmod_bc::index
virtual float index() const =0
Return the modulation index of the modulator.
gr::digital::cpmmod_bc::sptr
std::shared_ptr< cpmmod_bc > sptr
Definition cpmmod_bc.h:41
gr::hier_block2::hier_block2
hier_block2()
cpm.h
api.h
DIGITAL_API
#define DIGITAL_API
Definition gr-digital/include/gnuradio/digital/api.h:18
hier_block2.h
gr::digital
Definition adaptive_algorithm.h:22
gr
GNU Radio logging wrapper.
Definition basic_block.h:29