diff options
-rw-r--r-- | TODO.txt | 1 | ||||
m--------- | gnuradio | 0 | ||||
-rw-r--r-- | include/gnuradio/gr_block.h | 4 | ||||
-rw-r--r-- | include/gnuradio/gr_types.h | 91 | ||||
-rw-r--r-- | lib/element_impl.hpp | 1 |
5 files changed, 38 insertions, 59 deletions
@@ -21,3 +21,4 @@ * track memcpys for block usage stats * runtime history, input/output multiple change? ** resend the hint to the allocator and possibly re-allocate +* determine when outputs should be flushed, or continual filling diff --git a/gnuradio b/gnuradio -Subproject 00eca71506a89b19fff2081d158a3da5a36a18e +Subproject 5b64019e6c1640edd13ae04fea251b144c0d2fb diff --git a/include/gnuradio/gr_block.h b/include/gnuradio/gr_block.h index 5b3e9f2..038f1a5 100644 --- a/include/gnuradio/gr_block.h +++ b/include/gnuradio/gr_block.h @@ -24,6 +24,10 @@ #include <gr_tags.h> #include <string> +typedef std::vector<int> gr_vector_int; +typedef std::vector<void *> gr_vector_void_star; +typedef std::vector<const void *> gr_vector_const_void_star; + struct GRAS_API gr_block : gnuradio::Block { diff --git a/include/gnuradio/gr_types.h b/include/gnuradio/gr_types.h index f7d1cee..0da08cc 100644 --- a/include/gnuradio/gr_types.h +++ b/include/gnuradio/gr_types.h @@ -1,70 +1,45 @@ -/* -*- 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 io_sig program. If not, see <http://www.gnu.org/licenses/>. -#ifndef INCLUDED_GR_TYPES_H -#define INCLUDED_GR_TYPES_H +#ifndef INCLUDED_GRNURADIO_TYPES_H +#define INCLUDED_GRNURADIO_TYPES_H +// this section is to satisfy swig includes for gnuradio.i +// since gnuradio.i includes gr_types.h, we only have to edit this file #include <gnuradio/io_signature.hpp> #include <gnuradio/element.hpp> #include <gnuradio/block.hpp> #include <gnuradio/top_block.hpp> #include <gnuradio/hier_block.hpp> -#include <gr_core_api.h> -#include <boost/shared_ptr.hpp> -#include <vector> -#include <stddef.h> // size_t +// and gnuradio apparently needs its own typedefs for stdint... +#ifdef __cplusplus -#include <gr_complex.h> +#include <boost/cstdint.hpp> +typedef boost::int16_t gr_int16; +typedef boost::int32_t gr_int32; +typedef boost::int64_t gr_int64; +typedef boost::uint16_t gr_uint16; +typedef boost::uint32_t gr_uint32; +typedef boost::uint64_t gr_uint64; -typedef std::vector<int> gr_vector_int; -typedef std::vector<float> gr_vector_float; -typedef std::vector<double> gr_vector_double; -typedef std::vector<void *> gr_vector_void_star; -typedef std::vector<const void *> gr_vector_const_void_star; +#include <complex> +typedef std::complex<float> gr_complex; +typedef std::complex<double> gr_complexd; -/* - * #include <config.h> must be placed beforehand - * in the source file including gr_types.h for - * the following to work correctly - */ -#ifdef HAVE_STDINT_H -#include <stdint.h> -typedef int16_t gr_int16; -typedef int32_t gr_int32; -typedef int64_t gr_int64; -typedef uint16_t gr_uint16; -typedef uint32_t gr_uint32; -typedef uint64_t gr_uint64; -#else -/* - * Note: these defaults may be wrong on 64-bit systems - */ -typedef short gr_int16; -typedef int gr_int32; -typedef long long gr_int64; -typedef unsigned short gr_uint16; -typedef unsigned int gr_uint32; -typedef unsigned long long gr_uint64; -#endif /* HAVE_STDINT_H */ +#endif -#endif /* INCLUDED_GR_TYPES_H */ +#endif /* INCLUDED_GRNURADIO_TYPES_H */ diff --git a/lib/element_impl.hpp b/lib/element_impl.hpp index 01a9791..556fbd1 100644 --- a/lib/element_impl.hpp +++ b/lib/element_impl.hpp @@ -29,7 +29,6 @@ #include <tsbe/executor.hpp> #include <gnuradio/element.hpp> #include <gnuradio/block.hpp> -#include <gr_types.h> #include <set> #include <vector> #include <queue> |