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/tx_flow_ctrl_state.hpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'host/lib/include/uhdlib/rfnoc/tx_flow_ctrl_state.hpp') diff --git a/host/lib/include/uhdlib/rfnoc/tx_flow_ctrl_state.hpp b/host/lib/include/uhdlib/rfnoc/tx_flow_ctrl_state.hpp index 65fc1b093..0005e7584 100644 --- a/host/lib/include/uhdlib/rfnoc/tx_flow_ctrl_state.hpp +++ b/host/lib/include/uhdlib/rfnoc/tx_flow_ctrl_state.hpp @@ -15,11 +15,8 @@ namespace uhd { namespace rfnoc { class tx_flow_ctrl_state { public: - //! Updates destination capacity - void set_dest_capacity(const stream_buff_params_t& capacity) - { - _dest_capacity = capacity; - } + //! Constructor + tx_flow_ctrl_state(const stream_buff_params_t& capacity) : _dest_capacity(capacity) {} //! Updates destination received count void update_dest_recv_count(const stream_buff_params_t& recv_count) @@ -67,7 +64,7 @@ public: //! Clears fc resync request pending status void clear_fc_resync_req_pending() { - _fc_resync_req = false; + _fc_resync_req = false; _last_fc_resync_bytes = _xfer_counts.bytes; } -- cgit v1.2.3