summaryrefslogtreecommitdiff
path: root/gr-usrp2/src
diff options
context:
space:
mode:
Diffstat (limited to 'gr-usrp2/src')
-rw-r--r--gr-usrp2/src/usrp2.i2
-rw-r--r--gr-usrp2/src/usrp2_sink_base.cc8
-rw-r--r--gr-usrp2/src/usrp2_sink_base.h7
-rw-r--r--gr-usrp2/src/usrp2_source_base.cc6
-rw-r--r--gr-usrp2/src/usrp2_source_base.h7
5 files changed, 27 insertions, 3 deletions
diff --git a/gr-usrp2/src/usrp2.i b/gr-usrp2/src/usrp2.i
index 319740283..d1fa091f7 100644
--- a/gr-usrp2/src/usrp2.i
+++ b/gr-usrp2/src/usrp2.i
@@ -66,6 +66,7 @@ protected:
public:
~usrp2_source_base();
+ bool set_antenna(int ant);
bool set_gain(double gain);
%rename(_real_set_center_freq) set_center_freq;
bool set_lo_offset(double frequency);
@@ -138,6 +139,7 @@ protected:
public:
~usrp2_sink_base();
+ bool set_antenna(int ant);
bool set_gain(double gain);
%rename(_real_set_center_freq) set_center_freq;
bool set_lo_offset(double frequency);
diff --git a/gr-usrp2/src/usrp2_sink_base.cc b/gr-usrp2/src/usrp2_sink_base.cc
index 4579d1651..ce473f236 100644
--- a/gr-usrp2/src/usrp2_sink_base.cc
+++ b/gr-usrp2/src/usrp2_sink_base.cc
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2008 Free Software Foundation, Inc.
+ * Copyright 2008,2010 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -47,6 +47,12 @@ usrp2_sink_base::~usrp2_sink_base ()
}
bool
+usrp2_sink_base::set_antenna(int ant)
+{
+ return d_u2->set_tx_antenna(ant);
+}
+
+bool
usrp2_sink_base::set_gain(double gain)
{
return d_u2->set_tx_gain(gain);
diff --git a/gr-usrp2/src/usrp2_sink_base.h b/gr-usrp2/src/usrp2_sink_base.h
index f973e805c..38dc4f236 100644
--- a/gr-usrp2/src/usrp2_sink_base.h
+++ b/gr-usrp2/src/usrp2_sink_base.h
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2008 Free Software Foundation, Inc.
+ * Copyright 2008,2010 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -41,6 +41,11 @@ public:
~usrp2_sink_base();
/*!
+ * \brief Set antenna
+ */
+ bool set_antenna(int ant);
+
+ /*!
* \brief Set transmitter gain
*/
bool set_gain(double gain);
diff --git a/gr-usrp2/src/usrp2_source_base.cc b/gr-usrp2/src/usrp2_source_base.cc
index 0ad7008a6..d946991de 100644
--- a/gr-usrp2/src/usrp2_source_base.cc
+++ b/gr-usrp2/src/usrp2_source_base.cc
@@ -47,6 +47,12 @@ usrp2_source_base::~usrp2_source_base ()
}
bool
+usrp2_source_base::set_antenna(int ant)
+{
+ return d_u2->set_rx_antenna(ant);
+}
+
+bool
usrp2_source_base::set_gain(double gain)
{
return d_u2->set_rx_gain(gain);
diff --git a/gr-usrp2/src/usrp2_source_base.h b/gr-usrp2/src/usrp2_source_base.h
index 2e2d51fc3..9e35e2e93 100644
--- a/gr-usrp2/src/usrp2_source_base.h
+++ b/gr-usrp2/src/usrp2_source_base.h
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2008,2009 Free Software Foundation, Inc.
+ * Copyright 2008,2009,2010 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -41,6 +41,11 @@ public:
~usrp2_source_base();
/*!
+ * \brief Set antenna
+ */
+ bool set_antenna(int ant);
+
+ /*!
* \brief Set receiver gain
*/
bool set_gain(double gain);