summaryrefslogtreecommitdiff
path: root/gr-usrp/src
diff options
context:
space:
mode:
authorjblum2009-02-17 23:03:39 +0000
committerjblum2009-02-17 23:03:39 +0000
commit9030fb71746966a9ef6eb6ae2dc0aebdc6016987 (patch)
treea2f6a296048eeb1363cd8c77b68b36177473c1b4 /gr-usrp/src
parenteb2648dc72e7edb0adb0d810fc4166633c26aea0 (diff)
downloadgnuradio-9030fb71746966a9ef6eb6ae2dc0aebdc6016987.tar.gz
gnuradio-9030fb71746966a9ef6eb6ae2dc0aebdc6016987.tar.bz2
gnuradio-9030fb71746966a9ef6eb6ae2dc0aebdc6016987.zip
usrp methods for computing the mux for dual subdevices
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@10457 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'gr-usrp/src')
-rw-r--r--gr-usrp/src/usrp.i20
-rw-r--r--gr-usrp/src/usrp_sink_base.cc6
-rw-r--r--gr-usrp/src/usrp_sink_base.h1
-rw-r--r--gr-usrp/src/usrp_sink_base.i1
-rw-r--r--gr-usrp/src/usrp_source_base.cc6
-rw-r--r--gr-usrp/src/usrp_source_base.h1
-rw-r--r--gr-usrp/src/usrp_source_base.i1
7 files changed, 28 insertions, 8 deletions
diff --git a/gr-usrp/src/usrp.i b/gr-usrp/src/usrp.i
index 55ad2a763..f5841985d 100644
--- a/gr-usrp/src/usrp.i
+++ b/gr-usrp/src/usrp.i
@@ -48,14 +48,18 @@ def __selected_subdev(self, subdev_spec):
return self._real_selected_subdev(ss)
# Allow subdev_spec to be tuple
-def __determine_tx_mux_value(self, subdev_spec):
+def __determine_tx_mux_value(self, subdev_spec, subdev_spec_=None):
ss = usrp_subdev_spec(subdev_spec[0], subdev_spec[1])
- return self._real_determine_tx_mux_value(ss)
+ if subdev_spec_ is None: return self._real_determine_tx_mux_value(ss)
+ ss_ = usrp_subdev_spec(subdev_spec_[0], subdev_spec_[1])
+ return self._real_determine_tx_mux_value(ss, ss_)
# Allow subdev_spec to be tuple
-def __determine_rx_mux_value(self, subdev_spec):
+def __determine_rx_mux_value(self, subdev_spec, subdev_spec_=None):
ss = usrp_subdev_spec(subdev_spec[0], subdev_spec[1])
- return self._real_determine_rx_mux_value(ss)
+ if subdev_spec_ is None: return self._real_determine_rx_mux_value(ss)
+ ss_ = usrp_subdev_spec(subdev_spec_[0], subdev_spec_[1])
+ return self._real_determine_rx_mux_value(ss, ss_)
# Allow subdev_spec to be tuple
def __pick_subdev(self, candidates=[]):
@@ -86,12 +90,12 @@ def tune(u, chan, subdev, target_freq):
return u.tune(chan, subdev, target_freq)
# Allow to be called as free function
-def determine_tx_mux_value(u, subdev_spec):
- return u.determine_tx_mux_value(subdev_spec)
+def determine_tx_mux_value(u, subdev_spec, subdev_spec_=None):
+ return u.determine_tx_mux_value(subdev_spec, subdev_spec_)
# Allow to be called as free function
-def determine_rx_mux_value(u, subdev_spec):
- return u.determine_rx_mux_value(subdev_spec)
+def determine_rx_mux_value(u, subdev_spec, subdev_spec_=None):
+ return u.determine_rx_mux_value(subdev_spec, subdev_spec_)
# Allow to be called as free function
def selected_subdev(u, subdev_spec):
diff --git a/gr-usrp/src/usrp_sink_base.cc b/gr-usrp/src/usrp_sink_base.cc
index 963f4dd6d..fc238ceb8 100644
--- a/gr-usrp/src/usrp_sink_base.cc
+++ b/gr-usrp/src/usrp_sink_base.cc
@@ -151,6 +151,12 @@ usrp_sink_base::determine_tx_mux_value(usrp_subdev_spec ss)
return d_usrp->determine_tx_mux_value(ss);
}
+int
+usrp_sink_base::determine_tx_mux_value(usrp_subdev_spec ss_a, usrp_subdev_spec ss_b)
+{
+ return d_usrp->determine_tx_mux_value(ss_a, ss_b);
+}
+
bool
usrp_sink_base::set_tx_freq (int channel, double freq)
{
diff --git a/gr-usrp/src/usrp_sink_base.h b/gr-usrp/src/usrp_sink_base.h
index 12dd51c65..312bab246 100644
--- a/gr-usrp/src/usrp_sink_base.h
+++ b/gr-usrp/src/usrp_sink_base.h
@@ -88,6 +88,7 @@ class usrp_sink_base : public usrp_base {
bool set_nchannels (int nchan);
bool set_mux (int mux);
int determine_tx_mux_value(usrp_subdev_spec ss);
+ int determine_tx_mux_value(usrp_subdev_spec ss_a, usrp_subdev_spec ss_b);
/*!
* \brief set the frequency of the digital up converter.
diff --git a/gr-usrp/src/usrp_sink_base.i b/gr-usrp/src/usrp_sink_base.i
index ffc70a984..17fca441d 100644
--- a/gr-usrp/src/usrp_sink_base.i
+++ b/gr-usrp/src/usrp_sink_base.i
@@ -35,6 +35,7 @@ public:
bool set_mux (int mux);
%rename(_real_determine_tx_mux_value) determine_tx_mux_value;
int determine_tx_mux_value(usrp_subdev_spec ss);
+ int determine_tx_mux_value(usrp_subdev_spec ss_a, usrp_subdev_spec ss_b);
bool set_tx_freq (int channel, double freq);
long dac_rate() const { return converter_rate(); }
long dac_freq() const { return converter_rate(); }
diff --git a/gr-usrp/src/usrp_source_base.cc b/gr-usrp/src/usrp_source_base.cc
index 778fa1017..b875737ce 100644
--- a/gr-usrp/src/usrp_source_base.cc
+++ b/gr-usrp/src/usrp_source_base.cc
@@ -148,6 +148,12 @@ usrp_source_base::determine_rx_mux_value(usrp_subdev_spec ss)
return d_usrp->determine_rx_mux_value(ss);
}
+int
+usrp_source_base::determine_rx_mux_value(usrp_subdev_spec ss_a, usrp_subdev_spec ss_b)
+{
+ return d_usrp->determine_rx_mux_value(ss_a, ss_b);
+}
+
bool
usrp_source_base::set_rx_freq (int channel, double freq)
{
diff --git a/gr-usrp/src/usrp_source_base.h b/gr-usrp/src/usrp_source_base.h
index 9d8f32ac7..b9c4b9499 100644
--- a/gr-usrp/src/usrp_source_base.h
+++ b/gr-usrp/src/usrp_source_base.h
@@ -101,6 +101,7 @@ class usrp_source_base : public usrp_base {
bool set_nchannels (int nchan);
bool set_mux (int mux);
int determine_rx_mux_value(usrp_subdev_spec ss);
+ int determine_rx_mux_value(usrp_subdev_spec ss_a, usrp_subdev_spec ss_b);
/*!
* \brief set the center frequency of the digital down converter.
diff --git a/gr-usrp/src/usrp_source_base.i b/gr-usrp/src/usrp_source_base.i
index 6a70c7412..aed751de9 100644
--- a/gr-usrp/src/usrp_source_base.i
+++ b/gr-usrp/src/usrp_source_base.i
@@ -35,6 +35,7 @@ public:
bool set_mux (int mux);
%rename(_real_determine_rx_mux_value) determine_rx_mux_value;
int determine_rx_mux_value(usrp_subdev_spec ss);
+ int determine_rx_mux_value(usrp_subdev_spec ss_a, usrp_subdev_spec ss_b);
bool set_rx_freq (int channel, double freq);
bool set_fpga_mode (int mode);
bool set_ddc_phase(int channel, int phase);