[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r8506 - in usrp2/trunk/host: apps lib
From: |
eb |
Subject: |
[Commit-gnuradio] r8506 - in usrp2/trunk/host: apps lib |
Date: |
Sun, 25 May 2008 22:34:44 -0600 (MDT) |
Author: eb
Date: 2008-05-25 22:34:43 -0600 (Sun, 25 May 2008)
New Revision: 8506
Modified:
usrp2/trunk/host/apps/u2_burn_mac_addr.cc
usrp2/trunk/host/lib/usrp2_basic.cc
usrp2/trunk/host/lib/usrp2_basic.h
Log:
removed duplicated code to find a usrp by mac address
Modified: usrp2/trunk/host/apps/u2_burn_mac_addr.cc
===================================================================
--- usrp2/trunk/host/apps/u2_burn_mac_addr.cc 2008-05-26 04:27:51 UTC (rev
8505)
+++ usrp2/trunk/host/apps/u2_burn_mac_addr.cc 2008-05-26 04:34:43 UTC (rev
8506)
@@ -92,7 +92,7 @@
// Now see if we can find it using it's new address
- if (!usrp2_basic::find_usrp_by_mac(interface, new_mac_addr, 0)){
+ if (!usrp2_basic::find_usrp(interface, new_mac_addr, 0)){
std::cerr << "Failed to find USRP2 using new address "
<< new_mac_addr << ".\n";
return 1;
Modified: usrp2/trunk/host/lib/usrp2_basic.cc
===================================================================
--- usrp2/trunk/host/lib/usrp2_basic.cc 2008-05-26 04:27:51 UTC (rev 8505)
+++ usrp2/trunk/host/lib/usrp2_basic.cc 2008-05-26 04:34:43 UTC (rev 8506)
@@ -80,7 +80,7 @@
std::cerr << "usrp2_basic: constructor" << std::endl;
op_id_reply_t r;
- if (!usrp2_basic::find_usrp_by_mac(ifc, addr, &r))
+ if (!usrp2_basic::find_usrp(ifc, addr, &r))
throw std::runtime_error("Unable to find specified USRP2.");
d_ethernet->open(ifc, htons(U2_ETHERTYPE));
@@ -205,20 +205,6 @@
return true;
}
-bool
-usrp2_basic::find_usrp_by_mac(const std::string &ifc, const u2_mac_addr_t
&addr, op_id_reply_t *id)
-{
- std::vector<op_id_reply_t> r = find_usrps(ifc);
- for (unsigned i = 0; i < r.size(); i++){
- if (r[i].addr == addr){
- if (id)
- *id = r[i];
- return true;
- }
- }
- return false;
-}
-
// static
bool
usrp2_basic::find_usrp(const std::string &ifc, const u2_mac_addr_t &addr,
op_id_reply_t *u)
Modified: usrp2/trunk/host/lib/usrp2_basic.h
===================================================================
--- usrp2/trunk/host/lib/usrp2_basic.h 2008-05-26 04:27:51 UTC (rev 8505)
+++ usrp2/trunk/host/lib/usrp2_basic.h 2008-05-26 04:34:43 UTC (rev 8506)
@@ -87,16 +87,6 @@
static bool find_usrp(const std::string &ifc, const u2_mac_addr_t &addr,
op_id_reply_t *u);
/*!
- * \brief Find usrp by mac address
- *
- * \param[in] addr is the mac address of the USRP to look for
- * \param[out] u if not 0, is filled in with USRP info if found
- *
- * \returns true iff the specified usrp was found
- */
- static bool find_usrp_by_mac(const std::string &ifc, const u2_mac_addr_t
&addr, op_id_reply_t *u);
-
- /*!
* \brief Find a default USRP2 on an interface
* \param[in] ifc interface name, e.g., "eth0"
* \param[out] id if not 0, is filled in with ID reply information if found
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r8506 - in usrp2/trunk/host: apps lib,
eb <=