GNU Radio Manual and C++ API Reference  3.10.9.1
The Free & Open Software Radio Ecosystem
complex_to_interleaved_char.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2015 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_BLOCKS_COMPLEX_TO_INTERLEAVED_CHAR_H
12 #define INCLUDED_BLOCKS_COMPLEX_TO_INTERLEAVED_CHAR_H
13 
14 #include <gnuradio/blocks/api.h>
16 
17 namespace gr {
18 namespace blocks {
19 
20 /*!
21  * \brief Convert stream of complex to a stream of interleaved chars.
22  * \ingroup type_converters_blk
23  *
24  * \details
25  * The output stream contains chars with twice as many output
26  * items as input items. For every complex input item, we produce
27  * two output chars that contain the real part and imaginary part
28  * converted to chars:
29  *
30  * \li output[0][n] = static_cast<char>(input[0][m].real());
31  * \li output[0][n+1] = static_cast<char>(input[0][m].imag());
32  */
34 {
35 public:
36  // gr::blocks::complex_to_interleaved_char::sptr
37  typedef std::shared_ptr<complex_to_interleaved_char> sptr;
38 
39  /*!
40  * Build a complex to interleaved chars block.
41  */
42  static sptr make(bool vector = false, float scale_factor = 1.0f);
43 
44  virtual void set_scale_factor(float new_value) = 0;
45 };
46 
47 } /* namespace blocks */
48 } /* namespace gr */
49 
50 #endif /* INCLUDED_BLOCKS_COMPLEX_TO_INTERLEAVED_CHAR_H */
Convert stream of complex to a stream of interleaved chars.
Definition: complex_to_interleaved_char.h:34
static sptr make(bool vector=false, float scale_factor=1.0f)
std::shared_ptr< complex_to_interleaved_char > sptr
Definition: complex_to_interleaved_char.h:37
virtual void set_scale_factor(float new_value)=0
synchronous 1:N input to output with history
Definition: sync_interpolator.h:26
#define BLOCKS_API
Definition: gr-blocks/include/gnuradio/blocks/api.h:18
GNU Radio logging wrapper.
Definition: basic_block.h:29