GNU Radio 3.6.3.1 C++ API
gr_complex_to_xxx.h
Go to the documentation of this file.
1
/* -*- c++ -*- */
2
/*
3
* Copyright 2004 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_GR_COMPLEX_TO_XXX_H
24
#define INCLUDED_GR_COMPLEX_TO_XXX_H
25
26
#include <
gr_core_api.h
>
27
#include <
gr_sync_block.h
>
28
#include <
gr_complex.h
>
29
30
class
gr_complex_to_float
;
31
class
gr_complex_to_real
;
32
class
gr_complex_to_imag
;
33
class
gr_complex_to_mag
;
34
class
gr_complex_to_mag_squared
;
35
class
gr_complex_to_arg
;
36
37
typedef
boost::shared_ptr<gr_complex_to_float>
gr_complex_to_float_sptr
;
38
typedef
boost::shared_ptr<gr_complex_to_real>
gr_complex_to_real_sptr
;
39
typedef
boost::shared_ptr<gr_complex_to_imag>
gr_complex_to_imag_sptr
;
40
typedef
boost::shared_ptr<gr_complex_to_mag>
gr_complex_to_mag_sptr
;
41
typedef
boost::shared_ptr<gr_complex_to_mag_squared>
gr_complex_to_mag_squared_sptr
;
42
typedef
boost::shared_ptr<gr_complex_to_arg>
gr_complex_to_arg_sptr
;
43
44
GR_CORE_API
gr_complex_to_float_sptr
gr_make_complex_to_float
(
unsigned
int
vlen=1);
45
GR_CORE_API
gr_complex_to_real_sptr
gr_make_complex_to_real
(
unsigned
int
vlen=1);
46
GR_CORE_API
gr_complex_to_imag_sptr
gr_make_complex_to_imag
(
unsigned
int
vlen=1);
47
GR_CORE_API
gr_complex_to_mag_sptr
gr_make_complex_to_mag
(
unsigned
int
vlen=1);
48
GR_CORE_API
gr_complex_to_mag_squared_sptr
gr_make_complex_to_mag_squared
(
unsigned
int
vlen=1);
49
GR_CORE_API
gr_complex_to_arg_sptr
gr_make_complex_to_arg
(
unsigned
int
vlen=1);
50
51
/*!
52
* \brief convert a stream of gr_complex to 1 or 2 streams of float
53
* \ingroup converter_blk
54
* \param vlen vector len (default 1)
55
*/
56
class
GR_CORE_API
gr_complex_to_float
:
public
gr_sync_block
57
{
58
friend
GR_CORE_API
gr_complex_to_float_sptr
gr_make_complex_to_float
(
unsigned
int
vlen);
59
gr_complex_to_float
(
unsigned
int
vlen);
60
61
unsigned
int
d_vlen;
62
63
public
:
64
virtual
int
work
(
int
noutput_items,
65
gr_vector_const_void_star
&input_items,
66
gr_vector_void_star
&output_items);
67
};
68
69
/*!
70
* \brief complex in, real out (float)
71
* \ingroup converter_blk
72
* \param vlen vector len (default 1)
73
*/
74
class
GR_CORE_API
gr_complex_to_real
:
public
gr_sync_block
75
{
76
friend
GR_CORE_API
gr_complex_to_real_sptr
gr_make_complex_to_real
(
unsigned
int
vlen);
77
gr_complex_to_real
(
unsigned
int
vlen);
78
79
unsigned
int
d_vlen;
80
81
public
:
82
virtual
int
work
(
int
noutput_items,
83
gr_vector_const_void_star
&input_items,
84
gr_vector_void_star
&output_items);
85
};
86
87
/*!
88
* \brief complex in, imaginary out (float)
89
* \ingroup converter_blk
90
* \param vlen vector len (default 1)
91
*/
92
class
GR_CORE_API
gr_complex_to_imag
:
public
gr_sync_block
93
{
94
friend
GR_CORE_API
gr_complex_to_imag_sptr
gr_make_complex_to_imag
(
unsigned
int
vlen);
95
gr_complex_to_imag
(
unsigned
int
vlen);
96
97
unsigned
int
d_vlen;
98
99
public
:
100
virtual
int
work
(
int
noutput_items,
101
gr_vector_const_void_star
&input_items,
102
gr_vector_void_star
&output_items);
103
};
104
105
/*!
106
* \brief complex in, magnitude out (float)
107
* \ingroup converter_blk
108
* \param vlen vector len (default 1)
109
*/
110
class
GR_CORE_API
gr_complex_to_mag
:
public
gr_sync_block
111
{
112
friend
GR_CORE_API
gr_complex_to_mag_sptr
113
gr_make_complex_to_mag
(
unsigned
int
vlen);
114
gr_complex_to_mag
(
unsigned
int
vlen);
115
116
unsigned
int
d_vlen;
117
118
public
:
119
virtual
int
work
(
int
noutput_items,
120
gr_vector_const_void_star
&input_items,
121
gr_vector_void_star
&output_items);
122
};
123
124
/*!
125
* \brief complex in, magnitude squared out (float)
126
* \ingroup converter_blk
127
* \param vlen vector len (default 1)
128
*/
129
class
GR_CORE_API
gr_complex_to_mag_squared
:
public
gr_sync_block
130
{
131
friend
GR_CORE_API
gr_complex_to_mag_squared_sptr
gr_make_complex_to_mag_squared
(
unsigned
int
vlen);
132
gr_complex_to_mag_squared
(
unsigned
int
vlen);
133
134
unsigned
int
d_vlen;
135
136
public
:
137
virtual
int
work
(
int
noutput_items,
138
gr_vector_const_void_star
&input_items,
139
gr_vector_void_star
&output_items);
140
};
141
142
/*!
143
* \brief complex in, angle out (float)
144
* \ingroup converter_blk
145
* \param vlen vector len (default 1)
146
*/
147
class
GR_CORE_API
gr_complex_to_arg
:
public
gr_sync_block
148
{
149
friend
GR_CORE_API
gr_complex_to_arg_sptr
gr_make_complex_to_arg
(
unsigned
int
vlen);
150
gr_complex_to_arg
(
unsigned
int
vlen);
151
152
unsigned
int
d_vlen;
153
154
public
:
155
virtual
int
work
(
int
noutput_items,
156
gr_vector_const_void_star
&input_items,
157
gr_vector_void_star
&output_items);
158
};
159
160
#endif
/* INCLUDED_GR_COMPLEX_TO_XXX_H */
gnuradio
gnuradio-core
src
lib
general
gr_complex_to_xxx.h
Generated by
1.8.1.2