GNU Radio C++ API Reference: complex_to_interleaved_short.h Source File

| GNU Radio C++ API Reference 3.10.12.0 The Free & Open Software Radio Ecosystem |

Loading...
Searching...
No Matches
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>
15#include <gnuradio/sync_interpolator.h>
16
17namespace gr {
18namespace 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 */
33 class BLOCKS_API complex_to_interleaved_short : virtual public sync_interpolator
34{
35public:
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 */
gr::blocks::complex_to_interleaved_short
Convert stream of complex to a stream of interleaved shorts.
Definition complex_to_interleaved_short.h:34
gr::blocks::complex_to_interleaved_short::set_scale_factor
virtual void set_scale_factor(float new_value)=0
gr::blocks::complex_to_interleaved_short::sptr
std::shared_ptr< complex_to_interleaved_short > sptr
Definition complex_to_interleaved_short.h:37
gr::blocks::complex_to_interleaved_short::make
static sptr make(bool vector=false, float scale_factor=1.0f)
gr::sync_interpolator::sync_interpolator
sync_interpolator(void)
Definition sync_interpolator.h:31
api.h
BLOCKS_API
#define BLOCKS_API
Definition gr-blocks/include/gnuradio/blocks/api.h:18
gr::blocks
Definition abs_blk.h:20
gr
GNU Radio logging wrapper.
Definition basic_block.h:29
sync_interpolator.h