#include <uhd/rfnoc/sink_node_ctrl.hpp>
|
size_t | connect_upstream (node_ctrl_base::sptr upstream_node, size_t port=ANY_PORT, const uhd::device_addr_t &args=uhd::device_addr_t()) |
|
virtual void | set_tx_streamer (bool active, const size_t port) |
|
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 > >()) |
|
◆ node_map_pair_t
◆ node_map_t
◆ sptr
◆ _request_input_port()
virtual size_t uhd::rfnoc::sink_node_ctrl::_request_input_port |
( |
const size_t |
suggested_port, |
|
|
const uhd::device_addr_t & |
args |
|
) |
| const |
|
protectedvirtual |
Ask for a port number to connect an upstream block to.
Typically, this will be overridden for custom behaviour. The default is to return the suggested port, disregarding args
, unless port
== ANY_PORT, in which case the first unused input port is returned.
When deriving this function for custom behaviour, consider:
- The result is used to call register_upstream_node(), which has its own checks in place.
- This function may throw if the arguments can't be resolved. The exception will propagate to the user space.
- Alternatively, the function may return ANY_PORT to signify failure.
args
and suggested_port
should be treated as strong suggestions, but there's no reason to just return any valid port.
Note: For reasons of thread safety, it is recommended to never, ever call this function directly. It will be used by connect_upstream() which will handle the connection process in a thread-safe manner.
- Parameters
-
suggested_port | Try and connect here. |
args | When deciding on a port number, these arguments may be used. |
- Returns
- A valid input port, or ANY_PORT on failure.
Reimplemented in uhd::rfnoc::sink_block_ctrl_base.
◆ connect_upstream()
Connect another node upstream of this node.
Note: If additional settings are required to make this connection work, e.g. configure flow control, these need to be done separately.
If the requested connection is not possible, this function will throw.
upstream_node
Pointer to the node class to connect port
Suggested port number on this block to connect the upstream block to. args
Any arguments that can be useful for determining the port number.
- Returns
- The actual port number used.
◆ set_tx_streamer()
virtual void uhd::rfnoc::sink_node_ctrl::set_tx_streamer |
( |
bool |
active, |
|
|
const size_t |
port |
|
) |
| |
|
virtual |
Call this function to notify a node about its streamer activity.
When active
is set to true, this means this block is now part of an active tx streamer chain. Conversely, when set to false, this means the node has been removed from an tx streamer chain.
The documentation for this class was generated from the following file: