Block controller for all RFNoC-based radio blocks. More...
#include <uhd/rfnoc/radio_ctrl.hpp>
Public Member Functions | |
virtual | ~radio_ctrl () |
virtual double | get_rate () const =0 |
virtual double | set_rate (double rate)=0 |
virtual std::string | get_tx_antenna (const size_t chan)=0 |
virtual void | set_tx_antenna (const std::string &ant, const size_t chan)=0 |
virtual std::string | get_rx_antenna (const size_t chan)=0 |
virtual void | set_rx_antenna (const std::string &ant, const size_t chan)=0 |
virtual double | get_tx_frequency (const size_t chan)=0 |
virtual double | set_tx_frequency (const double freq, size_t chan)=0 |
virtual double | get_rx_frequency (const size_t chan)=0 |
virtual double | set_rx_frequency (const double freq, const size_t chan)=0 |
virtual double | get_tx_gain (const size_t chan)=0 |
virtual double | set_tx_gain (const double gain, const size_t chan)=0 |
virtual double | get_rx_gain (const size_t chan)=0 |
virtual double | set_rx_gain (const double gain, const size_t chan)=0 |
virtual void | set_time_now (const time_spec_t &time_spec)=0 |
virtual void | set_time_next_pps (const time_spec_t &time_spec)=0 |
virtual time_spec_t | get_time_now ()=0 |
virtual time_spec_t | get_time_last_pps ()=0 |
virtual size_t | get_chan_from_dboard_fe (const std::string &fe, const uhd::direction_t dir)=0 |
virtual std::string | get_dboard_fe_from_chan (const size_t chan, const uhd::direction_t dir)=0 |
![]() | |
virtual void | issue_stream_cmd (const uhd::stream_cmd_t &stream_cmd, const size_t chan=0) |
stream_sig_t | get_output_signature (size_t block_port=0) const |
std::vector< size_t > | get_output_ports () const |
virtual void | set_destination (boost::uint32_t next_address, size_t output_block_port=0) |
virtual void | configure_flow_control_out (size_t buf_size_pkts, size_t block_port=0, const uhd::sid_t &sid=uhd::sid_t()) |
![]() | |
boost::uint32_t | get_address (size_t block_port=0) |
block_id_t | get_block_id () const |
std::string | unique_id () const |
std::vector< size_t > | get_ctrl_ports () const |
void | sr_write (const boost::uint32_t reg, const boost::uint32_t data, const size_t port=0) |
void | sr_write (const std::string ®, const boost::uint32_t data, const size_t port=0) |
boost::uint64_t | sr_read64 (const settingsbus_reg_t reg, const size_t port=0) |
boost::uint32_t | sr_read32 (const settingsbus_reg_t reg, const size_t port=0) |
boost::uint64_t | user_reg_read64 (const boost::uint32_t addr, const size_t port=0) |
boost::uint64_t | user_reg_read64 (const std::string ®, const size_t port=0) |
boost::uint32_t | user_reg_read32 (const boost::uint32_t addr, const size_t port=0) |
boost::uint32_t | user_reg_read32 (const std::string ®, const size_t port=0) |
void | set_command_time (const time_spec_t &time_spec, const size_t port=ANY_PORT) |
time_spec_t | get_command_time (const size_t port=0) |
void | set_command_tick_rate (const double tick_rate, const size_t port=ANY_PORT) |
void | clear_command_time (const size_t port) |
void | clear (const size_t port=0) |
void | set_args (const uhd::device_addr_t &args, const size_t port=0) |
void | set_arg (const std::string &key, const std::string &val, const size_t port=0) |
Set a specific block argument. val is converted to the corresponding. More... | |
template<typename T > | |
void | set_arg (const std::string &key, const T &val, const size_t port=0) |
Direct access to set a block argument. More... | |
uhd::device_addr_t | get_args (const size_t port=0) const |
Return all block arguments as a device_addr_t. More... | |
std::string | get_arg (const std::string &key, const size_t port=0) const |
Return a single block argument in string format. More... | |
template<typename T > | |
T | get_arg (const std::string &key, const size_t port=0) const |
Direct access to get a block argument. More... | |
std::string | get_arg_type (const std::string &key, const size_t port=0) const |
![]() | |
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 > >()) |
![]() | |
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) |
![]() | |
stream_sig_t | get_input_signature (size_t block_port=0) const |
std::vector< size_t > | get_input_ports () const |
size_t | get_fifo_size (size_t block_port=0) const |
virtual void | configure_flow_control_in (size_t cycles, size_t packets, size_t block_port=0) |
virtual void | set_error_policy (const std::string &policy) |
![]() | |
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 double | get_input_samp_rate (size_t port=ANY_PORT) |
virtual double | get_output_samp_rate (size_t port=ANY_PORT) |
![]() | |
double | get_tick_rate (const std::set< node_ctrl_base::sptr > &_explored_nodes=std::set< node_ctrl_base::sptr >()) |
Additional Inherited Members | |
![]() | |
typedef boost::shared_ptr< source_block_ctrl_base > | sptr |
![]() | |
typedef boost::shared_ptr< block_ctrl_base > | sptr |
typedef boost::function< sptr(const make_args_t &)> | make_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::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< sink_block_ctrl_base > | sptr |
![]() | |
typedef boost::shared_ptr< sink_node_ctrl > | sptr |
typedef std::map< size_t, boost::weak_ptr< sink_node_ctrl > > | node_map_t |
typedef std::pair< size_t, boost::weak_ptr< sink_node_ctrl > > | node_map_pair_t |
![]() | |
typedef boost::shared_ptr< rate_node_ctrl > | sptr |
![]() | |
typedef boost::shared_ptr< tick_node_ctrl > | sptr |
![]() | |
typedef boost::shared_ptr< terminator_node_ctrl > | sptr |
![]() | |
static void | register_block (const make_t &make, const std::string &name) |
static sptr | make (const make_args_t &make_args, boost::uint64_t noc_id=~0) |
Create a block controller class given a NoC-ID or a block name. More... | |
![]() | |
static const double | RATE_UNDEFINED |
This value is used by rate nodes that don't actually set a rate themselves. More... | |
![]() | |
static const double | RATE_UNDEFINED |
This value is used by rate nodes that don't actually set a rate themselves. More... | |
![]() | |
virtual size_t | _request_output_port (const size_t suggested_port, const uhd::device_addr_t &args) const |
![]() | |
block_ctrl_base (void) | |
virtual | ~block_ctrl_base () |
block_ctrl_base (const make_args_t &make_args) | |
stream_sig_t | _resolve_port_def (const blockdef::port_t &port_def) const |
uhd::fs_path | get_arg_path (const std::string &key, size_t port=0) const |
Return the property tree path to a block argument key on port . More... | |
wb_iface::sptr | get_ctrl_iface (const size_t block_port) |
Get a control interface object for block port block_port . More... | |
virtual void | _clear (const size_t port=0) |
Override this function if your block does something else. More... | |
![]() | |
node_ctrl_base (void) | |
virtual | ~node_ctrl_base () |
![]() | |
virtual size_t | _request_input_port (const size_t suggested_port, const uhd::device_addr_t &args) const |
![]() | |
virtual double | _get_tick_rate () |
![]() | |
uhd::property_tree::sptr | _tree |
Property sub-tree. More... | |
uhd::fs_path | _root_path |
Root node of this block's properties. More... | |
bool | _transport_is_big_endian |
Endianness of underlying transport (for data transport) More... | |
blockdef::sptr | _block_def |
Block definition (stores info about the block such as ports) More... | |
![]() | |
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... | |
![]() | |
std::map< size_t, bool > | _rx_streamer_active |
![]() | |
std::map< size_t, bool > | _tx_streamer_active |
Block controller for all RFNoC-based radio blocks.
|
inlinevirtual |
|
pure virtual |
Given a frontend name, return the channel mapping.
E.g.: For a TwinRX board, there's two frontends, '0' and '1', which map to channels 0 and 1 respectively. A BasicRX boards has alphabetical frontends (A, B) which map to channels differently.
|
pure virtual |
The inverse function to get_chan_from_dboard_fe()
|
pure virtual |
Return the tick rate on all channels (rx and tx).
|
pure virtual |
Return the selected RX antenna for channel chan
.
|
pure virtual |
Return the current receive LO frequency on channel chan
.
|
pure virtual |
Return the transmit gain on channel chan
|
pure virtual |
Get the time when the last PPS pulse occurred.
|
pure virtual |
Get the current time in the timekeeper registers.
Note that there is a non-deterministic delay between the time the register is read and the time the function value is returned. To get the time with respect to a tick edge, use get_time_last_pps().
|
pure virtual |
Return the selected TX antenna for channel chan
.
|
pure virtual |
Return the current transmit LO frequency on channel chan
.
Note that the AD9361 only has one LO for all TX channels, and the chan
parameter is thus only for API compatibility.
|
pure virtual |
Return the transmit gain on channel chan
|
pure virtual |
Set the tick/sample rate on all channels (rx and tx).
Will coerce to the nearest possible rate and return the actual value.
|
pure virtual |
Select RX antenna for
channel chan
.
uhd::value_error | if ant is not a valid value. |
|
pure virtual |
Tune the RX LO for channel .
This function will attempt to tune as close as possible, and return a coerced value of the actual tuning result.
|
pure virtual |
Set the transmit gain on channel chan
This function will attempt to set the gain as close as possible, and return a coerced value of the actual gain value.
|
pure virtual |
Set the time registers at the next pps tick.
The values will not be latched in until the pulse occurs. It is recommended that the user sleep(1) after calling to ensure that the time registers will be in a known state prior to use.
Note: Because this call sets the time on the "next" pps, the seconds in the time spec should be current seconds + 1.
time_spec | the time to latch into the timekeeper |
|
pure virtual |
Sets the time in the radio's timekeeper to the given value.
Note that there is a non-deterministic delay between calling this function and the valung written to the register. For setting the time in alignment with a certain reference time, use set_time_next_pps().
|
pure virtual |
Select RX antenna for
channel chan
.
uhd::value_error | if ant is not a valid value. |
|
pure virtual |
Tune the TX LO for channel chan
.
This function will attempt to tune as close as possible, and return a coerced value of the actual tuning result.
freq | Frequency in Hz |
chan | Channel to tune |
|
pure virtual |
Set the transmit gain on channel chan
This function will attempt to set the gain as close as possible, and return a coerced value of the actual gain value.