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/include | |
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/include')
-rw-r--r-- | host/include/uhd/rfnoc/actions.hpp | 22 | ||||
-rw-r--r-- | host/include/uhd/rfnoc/defaults.hpp | 3 |
2 files changed, 23 insertions, 2 deletions
diff --git a/host/include/uhd/rfnoc/actions.hpp b/host/include/uhd/rfnoc/actions.hpp index b713bbed3..7326cfd6d 100644 --- a/host/include/uhd/rfnoc/actions.hpp +++ b/host/include/uhd/rfnoc/actions.hpp @@ -78,7 +78,27 @@ private: rx_event_action_info(); }; +struct UHD_API tx_event_action_info : public action_info +{ +public: + using sptr = std::shared_ptr<tx_event_action_info>; + + //! The event code that describes the event + uhd::async_metadata_t::event_code_t event_code; + + //! Has time specification? + bool has_tsf; + + //! When the async event occurred + uint64_t tsf; + + //! Factory function + static sptr make(uhd::async_metadata_t::event_code_t event_code); + +protected: + tx_event_action_info(uhd::async_metadata_t::event_code_t event_code); +}; + }} /* namespace uhd::rfnoc */ #endif /* INCLUDED_LIBUHD_RFNOC_ACTIONS_HPP */ - diff --git a/host/include/uhd/rfnoc/defaults.hpp b/host/include/uhd/rfnoc/defaults.hpp index 008847091..efc774467 100644 --- a/host/include/uhd/rfnoc/defaults.hpp +++ b/host/include/uhd/rfnoc/defaults.hpp @@ -32,11 +32,12 @@ static const io_type_t IO_TYPE_SC16 = "sc16"; static const std::string ACTION_KEY_STREAM_CMD("stream_cmd"); static const std::string ACTION_KEY_RX_EVENT("rx_event"); static const std::string ACTION_KEY_RX_RESTART_REQ("restart_request"); +static const std::string ACTION_KEY_TX_EVENT("tx_event"); //! If the block name can't be automatically detected, this name is used static const std::string DEFAULT_BLOCK_NAME = "Block"; //! This NOC-ID is used to look up the default block -static const uint32_t DEFAULT_NOC_ID = 0xFFFFFFFF; +static const uint32_t DEFAULT_NOC_ID = 0xFFFFFFFF; static const double DEFAULT_TICK_RATE = 1.0; // Whenever we need a default spp value use this, unless there are some // block/device-specific constraints. It will keep the frame size below 1500. |