GNU Radio Manual and C++ API Reference 3.10.5.1
The Free & Open Software Radio Ecosystem
nop.h
Go to the documentation of this file.
1/* -*- c++ -*- */
2/*
3 * Copyright 2004,2010,2013 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_GR_NOP_H
12#define INCLUDED_GR_NOP_H
13
14#include <gnuradio/block.h>
15#include <gnuradio/blocks/api.h>
16#include <cstddef> // size_t
17
18namespace gr {
19namespace blocks {
20
21/*!
22 * \brief Does nothing. Used for testing only.
23 * \ingroup misc_blk
24 */
25class BLOCKS_API nop : virtual public block
26{
27public:
28 // gr::blocks::nop::sptr
29 typedef std::shared_ptr<nop> sptr;
30
31 /*!
32 * Build a nop block.
33 *
34 * \param sizeof_stream_item size of the stream items in bytes.
35 */
36 static sptr make(size_t sizeof_stream_item);
37
38 virtual int nmsgs_received() const = 0;
39
40 virtual int ctrlport_test() const = 0;
41 virtual void set_ctrlport_test(int x) = 0;
42};
43
44} /* namespace blocks */
45} /* namespace gr */
46
47#endif /* INCLUDED_GR_NOP_H */
The abstract base class for all 'terminal' processing blocks.
Definition: gnuradio-runtime/include/gnuradio/block.h:63
Does nothing. Used for testing only.
Definition: nop.h:26
virtual int nmsgs_received() const =0
virtual int ctrlport_test() const =0
static sptr make(size_t sizeof_stream_item)
virtual void set_ctrlport_test(int x)=0
std::shared_ptr< nop > sptr
Definition: nop.h:29
#define BLOCKS_API
Definition: gr-blocks/include/gnuradio/blocks/api.h:18
GNU Radio logging wrapper.
Definition: basic_block.h:29