[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r11058 - in gnuradio/branches/developers/eb/vrt: . gr-
From: |
eb |
Subject: |
[Commit-gnuradio] r11058 - in gnuradio/branches/developers/eb/vrt: . gr-vrt/src |
Date: |
Tue, 19 May 2009 01:02:44 -0600 (MDT) |
Author: eb
Date: 2009-05-19 01:02:44 -0600 (Tue, 19 May 2009)
New Revision: 11058
Added:
gnuradio/branches/developers/eb/vrt/gr-vrt/src/vrt.i
Removed:
gnuradio/branches/developers/eb/vrt/gr-vrt/src/usrp2.i
Modified:
gnuradio/branches/developers/eb/vrt/configure.ac
gnuradio/branches/developers/eb/vrt/gr-vrt/src/Makefile.am
gnuradio/branches/developers/eb/vrt/gr-vrt/src/Makefile.swig.gen
Log:
work-in-progress: doesn't build
Modified: gnuradio/branches/developers/eb/vrt/configure.ac
===================================================================
--- gnuradio/branches/developers/eb/vrt/configure.ac 2009-05-19 06:47:22 UTC
(rev 11057)
+++ gnuradio/branches/developers/eb/vrt/configure.ac 2009-05-19 07:02:44 UTC
(rev 11058)
@@ -307,6 +307,7 @@
GRC_VRT
GRC_GR_USRP dnl this must come after GRC_USRP
GRC_GR_USRP2
+GRC_GR_VRT
GRC_GR_GCELL dnl this must come after GRC_GCELL and
GRC_GNURADIO_CORE
GRC_GR_MSDD6000
GRC_GR_AUDIO_ALSA
Modified: gnuradio/branches/developers/eb/vrt/gr-vrt/src/Makefile.am
===================================================================
--- gnuradio/branches/developers/eb/vrt/gr-vrt/src/Makefile.am 2009-05-19
06:47:22 UTC (rev 11057)
+++ gnuradio/branches/developers/eb/vrt/gr-vrt/src/Makefile.am 2009-05-19
07:02:44 UTC (rev 11058)
@@ -40,13 +40,13 @@
# ----------------------------------------------------------------------
# C++ block API interface librar(ies)
#
-# libgr-usrp.so
+# libgnuradio_vrt.so
# ----------------------------------------------------------------------
AM_CPPFLAGS = \
$(STD_DEFINES_AND_INCLUDES) \
$(GRUEL_INCLUDES) \
$(PYTHON_CPPFLAGS) \
- $(USRP2_INCLUDES) \
+ $(VRT_INCLUDES) \
$(WITH_INCLUDES)
lib_LTLIBRARIES = libgnuradio-vrt.la
@@ -57,24 +57,26 @@
vrt_base.cc \
vrt_source_base.cc \
vrt_source_16sc.cc \
- vrt_source_32fc.cc \
- vrt_sink_base.cc \
- vrt_sink_16sc.cc \
- vrt_sink_32fc.cc
+ vrt_source_32fc.cc
+# vrt_sink_base.cc \
+# vrt_sink_16sc.cc \
+# vrt_sink_32fc.cc
+
libgnuradio_vrt_la_LIBADD = \
- $(USRP2_LA) \
+ $(VRT_LA) \
$(GNURADIO_CORE_LA)
grinclude_HEADERS = \
vrt_base.h \
vrt_source_base.h \
vrt_source_32fc.h \
- vrt_source_16sc.h \
- vrt_sink_base.h \
- vrt_sink_16sc.h \
- vrt_sink_32fc.h
+ vrt_source_16sc.h
+# vrt_sink_base.h \
+# vrt_sink_16sc.h \
+# vrt_sink_32fc.h
+
noinst_HEADERS = \
rx_16sc_handler.h \
rx_32fc_handler.h
@@ -98,7 +100,7 @@
# additional arguments to the SWIG command
vrt_swig_args = \
- $(USRP2_INCLUDES)
+ $(VRT_INCLUDES)
# additional libraries for linking with the SWIG-generated library
vrt_la_swig_libadd = \
Modified: gnuradio/branches/developers/eb/vrt/gr-vrt/src/Makefile.swig.gen
===================================================================
--- gnuradio/branches/developers/eb/vrt/gr-vrt/src/Makefile.swig.gen
2009-05-19 06:47:22 UTC (rev 11057)
+++ gnuradio/branches/developers/eb/vrt/gr-vrt/src/Makefile.swig.gen
2009-05-19 07:02:44 UTC (rev 11058)
@@ -20,27 +20,27 @@
# Boston, MA 02110-1301, USA.
#
-# Makefile.swig.gen for usrp2.i
+# Makefile.swig.gen for vrt.i
## Default install locations for these files:
##
## Default location for the Python directory is:
-## ${prefix}/lib/python${python_version}/site-packages/[category]/usrp2
+## ${prefix}/lib/python${python_version}/site-packages/[category]/vrt
## Default location for the Python exec directory is:
-## ${exec_prefix}/lib/python${python_version}/site-packages/[category]/usrp2
+## ${exec_prefix}/lib/python${python_version}/site-packages/[category]/vrt
##
## The following can be overloaded to change the install location, but
## this has to be done in the including Makefile.am -before-
## Makefile.swig is included.
-usrp2_pythondir_category ?= gnuradio/usrp2
-usrp2_pylibdir_category ?= $(usrp2_pythondir_category)
-usrp2_pythondir = $(pythondir)/$(usrp2_pythondir_category)
-usrp2_pylibdir = $(pyexecdir)/$(usrp2_pylibdir_category)
+vrt_pythondir_category ?= gnuradio/vrt
+vrt_pylibdir_category ?= $(vrt_pythondir_category)
+vrt_pythondir = $(pythondir)/$(vrt_pythondir_category)
+vrt_pylibdir = $(pyexecdir)/$(vrt_pylibdir_category)
## SWIG headers are always installed into the same directory.
-usrp2_swigincludedir = $(swigincludedir)
+vrt_swigincludedir = $(swigincludedir)
## This is a template file for a "generated" Makefile addition (in
## this case, "Makefile.swig.gen"). By including the top-level
@@ -62,7 +62,7 @@
## parallel built. These will not be included in a tarball, because
## the SWIG-generated files will be removed from the distribution.
-STAMPS += $(DEPDIR)/usrp2-generate-*
+STAMPS += $(DEPDIR)/vrt-generate-*
## Other cleaned files: dependency files generated by SWIG or this Makefile
@@ -72,42 +72,42 @@
## .h file is sometimes built, but not always ... so that one has to
## be added manually by the including Makefile.am .
-swig_built_sources += usrp2.py usrp2.cc
+swig_built_sources += vrt.py vrt.cc
## Various SWIG variables. These can be overloaded in the including
## Makefile.am by setting the variable value there, then including
## Makefile.swig .
-usrp2_swiginclude_HEADERS = \
- usrp2.i \
- $(usrp2_swiginclude_headers)
+vrt_swiginclude_HEADERS = \
+ vrt.i \
+ $(vrt_swiginclude_headers)
-usrp2_pylib_LTLIBRARIES = \
- _usrp2.la
+vrt_pylib_LTLIBRARIES = \
+ _vrt.la
-_usrp2_la_SOURCES = \
- usrp2.cc \
- $(usrp2_la_swig_sources)
+_vrt_la_SOURCES = \
+ vrt.cc \
+ $(vrt_la_swig_sources)
-_usrp2_la_LIBADD = \
+_vrt_la_LIBADD = \
$(STD_SWIG_LA_LIB_ADD) \
- $(usrp2_la_swig_libadd)
+ $(vrt_la_swig_libadd)
-_usrp2_la_LDFLAGS = \
+_vrt_la_LDFLAGS = \
$(STD_SWIG_LA_LD_FLAGS) \
- $(usrp2_la_swig_ldflags)
+ $(vrt_la_swig_ldflags)
-_usrp2_la_CXXFLAGS = \
+_vrt_la_CXXFLAGS = \
$(STD_SWIG_CXX_FLAGS) \
- $(usrp2_la_swig_cxxflags)
+ $(vrt_la_swig_cxxflags)
-usrp2_python_PYTHON = \
- usrp2.py \
- $(usrp2_python)
+vrt_python_PYTHON = \
+ vrt.py \
+ $(vrt_python)
## Entry rule for running SWIG
-usrp2.h usrp2.py usrp2.cc: usrp2.i
+vrt.h vrt.py vrt.cc: vrt.i
## This rule will get called only when MAKE decides that one of the
## targets needs to be created or re-created, because:
##
@@ -134,7 +134,7 @@
##
## Once execution gets to here, it should always proceed no matter the
## state of a stamp (as discussed in link above). The
-## $(DEPDIR)/usrp2-generate stuff is used to allow for parallel
+## $(DEPDIR)/vrt-generate stuff is used to allow for parallel
## builds to "do the right thing". The stamp has no relationship with
## either the target files or dependency file; it is used solely for
## the protection of multiple builds during a given call to MAKE.
@@ -145,25 +145,25 @@
## The trap is valid until the process exits; the process includes all
## commands appended via "\"s.
##
- trap 'rm -rf $(DEPDIR)/usrp2-generate-*' 1 2 13 15; \
+ trap 'rm -rf $(DEPDIR)/vrt-generate-*' 1 2 13 15; \
##
## Create a temporary directory, which acts as a lock. The first
## process to create the directory will succeed and issue the MAKE
## command to do the actual work, while all subsequent processes will
## fail -- leading them to wait for the first process to finish.
##
- if mkdir $(DEPDIR)/usrp2-generate-lock 2>/dev/null; then \
+ if mkdir $(DEPDIR)/vrt-generate-lock 2>/dev/null; then \
##
## This code is being executed by the first process to succeed in
## creating the directory lock.
##
## Remove the stamp associated with this filename.
##
- rm -f $(DEPDIR)/usrp2-generate-stamp; \
+ rm -f $(DEPDIR)/vrt-generate-stamp; \
##
## Tell MAKE to run the rule for creating this stamp.
##
- $(MAKE) $(AM_MAKEFLAGS) $(DEPDIR)/usrp2-generate-stamp WHAT=$<;
\
+ $(MAKE) $(AM_MAKEFLAGS) $(DEPDIR)/vrt-generate-stamp WHAT=$<; \
##
## Now that the .cc, .h, and .py files have been (re)created from the
## .i file, future checking of this rule during the same MAKE
@@ -172,7 +172,7 @@
## will be positive. Remove the the directory lock, which frees up
## any waiting process(es) to continue.
##
- rmdir $(DEPDIR)/usrp2-generate-lock; \
+ rmdir $(DEPDIR)/vrt-generate-lock; \
else \
##
## This code is being executed by any follower processes while the
@@ -180,18 +180,18 @@
##
## Wait until the first process is done, testing once per second.
##
- while test -d $(DEPDIR)/usrp2-generate-lock; do \
+ while test -d $(DEPDIR)/vrt-generate-lock; do \
sleep 1; \
done; \
##
## Succeed if and only if the first process succeeded; exit this
## process returning the status of the generated stamp.
##
- test -f $(DEPDIR)/usrp2-generate-stamp; \
+ test -f $(DEPDIR)/vrt-generate-stamp; \
exit $$?; \
fi;
-$(DEPDIR)/usrp2-generate-stamp:
+$(DEPDIR)/vrt-generate-stamp:
## This rule will be called only by the first process issuing the
## above rule to succeed in creating the lock directory, after
## removing the actual stamp file in order to guarantee that MAKE will
@@ -200,18 +200,18 @@
## Call SWIG to generate the various output files; special
## post-processing on 'mingw32' host OS for the dependency file.
##
- if $(SWIG) $(STD_SWIG_PYTHON_ARGS) $(usrp2_swig_args) \
- -MD -MF $(DEPDIR)/usrp2.Std \
- -module usrp2 -o usrp2.cc $(WHAT); then \
+ if $(SWIG) $(STD_SWIG_PYTHON_ARGS) $(vrt_swig_args) \
+ -MD -MF $(DEPDIR)/vrt.Std \
+ -module vrt -o vrt.cc $(WHAT); then \
if test $(host_os) = mingw32; then \
- $(RM) $(DEPDIR)/usrp2.Sd; \
- $(SED) 's,\\\\,/,g' < $(DEPDIR)/usrp2.Std \
- > $(DEPDIR)/usrp2.Sd; \
- $(RM) $(DEPDIR)/usrp2.Std; \
- $(MV) $(DEPDIR)/usrp2.Sd $(DEPDIR)/usrp2.Std; \
+ $(RM) $(DEPDIR)/vrt.Sd; \
+ $(SED) 's,\\\\,/,g' < $(DEPDIR)/vrt.Std \
+ > $(DEPDIR)/vrt.Sd; \
+ $(RM) $(DEPDIR)/vrt.Std; \
+ $(MV) $(DEPDIR)/vrt.Sd $(DEPDIR)/vrt.Std; \
fi; \
else \
- $(RM) $(DEPDIR)/usrp2.S*; exit 1; \
+ $(RM) $(DEPDIR)/vrt.S*; exit 1; \
fi;
##
## Mess with the SWIG output .Std dependency file, to create a
@@ -223,37 +223,37 @@
##
## (1) remove the current dependency file
##
- $(RM) $(DEPDIR)/usrp2.d
+ $(RM) $(DEPDIR)/vrt.d
##
## (2) Copy the whole SWIG file:
##
- cp $(DEPDIR)/usrp2.Std $(DEPDIR)/usrp2.d
+ cp $(DEPDIR)/vrt.Std $(DEPDIR)/vrt.d
##
## (3) all a carriage return to the end of the dependency file.
##
- echo "" >> $(DEPDIR)/usrp2.d
+ echo "" >> $(DEPDIR)/vrt.d
##
## (4) from the SWIG file, remove the first line (the target); remove
## trailing " \" and " " from each line. Append ":" to each line,
## followed by 2 carriage returns, then append this to the end of
## the dependency file.
##
- $(SED) -e '1d;s, \\,,g;s, ,,g' < $(DEPDIR)/usrp2.Std | \
- awk '{ printf "%s:\n\n", $$0 }' >> $(DEPDIR)/usrp2.d
+ $(SED) -e '1d;s, \\,,g;s, ,,g' < $(DEPDIR)/vrt.Std | \
+ awk '{ printf "%s:\n\n", $$0 }' >> $(DEPDIR)/vrt.d
##
## (5) remove the SWIG-generated file
##
- $(RM) $(DEPDIR)/usrp2.Std
+ $(RM) $(DEPDIR)/vrt.Std
##
## Create the stamp for this filename generation, to signal success in
## executing this rule; allows other threads waiting on this process
## to continue.
##
- touch $(DEPDIR)/usrp2-generate-stamp
+ touch $(DEPDIR)/vrt-generate-stamp
# KLUDGE: Force runtime include of a SWIG dependency file. This is
# not guaranteed to be portable, but will probably work. If it works,
# we have accurate dependencies for our swig stuff, which is good.
address@hidden@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@ @address@hidden/$(DEPDIR)/address@hidden@
Copied: gnuradio/branches/developers/eb/vrt/gr-vrt/src/vrt.i (from rev 11055,
gnuradio/branches/developers/eb/vrt/gr-vrt/src/usrp2.i)
===================================================================
--- gnuradio/branches/developers/eb/vrt/gr-vrt/src/vrt.i
(rev 0)
+++ gnuradio/branches/developers/eb/vrt/gr-vrt/src/vrt.i 2009-05-19
07:02:44 UTC (rev 11058)
@@ -0,0 +1,345 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2008,2009 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" // the common stuff
+%import <stdint.i>
+
+%{
+#include "usrp2_source_16sc.h"
+#include "usrp2_source_32fc.h"
+#include "usrp2_sink_16sc.h"
+#include "usrp2_sink_32fc.h"
+%}
+
+%include <usrp2/tune_result.h>
+%include <usrp2/mimo_config.h>
+
+%template(uint32_t_vector) std::vector<uint32_t>;
+
+// ----------------------------------------------------------------
+
+class usrp2_base : public gr_sync_block
+{
+protected:
+ usrp2_base() throw (std::runtime_error);
+
+public:
+ ~usrp2_base();
+
+ std::string mac_addr() const;
+ std::string interface_name() const;
+ %rename(_real_fpga_master_clock_freq) fpga_master_clock_freq;
+ bool fpga_master_clock_freq(long *freq);
+ bool config_mimo(int flags);
+ bool sync_to_pps();
+ bool sync_every_pps(bool enable);
+ std::vector<uint32_t> peek32(uint32_t addr, uint32_t words);
+ bool poke32(uint32_t addr, const std::vector<uint32_t> &data);
+};
+
+// ----------------------------------------------------------------
+
+class usrp2_source_base : public usrp2_base
+{
+protected:
+ usrp2_source_base() throw (std::runtime_error);
+
+public:
+ ~usrp2_source_base();
+
+ bool set_gain(double gain);
+ %rename(_real_set_center_freq) set_center_freq;
+ bool set_lo_offset(double frequency);
+ bool set_center_freq(double frequency, usrp2::tune_result *r);
+ bool set_decim(int decimation_factor);
+ bool set_scale_iq(int scale_i, int scale_q);
+ int decim();
+ %rename(_real_adc_rate) adc_rate;
+ bool adc_rate(long *rate);
+ double gain_min();
+ double gain_max();
+ double gain_db_per_step();
+ double freq_min();
+ double freq_max();
+ %rename(_real_daughterboard_id) daughterboard_id;
+ bool daughterboard_id(int *dbid);
+ unsigned int overruns();
+ unsigned int missing();
+ bool set_gpio_ddr(uint16_t value, uint16_t mask);
+ bool set_gpio_sels(std::string sels);
+ bool write_gpio(uint16_t value, uint16_t mask);
+ %rename(_real_read_gpio) read_gpio;
+ bool read_gpio(uint16_t *value);
+ bool enable_gpio_streaming(int enable);
+};
+
+// ----------------------------------------------------------------
+
+GR_SWIG_BLOCK_MAGIC(usrp2,source_32fc)
+
+usrp2_source_32fc_sptr
+usrp2_make_source_32fc(const std::string ifc="eth0",
+ const std::string mac="")
+ throw (std::runtime_error);
+
+class usrp2_source_32fc : public usrp2_source_base
+{
+protected:
+ usrp2_source_32fc(const std::string &ifc, const std::string &mac);
+
+public:
+ ~usrp2_source_32fc();
+};
+
+// ----------------------------------------------------------------
+
+GR_SWIG_BLOCK_MAGIC(usrp2,source_16sc)
+
+usrp2_source_16sc_sptr
+usrp2_make_source_16sc(const std::string ifc="eth0",
+ const std::string mac="")
+ throw (std::runtime_error);
+
+class usrp2_source_16sc : public usrp2_source_base
+{
+protected:
+ usrp2_source_16sc(const std::string &ifc, const std::string &mac);
+
+public:
+ ~usrp2_source_16sc();
+};
+
+// ----------------------------------------------------------------
+
+class usrp2_sink_base : public usrp2_base
+{
+protected:
+ usrp2_sink_base() throw (std::runtime_error);
+
+public:
+ ~usrp2_sink_base();
+
+ bool set_gain(double gain);
+ %rename(_real_set_center_freq) set_center_freq;
+ bool set_lo_offset(double frequency);
+ bool set_center_freq(double frequency, usrp2::tune_result *r);
+ bool set_interp(int interp_factor);
+ bool set_scale_iq(int scale_i, int scale_q);
+ int interp();
+ %rename(_real_default_tx_scale_iq) default_scale_iq;
+ void default_scale_iq(int interp, int *scale_i, int *scale_q);
+ %rename(_real_dac_rate) dac_rate;
+ bool dac_rate(long *rate);
+ double gain_min();
+ double gain_max();
+ double gain_db_per_step();
+ double freq_min();
+ double freq_max();
+ %rename(_real_daughterboard_id) daughterboard_id;
+ bool daughterboard_id(int *dbid);
+ bool set_gpio_ddr(uint16_t value, uint16_t mask);
+ bool set_gpio_sels(std::string sels);
+ bool write_gpio(uint16_t value, uint16_t mask);
+ %rename(_real_read_gpio) read_gpio;
+ bool read_gpio(uint16_t *value);
+};
+
+// ----------------------------------------------------------------
+
+GR_SWIG_BLOCK_MAGIC(usrp2,sink_32fc)
+
+usrp2_sink_32fc_sptr
+usrp2_make_sink_32fc(const std::string ifc="eth0",
+ const std::string mac="")
+ throw (std::runtime_error);
+
+class usrp2_sink_32fc : public usrp2_sink_base
+{
+protected:
+ usrp2_sink_32fc(const std::string &ifc, const std::string &mac);
+
+public:
+ ~usrp2_sink_32fc();
+};
+
+// ----------------------------------------------------------------
+
+GR_SWIG_BLOCK_MAGIC(usrp2,sink_16sc)
+
+usrp2_sink_16sc_sptr
+usrp2_make_sink_16sc(const std::string ifc="eth0",
+ const std::string mac="")
+ throw (std::runtime_error);
+
+class usrp2_sink_16sc : public usrp2_sink_base
+{
+protected:
+ usrp2_sink_16sc(const std::string &ifc, const std::string &mac);
+
+public:
+ ~usrp2_sink_16sc();
+};
+
+// ----------------------------------------------------------------
+
+// some utility functions to allow Python to deal with pointers
+%{
+ long *make_long_ptr() { return new long; }
+ long deref_long_ptr(long *l) { return *l; }
+ void free_long_ptr(long *l) { delete l; }
+ int *make_int_ptr() { return new int; }
+ int deref_int_ptr(int *l) { return *l; }
+ void free_int_ptr(int *l) { delete l; }
+ uint16_t *make_uint16_ptr() { return new uint16_t; }
+ int deref_uint16_ptr(uint16_t *l) { return *l; }
+ void free_uint16_ptr(uint16_t *l) { delete l; }
+%}
+
+long *make_long_ptr();
+long deref_long_ptr(long *l);
+void free_long_ptr(long *l);
+int *make_int_ptr();
+int deref_int_ptr(int *l);
+void free_int_ptr(int *l);
+uint16_t *make_uint16_ptr();
+int deref_uint16_ptr(uint16_t *l);
+void free_uint16_ptr(uint16_t *l);
+
+// create a more pythonic interface
+%pythoncode %{
+
+def __set_center_freq(self, freq):
+ tr = tune_result()
+ r = self._real_set_center_freq(freq, tr)
+ if r:
+ return tr
+ else:
+ return None
+
+def __fpga_master_clock_freq(self):
+ f = make_long_ptr();
+ r = self._real_fpga_master_clock_freq(f)
+ if r:
+ result = deref_long_ptr(f)
+ else:
+ result = None
+ free_long_ptr(f)
+ return result
+
+def __adc_rate(self):
+ rate = make_long_ptr();
+ r = self._real_adc_rate(rate)
+ if r:
+ result = deref_long_ptr(rate)
+ else:
+ result = None
+ free_long_ptr(rate)
+ return result
+
+def __dac_rate(self):
+ rate = make_long_ptr();
+ r = self._real_dac_rate(rate)
+ if r:
+ result = deref_long_ptr(rate)
+ else:
+ result = None
+ free_long_ptr(rate)
+ return result
+
+def __gain_range(self):
+ return [self.gain_min(),
+ self.gain_max(),
+ self.gain_db_per_step()]
+
+# NOTE: USRP1 uses a length three tuple here (3rd value is 'freq step'),
+# but it's not really useful. We let an index error happen here
+# to identify code using it.
+def __freq_range(self):
+ return [self.freq_min(),
+ self.freq_max()]
+
+def __daughterboard_id(self):
+ dbid = make_int_ptr()
+ r = self._real_daughterboard_id(dbid)
+ if r:
+ result = deref_int_ptr(dbid)
+ else:
+ result = None
+ free_int_ptr(dbid)
+ return result
+
+def __default_tx_scale_iq(self, interp):
+ scale_i = make_int_ptr()
+ scale_q = make_int_ptr()
+ self._real_default_tx_scale_iq(interp, scale_i, scale_q)
+ return (deref_int_ptr(scale_i), deref_int_ptr(scale_q))
+
+def __read_gpio(self):
+ value = make_uint16_ptr()
+ r = self._real_read_gpio(value)
+ if r:
+ result = deref_uint16_ptr(value)
+ else:
+ result = None
+ free_uint16_ptr(value)
+ return result
+
+
+usrp2_source_32fc_sptr.set_center_freq = __set_center_freq
+usrp2_source_16sc_sptr.set_center_freq = __set_center_freq
+usrp2_sink_32fc_sptr.set_center_freq = __set_center_freq
+usrp2_sink_16sc_sptr.set_center_freq = __set_center_freq
+
+usrp2_source_32fc_sptr.fpga_master_clock_freq = __fpga_master_clock_freq
+usrp2_source_16sc_sptr.fpga_master_clock_freq = __fpga_master_clock_freq
+usrp2_sink_32fc_sptr.fpga_master_clock_freq = __fpga_master_clock_freq
+usrp2_sink_16sc_sptr.fpga_master_clock_freq = __fpga_master_clock_freq
+
+usrp2_source_32fc_sptr.adc_rate = __adc_rate
+usrp2_source_16sc_sptr.adc_rate = __adc_rate
+usrp2_sink_32fc_sptr.dac_rate = __dac_rate
+usrp2_sink_16sc_sptr.dac_rate = __dac_rate
+
+usrp2_source_32fc_sptr.gain_range = __gain_range
+usrp2_source_16sc_sptr.gain_range = __gain_range
+usrp2_sink_32fc_sptr.gain_range = __gain_range
+usrp2_sink_16sc_sptr.gain_range = __gain_range
+
+usrp2_source_32fc_sptr.freq_range = __freq_range
+usrp2_source_16sc_sptr.freq_range = __freq_range
+usrp2_sink_32fc_sptr.freq_range = __freq_range
+usrp2_sink_16sc_sptr.freq_range = __freq_range
+
+usrp2_source_32fc_sptr.daughterboard_id = __daughterboard_id
+usrp2_source_16sc_sptr.daughterboard_id = __daughterboard_id
+usrp2_sink_32fc_sptr.daughterboard_id = __daughterboard_id
+usrp2_sink_16sc_sptr.daughterboard_id = __daughterboard_id
+
+usrp2_sink_32fc_sptr.default_scale_iq = __default_tx_scale_iq
+usrp2_sink_16sc_sptr.default_scale_iq = __default_tx_scale_iq
+
+usrp2_source_32fc_sptr.read_gpio = __read_gpio
+usrp2_source_16sc_sptr.read_gpio = __read_gpio
+usrp2_sink_32fc_sptr.read_gpio = __read_gpio
+usrp2_sink_16sc_sptr.read_gpio = __read_gpio
+
+%}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r11058 - in gnuradio/branches/developers/eb/vrt: . gr-vrt/src,
eb <=