GNU Radio 3.6.5.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 
31 class gr_complex_to_real;
32 class gr_complex_to_imag;
33 class gr_complex_to_mag;
35 class gr_complex_to_arg;
36 
43 
50 
51 /*!
52  * \brief convert a stream of gr_complex to 1 or 2 streams of float
53  * \param vlen vector len (default 1)
54  */
56 {
58  gr_complex_to_float (unsigned int vlen);
59 
60  unsigned int d_vlen;
61 
62  public:
63  virtual int work (int noutput_items,
64  gr_vector_const_void_star &input_items,
65  gr_vector_void_star &output_items);
66 };
67 
68 /*!
69  * \brief complex in, real out (float)
70  * \param vlen vector len (default 1)
71  */
73 {
75  gr_complex_to_real (unsigned int vlen);
76 
77  unsigned int d_vlen;
78 
79  public:
80  virtual int work (int noutput_items,
81  gr_vector_const_void_star &input_items,
82  gr_vector_void_star &output_items);
83 };
84 
85 /*!
86  * \brief complex in, imaginary out (float)
87  * \param vlen vector len (default 1)
88  */
90 {
92  gr_complex_to_imag (unsigned int vlen);
93 
94  unsigned int d_vlen;
95 
96  public:
97  virtual int work (int noutput_items,
98  gr_vector_const_void_star &input_items,
99  gr_vector_void_star &output_items);
100 };
101 
102 /*!
103  * \brief complex in, magnitude out (float)
104  * \param vlen vector len (default 1)
105  */
107 {
109  gr_make_complex_to_mag (unsigned int vlen);
110  gr_complex_to_mag (unsigned int vlen);
111 
112  unsigned int d_vlen;
113 
114  public:
115  virtual int work (int noutput_items,
116  gr_vector_const_void_star &input_items,
117  gr_vector_void_star &output_items);
118 };
119 
120 /*!
121  * \brief complex in, magnitude squared out (float)
122  * \param vlen vector len (default 1)
123  */
125 {
127  gr_complex_to_mag_squared (unsigned int vlen);
128 
129  unsigned int d_vlen;
130 
131  public:
132  virtual int work (int noutput_items,
133  gr_vector_const_void_star &input_items,
134  gr_vector_void_star &output_items);
135 };
136 
137 /*!
138  * \brief complex in, angle out (float)
139  * \param vlen vector len (default 1)
140  */
142 {
143  friend GR_CORE_API gr_complex_to_arg_sptr gr_make_complex_to_arg (unsigned int vlen);
144  gr_complex_to_arg (unsigned int vlen);
145 
146  unsigned int d_vlen;
147 
148  public:
149  virtual int work (int noutput_items,
150  gr_vector_const_void_star &input_items,
151  gr_vector_void_star &output_items);
152 };
153 
154 #endif /* INCLUDED_GR_COMPLEX_TO_XXX_H */