aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael West <michael.west@ettus.com>2018-10-16 14:17:42 -0700
committerBrent Stapleton <bstapleton@g.hmc.edu>2018-10-24 14:28:18 -0700
commitc406c1dc9d10aa04e8d6a97919488b31f2b68424 (patch)
tree1ecdda1f1a36eb200bbfd21c45eae8a282dae4df
parentf23c8cd1407a04c75deb1c26860a9262d1924086 (diff)
downloaduhd-c406c1dc9d10aa04e8d6a97919488b31f2b68424.tar.gz
uhd-c406c1dc9d10aa04e8d6a97919488b31f2b68424.tar.bz2
uhd-c406c1dc9d10aa04e8d6a97919488b31f2b68424.zip
UHD: Fix RX streamer SOB and EOB handling
-rw-r--r--host/lib/transport/super_recv_packet_handler.hpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/host/lib/transport/super_recv_packet_handler.hpp b/host/lib/transport/super_recv_packet_handler.hpp
index ea02f367d..894287d6b 100644
--- a/host/lib/transport/super_recv_packet_handler.hpp
+++ b/host/lib/transport/super_recv_packet_handler.hpp
@@ -519,12 +519,21 @@ private:
}
}
info.data_bytes_to_copy = info[index].ifpi.num_payload_bytes;
+ // reset start_of_burst and end_of_burst states
+ info.metadata.start_of_burst = info[index].ifpi.sob;
+ info.metadata.end_of_burst = info[index].ifpi.eob;
}
//if the sequence id matches:
// remove this index from the list and continue
else if (info[index].time == info.alignment_time){
info.indexes_todo.reset(index);
+ // All channels should have sob set at the same time, so only
+ // set start_of burst if all channels have sob set.
+ info.metadata.start_of_burst &= info[index].ifpi.sob;
+ // If any channel indicates eob, no more data will be received for
+ // that channel so set end_of_burst for any eob.
+ info.metadata.end_of_burst |= info[index].ifpi.eob;
} else {
// Not going to use this buffer, so release it
info[index].reset();
@@ -660,8 +669,6 @@ private:
curr_info.metadata.time_spec = time_spec_t::from_ticks(curr_info[0].time, _tick_rate);
curr_info.metadata.more_fragments = false;
curr_info.metadata.fragment_offset = 0;
- curr_info.metadata.start_of_burst = curr_info[0].ifpi.sob;
- curr_info.metadata.end_of_burst = curr_info[0].ifpi.eob;
curr_info.metadata.error_code = rx_metadata_t::ERROR_CODE_NONE;
}