From 0e2464ad888230054b04a4f3fb192ea8dc5721b0 Mon Sep 17 00:00:00 2001 From: Ciro Nishiguchi Date: Tue, 27 Aug 2019 16:08:05 -0500 Subject: 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. --- host/lib/include/uhdlib/rfnoc/rx_flow_ctrl_state.hpp | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) (limited to 'host/lib/include/uhdlib/rfnoc/rx_flow_ctrl_state.hpp') 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) { -- cgit v1.2.3