11 #define UHD_USRP_MULTI_USRP_REF_SOURCES_API
12 #define UHD_USRP_MULTI_USRP_GET_RATES_API
13 #define UHD_USRP_MULTI_USRP_FRONTEND_CAL_API
14 #define UHD_USRP_MULTI_USRP_FRONTEND_IQ_AUTO_API
15 #define UHD_USRP_MULTI_USRP_COMMAND_TIME_API
16 #define UHD_USRP_MULTI_USRP_BW_RANGE_API
17 #define UHD_USRP_MULTI_USRP_USER_REGS_API
18 #define UHD_USRP_MULTI_USRP_GET_USRP_INFO_API
19 #define UHD_USRP_MULTI_USRP_NORMALIZED_GAIN
20 #define UHD_USRP_MULTI_USRP_GPIO_API
21 #define UHD_USRP_MULTI_USRP_REGISTER_API
22 #define UHD_USRP_MULTI_USRP_FILTER_API
23 #define UHD_USRP_MULTI_USRP_LO_CONFIG_API
24 #define UHD_USRP_MULTI_USRP_TX_LO_CONFIG_API
25 #define UHD_USRP_MULTI_USRP_POWER_LEVEL
47 namespace uhd {
namespace usrp {
98 typedef std::shared_ptr<multi_usrp>
sptr;
193 virtual void set_master_clock_rate(
double rate,
size_t mboard = ALL_MBOARDS) = 0;
200 virtual double get_master_clock_rate(
size_t mboard = 0) = 0;
220 virtual meta_range_t get_master_clock_rate_range(
const size_t mboard = 0) = 0;
226 virtual std::string get_pp_string(
void) = 0;
233 virtual std::string get_mboard_name(
size_t mboard = 0) = 0;
240 virtual time_spec_t get_time_now(
size_t mboard = 0) = 0;
247 virtual time_spec_t get_time_last_pps(
size_t mboard = 0) = 0;
260 virtual void set_time_now(
261 const time_spec_t& time_spec,
size_t mboard = ALL_MBOARDS) = 0;
275 virtual void set_time_next_pps(
276 const time_spec_t& time_spec,
size_t mboard = ALL_MBOARDS) = 0;
293 virtual void set_time_unknown_pps(
const time_spec_t& time_spec) = 0;
301 virtual bool get_time_synchronized(
void) = 0;
313 virtual void set_command_time(
321 virtual void clear_command_time(
size_t mboard = ALL_MBOARDS) = 0;
335 virtual void issue_stream_cmd(
336 const stream_cmd_t& stream_cmd,
size_t chan = ALL_CHANS) = 0;
380 virtual void set_time_source(
381 const std::string&
source,
const size_t mboard = ALL_MBOARDS) = 0;
388 virtual std::string get_time_source(
const size_t mboard) = 0;
395 virtual std::vector<std::string> get_time_sources(
const size_t mboard) = 0;
439 virtual void set_clock_source(
440 const std::string&
source,
const size_t mboard = ALL_MBOARDS) = 0;
447 virtual std::string get_clock_source(
const size_t mboard) = 0;
454 virtual std::vector<std::string> get_clock_sources(
const size_t mboard) = 0;
466 virtual void set_sync_source(
const std::string& clock_source,
467 const std::string& time_source,
468 const size_t mboard = ALL_MBOARDS) = 0;
492 virtual void set_sync_source(
493 const device_addr_t& sync_source,
const size_t mboard = ALL_MBOARDS) = 0;
500 virtual device_addr_t get_sync_source(
const size_t mboard) = 0;
507 virtual std::vector<device_addr_t> get_sync_sources(
const size_t mboard) = 0;
523 virtual void set_clock_source_out(
524 const bool enb,
const size_t mboard = ALL_MBOARDS) = 0;
540 virtual void set_time_source_out(
541 const bool enb,
const size_t mboard = ALL_MBOARDS) = 0;
546 virtual size_t get_num_mboards(
void) = 0;
555 const std::string& name,
size_t mboard = 0) = 0;
562 virtual std::vector<std::string> get_mboard_sensor_names(
size_t mboard = 0) = 0;
573 virtual void set_user_register(
574 const uint8_t addr,
const uint32_t data,
size_t mboard = ALL_MBOARDS) = 0;
640 template <
typename T>
643 return std::dynamic_pointer_cast<T>(get_extension(trx, chan));
659 virtual void set_rx_subdev_spec(
674 virtual size_t get_rx_num_channels(
void) = 0;
681 virtual std::string get_rx_subdev_name(
size_t chan = 0) = 0;
692 virtual void set_rx_rate(
double rate,
size_t chan = ALL_CHANS) = 0;
703 virtual void set_rx_spp(
const size_t spp,
const size_t chan = ALL_CHANS) = 0;
710 virtual double get_rx_rate(
size_t chan = 0) = 0;
737 virtual double get_rx_freq(
size_t chan = 0) = 0;
748 virtual freq_range_t get_rx_freq_range(
size_t chan = 0) = 0;
755 virtual freq_range_t get_fe_rx_freq_range(
size_t chan = 0) = 0;
773 virtual std::vector<std::string> get_rx_lo_names(
size_t chan = 0) = 0;
793 virtual void set_rx_lo_source(
794 const std::string& src,
const std::string& name = ALL_LOS,
size_t chan = 0) = 0;
804 virtual const std::string get_rx_lo_source(
805 const std::string& name = ALL_LOS,
size_t chan = 0) = 0;
819 virtual std::vector<std::string> get_rx_lo_sources(
820 const std::string& name = ALL_LOS,
size_t chan = 0) = 0;
832 virtual void set_rx_lo_export_enabled(
833 bool enabled,
const std::string& name = ALL_LOS,
size_t chan = 0) = 0;
840 virtual bool get_rx_lo_export_enabled(
841 const std::string& name = ALL_LOS,
size_t chan = 0) = 0;
867 virtual double set_rx_lo_freq(
868 double freq,
const std::string& name,
size_t chan = 0) = 0;
880 virtual double get_rx_lo_freq(
const std::string& name,
size_t chan = 0) = 0;
892 const std::string& name,
size_t chan = 0) = 0;
906 virtual std::vector<std::string> get_tx_lo_names(
size_t chan = 0) = 0;
923 virtual void set_tx_lo_source(
const std::string& src,
924 const std::string& name = ALL_LOS,
925 const size_t chan = 0) = 0;
935 virtual const std::string get_tx_lo_source(
936 const std::string& name = ALL_LOS,
const size_t chan = 0) = 0;
948 virtual std::vector<std::string> get_tx_lo_sources(
949 const std::string& name = ALL_LOS,
const size_t chan = 0) = 0;
961 virtual void set_tx_lo_export_enabled(
962 const bool enabled,
const std::string& name = ALL_LOS,
const size_t chan = 0) = 0;
969 virtual bool get_tx_lo_export_enabled(
970 const std::string& name = ALL_LOS,
const size_t chan = 0) = 0;
996 virtual double set_tx_lo_freq(
997 const double freq,
const std::string& name,
const size_t chan = 0) = 0;
1009 virtual double get_tx_lo_freq(
const std::string& name,
const size_t chan = 0) = 0;
1021 const std::string& name,
const size_t chan = 0) = 0;
1039 virtual void set_rx_gain(
double gain,
const std::string& name,
size_t chan = 0) = 0;
1053 virtual std::vector<std::string> get_rx_gain_profile_names(
const size_t chan = 0) = 0;
1063 virtual void set_rx_gain_profile(
1064 const std::string& profile,
const size_t chan = 0) = 0;
1071 virtual std::string get_rx_gain_profile(
const size_t chan = 0) = 0;
1076 return this->set_rx_gain(gain, ALL_GAINS, chan);
1096 virtual void set_normalized_rx_gain(
double gain,
size_t chan = 0) = 0;
1115 virtual void set_rx_agc(
bool enable,
size_t chan = 0) = 0;
1124 virtual double get_rx_gain(
const std::string& name,
size_t chan = 0) = 0;
1129 return this->get_rx_gain(ALL_GAINS, chan);
1142 virtual double get_normalized_rx_gain(
size_t chan = 0) = 0;
1151 virtual gain_range_t get_rx_gain_range(
const std::string& name,
size_t chan = 0) = 0;
1156 return this->get_rx_gain_range(ALL_GAINS, chan);
1165 virtual std::vector<std::string> get_rx_gain_names(
size_t chan = 0) = 0;
1175 virtual void set_rx_antenna(
const std::string& ant,
size_t chan = 0) = 0;
1182 virtual std::string get_rx_antenna(
size_t chan = 0) = 0;
1189 virtual std::vector<std::string> get_rx_antennas(
size_t chan = 0) = 0;
1200 virtual void set_rx_bandwidth(
double bandwidth,
size_t chan = 0) = 0;
1207 virtual double get_rx_bandwidth(
size_t chan = 0) = 0;
1214 virtual meta_range_t get_rx_bandwidth_range(
size_t chan = 0) = 0;
1231 virtual sensor_value_t get_rx_sensor(
const std::string& name,
size_t chan = 0) = 0;
1238 virtual std::vector<std::string> get_rx_sensor_names(
size_t chan = 0) = 0;
1252 virtual void set_rx_dc_offset(
const bool enb,
size_t chan = ALL_CHANS) = 0;
1261 virtual void set_rx_dc_offset(
1262 const std::complex<double>& offset,
size_t chan = ALL_CHANS) = 0;
1268 virtual meta_range_t get_rx_dc_offset_range(
size_t chan = 0) = 0;
1276 virtual void set_rx_iq_balance(
const bool enb,
size_t chan) = 0;
1285 virtual void set_rx_iq_balance(
1286 const std::complex<double>& correction,
size_t chan = ALL_CHANS) = 0;
1308 virtual bool has_rx_power_reference(
const size_t chan = 0) = 0;
1324 virtual void set_rx_power_reference(
1325 const double power_dbm,
const size_t chan = 0) = 0;
1339 virtual double get_rx_power_reference(
const size_t chan = 0) = 0;
1350 virtual meta_range_t get_rx_power_range(
const size_t chan) = 0;
1364 virtual void set_tx_subdev_spec(
1379 virtual size_t get_tx_num_channels(
void) = 0;
1386 virtual std::string get_tx_subdev_name(
size_t chan = 0) = 0;
1397 virtual void set_tx_rate(
double rate,
size_t chan = ALL_CHANS) = 0;
1404 virtual double get_tx_rate(
size_t chan = 0) = 0;
1411 virtual meta_range_t get_tx_rates(
size_t chan = 0) = 0;
1431 virtual double get_tx_freq(
size_t chan = 0) = 0;
1442 virtual freq_range_t get_tx_freq_range(
size_t chan = 0) = 0;
1449 virtual freq_range_t get_fe_tx_freq_range(
size_t chan = 0) = 0;
1464 virtual void set_tx_gain(
double gain,
const std::string& name,
size_t chan = 0) = 0;
1478 virtual std::vector<std::string> get_tx_gain_profile_names(
const size_t chan = 0) = 0;
1488 virtual void set_tx_gain_profile(
1489 const std::string& profile,
const size_t chan = 0) = 0;
1496 virtual std::string get_tx_gain_profile(
const size_t chan = 0) = 0;
1501 return this->set_tx_gain(gain, ALL_GAINS, chan);
1516 virtual void set_normalized_tx_gain(
double gain,
size_t chan = 0) = 0;
1525 virtual double get_tx_gain(
const std::string& name,
size_t chan = 0) = 0;
1530 return this->get_tx_gain(ALL_GAINS, chan);
1543 virtual double get_normalized_tx_gain(
size_t chan = 0) = 0;
1552 virtual gain_range_t get_tx_gain_range(
const std::string& name,
size_t chan = 0) = 0;
1557 return this->get_tx_gain_range(ALL_GAINS, chan);
1566 virtual std::vector<std::string> get_tx_gain_names(
size_t chan = 0) = 0;
1587 virtual bool has_tx_power_reference(
const size_t chan = 0) = 0;
1603 virtual void set_tx_power_reference(
1604 const double power_dbm,
const size_t chan = 0) = 0;
1618 virtual double get_tx_power_reference(
const size_t chan = 0) = 0;
1629 virtual meta_range_t get_tx_power_range(
const size_t chan) = 0;
1639 virtual void set_tx_antenna(
const std::string& ant,
size_t chan = 0) = 0;
1646 virtual std::string get_tx_antenna(
size_t chan = 0) = 0;
1653 virtual std::vector<std::string> get_tx_antennas(
size_t chan = 0) = 0;
1664 virtual void set_tx_bandwidth(
double bandwidth,
size_t chan = 0) = 0;
1671 virtual double get_tx_bandwidth(
size_t chan = 0) = 0;
1678 virtual meta_range_t get_tx_bandwidth_range(
size_t chan = 0) = 0;
1695 virtual sensor_value_t get_tx_sensor(
const std::string& name,
size_t chan = 0) = 0;
1702 virtual std::vector<std::string> get_tx_sensor_names(
size_t chan = 0) = 0;
1710 virtual void set_tx_dc_offset(
1711 const std::complex<double>& offset,
size_t chan = ALL_CHANS) = 0;
1717 virtual meta_range_t get_tx_dc_offset_range(
size_t chan = 0) = 0;
1726 virtual void set_tx_iq_balance(
1727 const std::complex<double>& correction,
size_t chan = ALL_CHANS) = 0;
1738 virtual std::vector<std::string> get_gpio_banks(
const size_t mboard) = 0;
1792 virtual void set_gpio_attr(
const std::string& bank,
1793 const std::string& attr,
1794 const uint32_t value,
1795 const uint32_t
mask = 0xffffffff,
1796 const size_t mboard = 0) = 0;
1817 virtual uint32_t get_gpio_attr(
1818 const std::string& bank,
const std::string& attr,
const size_t mboard = 0) = 0;
1836 virtual std::vector<std::string> get_gpio_src_banks(
const size_t mboard = 0) = 0;
1848 virtual std::vector<std::string> get_gpio_srcs(
1849 const std::string& bank,
const size_t mboard = 0) = 0;
1860 virtual std::vector<std::string> get_gpio_src(
1861 const std::string& bank,
const size_t mboard = 0) = 0;
1877 virtual void set_gpio_src(
const std::string& bank,
1878 const std::vector<std::string>& src,
1879 const size_t mboard = 0) = 0;
1893 virtual std::vector<std::string> get_rx_filter_names(
const size_t chan) = 0;
1902 const std::string& name,
const size_t chan) = 0;
1911 virtual void set_rx_filter(
const std::string& name,
1913 const size_t chan) = 0;
1924 virtual std::vector<std::string> get_tx_filter_names(
const size_t chan) = 0;
1933 const std::string& name,
const size_t chan) = 0;
1942 virtual void set_tx_filter(
const std::string& name,
1944 const size_t chan) = 0;