diff options
author | Ciro Nishiguchi <ciro.nishiguchi@ni.com> | 2019-08-08 10:25:20 -0500 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2019-11-26 11:49:36 -0800 |
commit | bffef674fbbcd892967017e81515bb76e0b850b5 (patch) | |
tree | 8f56eb8548d0fb56094b555ae11d16eb61e6c381 /host/lib/include/uhdlib/rfnoc/rfnoc_tx_streamer.hpp | |
parent | 91e01c484475600fcd659bb433ab86efa5146426 (diff) | |
download | uhd-bffef674fbbcd892967017e81515bb76e0b850b5.tar.gz uhd-bffef674fbbcd892967017e81515bb76e0b850b5.tar.bz2 uhd-bffef674fbbcd892967017e81515bb76e0b850b5.zip |
rfnoc: tx_streamer: add support for async messages
Add an async message queue that aggregates errors from multiple sources.
Errors can come from the strs packets originating from the stream
endpoint or from the radio block through control packets to the host.
Diffstat (limited to 'host/lib/include/uhdlib/rfnoc/rfnoc_tx_streamer.hpp')
-rw-r--r-- | host/lib/include/uhdlib/rfnoc/rfnoc_tx_streamer.hpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/host/lib/include/uhdlib/rfnoc/rfnoc_tx_streamer.hpp b/host/lib/include/uhdlib/rfnoc/rfnoc_tx_streamer.hpp index 3bfc9d05a..3e006f7f9 100644 --- a/host/lib/include/uhdlib/rfnoc/rfnoc_tx_streamer.hpp +++ b/host/lib/include/uhdlib/rfnoc/rfnoc_tx_streamer.hpp @@ -9,6 +9,7 @@ #include <uhd/rfnoc/node.hpp> #include <uhdlib/rfnoc/chdr_tx_data_xport.hpp> +#include <uhdlib/rfnoc/tx_async_msg_queue.hpp> #include <uhdlib/transport/tx_streamer_impl.hpp> #include <string> @@ -78,9 +79,25 @@ public: */ void connect_channel(const size_t channel, chdr_tx_data_xport::uptr xport); + /*! Receive an asynchronous message from this tx stream + * + * Implementation of tx_streamer API method. + * + * \param async_metadata the metadata to be filled in + * \param timeout the timeout in seconds to wait for a message + * \return true when the async_metadata is valid, false for timeout + */ + bool recv_async_msg(uhd::async_metadata_t& async_metadata, double timeout); + private: void _register_props(const size_t chan, const std::string& otw_format); + void _handle_tx_event_action( + const res_source_info& src, tx_event_action_info::sptr tx_event_action); + + // Queue for async messages + tx_async_msg_queue::sptr _async_msg_queue; + // Properties std::vector<property_t<double>> _scaling_out; std::vector<property_t<double>> _samp_rate_out; |