aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/include/uhdlib/rfnoc/rx_flow_ctrl_state.hpp
diff options
context:
space:
mode:
authorCiro Nishiguchi <ciro.nishiguchi@ni.com>2019-08-27 16:08:05 -0500
committerMartin Braun <martin.braun@ettus.com>2019-11-26 11:49:43 -0800
commit0e2464ad888230054b04a4f3fb192ea8dc5721b0 (patch)
treec51fa49fa5280437b178244660094a535b7059cc /host/lib/include/uhdlib/rfnoc/rx_flow_ctrl_state.hpp
parent23f4f8cf4ea72d59740afcb5663e4541f93e821a (diff)
downloaduhd-0e2464ad888230054b04a4f3fb192ea8dc5721b0.tar.gz
uhd-0e2464ad888230054b04a4f3fb192ea8dc5721b0.tar.bz2
uhd-0e2464ad888230054b04a4f3fb192ea8dc5721b0.zip
rfnoc: Move data xport sep configuration to static methods
Move the configuration logic for stream endpoints to static methods of the chdr data transports. This separates those interactions from the main transport code, simplifying both. It also makes it easier to use the transports with mock link objects.
Diffstat (limited to 'host/lib/include/uhdlib/rfnoc/rx_flow_ctrl_state.hpp')
-rw-r--r--host/lib/include/uhdlib/rfnoc/rx_flow_ctrl_state.hpp17
1 files changed, 3 insertions, 14 deletions
diff --git a/host/lib/include/uhdlib/rfnoc/rx_flow_ctrl_state.hpp b/host/lib/include/uhdlib/rfnoc/rx_flow_ctrl_state.hpp
index 937baf982..ed6553bf3 100644
--- a/host/lib/include/uhdlib/rfnoc/rx_flow_ctrl_state.hpp
+++ b/host/lib/include/uhdlib/rfnoc/rx_flow_ctrl_state.hpp
@@ -17,12 +17,10 @@ class rx_flow_ctrl_state
{
public:
//! Constructor
- rx_flow_ctrl_state(const rfnoc::sep_id_pair_t epids) : _epids(epids) {}
-
- //! Initialize frequency parameters
- void initialize(const stream_buff_params_t fc_freq)
+ rx_flow_ctrl_state(
+ const rfnoc::sep_id_pair_t epids, const stream_buff_params_t fc_freq)
+ : _fc_freq(fc_freq), _epids(epids)
{
- _fc_freq = fc_freq;
}
//! Resynchronize with transfer counts from the sender
@@ -50,15 +48,6 @@ public:
}
}
- //! Reset the transfer counts (happens during init)
- void reset_counts()
- {
- UHD_LOGGER_TRACE("rx_flow_ctrl_state")
- << "Resetting transfer counts" << std::endl;
- _recv_counts = {0, 0};
- _xfer_counts = {0, 0};
- }
-
//! Update state when data is received
void data_received(const size_t bytes)
{