summaryrefslogtreecommitdiff
path: root/gr-blocks/include/gnuradio/blocks/add_const_ss.h
blob: 36701756e40521d44936f29494702a60d08b5fa3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/* -*- c++ -*- */
/*
 * Copyright 2004,2012,2015 Free Software Foundation, Inc.
 *
 * This file is part of GNU Radio
 *
 * SPDX-License-Identifier: GPL-3.0-or-later
 *
 */

#ifndef ADD_CONST_SS
#define ADD_CONST_SS

#include <gnuradio/blocks/api.h>
#include <gnuradio/sync_block.h>

namespace gr {
namespace blocks {

/*!
 * \brief output = input + constant
 * \ingroup math_operators_blk
 */
class BLOCKS_API add_const_ss : virtual public sync_block
{
public:
    // gr::blocks::add_const_ss::sptr
    typedef std::shared_ptr<add_const_ss> sptr;

    /*!
     * \brief Create an instance of add_const_ss
     * \param k additive constant
     */
    static sptr make(short k);

    /*!
     * \brief Return additive constant
     */
    virtual short k() const = 0;

    /*!
     * \brief Set additive constant
     */
    virtual void set_k(short k) = 0;
};

} // namespace blocks
} // namespace gr

#endif /* ADD_CONST_SS */