From b8a6c64d6012ab1ec0b3b843fccec2d990d440a3 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Wed, 15 May 2019 10:26:44 -0700 Subject: 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 --- host/lib/include/uhdlib/rfnoc/node_accessor.hpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'host/lib/include/uhdlib/rfnoc/node_accessor.hpp') 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 #include +#include #include 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); + } }; -- cgit v1.2.3