#include <uhd/rfnoc/source_node_ctrl.hpp>
Public Types | |
typedef boost::shared_ptr < source_node_ctrl > | sptr |
typedef std::map< size_t, boost::weak_ptr < source_node_ctrl > > | node_map_t |
typedef std::pair< size_t, boost::weak_ptr < source_node_ctrl > > | node_map_pair_t |
![]() | |
typedef boost::shared_ptr < node_ctrl_base > | sptr |
typedef boost::weak_ptr < node_ctrl_base > | wptr |
typedef std::map< size_t, wptr > | node_map_t |
typedef std::pair< size_t, wptr > | node_map_pair_t |
typedef boost::function< void(void)> | graph_update_cb_t |
Public Member Functions | |
virtual void | issue_stream_cmd (const uhd::stream_cmd_t &stream_cmd, const size_t chan=0)=0 |
size_t | connect_downstream (node_ctrl_base::sptr downstream_node, size_t port=ANY_PORT, const uhd::device_addr_t &args=uhd::device_addr_t()) |
virtual void | set_rx_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 > >()) |
Protected Member Functions | |
virtual size_t | _request_output_port (const size_t suggested_port, const uhd::device_addr_t &args) const |
![]() | |
node_ctrl_base (void) | |
virtual | ~node_ctrl_base () |
virtual void | _register_upstream_node (node_ctrl_base::sptr upstream_node, size_t port) |
void | update_graph () |
Additional Inherited Members | |
![]() | |
uhd::device_addr_t | _args |
Stores default arguments. More... | |
node_map_t | _upstream_nodes |
List of upstream nodes. More... | |
node_map_t | _downstream_nodes |
List of downstream nodes. More... | |
size_t | _num_input_ports |
size_t | _num_output_ports |
std::map< size_t, bool > | _rx_streamer_active |
std::map< size_t, bool > | _tx_streamer_active |
typedef std::pair<size_t, boost::weak_ptr<source_node_ctrl> > uhd::rfnoc::source_node_ctrl::node_map_pair_t |
typedef std::map<size_t, boost::weak_ptr<source_node_ctrl> > uhd::rfnoc::source_node_ctrl::node_map_t |
typedef boost::shared_ptr<source_node_ctrl> uhd::rfnoc::source_node_ctrl::sptr |
|
protectedvirtual |
Ask for a port number to connect a downstream block to.
See sink_node_ctrl::_request_input_port(). This is the same for output.
suggested_port | Try and connect here. |
args | When deciding on a port number, these arguments may be used. |
Reimplemented in uhd::rfnoc::source_block_ctrl_base.
size_t uhd::rfnoc::source_node_ctrl::connect_downstream | ( | node_ctrl_base::sptr | downstream_node, |
size_t | port = ANY_PORT , |
||
const uhd::device_addr_t & | args = uhd::device_addr_t() |
||
) |
Connect another node downstream 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.
downstream_node
Pointer to the node class to connect port
Suggested port number on this block to connect the downstream block to. args
Any arguments that can be useful for determining the port number.
|
pure virtual |
Issue a stream command for this block.
stream_cmd | The stream command. |
chan | Channel Index |
Implemented in uhd::rfnoc::source_block_ctrl_base.
|
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 rx streamer chain. Conversely, when set to false, this means the node has been removed from an rx streamer chain.