summaryrefslogtreecommitdiffstats
path: root/host/lib/usrp
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-10-13 13:08:12 -0700
committerJosh Blum <josh@joshknows.com>2011-11-03 20:37:12 -0700
commit00b6d8359de6ea616f7bd6573d7f87d635d78a79 (patch)
treecaea2fa1178dd5dac722f1395480539474c47b57 /host/lib/usrp
parent522bc87d9f61668f3d22e067c39a98e5f33fc6c5 (diff)
downloaduhd-00b6d8359de6ea616f7bd6573d7f87d635d78a79.tar.gz
uhd-00b6d8359de6ea616f7bd6573d7f87d635d78a79.tar.bz2
uhd-00b6d8359de6ea616f7bd6573d7f87d635d78a79.zip
uhd: added trailer parsing for occupancy
Diffstat (limited to 'host/lib/usrp')
-rw-r--r--host/lib/usrp/cores/rx_dsp_core_200.cpp3
-rw-r--r--host/lib/usrp/cores/tx_dsp_core_200.cpp3
-rw-r--r--host/lib/usrp/usrp1/io_impl.cpp1
3 files changed, 5 insertions, 2 deletions
diff --git a/host/lib/usrp/cores/rx_dsp_core_200.cpp b/host/lib/usrp/cores/rx_dsp_core_200.cpp
index 023216a09..b121bc849 100644
--- a/host/lib/usrp/cores/rx_dsp_core_200.cpp
+++ b/host/lib/usrp/cores/rx_dsp_core_200.cpp
@@ -130,7 +130,8 @@ public:
}
void set_link_rate(const double rate){
- _link_rate = rate/sizeof(boost::uint32_t); //in samps/s
+ //_link_rate = rate/sizeof(boost::uint32_t); //in samps/s
+ _link_rate = rate/sizeof(boost::uint16_t); //in samps/s (allows for 8sc)
}
double set_host_rate(const double rate){
diff --git a/host/lib/usrp/cores/tx_dsp_core_200.cpp b/host/lib/usrp/cores/tx_dsp_core_200.cpp
index 04e9f5da4..f37b53527 100644
--- a/host/lib/usrp/cores/tx_dsp_core_200.cpp
+++ b/host/lib/usrp/cores/tx_dsp_core_200.cpp
@@ -70,7 +70,8 @@ public:
}
void set_link_rate(const double rate){
- _link_rate = rate/sizeof(boost::uint32_t); //in samps/s
+ //_link_rate = rate/sizeof(boost::uint32_t); //in samps/s
+ _link_rate = rate/sizeof(boost::uint16_t); //in samps/s (allows for 8sc)
}
double set_host_rate(const double rate){
diff --git a/host/lib/usrp/usrp1/io_impl.cpp b/host/lib/usrp/usrp1/io_impl.cpp
index 534d33959..12950d385 100644
--- a/host/lib/usrp/usrp1/io_impl.cpp
+++ b/host/lib/usrp/usrp1/io_impl.cpp
@@ -111,6 +111,7 @@ static void usrp1_bs_vrt_unpacker(
){
if_packet_info.packet_type = vrt::if_packet_info_t::PACKET_TYPE_DATA;
if_packet_info.num_payload_words32 = if_packet_info.num_packet_words32;
+ if_packet_info.num_payload_bytes = if_packet_info.num_packet_words32*sizeof(boost::uint32_t);
if_packet_info.num_header_words32 = 0;
if_packet_info.packet_count = 0;
if_packet_info.sob = false;