From 7c23fd43214e8a729b3022db281dc85040f0e749 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Fri, 26 Feb 2010 15:17:38 -0800 Subject: Created simple source (with nothing in it) and some swig build stuff. Seems to work and compile --- gr-uhd/swig/uhd_swig.i | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 gr-uhd/swig/uhd_swig.i (limited to 'gr-uhd/swig/uhd_swig.i') diff --git a/gr-uhd/swig/uhd_swig.i b/gr-uhd/swig/uhd_swig.i new file mode 100644 index 000000000..e20d22a26 --- /dev/null +++ b/gr-uhd/swig/uhd_swig.i @@ -0,0 +1,31 @@ +/* -*- c++ -*- */ +/* + * Copyright 2010 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. + */ + +%include "gnuradio.i" + +%{ +#include +%} + +GR_SWIG_BLOCK_MAGIC(uhd,simple_source) + +%include -- cgit From 6d71414a0a467dc37fc903b327be22f8d0ddeade Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Tue, 2 Mar 2010 14:43:20 -0800 Subject: Added the uhd simple sink lib block, swig wrapper, grc wrapper. It seems to work, but still getting the kinks out of tx->usrp2 --- gr-uhd/swig/uhd_swig.i | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'gr-uhd/swig/uhd_swig.i') diff --git a/gr-uhd/swig/uhd_swig.i b/gr-uhd/swig/uhd_swig.i index e20d22a26..06a1c88ff 100644 --- a/gr-uhd/swig/uhd_swig.i +++ b/gr-uhd/swig/uhd_swig.i @@ -24,8 +24,11 @@ %{ #include +#include %} GR_SWIG_BLOCK_MAGIC(uhd,simple_source) - %include + +GR_SWIG_BLOCK_MAGIC(uhd,simple_sink) +%include -- cgit From 6851718b6d9a97a8c9397a1548708c7075de98e4 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Mon, 29 Mar 2010 15:30:02 -0700 Subject: added swig includes and tune result return --- gr-uhd/swig/uhd_swig.i | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gr-uhd/swig/uhd_swig.i') diff --git a/gr-uhd/swig/uhd_swig.i b/gr-uhd/swig/uhd_swig.i index 06a1c88ff..363d9c914 100644 --- a/gr-uhd/swig/uhd_swig.i +++ b/gr-uhd/swig/uhd_swig.i @@ -27,6 +27,9 @@ #include %} +%include +%include + GR_SWIG_BLOCK_MAGIC(uhd,simple_source) %include -- cgit From a87552815119742d98561f9b53ab0da5513514bb Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Tue, 30 Mar 2010 14:08:11 -0700 Subject: gr-uhd working with io type --- gr-uhd/swig/uhd_swig.i | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gr-uhd/swig/uhd_swig.i') diff --git a/gr-uhd/swig/uhd_swig.i b/gr-uhd/swig/uhd_swig.i index 363d9c914..2642f9450 100644 --- a/gr-uhd/swig/uhd_swig.i +++ b/gr-uhd/swig/uhd_swig.i @@ -27,8 +27,10 @@ #include %} +%include %include %include +%include GR_SWIG_BLOCK_MAGIC(uhd,simple_source) %include -- cgit From 1e71bdae9956d64e06bdfbb0c87530619807e100 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Wed, 30 Jun 2010 10:12:02 -0700 Subject: uhd: added calls to set time and clock config --- gr-uhd/swig/uhd_swig.i | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gr-uhd/swig/uhd_swig.i') diff --git a/gr-uhd/swig/uhd_swig.i b/gr-uhd/swig/uhd_swig.i index 2642f9450..5956a686c 100644 --- a/gr-uhd/swig/uhd_swig.i +++ b/gr-uhd/swig/uhd_swig.i @@ -31,6 +31,8 @@ %include %include %include +%include +%include GR_SWIG_BLOCK_MAGIC(uhd,simple_source) %include -- cgit From 4e636b2b4bb29d5224aeff4ae79af121020338f1 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Fri, 2 Jul 2010 18:30:31 -0700 Subject: uhd mimo: created mimo source and sink block for gr-uhd --- gr-uhd/swig/uhd_swig.i | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'gr-uhd/swig/uhd_swig.i') diff --git a/gr-uhd/swig/uhd_swig.i b/gr-uhd/swig/uhd_swig.i index 5956a686c..34e140887 100644 --- a/gr-uhd/swig/uhd_swig.i +++ b/gr-uhd/swig/uhd_swig.i @@ -23,6 +23,8 @@ %include "gnuradio.i" %{ +#include +#include #include #include %} @@ -34,6 +36,12 @@ %include %include +GR_SWIG_BLOCK_MAGIC(uhd,mimo_source) +%include + +GR_SWIG_BLOCK_MAGIC(uhd,mimo_sink) +%include + GR_SWIG_BLOCK_MAGIC(uhd,simple_source) %include -- cgit From 385eafd8559b90a027604dd5c0ab734bea54f6d8 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Tue, 21 Sep 2010 17:12:47 -0700 Subject: uhd: added grc and swig wrappers for single usrp --- gr-uhd/swig/uhd_swig.i | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'gr-uhd/swig/uhd_swig.i') diff --git a/gr-uhd/swig/uhd_swig.i b/gr-uhd/swig/uhd_swig.i index 34e140887..d755dfeee 100644 --- a/gr-uhd/swig/uhd_swig.i +++ b/gr-uhd/swig/uhd_swig.i @@ -21,12 +21,20 @@ */ %include "gnuradio.i" +%include "std_string.i" +%include "std_vector.i" + +namespace std { + %template(StringVector) vector; +} %{ #include #include #include #include +#include +#include %} %include @@ -47,3 +55,9 @@ GR_SWIG_BLOCK_MAGIC(uhd,simple_source) GR_SWIG_BLOCK_MAGIC(uhd,simple_sink) %include + +GR_SWIG_BLOCK_MAGIC(uhd,single_usrp_source) +%include + +GR_SWIG_BLOCK_MAGIC(uhd,single_usrp_sink) +%include -- cgit From 873228d25b3ea5df8eb10f6652518f144858af61 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Mon, 18 Oct 2010 13:46:51 -0700 Subject: uhd: filled in multi usrp code and swig file --- gr-uhd/swig/uhd_swig.i | 33 +++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-) (limited to 'gr-uhd/swig/uhd_swig.i') diff --git a/gr-uhd/swig/uhd_swig.i b/gr-uhd/swig/uhd_swig.i index d755dfeee..1631a768a 100644 --- a/gr-uhd/swig/uhd_swig.i +++ b/gr-uhd/swig/uhd_swig.i @@ -29,10 +29,13 @@ namespace std { } %{ -#include -#include -#include -#include +#include //deprecated +#include //deprecated +#include //deprecated +#include //deprecated + +#include +#include #include #include %} @@ -44,17 +47,23 @@ namespace std { %include %include -GR_SWIG_BLOCK_MAGIC(uhd,mimo_source) -%include +GR_SWIG_BLOCK_MAGIC(uhd,mimo_source) //deprecated +%include //deprecated + +GR_SWIG_BLOCK_MAGIC(uhd,mimo_sink) //deprecated +%include //deprecated + +GR_SWIG_BLOCK_MAGIC(uhd,simple_source) //deprecated +%include //deprecated -GR_SWIG_BLOCK_MAGIC(uhd,mimo_sink) -%include +GR_SWIG_BLOCK_MAGIC(uhd,simple_sink) //deprecated +%include //deprecated -GR_SWIG_BLOCK_MAGIC(uhd,simple_source) -%include +GR_SWIG_BLOCK_MAGIC(uhd,multi_usrp_source) +%include -GR_SWIG_BLOCK_MAGIC(uhd,simple_sink) -%include +GR_SWIG_BLOCK_MAGIC(uhd,multi_usrp_sink) +%include GR_SWIG_BLOCK_MAGIC(uhd,single_usrp_source) %include -- cgit From 343cba5663d0eefdd3ee3918bef812dc1bd75508 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Mon, 18 Oct 2010 18:29:20 -0700 Subject: uhd: tweaked and tested multi usrp with a single channel --- gr-uhd/swig/uhd_swig.i | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'gr-uhd/swig/uhd_swig.i') diff --git a/gr-uhd/swig/uhd_swig.i b/gr-uhd/swig/uhd_swig.i index 1631a768a..6f29f706d 100644 --- a/gr-uhd/swig/uhd_swig.i +++ b/gr-uhd/swig/uhd_swig.i @@ -20,6 +20,9 @@ * Boston, MA 02110-1301, USA. */ +//////////////////////////////////////////////////////////////////////// +// standard includes +//////////////////////////////////////////////////////////////////////// %include "gnuradio.i" %include "std_string.i" %include "std_vector.i" @@ -28,6 +31,9 @@ namespace std { %template(StringVector) vector; } +//////////////////////////////////////////////////////////////////////// +// block headers +//////////////////////////////////////////////////////////////////////// %{ #include //deprecated #include //deprecated @@ -40,6 +46,9 @@ namespace std { #include %} +//////////////////////////////////////////////////////////////////////// +// used types +//////////////////////////////////////////////////////////////////////// %include %include %include @@ -47,6 +56,9 @@ namespace std { %include %include +//////////////////////////////////////////////////////////////////////// +// block magic +//////////////////////////////////////////////////////////////////////// GR_SWIG_BLOCK_MAGIC(uhd,mimo_source) //deprecated %include //deprecated @@ -70,3 +82,11 @@ GR_SWIG_BLOCK_MAGIC(uhd,single_usrp_source) GR_SWIG_BLOCK_MAGIC(uhd,single_usrp_sink) %include + +//////////////////////////////////////////////////////////////////////// +// helpful constants +//////////////////////////////////////////////////////////////////////// +%{ +static const size_t ALL_MBOARDS = uhd::usrp::multi_usrp::ALL_MBOARDS; +%} +static const size_t ALL_MBOARDS; -- cgit From cd6b9eee92cbb16c4b36f568b812de4dc918eac8 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Thu, 21 Oct 2010 15:09:31 -0700 Subject: uhd: install swig exception handler --- gr-uhd/swig/uhd_swig.i | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'gr-uhd/swig/uhd_swig.i') diff --git a/gr-uhd/swig/uhd_swig.i b/gr-uhd/swig/uhd_swig.i index 6f29f706d..5b3b52472 100644 --- a/gr-uhd/swig/uhd_swig.i +++ b/gr-uhd/swig/uhd_swig.i @@ -20,6 +20,24 @@ * Boston, MA 02110-1301, USA. */ +//////////////////////////////////////////////////////////////////////// +// Language independent exception handler +//////////////////////////////////////////////////////////////////////// +%include exception.i + +%exception { + try { + $action + } + catch(std::exception &e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + catch(...) { + SWIG_exception(SWIG_RuntimeError, "Unknown exception"); + } + +} + //////////////////////////////////////////////////////////////////////// // standard includes //////////////////////////////////////////////////////////////////////// -- cgit From 5a2de999da86d48cd7f005d08cc48965cb8c7a65 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Mon, 25 Oct 2010 16:22:05 -0700 Subject: uhd: move tune functions to tune_request and provide wrapper for simple case --- gr-uhd/swig/uhd_swig.i | 1 + 1 file changed, 1 insertion(+) (limited to 'gr-uhd/swig/uhd_swig.i') diff --git a/gr-uhd/swig/uhd_swig.i b/gr-uhd/swig/uhd_swig.i index 5b3b52472..d332bb617 100644 --- a/gr-uhd/swig/uhd_swig.i +++ b/gr-uhd/swig/uhd_swig.i @@ -69,6 +69,7 @@ namespace std { //////////////////////////////////////////////////////////////////////// %include %include +%include %include %include %include -- cgit From 38c60bd0bfb411c2557b84f92bcbd66395475ba6 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Mon, 1 Nov 2010 19:01:49 -0700 Subject: uhd: swig changes for templated ranges --- gr-uhd/swig/uhd_swig.i | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'gr-uhd/swig/uhd_swig.i') diff --git a/gr-uhd/swig/uhd_swig.i b/gr-uhd/swig/uhd_swig.i index d332bb617..3c6773374 100644 --- a/gr-uhd/swig/uhd_swig.i +++ b/gr-uhd/swig/uhd_swig.i @@ -68,6 +68,7 @@ namespace std { // used types //////////////////////////////////////////////////////////////////////// %include +%include %include %include %include @@ -75,6 +76,17 @@ namespace std { %include %include +//Re-create range typedefs here with %template as they are not imported. +//Replicate all the levels of templated inheritance so swig understands. + +%template(float_range_t) uhd::range_t; +%template(_float_range_vector_t) std::vector >; +%template(gain_range_t) uhd::meta_range_t; + +%template(double_range_t) uhd::range_t; +%template(_double_range_vector_t) std::vector >; +%template(freq_range_t) uhd::meta_range_t; + //////////////////////////////////////////////////////////////////////// // block magic //////////////////////////////////////////////////////////////////////// -- cgit From d94769a975612072dc03fa378bc79856c07cd66b Mon Sep 17 00:00:00 2001 From: Rob Savoye Date: Sat, 30 Oct 2010 12:14:41 -0600 Subject: add load-extension support --- gr-uhd/swig/uhd_swig.i | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'gr-uhd/swig/uhd_swig.i') diff --git a/gr-uhd/swig/uhd_swig.i b/gr-uhd/swig/uhd_swig.i index d332bb617..8486b24a5 100644 --- a/gr-uhd/swig/uhd_swig.i +++ b/gr-uhd/swig/uhd_swig.i @@ -109,3 +109,13 @@ GR_SWIG_BLOCK_MAGIC(uhd,single_usrp_sink) static const size_t ALL_MBOARDS = uhd::usrp::multi_usrp::ALL_MBOARDS; %} static const size_t ALL_MBOARDS; + +#if SWIGGUILE +%scheme %{ +(load-extension "libguile-uhd_swig" "scm_init_gnuradio_uhd_swig_module") +%} + +%goops %{ +(use-modules (gnuradio gnuradio_core_runtime)) +%} +#endif -- cgit From 4eadee57c588940347027c7e7f99ac7e993874fd Mon Sep 17 00:00:00 2001 From: Eric Blossom Date: Wed, 17 Nov 2010 13:54:04 -0800 Subject: Add support for guile std::vector< std::complex >. --- gr-uhd/swig/uhd_swig.i | 2 -- 1 file changed, 2 deletions(-) (limited to 'gr-uhd/swig/uhd_swig.i') diff --git a/gr-uhd/swig/uhd_swig.i b/gr-uhd/swig/uhd_swig.i index 8486b24a5..b3abf29be 100644 --- a/gr-uhd/swig/uhd_swig.i +++ b/gr-uhd/swig/uhd_swig.i @@ -42,8 +42,6 @@ // standard includes //////////////////////////////////////////////////////////////////////// %include "gnuradio.i" -%include "std_string.i" -%include "std_vector.i" namespace std { %template(StringVector) vector; -- cgit From 655a7afcbcaf159e66a404b455a9581e0fe2cba3 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Fri, 19 Nov 2010 11:47:28 -0800 Subject: uhd: removed deprecated interfaces (simple and mimo) --- gr-uhd/swig/uhd_swig.i | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'gr-uhd/swig/uhd_swig.i') diff --git a/gr-uhd/swig/uhd_swig.i b/gr-uhd/swig/uhd_swig.i index 3c6773374..695cf1cd2 100644 --- a/gr-uhd/swig/uhd_swig.i +++ b/gr-uhd/swig/uhd_swig.i @@ -53,11 +53,6 @@ namespace std { // block headers //////////////////////////////////////////////////////////////////////// %{ -#include //deprecated -#include //deprecated -#include //deprecated -#include //deprecated - #include #include #include @@ -90,18 +85,6 @@ namespace std { //////////////////////////////////////////////////////////////////////// // block magic //////////////////////////////////////////////////////////////////////// -GR_SWIG_BLOCK_MAGIC(uhd,mimo_source) //deprecated -%include //deprecated - -GR_SWIG_BLOCK_MAGIC(uhd,mimo_sink) //deprecated -%include //deprecated - -GR_SWIG_BLOCK_MAGIC(uhd,simple_source) //deprecated -%include //deprecated - -GR_SWIG_BLOCK_MAGIC(uhd,simple_sink) //deprecated -%include //deprecated - GR_SWIG_BLOCK_MAGIC(uhd,multi_usrp_source) %include -- cgit From 0b5f66113f43d2ba94a1ca741b5ce65e1f9f2c02 Mon Sep 17 00:00:00 2001 From: Eric Blossom Date: Fri, 3 Dec 2010 23:30:54 -0800 Subject: Rename libguile- to libguile-gnuradio- to match guile library naming convention. The stuff in gnuradio-core ends up with funky names, but that could be fixed by renaming gnuradio_core_filter.i -> core_filter.i etc. --- gr-uhd/swig/uhd_swig.i | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gr-uhd/swig/uhd_swig.i') diff --git a/gr-uhd/swig/uhd_swig.i b/gr-uhd/swig/uhd_swig.i index 7344f7a72..c7664157b 100644 --- a/gr-uhd/swig/uhd_swig.i +++ b/gr-uhd/swig/uhd_swig.i @@ -122,7 +122,7 @@ static const size_t ALL_MBOARDS; #if SWIGGUILE %scheme %{ -(load-extension "libguile-uhd_swig" "scm_init_gnuradio_uhd_swig_module") +(load-extension "libguile-gnuradio-uhd_swig" "scm_init_gnuradio_uhd_swig_module") %} %goops %{ -- cgit From 08907ee94fb6c34531d57b988324c67c26c8b747 Mon Sep 17 00:00:00 2001 From: Eric Blossom Date: Fri, 10 Dec 2010 16:15:40 -0800 Subject: Use load-extension-global instead of load-extension --- gr-uhd/swig/uhd_swig.i | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gr-uhd/swig/uhd_swig.i') diff --git a/gr-uhd/swig/uhd_swig.i b/gr-uhd/swig/uhd_swig.i index 079f8120e..80a6a588a 100644 --- a/gr-uhd/swig/uhd_swig.i +++ b/gr-uhd/swig/uhd_swig.i @@ -105,7 +105,7 @@ static const size_t ALL_MBOARDS; #if SWIGGUILE %scheme %{ -(load-extension "libguile-gnuradio-uhd_swig" "scm_init_gnuradio_uhd_swig_module") +(load-extension-global "libguile-gnuradio-uhd_swig" "scm_init_gnuradio_uhd_swig_module") %} %goops %{ -- cgit From 1047775464c1bb8a86e727487551e2b14abd476e Mon Sep 17 00:00:00 2001 From: Tom Rondeau Date: Mon, 13 Dec 2010 12:21:35 -0500 Subject: gr_uhd: Quick fix for make distcheck failures if UHD is not installed. --- gr-uhd/swig/uhd_swig.i | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'gr-uhd/swig/uhd_swig.i') diff --git a/gr-uhd/swig/uhd_swig.i b/gr-uhd/swig/uhd_swig.i index 695cf1cd2..4acf2dc83 100644 --- a/gr-uhd/swig/uhd_swig.i +++ b/gr-uhd/swig/uhd_swig.i @@ -20,6 +20,10 @@ * Boston, MA 02110-1301, USA. */ +// Defined during configure; avoids trying to locate +// header files if UHD was not installed. +#ifdef GR_HAVE_UHD + //////////////////////////////////////////////////////////////////////// // Language independent exception handler //////////////////////////////////////////////////////////////////////// @@ -104,3 +108,6 @@ GR_SWIG_BLOCK_MAGIC(uhd,single_usrp_sink) static const size_t ALL_MBOARDS = uhd::usrp::multi_usrp::ALL_MBOARDS; %} static const size_t ALL_MBOARDS; + +#endif + -- cgit From 5e00de56713729b7c366884d3a1e31ffa3423b13 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Wed, 5 Jan 2011 12:46:39 -0800 Subject: uhd: removed ranges template stuff, added some python polish in __init__.py --- gr-uhd/swig/uhd_swig.i | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'gr-uhd/swig/uhd_swig.i') diff --git a/gr-uhd/swig/uhd_swig.i b/gr-uhd/swig/uhd_swig.i index 76f44a491..cf4ecf920 100644 --- a/gr-uhd/swig/uhd_swig.i +++ b/gr-uhd/swig/uhd_swig.i @@ -73,17 +73,6 @@ namespace std { %include %include -//Re-create range typedefs here with %template as they are not imported. -//Replicate all the levels of templated inheritance so swig understands. - -%template(float_range_t) uhd::range_t; -%template(_float_range_vector_t) std::vector >; -%template(gain_range_t) uhd::meta_range_t; - -%template(double_range_t) uhd::range_t; -%template(_double_range_vector_t) std::vector >; -%template(freq_range_t) uhd::meta_range_t; - //////////////////////////////////////////////////////////////////////// // block magic //////////////////////////////////////////////////////////////////////// -- cgit From c63edcbe834c0929a7e0c7907f7c79ffc3fc5667 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Wed, 5 Jan 2011 16:19:19 -0800 Subject: uhd: swig + python tweaks to uhd types --- gr-uhd/swig/uhd_swig.i | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'gr-uhd/swig/uhd_swig.i') diff --git a/gr-uhd/swig/uhd_swig.i b/gr-uhd/swig/uhd_swig.i index cf4ecf920..5628a1203 100644 --- a/gr-uhd/swig/uhd_swig.i +++ b/gr-uhd/swig/uhd_swig.i @@ -24,6 +24,8 @@ // header files if UHD was not installed. #ifdef GR_HAVE_UHD +#define GR_UHD_API + //////////////////////////////////////////////////////////////////////// // Language independent exception handler //////////////////////////////////////////////////////////////////////// @@ -47,10 +49,6 @@ //////////////////////////////////////////////////////////////////////// %include "gnuradio.i" -namespace std { - %template(StringVector) vector; -} - //////////////////////////////////////////////////////////////////////// // block headers //////////////////////////////////////////////////////////////////////// @@ -61,6 +59,12 @@ namespace std { #include %} +//////////////////////////////////////////////////////////////////////// +// templated types +//////////////////////////////////////////////////////////////////////// +%template(string_vector_t) std::vector; +%template(range_vector_t) std::vector; + //////////////////////////////////////////////////////////////////////// // used types //////////////////////////////////////////////////////////////////////// -- cgit From cf33e1e5f75c627907811e07e4c3c7a6b6175e8a Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Wed, 5 Jan 2011 16:22:47 -0800 Subject: uhd: added export macros (not used now) and updated copyright dates --- gr-uhd/swig/uhd_swig.i | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gr-uhd/swig/uhd_swig.i') diff --git a/gr-uhd/swig/uhd_swig.i b/gr-uhd/swig/uhd_swig.i index 5628a1203..89f82e9f4 100644 --- a/gr-uhd/swig/uhd_swig.i +++ b/gr-uhd/swig/uhd_swig.i @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2010 Free Software Foundation, Inc. + * Copyright 2010-2011 Free Software Foundation, Inc. * * This file is part of GNU Radio * -- cgit From dfcc8cc28d8e5d0ca1de62b1622438be2439ebd1 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Wed, 5 Jan 2011 19:08:26 -0800 Subject: uhd: use the actual device and io types, do hacks in the init.py, also use clock config convenience --- gr-uhd/swig/uhd_swig.i | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) (limited to 'gr-uhd/swig/uhd_swig.i') diff --git a/gr-uhd/swig/uhd_swig.i b/gr-uhd/swig/uhd_swig.i index 89f82e9f4..e25dbce90 100644 --- a/gr-uhd/swig/uhd_swig.i +++ b/gr-uhd/swig/uhd_swig.i @@ -60,21 +60,32 @@ %} //////////////////////////////////////////////////////////////////////// -// templated types +// used types //////////////////////////////////////////////////////////////////////// %template(string_vector_t) std::vector; -%template(range_vector_t) std::vector; -//////////////////////////////////////////////////////////////////////// -// used types -//////////////////////////////////////////////////////////////////////// %include + %include + +%include +%template(string_string_dict_t) uhd::dict; //define after dict + +%include + +%include + +%template(range_vector_t) std::vector; //define before range %include + %include + %include + %include + %include + %include //////////////////////////////////////////////////////////////////////// -- cgit From 81d3460c5c6a950c8b734f192aa62cd1f8718d7c Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Wed, 12 Jan 2011 15:20:13 -0800 Subject: uhd: swig up the device discovery --- gr-uhd/swig/uhd_swig.i | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'gr-uhd/swig/uhd_swig.i') diff --git a/gr-uhd/swig/uhd_swig.i b/gr-uhd/swig/uhd_swig.i index e25dbce90..3c317beb4 100644 --- a/gr-uhd/swig/uhd_swig.i +++ b/gr-uhd/swig/uhd_swig.i @@ -88,6 +88,11 @@ %include +%include + +%include +%template(device_addr_vector_t) std::vector; + //////////////////////////////////////////////////////////////////////// // block magic //////////////////////////////////////////////////////////////////////// -- cgit From 8afa393725c2bfda7c341b7202acfa40cc3245d2 Mon Sep 17 00:00:00 2001 From: Jason Abele Date: Fri, 21 Jan 2011 19:24:33 -0800 Subject: Added first pass at swigging dboard iface --- gr-uhd/swig/uhd_swig.i | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'gr-uhd/swig/uhd_swig.i') diff --git a/gr-uhd/swig/uhd_swig.i b/gr-uhd/swig/uhd_swig.i index 3c317beb4..e90f850bd 100644 --- a/gr-uhd/swig/uhd_swig.i +++ b/gr-uhd/swig/uhd_swig.i @@ -93,6 +93,15 @@ %include %template(device_addr_vector_t) std::vector; +//////////////////////////////////////////////////////////////////////// +// swig dboard_iface for python access +//////////////////////////////////////////////////////////////////////// +%include stdint.i +%include +%include + +%template(dboard_iface_sptr) boost::shared_ptr; + //////////////////////////////////////////////////////////////////////// // block magic //////////////////////////////////////////////////////////////////////// -- cgit From 7787d1fc1aecc7b59e476c31865b4f32348cb729 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Thu, 10 Feb 2011 00:56:55 -0800 Subject: uhd: replaced multi/single usrp stuff with just one usrp wrapper --- gr-uhd/swig/uhd_swig.i | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) (limited to 'gr-uhd/swig/uhd_swig.i') diff --git a/gr-uhd/swig/uhd_swig.i b/gr-uhd/swig/uhd_swig.i index e90f850bd..a42344fab 100644 --- a/gr-uhd/swig/uhd_swig.i +++ b/gr-uhd/swig/uhd_swig.i @@ -53,10 +53,8 @@ // block headers //////////////////////////////////////////////////////////////////////// %{ -#include -#include -#include -#include +#include +#include %} //////////////////////////////////////////////////////////////////////// @@ -105,17 +103,11 @@ //////////////////////////////////////////////////////////////////////// // block magic //////////////////////////////////////////////////////////////////////// -GR_SWIG_BLOCK_MAGIC(uhd,multi_usrp_source) -%include +GR_SWIG_BLOCK_MAGIC(uhd,usrp_source) +%include -GR_SWIG_BLOCK_MAGIC(uhd,multi_usrp_sink) -%include - -GR_SWIG_BLOCK_MAGIC(uhd,single_usrp_source) -%include - -GR_SWIG_BLOCK_MAGIC(uhd,single_usrp_sink) -%include +GR_SWIG_BLOCK_MAGIC(uhd,usrp_sink) +%include //////////////////////////////////////////////////////////////////////// // helpful constants -- cgit From 5bb8acf24e4913d2a969db70476af65c498b032f Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Fri, 25 Feb 2011 15:34:04 -0800 Subject: uhd: added sensors api to gr-uhd blocks and swig support --- gr-uhd/swig/uhd_swig.i | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gr-uhd/swig/uhd_swig.i') diff --git a/gr-uhd/swig/uhd_swig.i b/gr-uhd/swig/uhd_swig.i index a42344fab..b814471b2 100644 --- a/gr-uhd/swig/uhd_swig.i +++ b/gr-uhd/swig/uhd_swig.i @@ -91,6 +91,8 @@ %include %template(device_addr_vector_t) std::vector; +%include + //////////////////////////////////////////////////////////////////////// // swig dboard_iface for python access //////////////////////////////////////////////////////////////////////// -- cgit From b812a91c0beb33ff755f4426f36a2a3e2c9b295c Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Sat, 12 Mar 2011 17:46:00 -0800 Subject: uhd: use %ignore to hide warnings and fix errors --- gr-uhd/swig/uhd_swig.i | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gr-uhd/swig/uhd_swig.i') diff --git a/gr-uhd/swig/uhd_swig.i b/gr-uhd/swig/uhd_swig.i index b814471b2..3ffcc7aea 100644 --- a/gr-uhd/swig/uhd_swig.i +++ b/gr-uhd/swig/uhd_swig.i @@ -66,6 +66,7 @@ %include +%ignore uhd::dict::operator[]; //ignore warnings about %extend %include %template(string_string_dict_t) uhd::dict; //define after dict @@ -88,6 +89,7 @@ %include +%ignore uhd::device::register_device; //causes compile to choke in MSVC %include %template(device_addr_vector_t) std::vector; -- cgit