GNU Radio Manual and C++ API Reference  3.10.9.1
The Free & Open Software Radio Ecosystem
complex_to_interleaved_short.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 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_BLOCKS_COMPLEX_TO_INTERLEAVED_SHORT_H
12 #define INCLUDED_BLOCKS_COMPLEX_TO_INTERLEAVED_SHORT_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 shorts.
22  * \ingroup type_converters_blk
23  *
24  * \details
25  * The output stream contains shorts with twice as many output
26  * items as input items. For every complex input item, we produce
27  * two output shorts that contain the real part and imaginary part
28  * converted to shorts:
29  *
30  * \li output[0][n] = static_cast<short>(input[0][m].real());
31  * \li output[0][n+1] = static_cast<short>(input[0][m].imag());
32  */
34 {
35 public:
36  // gr::blocks::complex_to_interleaved_short::sptr
37  typedef std::shared_ptr<complex_to_interleaved_short> sptr;
38 
39  /*!
40  * Build a complex to interleaved shorts 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_SHORT_H */
Convert stream of complex to a stream of interleaved shorts.
Definition: complex_to_interleaved_short.h:34
virtual void set_scale_factor(float new_value)=0
std::shared_ptr< complex_to_interleaved_short > sptr
Definition: complex_to_interleaved_short.h:37
static sptr make(bool vector=false, float scale_factor=1.0f)
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