GNU Radio Manual and C++ API Reference  3.10.9.1
The Free & Open Software Radio Ecosystem
add_const_cc.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2004,2012,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 ADD_CONST_CC
12 #define ADD_CONST_CC
13 
14 #include <gnuradio/blocks/api.h>
15 #include <gnuradio/sync_block.h>
16 #include <volk/volk_alloc.hh>
17 
18 namespace gr {
19 namespace blocks {
20 
21 /*!
22  * \brief output = input + constant
23  * \ingroup math_operators_blk
24  */
25 class BLOCKS_API add_const_cc : virtual public sync_block
26 {
27 public:
28  // gr::blocks::add_const_cc::sptr
29  typedef std::shared_ptr<add_const_cc> sptr;
30 
31  /*!
32  * \brief Create an instance of add_const_cc
33  * \param k additive constant
34  */
35  static sptr make(gr_complex k);
36 
37  /*!
38  * \brief Return additive constant
39  */
40  virtual gr_complex k() const = 0;
41 
42  /*!
43  * \brief Set additive constant
44  */
45  virtual void set_k(gr_complex k) = 0;
46 };
47 
48 } // namespace blocks
49 } // namespace gr
50 
51 #endif /* ADD_CONST_CC */
output = input + constant
Definition: add_const_cc.h:26
virtual void set_k(gr_complex k)=0
Set additive constant.
virtual gr_complex k() const =0
Return additive constant.
std::shared_ptr< add_const_cc > sptr
Definition: add_const_cc.h:29
static sptr make(gr_complex k)
Create an instance of add_const_cc.
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
std::complex< float > gr_complex
Definition: gr_complex.h:15
GNU Radio logging wrapper.
Definition: basic_block.h:29