diff options
Diffstat (limited to 'host')
| -rw-r--r-- | host/include/uhd/rfnoc/actions.hpp | 19 | ||||
| -rw-r--r-- | host/lib/rfnoc/actions.cpp | 17 | 
2 files changed, 33 insertions, 3 deletions
| diff --git a/host/include/uhd/rfnoc/actions.hpp b/host/include/uhd/rfnoc/actions.hpp index 611cb787c..bc681360b 100644 --- a/host/include/uhd/rfnoc/actions.hpp +++ b/host/include/uhd/rfnoc/actions.hpp @@ -8,11 +8,11 @@  #define INCLUDED_LIBUHD_RFNOC_ACTIONS_HPP  #include <uhd/config.hpp> -#include <uhd/rfnoc/defaults.hpp> +#include <uhd/types/metadata.hpp>  #include <uhd/types/stream_cmd.hpp> +#include <memory>  #include <string>  #include <vector> -#include <memory>  namespace uhd { namespace rfnoc { @@ -58,6 +58,21 @@ private:      stream_cmd_action_info(const uhd::stream_cmd_t::stream_mode_t stream_mode);  }; +struct UHD_API rx_event_action_info : public action_info +{ +public: +    using sptr = std::shared_ptr<rx_event_action_info>; + +    //! The error code that describes the event +    uhd::rx_metadata_t::error_code_t error_code = uhd::rx_metadata_t::ERROR_CODE_NONE; + +    //! Factory function +    static sptr make(); + +private: +    rx_event_action_info(); +}; +  }} /* namespace uhd::rfnoc */  #endif /* INCLUDED_LIBUHD_RFNOC_ACTIONS_HPP */ diff --git a/host/lib/rfnoc/actions.cpp b/host/lib/rfnoc/actions.cpp index 428a1fcb2..c441c52b3 100644 --- a/host/lib/rfnoc/actions.cpp +++ b/host/lib/rfnoc/actions.cpp @@ -5,6 +5,7 @@  //  #include <uhd/rfnoc/actions.hpp> +#include <uhd/rfnoc/defaults.hpp>  #include <atomic>  using namespace uhd::rfnoc; @@ -30,6 +31,7 @@ action_info::sptr action_info::make(const std::string& key)      return sptr(new action_info(key));  } +/*** Stream Command Action Info **********************************************/  stream_cmd_action_info::stream_cmd_action_info(      const uhd::stream_cmd_t::stream_mode_t stream_mode)      : action_info(ACTION_KEY_STREAM_CMD), stream_cmd(stream_mode) @@ -40,6 +42,19 @@ stream_cmd_action_info::stream_cmd_action_info(  stream_cmd_action_info::sptr stream_cmd_action_info::make(      const uhd::stream_cmd_t::stream_mode_t stream_mode)  { -    //return std::make_shared<action_info>(ACTION_KEY_STREAM_CMD);      return sptr(new stream_cmd_action_info(stream_mode));  } + +/*** RX Metadata Action Info *************************************************/ +rx_event_action_info::rx_event_action_info() : action_info(ACTION_KEY_RX_EVENT) +{ +    // nop +} + +rx_event_action_info::sptr rx_event_action_info::make() +{ +    struct rx_event_action_info_make_shared : public rx_event_action_info +    { +    }; +    return std::make_shared<rx_event_action_info_make_shared>(); +} | 
