3 * Copyright 2006 Free Software Foundation, Inc.
5 * This file is part of GNU Radio
7 * GNU Radio is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 3, or (at your option)
12 * GNU Radio is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with GNU Radio; see the file COPYING. If not, write to
19 * the Free Software Foundation, Inc., 51 Franklin Street,
20 * Boston, MA 02110-1301, USA.
23 GR_SWIG_BLOCK_MAGIC(gr,test);
27 typedef boost::shared_ptr<gr_test> gr_test_sptr;
31 gr_test_sptr gr_make_test (const std::string &name=std::string("gr_test"),
32 int min_inputs=1, int max_inputs=1, unsigned int sizeof_input_item=1,
33 int min_outputs=1, int max_outputs=1, unsigned int sizeof_output_item=1,
34 unsigned int history=1,unsigned int output_multiple=1,double relative_rate=1.0,
35 bool fixed_rate=true,gr_consume_type_t cons_type=CONSUME_NOUTPUT_ITEMS, gr_produce_type_t prod_type=PRODUCE_NOUTPUT_ITEMS);
38 class gr_test : public gr_block {
43 void forecast (int noutput_items,
44 gr_vector_int &ninput_items_required);
45 void set_check_topology (bool check_topology);
46 bool check_topology (int ninputs, int noutputs);
47 int fixed_rate_ninput_to_noutput(int ninput);
48 int fixed_rate_noutput_to_ninput(int noutput);
49 void set_fixed_rate_public(bool fixed_rate);
50 void set_consume_type (gr_consume_type_t cons_type);
51 void set_consume_limit (unsigned int limit);
52 void set_produce_type (gr_produce_type_t prod_type);
53 void set_produce_limit (unsigned int limit);
56 gr_test (const std::string &name,int min_inputs, int max_inputs, unsigned int sizeof_input_item,
57 int min_outputs, int max_outputs, unsigned int sizeof_output_item,
58 unsigned int history,unsigned int output_multiple,double relative_rate,
59 bool fixed_rate,gr_consume_type_t cons_type, gr_produce_type_t prod_type);