diff options
author | Alex Williams <alex.williams@ni.com> | 2019-08-08 15:41:30 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2019-11-26 11:49:36 -0800 |
commit | 117af6f0b0d50e6ba81bbd8f970d8963f615548a (patch) | |
tree | 61e5b5f037afc406e7208267cf8773bb6e057d94 /host/lib/rfnoc/graph_stream_manager.cpp | |
parent | bffef674fbbcd892967017e81515bb76e0b850b5 (diff) | |
download | uhd-117af6f0b0d50e6ba81bbd8f970d8963f615548a.tar.gz uhd-117af6f0b0d50e6ba81bbd8f970d8963f615548a.tar.bz2 uhd-117af6f0b0d50e6ba81bbd8f970d8963f615548a.zip |
rfnoc: Add ability to select transport for streamers to user APIs
Now the user can choose which transport is used in connect() calls.
Diffstat (limited to 'host/lib/rfnoc/graph_stream_manager.cpp')
-rw-r--r-- | host/lib/rfnoc/graph_stream_manager.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/host/lib/rfnoc/graph_stream_manager.cpp b/host/lib/rfnoc/graph_stream_manager.cpp index 2db68db04..fe28eab54 100644 --- a/host/lib/rfnoc/graph_stream_manager.cpp +++ b/host/lib/rfnoc/graph_stream_manager.cpp @@ -181,11 +181,9 @@ public: const sep_addr_t src_addr, const sw_buff_t pyld_buff_fmt, const sw_buff_t mdata_buff_fmt, + const device_id_t via_device, const device_addr_t& xport_args) { - // TODO: choose a route - const device_id_t via_device = NULL_DEVICE_ID; - return _link_mgrs.at(_check_dst_and_find_src(src_addr, via_device)) ->create_device_to_host_data_stream(src_addr, pyld_buff_fmt, @@ -197,11 +195,9 @@ public: sep_addr_t dst_addr, const sw_buff_t pyld_buff_fmt, const sw_buff_t mdata_buff_fmt, + const device_id_t via_device, const device_addr_t& xport_args) { - // TODO: choose a route - const device_id_t via_device = NULL_DEVICE_ID; - return _link_mgrs.at(_check_dst_and_find_src(dst_addr, via_device)) ->create_host_to_device_data_stream(dst_addr, pyld_buff_fmt, @@ -209,6 +205,14 @@ public: xport_args); } + std::vector<device_id_t> get_via_devices(sep_addr_t addr) const + { + if (_src_map.count(addr) > 0) { + return _src_map.at(addr); + } else { + throw uhd::rfnoc_error("Specified address is unreachable. No via_devices."); + } + } private: device_id_t _check_dst_and_find_src(sep_addr_t dst_addr, device_id_t via_device) const { |