8 #ifndef INCLUDED_UHD_USRP_MULTI_USRP_HPP 9 #define INCLUDED_UHD_USRP_MULTI_USRP_HPP 12 #define UHD_USRP_MULTI_USRP_REF_SOURCES_API 13 #define UHD_USRP_MULTI_USRP_GET_RATES_API 14 #define UHD_USRP_MULTI_USRP_FRONTEND_CAL_API 15 #define UHD_USRP_MULTI_USRP_FRONTEND_IQ_AUTO_API 16 #define UHD_USRP_MULTI_USRP_COMMAND_TIME_API 17 #define UHD_USRP_MULTI_USRP_BW_RANGE_API 18 #define UHD_USRP_MULTI_USRP_USER_REGS_API 19 #define UHD_USRP_MULTI_USRP_GET_USRP_INFO_API 20 #define UHD_USRP_MULTI_USRP_NORMALIZED_GAIN 21 #define UHD_USRP_MULTI_USRP_GPIO_API 22 #define UHD_USRP_MULTI_USRP_REGISTER_API 23 #define UHD_USRP_MULTI_USRP_FILTER_API 24 #define UHD_USRP_MULTI_USRP_LO_CONFIG_API 25 #define UHD_USRP_MULTI_USRP_TX_LO_CONFIG_API 39 #include <boost/shared_ptr.hpp> 99 typedef boost::shared_ptr<multi_usrp>
sptr;
133 virtual bool is_device3(
void) = 0;
143 virtual boost::shared_ptr<uhd::device3> get_device3(
void) = 0;
195 virtual void set_master_clock_rate(
double rate,
size_t mboard = ALL_MBOARDS) = 0;
202 virtual double get_master_clock_rate(
size_t mboard = 0) = 0;
222 virtual meta_range_t get_master_clock_rate_range(
const size_t mboard = 0) = 0;
228 virtual std::string get_pp_string(
void) = 0;
235 virtual std::string get_mboard_name(
size_t mboard = 0) = 0;
242 virtual time_spec_t get_time_now(
size_t mboard = 0) = 0;
249 virtual time_spec_t get_time_last_pps(
size_t mboard = 0) = 0;
262 virtual void set_time_now(
263 const time_spec_t& time_spec,
size_t mboard = ALL_MBOARDS) = 0;
277 virtual void set_time_next_pps(
278 const time_spec_t& time_spec,
size_t mboard = ALL_MBOARDS) = 0;
295 virtual void set_time_unknown_pps(
const time_spec_t& time_spec) = 0;
303 virtual bool get_time_synchronized(
void) = 0;
315 virtual void set_command_time(
323 virtual void clear_command_time(
size_t mboard = ALL_MBOARDS) = 0;
337 virtual void issue_stream_cmd(
338 const stream_cmd_t& stream_cmd,
size_t chan = ALL_CHANS) = 0;
348 virtual void set_clock_config(
349 const clock_config_t& clock_config,
size_t mboard = ALL_MBOARDS) = 0;
393 virtual void set_time_source(
394 const std::string& source,
const size_t mboard = ALL_MBOARDS) = 0;
401 virtual std::string get_time_source(
const size_t mboard) = 0;
408 virtual std::vector<std::string> get_time_sources(
const size_t mboard) = 0;
452 virtual void set_clock_source(
453 const std::string& source,
const size_t mboard = ALL_MBOARDS) = 0;
460 virtual std::string get_clock_source(
const size_t mboard) = 0;
467 virtual std::vector<std::string> get_clock_sources(
const size_t mboard) = 0;
479 virtual void set_sync_source(
const std::string& clock_source,
480 const std::string& time_source,
481 const size_t mboard = ALL_MBOARDS) = 0;
505 virtual void set_sync_source(
506 const device_addr_t& sync_source,
const size_t mboard = ALL_MBOARDS) = 0;
513 virtual device_addr_t get_sync_source(
const size_t mboard) = 0;
520 virtual std::vector<device_addr_t> get_sync_sources(
const size_t mboard) = 0;
530 virtual void set_clock_source_out(
531 const bool enb,
const size_t mboard = ALL_MBOARDS) = 0;
541 virtual void set_time_source_out(
542 const bool enb,
const size_t mboard = ALL_MBOARDS) = 0;
547 virtual size_t get_num_mboards(
void) = 0;
556 const std::string& name,
size_t mboard = 0) = 0;
563 virtual std::vector<std::string> get_mboard_sensor_names(
size_t mboard = 0) = 0;
572 virtual void set_user_register(
573 const uint8_t addr,
const uint32_t data,
size_t mboard = ALL_MBOARDS) = 0;
612 virtual void set_rx_subdev_spec(
627 virtual size_t get_rx_num_channels(
void) = 0;
634 virtual std::string get_rx_subdev_name(
size_t chan = 0) = 0;
641 virtual void set_rx_rate(
double rate,
size_t chan = ALL_CHANS) = 0;
648 virtual double get_rx_rate(
size_t chan = 0) = 0;
671 virtual double get_rx_freq(
size_t chan = 0) = 0;
682 virtual freq_range_t get_rx_freq_range(
size_t chan = 0) = 0;
689 virtual freq_range_t get_fe_rx_freq_range(
size_t chan = 0) = 0;
707 virtual std::vector<std::string> get_rx_lo_names(
size_t chan = 0) = 0;
720 virtual void set_rx_lo_source(
721 const std::string& src,
const std::string& name = ALL_LOS,
size_t chan = 0) = 0;
731 virtual const std::string get_rx_lo_source(
732 const std::string& name = ALL_LOS,
size_t chan = 0) = 0;
745 virtual std::vector<std::string> get_rx_lo_sources(
746 const std::string& name = ALL_LOS,
size_t chan = 0) = 0;
758 virtual void set_rx_lo_export_enabled(
759 bool enabled,
const std::string& name = ALL_LOS,
size_t chan = 0) = 0;
766 virtual bool get_rx_lo_export_enabled(
767 const std::string& name = ALL_LOS,
size_t chan = 0) = 0;
792 virtual double set_rx_lo_freq(
793 double freq,
const std::string& name,
size_t chan = 0) = 0;
805 virtual double get_rx_lo_freq(
const std::string& name,
size_t chan = 0) = 0;
817 const std::string& name,
size_t chan = 0) = 0;
831 virtual std::vector<std::string> get_tx_lo_names(
size_t chan = 0) = 0;
844 virtual void set_tx_lo_source(
const std::string& src,
845 const std::string& name = ALL_LOS,
846 const size_t chan = 0) = 0;
856 virtual const std::string get_tx_lo_source(
857 const std::string& name = ALL_LOS,
const size_t chan = 0) = 0;
869 virtual std::vector<std::string> get_tx_lo_sources(
870 const std::string& name = ALL_LOS,
const size_t chan = 0) = 0;
882 virtual void set_tx_lo_export_enabled(
883 const bool enabled,
const std::string& name = ALL_LOS,
const size_t chan = 0) = 0;
890 virtual bool get_tx_lo_export_enabled(
891 const std::string& name = ALL_LOS,
const size_t chan = 0) = 0;
916 virtual double set_tx_lo_freq(
917 const double freq,
const std::string& name,
const size_t chan = 0) = 0;
929 virtual double get_tx_lo_freq(
const std::string& name,
const size_t chan = 0) = 0;
941 const std::string& name,
const size_t chan = 0) = 0;
953 virtual void set_rx_gain(
double gain,
const std::string& name,
size_t chan = 0) = 0;
967 virtual std::vector<std::string> get_rx_gain_profile_names(
const size_t chan = 0) = 0;
974 virtual void set_rx_gain_profile(
975 const std::string& profile,
const size_t chan = 0) = 0;
982 virtual std::string get_rx_gain_profile(
const size_t chan = 0) = 0;
987 return this->set_rx_gain(gain, ALL_GAINS, chan);
1006 virtual void set_normalized_rx_gain(
double gain,
size_t chan = 0) = 0;
1016 virtual void set_rx_agc(
bool enable,
size_t chan = 0) = 0;
1025 virtual double get_rx_gain(
const std::string& name,
size_t chan = 0) = 0;
1030 return this->get_rx_gain(ALL_GAINS, chan);
1043 virtual double get_normalized_rx_gain(
size_t chan = 0) = 0;
1052 virtual gain_range_t get_rx_gain_range(
const std::string& name,
size_t chan = 0) = 0;
1057 return this->get_rx_gain_range(ALL_GAINS, chan);
1066 virtual std::vector<std::string> get_rx_gain_names(
size_t chan = 0) = 0;
1073 virtual void set_rx_antenna(
const std::string& ant,
size_t chan = 0) = 0;
1080 virtual std::string get_rx_antenna(
size_t chan = 0) = 0;
1087 virtual std::vector<std::string> get_rx_antennas(
size_t chan = 0) = 0;
1094 virtual void set_rx_bandwidth(
double bandwidth,
size_t chan = 0) = 0;
1101 virtual double get_rx_bandwidth(
size_t chan = 0) = 0;
1108 virtual meta_range_t get_rx_bandwidth_range(
size_t chan = 0) = 0;
1125 virtual sensor_value_t get_rx_sensor(
const std::string& name,
size_t chan = 0) = 0;
1132 virtual std::vector<std::string> get_rx_sensor_names(
size_t chan = 0) = 0;
1146 virtual void set_rx_dc_offset(
const bool enb,
size_t chan = ALL_CHANS) = 0;
1155 virtual void set_rx_dc_offset(
1156 const std::complex<double>& offset,
size_t chan = ALL_CHANS) = 0;
1162 virtual meta_range_t get_rx_dc_offset_range(
size_t chan = 0) = 0;
1170 virtual void set_rx_iq_balance(
const bool enb,
size_t chan) = 0;
1179 virtual void set_rx_iq_balance(
1180 const std::complex<double>& correction,
size_t chan = ALL_CHANS) = 0;
1193 virtual void set_tx_subdev_spec(
1208 virtual size_t get_tx_num_channels(
void) = 0;
1215 virtual std::string get_tx_subdev_name(
size_t chan = 0) = 0;
1222 virtual void set_tx_rate(
double rate,
size_t chan = ALL_CHANS) = 0;
1229 virtual double get_tx_rate(
size_t chan = 0) = 0;
1236 virtual meta_range_t get_tx_rates(
size_t chan = 0) = 0;
1252 virtual double get_tx_freq(
size_t chan = 0) = 0;
1263 virtual freq_range_t get_tx_freq_range(
size_t chan = 0) = 0;
1270 virtual freq_range_t get_fe_tx_freq_range(
size_t chan = 0) = 0;
1279 virtual void set_tx_gain(
double gain,
const std::string& name,
size_t chan = 0) = 0;
1293 virtual std::vector<std::string> get_tx_gain_profile_names(
const size_t chan = 0) = 0;
1300 virtual void set_tx_gain_profile(
1301 const std::string& profile,
const size_t chan = 0) = 0;
1308 virtual std::string get_tx_gain_profile(
const size_t chan = 0) = 0;
1313 return this->set_tx_gain(gain, ALL_GAINS, chan);
1326 virtual void set_normalized_tx_gain(
double gain,
size_t chan = 0) = 0;
1335 virtual double get_tx_gain(
const std::string& name,
size_t chan = 0) = 0;
1340 return this->get_tx_gain(ALL_GAINS, chan);
1353 virtual double get_normalized_tx_gain(
size_t chan = 0) = 0;
1362 virtual gain_range_t get_tx_gain_range(
const std::string& name,
size_t chan = 0) = 0;
1367 return this->get_tx_gain_range(ALL_GAINS, chan);
1376 virtual std::vector<std::string> get_tx_gain_names(
size_t chan = 0) = 0;
1383 virtual void set_tx_antenna(
const std::string& ant,
size_t chan = 0) = 0;
1390 virtual std::string get_tx_antenna(
size_t chan = 0) = 0;
1397 virtual std::vector<std::string> get_tx_antennas(
size_t chan = 0) = 0;
1404 virtual void set_tx_bandwidth(
double bandwidth,
size_t chan = 0) = 0;
1411 virtual double get_tx_bandwidth(
size_t chan = 0) = 0;
1418 virtual meta_range_t get_tx_bandwidth_range(
size_t chan = 0) = 0;
1435 virtual sensor_value_t get_tx_sensor(
const std::string& name,
size_t chan = 0) = 0;
1442 virtual std::vector<std::string> get_tx_sensor_names(
size_t chan = 0) = 0;
1450 virtual void set_tx_dc_offset(
1451 const std::complex<double>& offset,
size_t chan = ALL_CHANS) = 0;
1457 virtual meta_range_t get_tx_dc_offset_range(
size_t chan = 0) = 0;
1466 virtual void set_tx_iq_balance(
1467 const std::complex<double>& correction,
size_t chan = ALL_CHANS) = 0;
1478 virtual std::vector<std::string> get_gpio_banks(
const size_t mboard) = 0;
1496 virtual void set_gpio_attr(
const std::string& bank,
1497 const std::string& attr,
1498 const uint32_t value,
1499 const uint32_t
mask = 0xffffffff,
1500 const size_t mboard = 0) = 0;
1532 virtual void set_gpio_attr(
const std::string& bank,
1533 const std::string& attr,
1534 const std::string& value,
1535 const uint32_t
mask = 0xffffffff,
1536 const size_t mboard = 0) = 0;
1554 virtual uint32_t get_gpio_attr(
1555 const std::string& bank,
const std::string& attr,
const size_t mboard = 0) = 0;
1590 virtual std::vector<std::string> get_gpio_string_attr(
1591 const std::string& bank,
const std::string& attr,
const size_t mboard = 0) = 0;
1608 virtual std::vector<std::string> enumerate_registers(
const size_t mboard = 0) = 0;
1618 const std::string& path,
const size_t mboard = 0) = 0;
1627 virtual void write_register(
const std::string& path,
1628 const uint32_t field,
1629 const uint64_t value,
1630 const size_t mboard = 0) = 0;
1639 virtual uint64_t read_register(
1640 const std::string& path,
const uint32_t field,
const size_t mboard = 0) = 0;
1656 virtual std::vector<std::string> get_filter_names(
1657 const std::string& search_mask =
"") = 0;
gain_range_t get_rx_gain_range(size_t chan=0)
A convenience wrapper for getting overall RX gain range.
Definition: multi_usrp.hpp:1055
boost::shared_ptr< wb_iface > sptr
Definition: wb_iface.hpp:21
Definition: stream_cmd.hpp:36
Definition: tune_result.hpp:19
double get_tx_gain(size_t chan=0)
A convenience wrapper for getting overall TX gain.
Definition: multi_usrp.hpp:1338
boost::noncopyable noncopyable
Definition: noncopyable.hpp:46
void set_tx_gain(double gain, size_t chan=0)
A convenience wrapper for setting overall TX gain.
Definition: multi_usrp.hpp:1311
Definition: time_spec.hpp:29
static const size_t ALL_MBOARDS
A wildcard motherboard index.
Definition: multi_usrp.hpp:104
bool readable
Definition: multi_usrp.hpp:1599
boost::shared_ptr< device > sptr
Definition: device.hpp:31
boost::shared_ptr< multi_usrp > sptr
Definition: multi_usrp.hpp:99
Definition: multi_usrp.hpp:1596
double get_rx_gain(size_t chan=0)
A convenience wrapper for getting overall RX gain.
Definition: multi_usrp.hpp:1028
Definition: tune_request.hpp:25
boost::shared_ptr< rx_streamer > sptr
Definition: stream.hpp:173
static const std::string ALL_GAINS
A wildcard gain element name.
Definition: multi_usrp.hpp:110
Definition: build_info.hpp:13
Definition: sensors.hpp:29
boost::shared_ptr< filter_info_base > sptr
Definition: filters.hpp:27
Definition: clock_config.hpp:26
Definition: multi_usrp.hpp:96
Definition: stream.hpp:59
#define UHD_API
Definition: config.h:68
UHD_INLINE data_t mask(const soft_reg_field_t field)
Definition: soft_register.hpp:88
boost::shared_ptr< dboard_iface > sptr
Definition: dboard_iface.hpp:56
void set_rx_gain(double gain, size_t chan=0)
A convenience wrapper for setting overall RX gain.
Definition: multi_usrp.hpp:985
static const std::string ALL_LOS
A wildcard LO stage name.
Definition: multi_usrp.hpp:113
Definition: subdev_spec.hpp:60
bool writable
Definition: multi_usrp.hpp:1600
size_t bitwidth
Definition: multi_usrp.hpp:1598
boost::shared_ptr< tx_streamer > sptr
Definition: stream.hpp:251
static const size_t ALL_CHANS
A wildcard channel index.
Definition: multi_usrp.hpp:107
gain_range_t get_tx_gain_range(size_t chan=0)
A convenience wrapper for getting overall TX gain range.
Definition: multi_usrp.hpp:1365
Definition: device_addr.hpp:38