GNU Radio Manual and C++ API Reference 3.10.5.1
The Free & Open Software Radio Ecosystem
and_const.h
Go to the documentation of this file.
1/* -*- c++ -*- */
2/*
3 * Copyright 2012,2018 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
12#ifndef AND_CONST_H
13#define AND_CONST_H
14
15#include <gnuradio/blocks/api.h>
16#include <gnuradio/sync_block.h>
17#include <cstdint>
18
19namespace gr {
20namespace blocks {
21
22/*!
23 * \brief output[m] = input[m] & value for all M streams.
24 * \ingroup boolean_operators_blk
25 *
26 * \details
27 * Bitwise boolean AND of constant \p k with the data stream.
28 */
29template <class T>
30class BLOCKS_API and_const : virtual public sync_block
31{
32
33public:
34 // gr::blocks::and_const::sptr
35 typedef std::shared_ptr<and_const<T>> sptr;
36
37 /*!
38 * \brief Create an instance of and_const
39 * \param k AND constant
40 */
41 static sptr make(T k);
42
43 /*!
44 * \brief Return AND constant
45 */
46 virtual T k() const = 0;
47
48 /*!
49 * \brief Set AND constant
50 */
51 virtual void set_k(T k) = 0;
52};
53
57} /* namespace blocks */
58} /* namespace gr */
59
60#endif /* AND_CONST_H */
output[m] = input[m] & value for all M streams.
Definition: and_const.h:31
std::shared_ptr< and_const< T > > sptr
Definition: and_const.h:35
virtual void set_k(T k)=0
Set AND constant.
virtual T k() const =0
Return AND constant.
static sptr make(T k)
Create an instance of and_const.
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
and_const< std::uint8_t > and_const_bb
Definition: and_const.h:54
and_const< std::int32_t > and_const_ii
Definition: and_const.h:56
and_const< std::int16_t > and_const_ss
Definition: and_const.h:55
GNU Radio logging wrapper.
Definition: basic_block.h:29