USRP Hardware Driver and USRP Manual: uhd::rfnoc::test::mock_edge_node_t Class Reference

| USRP Hardware Driver and USRP Manual Version: 4.9.0.makepkg-0-g9ec1f582 UHD and USRP Manual |

Loading...
Searching...
No Matches
uhd::rfnoc::test::mock_edge_node_t Class Reference

`#include <uhd/rfnoc/mock_nodes.hpp>`

Inheritance diagram for uhd::rfnoc::test::mock_edge_node_t:

## Public Types
using | received_actions_map_t
Public Types inherited from uhd::rfnoc::node_t
enum class | forwarding_policy_t { ONE_TO_ONE , ONE_TO_FAN , ONE_TO_ALL_IN , ONE_TO_ALL_OUT , ONE_TO_ALL , DROP , USE_MAP }
| Types of property/action forwarding for those not defined by the block itself. More...
using | resolver_fn_t = std::function<void(void)>
using | resolve_callback_t = std::function<void(void)>
using | graph_mutex_callback_t = std::function<std::recursive_mutex&(void)>
using | action_handler_t
using | forwarding_map_t

## Public Member Functions
| mock_edge_node_t (size_t input_ports, size_t output_ports, const std::string &name="MOCK_EDGE_NODE")
template<typename T>
void | set_edge_property (const std::string &id, const T &val, const res_source_info &rsi)
template<typename T>
T | get_edge_property (const std::string &id, const res_source_info &rsi)
size_t | get_num_input_ports () const override
size_t | get_num_output_ports () const override
std::string | get_unique_id () const override
| Return a unique identifier string for this node. In every RFNoC graph,.
void | post_input_edge_action (action_info::sptr action, size_t port)
void | post_output_edge_action (action_info::sptr action, size_t port)
const received_actions_map_t & | get_received_actions_map () const
void | clear_received_actions_map ()
Public Member Functions inherited from uhd::rfnoc::node_t
| node_t ()
virtual | ~node_t ()
std::vector< std::string > | get_property_ids () const
template<typename prop_data_t>
void | set_property (const std::string &id, const prop_data_t &val, const size_t instance=0)
void | set_properties (const uhd::device_addr_t &props, const size_t instance=0)
template<typename prop_data_t>
const prop_data_t & | get_property (const std::string &id, const size_t instance=0)
virtual void | set_command_time (uhd::time_spec_t time, const size_t instance)
virtual uhd::time_spec_t | get_command_time (const size_t instance) const
virtual void | clear_command_time (const size_t instance)

## Additional Inherited Members
Static Public Attributes inherited from uhd::rfnoc::node_t
static const size_t | ANY_PORT = size_t(~0)
Protected Types inherited from uhd::rfnoc::node_t
using | prop_ptrs_t = std::vector<property_base_t*>
Protected Member Functions inherited from uhd::rfnoc::node_t
void | register_property (property_base_t *prop, resolve_callback_t &&clean_callback=nullptr)
void | add_property_resolver (prop_ptrs_t &&inputs, prop_ptrs_t &&outputs, resolver_fn_t &&resolver_fn)
void | set_prop_forwarding_policy (forwarding_policy_t policy, const std::string &prop_id="")
void | set_prop_forwarding_map (const forwarding_map_t &map)
template<typename prop_data_t>
void | set_property (const std::string &id, const prop_data_t &val, const res_source_info &src_info)
template<typename prop_data_t>
const prop_data_t & | get_property (const std::string &id, const res_source_info &src_info)
void | register_action_handler (const std::string &id, action_handler_t &&handler)
void | set_action_forwarding_policy (forwarding_policy_t policy, const std::string &action_key="")
void | set_action_forwarding_map (const forwarding_map_t &map)
void | post_action (const res_source_info &edge_info, action_info::sptr action)
virtual bool | check_topology (const std::vector< size_t > &connected_inputs, const std::vector< size_t > &connected_outputs)
virtual void | shutdown ()
Static Protected Attributes inherited from uhd::rfnoc::node_t
static dirtifier_t | ALWAYS_DIRTY
| A dirtifyer object, useful for properties that always need updating.

## Detailed Description

Mock node with configurable number of input and output ports that have an edge property associated with each. The node can source actions with key 'action' from any of its edges. Incoming actions with key 'action' are stored in a (source port --> list of incoming actions) map.

## Member Typedef Documentation

## ◆ received_actions_map_t

using uhd::rfnoc::test::mock_edge_node_t::received_actions_map_t

Initial value:
std::unordered_map<res_source_info, std::vector<action_info::sptr>>

## Constructor & Destructor Documentation

## ◆ mock_edge_node_t()

uhd::rfnoc::test::mock_edge_node_t::mock_edge_node_t | ( | size_t | input_ports,
|  | size_t | output_ports,
|  | const std::string & | name = "MOCK_EDGE_NODE" )
| inline

## Member Function Documentation

## ◆ clear_received_actions_map()

void uhd::rfnoc::test::mock_edge_node_t::clear_received_actions_map | ( |  | ) |
| inline

## ◆ get_edge_property()

template<typename T>

T uhd::rfnoc::test::mock_edge_node_t::get_edge_property | ( | const std::string & | id,
|  | const res_source_info & | rsi )
| inline

## ◆ get_num_input_ports()

size_t uhd::rfnoc::test::mock_edge_node_t::get_num_input_ports | ( |  | ) | const
| inlineoverridevirtual

Return the number of input ports for this block.

This function needs to be overridden.

Returns
  noc_id The number of ports

Implements uhd::rfnoc::node_t.

## ◆ get_num_output_ports()

size_t uhd::rfnoc::test::mock_edge_node_t::get_num_output_ports | ( |  | ) | const
| inlineoverridevirtual

Return the number of output ports for this block.

This function needs to be overridden.

Returns
  noc_id The number of ports

Implements uhd::rfnoc::node_t.

## ◆ get_received_actions_map()

const received_actions_map_t & uhd::rfnoc::test::mock_edge_node_t::get_received_actions_map | ( |  | ) | const
| inline

## ◆ get_unique_id()

std::string uhd::rfnoc::test::mock_edge_node_t::get_unique_id | ( |  | ) | const
| inlineoverridevirtual

Return a unique identifier string for this node. In every RFNoC graph,.

Reimplemented from uhd::rfnoc::node_t.

## ◆ post_input_edge_action()

void uhd::rfnoc::test::mock_edge_node_t::post_input_edge_action | ( | action_info::sptr | action,
|  | size_t | port )
| inline

## ◆ post_output_edge_action()

void uhd::rfnoc::test::mock_edge_node_t::post_output_edge_action | ( | action_info::sptr | action,
|  | size_t | port )
| inline

## ◆ set_edge_property()

template<typename T>

void uhd::rfnoc::test::mock_edge_node_t::set_edge_property | ( | const std::string & | id,
|  | const T & | val,
|  | const res_source_info & | rsi )
| inline

The documentation for this class was generated from the following file:

- mock_nodes.hpp