diff options
Diffstat (limited to 'gnuradio-core/src/lib/runtime/runtime.i')
-rw-r--r-- | gnuradio-core/src/lib/runtime/runtime.i | 121 |
1 files changed, 70 insertions, 51 deletions
diff --git a/gnuradio-core/src/lib/runtime/runtime.i b/gnuradio-core/src/lib/runtime/runtime.i index 8e35df834..c8927f336 100644 --- a/gnuradio-core/src/lib/runtime/runtime.i +++ b/gnuradio-core/src/lib/runtime/runtime.i @@ -1,69 +1,88 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3, or (at your option) - * any later version. - * - * GNU Radio is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ +// +// Copyright 2012 Josh Blum +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. #define GR_CORE_API +//not here to fight you swig, reference() is ambigi with shared ptr, but whatevs +%ignore gri_agc_cc::reference(); +%ignore gri_agc2_ff::reference(); +%ignore gri_agc2_cc::reference(); + %{ -#include <gr_runtime_types.h> + +#include <gras/block.hpp> +#include <gras/hier_block.hpp> +#include <gras/top_block.hpp> +#include <gras/io_signature.hpp> #include <gr_io_signature.h> -#include <gr_buffer.h> #include <gr_block.h> -#include <gr_block_detail.h> +#include <gr_top_block.h> #include <gr_hier_block2.h> -#include <gr_single_threaded_scheduler.h> #include <gr_message.h> #include <gr_msg_handler.h> #include <gr_msg_queue.h> -#include <gr_dispatcher.h> -#include <gr_error_handler.h> -#include <gr_realtime.h> #include <gr_sync_block.h> #include <gr_sync_decimator.h> #include <gr_sync_interpolator.h> -#include <gr_top_block.h> -%} -%constant int sizeof_char = sizeof(char); -%constant int sizeof_short = sizeof(short); -%constant int sizeof_int = sizeof(int); -%constant int sizeof_float = sizeof(float); -%constant int sizeof_double = sizeof(double); -%constant int sizeof_gr_complex = sizeof(gr_complex); +%} -%include <gr_io_signature.i> -%include <gr_buffer.i> -%include <gr_basic_block.i> -%include <gr_block.i> -%include <gr_block_detail.i> -%include <gr_hier_block2.i> -%include <gr_swig_block_magic.i> -%include <gr_single_threaded_scheduler.i> %include <gr_message.i> %include <gr_msg_handler.i> %include <gr_msg_queue.i> -%include <gr_dispatcher.i> -%include <gr_error_handler.i> -%include <gr_realtime.i> -%include <gr_sync_block.i> -%include <gr_sync_decimator.i> -%include <gr_sync_interpolator.i> -%include <gr_top_block.i> +%include <gr_swig_block_magic.i> + +#ifdef SW_RUNTIME + +%rename(io_signature) gr_make_io_signature; +%rename(io_signature2) gr_make_io_signature2; +%rename(io_signature3) gr_make_io_signature3; +%rename(io_signaturev) gr_make_io_signaturev; + +//const size types used by blocks in python +%constant int sizeof_char = sizeof(char); +%constant int sizeof_short = sizeof(short); +%constant int sizeof_int = sizeof(int); +%constant int sizeof_float = sizeof(float); +%constant int sizeof_double = sizeof(double); +%constant int sizeof_gr_complex = sizeof(gr_complex); + +%import <gras/block.i> +%include <gr_io_signature.h> +%include <gr_block.h> +%include <gr_hier_block2.h> +%include <gr_top_block.h> +%include <gr_sync_block.h> +%include <gr_sync_decimator.h> +%include <gr_sync_interpolator.h> + +#else + +//the bare minimum block inheritance interface to make things work but keep swig cxx file size down +%include <gras/gras.hpp> +%include <gras/element.hpp> +namespace gras +{ + struct Block : gras::Element{}; + struct HierBlock : gras::Element{}; +} +struct gr_hier_block2 : gras::HierBlock{}; +struct gr_block : gras::Block{}; +struct gr_sync_block : gr_block{}; +struct gr_sync_interpolator : gr_sync_block{}; +struct gr_sync_decimator : gr_sync_block{}; + +#endif |