diff options
author | Nick Foster | 2011-01-10 15:25:19 -0800 |
---|---|---|
committer | Nick Foster | 2011-01-10 15:25:19 -0800 |
commit | 70e978b7fdc0285b56ed3ec7be3f10dc3d922504 (patch) | |
tree | 75231113034c1ac75277fbe444c02e9b600b2a7a /gnuradio-core/src/lib/general/gr_nop.h | |
parent | 0e92b93f21fc9c324c379bc318120d414e7422cc (diff) | |
parent | bb438e7d12c5767123f8abed5810f284a5f18bf8 (diff) | |
download | gnuradio-70e978b7fdc0285b56ed3ec7be3f10dc3d922504.tar.gz gnuradio-70e978b7fdc0285b56ed3ec7be3f10dc3d922504.tar.bz2 gnuradio-70e978b7fdc0285b56ed3ec7be3f10dc3d922504.zip |
Merge branch 'next' of http://gnuradio.org/git/gnuradio into next
Diffstat (limited to 'gnuradio-core/src/lib/general/gr_nop.h')
-rw-r--r-- | gnuradio-core/src/lib/general/gr_nop.h | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/gnuradio-core/src/lib/general/gr_nop.h b/gnuradio-core/src/lib/general/gr_nop.h index 60b20c5ab..354c2f9fc 100644 --- a/gnuradio-core/src/lib/general/gr_nop.h +++ b/gnuradio-core/src/lib/general/gr_nop.h @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2004 Free Software Foundation, Inc. + * Copyright 2004,2010 Free Software Foundation, Inc. * * This file is part of GNU Radio * @@ -26,24 +26,35 @@ #include <gr_block.h> #include <stddef.h> // size_t +class gr_nop; +typedef boost::shared_ptr<gr_nop> gr_nop_sptr; + +gr_nop_sptr +gr_make_nop (size_t sizeof_stream_item); + /*! * \brief Does nothing. Used for testing only. * \ingroup misc_blk */ class gr_nop : public gr_block { - friend gr_block_sptr gr_make_nop (size_t sizeof_stream_item); - + friend gr_nop_sptr gr_make_nop (size_t sizeof_stream_item); gr_nop (size_t sizeof_stream_item); +protected: + int d_nmsgs_recvd; + + // Method that just counts any received messages. + void count_received_msgs(pmt::pmt_t msg); + public: virtual int general_work (int noutput_items, gr_vector_int &ninput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items); -}; -gr_block_sptr -gr_make_nop (size_t sizeof_stream_item); + int nmsgs_received() const { return d_nmsgs_recvd; } + +}; #endif /* INCLUDED_GR_NOP_H */ |