#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 | disconnect () |
|
void | disconnect_output_port (const size_t output_port) |
|
void | disconnect_input_port (const size_t input_port) |
|
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 (bool active_only=false) |
|
template<typename T > |
UHD_INLINE std::vector< boost::shared_ptr< T > > | find_upstream_node (bool active_only=false) |
|
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 > >()) |
|
◆ graph_update_cb_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 |
◆ disconnect()
void uhd::rfnoc::node_ctrl_base::disconnect |
( |
| ) |
|
Disconnect this node from all neighbouring nodes.
◆ disconnect_input_port()
void uhd::rfnoc::node_ctrl_base::disconnect_input_port |
( |
const size_t |
input_port | ) |
|
Identify input_port
as unconnected
◆ disconnect_output_port()
void uhd::rfnoc::node_ctrl_base::disconnect_output_port |
( |
const size_t |
output_port | ) |
|
Identify output_port
as unconnected
◆ find_downstream_node()
template<typename T >
UHD_INLINE std::vector<boost::shared_ptr<T> > uhd::rfnoc::node_ctrl_base::find_downstream_node |
( |
bool |
active_only = false | ) |
|
|
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 |
( |
bool |
active_only = false | ) |
|
|
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 |
◆ update_graph()
void uhd::rfnoc::node_ctrl_base::update_graph |
( |
| ) |
|
|
inlineprotected |
Initiate the update graph callback
Call this from your block when you've changed one of these:
- sampling rate
- scaling
- tick rate
◆ uhd::usrp::device3_impl
friend class uhd::usrp::device3_impl |
|
friend |
◆ _args
Stores default arguments.
◆ _downstream_nodes
node_map_t uhd::rfnoc::node_ctrl_base::_downstream_nodes |
|
protected |
List of downstream nodes.
◆ _num_input_ports
size_t uhd::rfnoc::node_ctrl_base::_num_input_ports |
|
protected |
◆ _num_output_ports
size_t uhd::rfnoc::node_ctrl_base::_num_output_ports |
|
protected |
◆ _rx_streamer_active
std::map<size_t, bool> uhd::rfnoc::node_ctrl_base::_rx_streamer_active |
|
protected |
For every output port, store rx streamer activity.
If _rx_streamer_active[0] == true, this means that an active rx streamer is operating on port 0. If it is false, or if the entry does not exist, there is no streamer. Values are toggled by set_rx_streamer().
◆ _tx_streamer_active
std::map<size_t, bool> uhd::rfnoc::node_ctrl_base::_tx_streamer_active |
|
protected |
For every input port, store tx streamer activity.
If _tx_streamer_active[0] == true, this means that an active tx streamer is operating on port 0. If it is false, or if the entry does not exist, there is no streamer. Values are toggled by set_tx_streamer().
◆ _upstream_nodes
node_map_t uhd::rfnoc::node_ctrl_base::_upstream_nodes |
|
protected |
The documentation for this class was generated from the following files: