GNU Radio Manual and C++ API Reference  3.10.9.1
The Free & Open Software Radio Ecosystem
phase_shift.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2020 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_PHASESHIFT_H
12 #define INCLUDED_PHASESHIFT_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 This block will shift the incoming signal by the specified amount.
22  * Shift can be specified in either radians or degrees which is configurable
23  * in the constructor.
24  *
25  * This block functions like a multiply const, but with the const limited to
26  * abs() == 1 to provide a constant phase shift.
27  * \ingroup misc_blk
28  *
29  */
30 class BLOCKS_API phase_shift : virtual public gr::sync_block
31 {
32 public:
33  typedef std::shared_ptr<phase_shift> sptr;
34 
35  /*!
36  * \brief Create an instance of phase_shift
37  */
38  static sptr make(float shift, bool is_radians);
39  virtual float get_shift() const = 0;
40  virtual void set_shift(float new_value) = 0;
41 };
42 
43 } // namespace blocks
44 } // namespace gr
45 
46 #endif /* INCLUDED_PHASESHIFT_H */
This block will shift the incoming signal by the specified amount. Shift can be specified in either r...
Definition: phase_shift.h:31
static sptr make(float shift, bool is_radians)
Create an instance of phase_shift.
std::shared_ptr< phase_shift > sptr
Definition: phase_shift.h:33
virtual void set_shift(float new_value)=0
virtual float get_shift() const =0
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