GNU Radio 3.6.5.1 C++ API
digital_cpmmod_bc.h
Go to the documentation of this file.
1
/* -*- c++ -*- */
2
/*
3
* Copyright 2010 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 <
digital_api.h
>
27
#include <
gr_hier_block2.h
>
28
#include <
gr_char_to_float.h
>
29
#include <gr_interp_fir_filter_fff.h>
30
#include <
gr_frequency_modulator_fc.h
>
31
#include <
gr_cpm.h
>
32
33
34
class
digital_cpmmod_bc
;
35
typedef
boost::shared_ptr<digital_cpmmod_bc>
digital_cpmmod_bc_sptr
;
36
37
38
DIGITAL_API
digital_cpmmod_bc_sptr
39
digital_make_cpmmod_bc
(
int
type,
float
h,
40
unsigned
samples_per_sym,
41
unsigned
L,
double
beta=0.3);
42
43
/*!
44
* \brief Generic CPM modulator
45
* \ingroup modulators_blk
46
*
47
* \details
48
* Examples:
49
* - Setting h = 0.5, L = 1, type = LREC yields MSK.
50
* - Setting h = 0.5, type = GAUSSIAN and beta = 0.3 yields GMSK
51
* as used in GSM.
52
*
53
* The input of this block are symbols from an M-ary alphabet
54
* +/-1, +/-3, ..., +/-(M-1). Usually, M = 2 and therefore, the
55
* valid inputs are +/-1.
56
* The modulator will silently accept any other inputs, though.
57
* The output is the phase-modulated signal.
58
*/
59
class
DIGITAL_API
digital_cpmmod_bc
:
public
gr_hier_block2
60
{
61
friend
DIGITAL_API
digital_cpmmod_bc_sptr
62
digital_make_cpmmod_bc
(
int
type,
float
h,
63
unsigned
samples_per_sym,
64
unsigned
L,
double
beta);
65
66
std::vector<float> d_taps;
67
gr_char_to_float_sptr
d_char_to_float;
68
gr_interp_fir_filter_fff_sptr d_pulse_shaper;
69
gr_frequency_modulator_fc_sptr
d_fm;
70
71
protected
:
72
/*!
73
* Build a generic CPM modulator block.
74
*
75
* \param type The modulation type. Can be one of LREC, LRC, LSRC, TFM
76
* or GAUSSIAN. See gr_cpm::phase_response() for a
77
* detailed description.
78
* \param h The modulation index. \f$ h \cdot \pi\f$ is the maximum
79
* phase change that can occur between two symbols, i.e., if
80
* you only send ones, the phase will increase by \f$ h \cdot
81
* \pi\f$ every \p samples_per_sym samples. Set this to 0.5
82
* for Minimum Shift Keying variants.
83
* \param samples_per_sym Samples per symbol.
84
* \param L The length of the phase duration in symbols. For L=1, this
85
* yields full- response CPM symbols, for L > 1,
86
* partial-response.
87
* \param beta For LSRC, this is the rolloff factor. For Gaussian
88
* pulses, this is the 3 dB time-bandwidth product.
89
*/
90
digital_cpmmod_bc
(
gr_cpm::cpm_type
type,
float
h,
91
unsigned
samples_per_sym,
92
unsigned
L,
double
beta);
93
94
public
:
95
//! Return the phase response FIR taps
96
std::vector<float>
get_taps
() {
return
d_taps; };
97
};
98
99
#endif
/* INCLUDED_DIGITAL_CPMMOD_BC_H */
100
gr-digital
include
digital_cpmmod_bc.h
Generated on Mon Aug 19 2013 15:37:30 for GNU Radio 3.6.5.1 C++ API by
1.8.1.2