#include <uhd/rfnoc/node_ctrl_base.hpp>
|
virtual std::string | unique_id () const |
| Returns a unique string that identifies this block. More...
|
|
virtual void | clear () |
|
node_map_t | list_downstream_nodes () |
|
node_map_t | list_upstream_nodes () |
|
void | set_downstream_port (const size_t this_port, const size_t remote_port) |
|
size_t | get_downstream_port (const size_t this_port) |
|
void | set_upstream_port (const size_t this_port, const size_t remote_port) |
|
size_t | get_upstream_port (const size_t this_port) |
|
template<typename T > |
UHD_INLINE std::vector< boost::shared_ptr< T > > | find_downstream_node () |
|
template<typename T > |
UHD_INLINE std::vector< boost::shared_ptr< T > > | find_upstream_node () |
|
template<typename T , typename value_type > |
UHD_INLINE value_type | find_downstream_unique_property (boost::function< value_type(boost::shared_ptr< T > node, size_t port)> get_property, value_type null_value, const std::set< boost::shared_ptr< T > > &exclude_nodes=std::set< boost::shared_ptr< T > >()) |
|
template<typename T , typename value_type > |
UHD_INLINE value_type | find_upstream_unique_property (boost::function< value_type(boost::shared_ptr< T > node, size_t port)> get_property, value_type null_value, const std::set< boost::shared_ptr< T > > &exclude_nodes=std::set< boost::shared_ptr< T > >()) |
|
◆ node_map_pair_t
◆ node_map_t
◆ sptr
◆ wptr
◆ node_ctrl_base()
uhd::rfnoc::node_ctrl_base::node_ctrl_base |
( |
void |
| ) |
|
|
inlineprotected |
◆ ~node_ctrl_base()
virtual uhd::rfnoc::node_ctrl_base::~node_ctrl_base |
( |
| ) |
|
|
inlineprotectedvirtual |
◆ _register_downstream_node()
virtual void uhd::rfnoc::node_ctrl_base::_register_downstream_node |
( |
node_ctrl_base::sptr |
downstream_node, |
|
|
size_t |
port |
|
) |
| |
|
protectedvirtual |
Registers another node as downstream of this node, connected to a given port.
This implies that this node is a source node, and the downstream node is a sink node. See also uhd::rfnoc::source_node_ctrl::_register_downstream_node().
◆ _register_upstream_node()
virtual void uhd::rfnoc::node_ctrl_base::_register_upstream_node |
( |
node_ctrl_base::sptr |
upstream_node, |
|
|
size_t |
port |
|
) |
| |
|
protectedvirtual |
Registers another node as upstream of this node, connected to a given port.
This implies that this node is a sink node, and the upstream node is a source node. See also uhd::rfnoc::sink_node_ctrl::_register_upstream_node().
◆ clear()
virtual void uhd::rfnoc::node_ctrl_base::clear |
( |
| ) |
|
|
virtual |
Clears the list of connected nodes.
◆ find_downstream_node()
template<typename T >
UHD_INLINE std::vector< boost::shared_ptr<T> > uhd::rfnoc::node_ctrl_base::find_downstream_node |
( |
| ) |
|
|
inline |
Find nodes downstream that match a predicate.
Uses a non-recursive breadth-first search algorithm. On every branch, the search stops if a block matches. See this example:
A -> B -> C -> C
Say node A searches for nodes of type C. It will only find the first 'C' block, not the second.
Returns blocks that are of type T.
Search only goes downstream.
◆ find_downstream_unique_property()
template<typename T , typename value_type >
UHD_INLINE value_type uhd::rfnoc::node_ctrl_base::find_downstream_unique_property |
( |
boost::function< value_type(boost::shared_ptr< T > node, size_t port)> |
get_property, |
|
|
value_type |
null_value, |
|
|
const std::set< boost::shared_ptr< T > > & |
exclude_nodes = std::set< boost::shared_ptr<T> >() |
|
) |
| |
|
inline |
Checks if downstream nodes share a common, unique property.
This will use find_downstream_node() to find all nodes downstream of this that are of type T. Then it will use get_property
to return a property from all of them. If all these properties are identical, it will return that property. Otherwise, it will throw a uhd::runtime_error.
get_property
A functor to return the property from a node null_value
If get_property
returns this value, that node is skipped. explored_nodes
A list of nodes to exclude from the search. This is typically to avoid recursion loops.
◆ find_upstream_node()
template<typename T >
UHD_INLINE std::vector< boost::shared_ptr<T> > uhd::rfnoc::node_ctrl_base::find_upstream_node |
( |
| ) |
|
|
inline |
◆ find_upstream_unique_property()
template<typename T , typename value_type >
UHD_INLINE value_type uhd::rfnoc::node_ctrl_base::find_upstream_unique_property |
( |
boost::function< value_type(boost::shared_ptr< T > node, size_t port)> |
get_property, |
|
|
value_type |
null_value, |
|
|
const std::set< boost::shared_ptr< T > > & |
exclude_nodes = std::set< boost::shared_ptr<T> >() |
|
) |
| |
|
inline |
◆ get_downstream_port()
size_t uhd::rfnoc::node_ctrl_base::get_downstream_port |
( |
const size_t |
this_port | ) |
|
Return the remote port of a connection on a given port.
- Exceptions
-
◆ get_upstream_port()
size_t uhd::rfnoc::node_ctrl_base::get_upstream_port |
( |
const size_t |
this_port | ) |
|
Return the remote port of a connection on a given port.
- Exceptions
-
◆ list_downstream_nodes()
node_map_t uhd::rfnoc::node_ctrl_base::list_downstream_nodes |
( |
| ) |
|
|
inline |
◆ list_upstream_nodes()
node_map_t uhd::rfnoc::node_ctrl_base::list_upstream_nodes |
( |
| ) |
|
|
inline |
◆ set_downstream_port()
void uhd::rfnoc::node_ctrl_base::set_downstream_port |
( |
const size_t |
this_port, |
|
|
const size_t |
remote_port |
|
) |
| |
For an existing connection, store the remote port number.
- Exceptions
-
◆ set_upstream_port()
void uhd::rfnoc::node_ctrl_base::set_upstream_port |
( |
const size_t |
this_port, |
|
|
const size_t |
remote_port |
|
) |
| |
For an existing connection, store the remote port number.
- Exceptions
-
◆ unique_id()
virtual std::string uhd::rfnoc::node_ctrl_base::unique_id |
( |
| ) |
const |
|
virtual |
◆ _args
Stores default arguments.
◆ _downstream_nodes
node_map_t uhd::rfnoc::node_ctrl_base::_downstream_nodes |
|
protected |
List of downstream nodes.
◆ _upstream_nodes
node_map_t uhd::rfnoc::node_ctrl_base::_upstream_nodes |
|
protected |
The documentation for this class was generated from the following files: