aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp
diff options
context:
space:
mode:
authorPhilip Balister <philip@opensdr.com>2010-10-14 21:41:14 -0400
committerPhilip Balister <philip@opensdr.com>2010-10-14 21:41:14 -0400
commit9348c2764dbbdf01e34a3ec7b5c8e74964b355e0 (patch)
tree8b5d5ab18f970b66b09c0ca484eb791adfab50c7 /host/lib/usrp
parent0582d9f5bc4793aa0ce609933e8cc108255903e8 (diff)
downloaduhd-9348c2764dbbdf01e34a3ec7b5c8e74964b355e0.tar.gz
uhd-9348c2764dbbdf01e34a3ec7b5c8e74964b355e0.tar.bz2
uhd-9348c2764dbbdf01e34a3ec7b5c8e74964b355e0.zip
usrp_e: back out dynamic send/recv samples calculation.
Diffstat (limited to 'host/lib/usrp')
-rw-r--r--host/lib/usrp/usrp_e/io_impl.cpp6
-rw-r--r--host/lib/usrp/usrp_e/usrp_e_impl.hpp5
2 files changed, 10 insertions, 1 deletions
diff --git a/host/lib/usrp/usrp_e/io_impl.cpp b/host/lib/usrp/usrp_e/io_impl.cpp
index 406b7269f..d89a7db07 100644
--- a/host/lib/usrp/usrp_e/io_impl.cpp
+++ b/host/lib/usrp/usrp_e/io_impl.cpp
@@ -37,7 +37,7 @@ zero_copy_if::sptr usrp_e_make_mmap_zero_copy(usrp_e_iface::sptr iface);
**********************************************************************/
static const size_t tx_async_report_sid = 1;
static const int underflow_flags = async_metadata_t::EVENT_CODE_UNDERFLOW | async_metadata_t::EVENT_CODE_UNDERFLOW_IN_PACKET;
-static const bool recv_debug = true;
+static const bool recv_debug = false;
/***********************************************************************
* io impl details (internal to this file)
@@ -205,6 +205,7 @@ bool get_send_buffs(
return buffs[0].get() != NULL;
}
+#if 0
size_t usrp_e_impl::get_max_send_samps_per_packet(void) const{
static const size_t hdr_size = 0
+ vrt::max_if_hdr_words32*sizeof(boost::uint32_t)
@@ -213,6 +214,7 @@ size_t usrp_e_impl::get_max_send_samps_per_packet(void) const{
size_t bpp = _io_impl->data_xport->get_send_frame_size() - hdr_size;
return bpp/_send_otw_type.get_sample_size();
}
+#endif
size_t usrp_e_impl::send(
const std::vector<const void *> &buffs, size_t num_samps,
@@ -234,6 +236,7 @@ size_t usrp_e_impl::send(
/***********************************************************************
* Data Recv
**********************************************************************/
+#if 0
size_t usrp_e_impl::get_max_recv_samps_per_packet(void) const{
static const size_t hdr_size = 0
+ vrt::max_if_hdr_words32*sizeof(boost::uint32_t)
@@ -243,6 +246,7 @@ size_t usrp_e_impl::get_max_recv_samps_per_packet(void) const{
size_t bpp = _io_impl->data_xport->get_recv_frame_size() - hdr_size;
return bpp/_recv_otw_type.get_sample_size();
}
+#endif
size_t usrp_e_impl::recv(
const std::vector<void *> &buffs, size_t num_samps,
diff --git a/host/lib/usrp/usrp_e/usrp_e_impl.hpp b/host/lib/usrp/usrp_e/usrp_e_impl.hpp
index 95d80fed5..9799cd645 100644
--- a/host/lib/usrp/usrp_e/usrp_e_impl.hpp
+++ b/host/lib/usrp/usrp_e/usrp_e_impl.hpp
@@ -86,8 +86,13 @@ public:
size_t send(const std::vector<const void *> &, size_t, const uhd::tx_metadata_t &, const uhd::io_type_t &, send_mode_t, double);
size_t recv(const std::vector<void *> &, size_t, uhd::rx_metadata_t &, const uhd::io_type_t &, recv_mode_t, double);
bool recv_async_msg(uhd::async_metadata_t &, double);
+#if 0
size_t get_max_send_samps_per_packet(void) const;
size_t get_max_recv_samps_per_packet(void) const;
+#else
+ size_t get_max_send_samps_per_packet(void) const{return 503;}
+ size_t get_max_recv_samps_per_packet(void) const{return 503;}
+#endif
private:
//interface to ioctls and file descriptor