[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r10475 - in gnuradio/trunk: gr-usrp2/src usrp2/host/in
From: |
jcorgan |
Subject: |
[Commit-gnuradio] r10475 - in gnuradio/trunk: gr-usrp2/src usrp2/host/include/usrp2 usrp2/host/lib |
Date: |
Sun, 22 Feb 2009 13:52:29 -0700 (MST) |
Author: jcorgan
Date: 2009-02-22 13:52:29 -0700 (Sun, 22 Feb 2009)
New Revision: 10475
Modified:
gnuradio/trunk/gr-usrp2/src/usrp2.i
gnuradio/trunk/gr-usrp2/src/usrp2_base.cc
gnuradio/trunk/gr-usrp2/src/usrp2_base.h
gnuradio/trunk/usrp2/host/include/usrp2/usrp2.h
gnuradio/trunk/usrp2/host/lib/usrp2.cc
gnuradio/trunk/usrp2/host/lib/usrp2_impl.cc
gnuradio/trunk/usrp2/host/lib/usrp2_impl.h
Log:
Adds ifc_name() to libusrp2 and gr-usrp2
Modified: gnuradio/trunk/gr-usrp2/src/usrp2.i
===================================================================
--- gnuradio/trunk/gr-usrp2/src/usrp2.i 2009-02-22 20:20:34 UTC (rev 10474)
+++ gnuradio/trunk/gr-usrp2/src/usrp2.i 2009-02-22 20:52:29 UTC (rev 10475)
@@ -45,6 +45,7 @@
~usrp2_base();
std::string mac_addr() const;
+ std::string ifc_name() const;
%rename(_real_fpga_master_clock_freq) fpga_master_clock_freq;
bool fpga_master_clock_freq(long *freq);
bool sync_to_pps();
Modified: gnuradio/trunk/gr-usrp2/src/usrp2_base.cc
===================================================================
--- gnuradio/trunk/gr-usrp2/src/usrp2_base.cc 2009-02-22 20:20:34 UTC (rev
10474)
+++ gnuradio/trunk/gr-usrp2/src/usrp2_base.cc 2009-02-22 20:52:29 UTC (rev
10475)
@@ -55,6 +55,12 @@
return d_u2->mac_addr();
}
+std::string
+usrp2_base::ifc_name() const
+{
+ return d_u2->ifc_name();
+}
+
bool
usrp2_base::fpga_master_clock_freq(long *freq) const
{
Modified: gnuradio/trunk/gr-usrp2/src/usrp2_base.h
===================================================================
--- gnuradio/trunk/gr-usrp2/src/usrp2_base.h 2009-02-22 20:20:34 UTC (rev
10474)
+++ gnuradio/trunk/gr-usrp2/src/usrp2_base.h 2009-02-22 20:52:29 UTC (rev
10475)
@@ -54,6 +54,11 @@
std::string mac_addr() const;
/*!
+ * \brief Get interface name used to communicat with USRP2
+ */
+ std::string ifc_name() const;
+
+ /*!
* \brief Get USRP2 master clock rate
*/
bool fpga_master_clock_freq(long *freq) const;
Modified: gnuradio/trunk/usrp2/host/include/usrp2/usrp2.h
===================================================================
--- gnuradio/trunk/usrp2/host/include/usrp2/usrp2.h 2009-02-22 20:20:34 UTC
(rev 10474)
+++ gnuradio/trunk/usrp2/host/include/usrp2/usrp2.h 2009-02-22 20:52:29 UTC
(rev 10475)
@@ -94,6 +94,11 @@
*/
std::string mac_addr();
+ /*!
+ * Returns the GbE interface name associated with this USRP
+ */
+ std::string ifc_name();
+
/*
* ----------------------------------------------------------------
* Rx configuration and control
Modified: gnuradio/trunk/usrp2/host/lib/usrp2.cc
===================================================================
--- gnuradio/trunk/usrp2/host/lib/usrp2.cc 2009-02-22 20:20:34 UTC (rev
10474)
+++ gnuradio/trunk/usrp2/host/lib/usrp2.cc 2009-02-22 20:52:29 UTC (rev
10475)
@@ -160,6 +160,12 @@
return d_impl->mac_addr();
}
+ std::string
+ usrp2::ifc_name()
+ {
+ return d_impl->ifc_name();
+ }
+
// Receive
bool
Modified: gnuradio/trunk/usrp2/host/lib/usrp2_impl.cc
===================================================================
--- gnuradio/trunk/usrp2/host/lib/usrp2_impl.cc 2009-02-22 20:20:34 UTC (rev
10474)
+++ gnuradio/trunk/usrp2/host/lib/usrp2_impl.cc 2009-02-22 20:52:29 UTC (rev
10475)
@@ -129,8 +129,8 @@
usrp2::impl::impl(const std::string &ifc, props *p)
- : d_eth_buf(new eth_buffer()), d_pf(0), d_bg_thread(0),
d_bg_running(false),
- d_rx_seqno(-1), d_tx_seqno(0), d_next_rid(0),
+ : d_eth_buf(new eth_buffer()), d_ifc_name(ifc), d_pf(0), d_bg_thread(0),
+ d_bg_running(false), d_rx_seqno(-1), d_tx_seqno(0), d_next_rid(0),
d_num_rx_frames(0), d_num_rx_missing(0), d_num_rx_overruns(0),
d_num_rx_bytes(0),
d_num_enqueued(0), d_enqueued_mutex(),
d_bg_pending_cond(&d_enqueued_mutex),
d_channel_rings(NCHANS), d_tx_interp(0), d_rx_decim(0)
Modified: gnuradio/trunk/usrp2/host/lib/usrp2_impl.h
===================================================================
--- gnuradio/trunk/usrp2/host/lib/usrp2_impl.h 2009-02-22 20:20:34 UTC (rev
10474)
+++ gnuradio/trunk/usrp2/host/lib/usrp2_impl.h 2009-02-22 20:52:29 UTC (rev
10475)
@@ -57,6 +57,7 @@
static const size_t NCHANS = 32;
eth_buffer *d_eth_buf;
+ std::string d_ifc_name;
pktfilter *d_pf;
std::string d_addr; // FIXME: use u2_mac_addr_t instead
usrp2_thread *d_bg_thread;
@@ -117,6 +118,7 @@
void bg_loop();
std::string mac_addr() const { return d_addr; } // FIXME: convert from
u2_mac_addr_t
+ std::string ifc_name() const { return d_ifc_name; }
// Rx
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r10475 - in gnuradio/trunk: gr-usrp2/src usrp2/host/include/usrp2 usrp2/host/lib,
jcorgan <=