diff options
author | Martin Braun <martin.braun@ettus.com> | 2019-05-15 10:26:44 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2019-11-26 11:49:14 -0800 |
commit | b8a6c64d6012ab1ec0b3b843fccec2d990d440a3 (patch) | |
tree | 31a99d71af5a6aa2db2a7c9f2a7d19986a2d3856 /host/lib/include/uhdlib/rfnoc/node_accessor.hpp | |
parent | d6251df6347390e74784b2fbe116b0e64780547e (diff) | |
download | uhd-b8a6c64d6012ab1ec0b3b843fccec2d990d440a3.tar.gz uhd-b8a6c64d6012ab1ec0b3b843fccec2d990d440a3.tar.bz2 uhd-b8a6c64d6012ab1ec0b3b843fccec2d990d440a3.zip |
rfnoc: Add action API
- Added action_info class
- Allow to send actions from node to node
- Allow to post actions into nodes
- Allow to set default forwarding policies
- Added unit tests
Diffstat (limited to 'host/lib/include/uhdlib/rfnoc/node_accessor.hpp')
-rw-r--r-- | host/lib/include/uhdlib/rfnoc/node_accessor.hpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/host/lib/include/uhdlib/rfnoc/node_accessor.hpp b/host/lib/include/uhdlib/rfnoc/node_accessor.hpp index 554cc8f4f..827c87dd2 100644 --- a/host/lib/include/uhdlib/rfnoc/node_accessor.hpp +++ b/host/lib/include/uhdlib/rfnoc/node_accessor.hpp @@ -7,7 +7,9 @@ #ifndef INCLUDED_LIBUHD_NODE_ACCESSOR_HPP #define INCLUDED_LIBUHD_NODE_ACCESSOR_HPP +#include <uhd/rfnoc/actions.hpp> #include <uhd/rfnoc/node.hpp> +#include <uhd/rfnoc/res_source_info.hpp> #include <functional> namespace uhd { namespace rfnoc { @@ -77,6 +79,24 @@ public: { dst_node->forward_edge_property(incoming_prop, dst_port); } + + /*! Set post action callback for the node + * + * See node_t::set_post_action_callback() for details. + */ + void set_post_action_callback(node_t* node, node_t::action_handler_t&& post_handler) + { + node->set_post_action_callback(std::move(post_handler)); + } + + /*! Send an action to \p node + * + * This will call node_t::receive_action() (see that for details). + */ + void send_action(node_t* node, const res_source_info& port_info, action_info::sptr action) + { + node->receive_action(port_info, action); + } }; |