GNU Radio 3.6.5 C++ API

keep_one_in_n_impl.h

Go to the documentation of this file.
00001 
00002 /* -*- c++ -*- */
00003 /*
00004  * Copyright 2012 Free Software Foundation, Inc.
00005  *
00006  * This file is part of GNU Radio
00007  *
00008  * GNU Radio is free software; you can redistribute it and/or modify
00009  * it under the terms of the GNU General Public License as published by
00010  * the Free Software Foundation; either version 3, or (at your option)
00011  * any later version.
00012  *
00013  * GNU Radio is distributed in the hope that it will be useful,
00014  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016  * GNU General Public License for more details.
00017  *
00018  * You should have received a copy of the GNU General Public License
00019  * along with GNU Radio; see the file COPYING.  If not, write to
00020  * the Free Software Foundation, Inc., 51 Franklin Street,
00021  * Boston, MA 02110-1301, USA.
00022  */
00023 
00024 #ifndef INCLUDED_KEEP_ONE_IN_N_IMPL_H
00025 #define INCLUDED_KEEP_ONE_IN_N_IMPL_H
00026 
00027 #include <blocks/keep_one_in_n.h>
00028 
00029 namespace gr {
00030   namespace blocks {
00031 
00032     class BLOCKS_API keep_one_in_n_impl : public keep_one_in_n
00033     {
00034       int   d_n;
00035       int   d_count;
00036       float d_decim_rate;
00037 
00038     public:
00039       keep_one_in_n_impl(size_t itemsize,int n);
00040 
00041       int general_work(int noutput_items,
00042                        gr_vector_int &ninput_items,
00043                        gr_vector_const_void_star &input_items,
00044                        gr_vector_void_star &output_items);
00045       
00046       void set_n(int n);
00047     };
00048 
00049   } /* namespace blocks */
00050 } /* namespace gr */
00051    
00052 
00053 #endif /* INCLUDED_KEEP_ONE_IN_N_IMPL_H */