GNU Radio Manual and C++ API Reference  3.10.9.1
The Free & Open Software Radio Ecosystem
rotator_cc.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2014 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_ROTATOR_CC_H
12 #define INCLUDED_BLOCKS_ROTATOR_CC_H
13 
14 #include <gnuradio/blocks/api.h>
15 #include <gnuradio/sync_block.h>
16 
17 namespace gr {
18 namespace blocks {
19 
20 /*!
21  * \brief Complex rotator
22  * \ingroup math_operators_blk
23  *
24  * \details
25  *
26  * Rotates an input complex sequence using a complex exponential in the form of
27  * exp(1j * phase_inc * n), where "phase_inc" is a chosen phase increment in
28  * radians and "n" is the sample index.
29  *
30  * Message Ports:
31  *
32  * - cmd (input):
33  * Receives a PMT dictionary with a command message to set a new phase
34  * increment on the rotator at a specified sample offset. The new increment
35  * must be provided as a PMT double on a key named "inc". The target sample
36  * offset on which to update the phase increment must be given as a PMT
37  * uint64 (with the absolute output item number) on a key named
38  * "offset". Unlike the "inc" key, the "offset" key is optional. When not
39  * provided, the rotator updates its phase increment immediately.
40  */
41 class BLOCKS_API rotator_cc : virtual public sync_block
42 {
43 public:
44  // gr::blocks::rotator_cc::sptr
45  typedef std::shared_ptr<rotator_cc> sptr;
46 
47  /*!
48  * \brief Make a complex rotator block
49  * \param phase_inc rotational velocity
50  * \param tag_inc_updates Tag the sample where a phase increment update is
51  * applied following the reception of a control
52  * message received via the input message port.
53  */
54  static sptr make(double phase_inc = 0.0, bool tag_inc_updates = false);
55 
56  virtual void set_phase_inc(double phase_inc) = 0;
57 };
58 
59 } /* namespace blocks */
60 } /* namespace gr */
61 
62 #endif /* INCLUDED_BLOCKS_ROTATOR_CC_H */
Complex rotator.
Definition: rotator_cc.h:42
static sptr make(double phase_inc=0.0, bool tag_inc_updates=false)
Make a complex rotator block.
virtual void set_phase_inc(double phase_inc)=0
std::shared_ptr< rotator_cc > sptr
Definition: rotator_cc.h:45
synchronous 1:1 input to output with history
Definition: sync_block.h:26
#define BLOCKS_API
Definition: gr-blocks/include/gnuradio/blocks/api.h:18
GNU Radio logging wrapper.
Definition: basic_block.h:29