18 #ifndef INCLUDED_UHD_USRP_MULTI_USRP_HPP 19 #define INCLUDED_UHD_USRP_MULTI_USRP_HPP 32 #include <boost/shared_ptr.hpp> 33 #include <boost/utility.hpp> 36 namespace uhd{
namespace usrp{
86 typedef boost::shared_ptr<multi_usrp>
sptr;
89 static const size_t ALL_MBOARDS = size_t(~0);
92 static const size_t ALL_CHANS = size_t(~0);
125 virtual void set_master_clock_rate(
double rate,
size_t mboard = ALL_MBOARDS) = 0;
132 virtual double get_master_clock_rate(
size_t mboard = 0) = 0;
138 virtual std::string get_pp_string(
void) = 0;
145 virtual std::string get_mboard_name(
size_t mboard = 0) = 0;
152 virtual time_spec_t get_time_now(
size_t mboard = 0) = 0;
159 virtual time_spec_t get_time_last_pps(
size_t mboard = 0) = 0;
172 virtual void set_time_now(
const time_spec_t &time_spec,
size_t mboard = ALL_MBOARDS) = 0;
185 virtual void set_time_next_pps(
const time_spec_t &time_spec) = 0;
202 virtual void set_time_unknown_pps(
const time_spec_t &time_spec) = 0;
210 virtual bool get_time_synchronized(
void) = 0;
224 virtual void issue_stream_cmd(
const stream_cmd_t &stream_cmd,
size_t chan = ALL_CHANS) = 0;
233 virtual void set_clock_config(
const clock_config_t &clock_config,
size_t mboard = ALL_MBOARDS) = 0;
238 virtual size_t get_num_mboards(
void) = 0;
246 virtual sensor_value_t get_mboard_sensor(
const std::string &name,
size_t mboard = 0) = 0;
253 virtual std::vector<std::string> get_mboard_sensor_names(
size_t mboard = 0) = 0;
286 virtual size_t get_rx_num_channels(
void) = 0;
293 virtual std::string get_rx_subdev_name(
size_t chan = 0) = 0;
300 virtual void set_rx_rate(
double rate,
size_t chan = ALL_CHANS) = 0;
307 virtual double get_rx_rate(
size_t chan = 0) = 0;
324 virtual double get_rx_freq(
size_t chan = 0) = 0;
331 virtual freq_range_t get_rx_freq_range(
size_t chan = 0) = 0;
340 virtual void set_rx_gain(
double gain,
const std::string &name,
size_t chan = 0) = 0;
344 return this->set_rx_gain(gain, ALL_GAINS, chan);
354 virtual double get_rx_gain(
const std::string &name,
size_t chan = 0) = 0;
358 return this->get_rx_gain(ALL_GAINS, chan);
368 virtual gain_range_t get_rx_gain_range(
const std::string &name,
size_t chan = 0) = 0;
372 return this->get_rx_gain_range(ALL_GAINS, chan);
381 virtual std::vector<std::string> get_rx_gain_names(
size_t chan = 0) = 0;
388 virtual void set_rx_antenna(
const std::string &ant,
size_t chan = 0) = 0;
395 virtual std::string get_rx_antenna(
size_t chan = 0) = 0;
402 virtual std::vector<std::string> get_rx_antennas(
size_t chan = 0) = 0;
410 return this->get_rx_sensor(
"lo_locked", chan).to_bool();
418 virtual void set_rx_bandwidth(
double bandwidth,
size_t chan = 0) = 0;
425 virtual double get_rx_bandwidth(
size_t chan = 0) = 0;
434 return this->get_rx_sensor(
"rssi", chan).to_real();
452 virtual sensor_value_t get_rx_sensor(
const std::string &name,
size_t chan = 0) = 0;
459 virtual std::vector<std::string> get_rx_sensor_names(
size_t chan = 0) = 0;
486 virtual size_t get_tx_num_channels(
void) = 0;
493 virtual std::string get_tx_subdev_name(
size_t chan = 0) = 0;
500 virtual void set_tx_rate(
double rate,
size_t chan = ALL_CHANS) = 0;
507 virtual double get_tx_rate(
size_t chan = 0) = 0;
524 virtual double get_tx_freq(
size_t chan = 0) = 0;
531 virtual freq_range_t get_tx_freq_range(
size_t chan = 0) = 0;
540 virtual void set_tx_gain(
double gain,
const std::string &name,
size_t chan = 0) = 0;
544 return this->set_tx_gain(gain, ALL_GAINS, chan);
554 virtual double get_tx_gain(
const std::string &name,
size_t chan = 0) = 0;
558 return this->get_tx_gain(ALL_GAINS, chan);
568 virtual gain_range_t get_tx_gain_range(
const std::string &name,
size_t chan = 0) = 0;
572 return this->get_tx_gain_range(ALL_GAINS, chan);
581 virtual std::vector<std::string> get_tx_gain_names(
size_t chan = 0) = 0;
588 virtual void set_tx_antenna(
const std::string &ant,
size_t chan = 0) = 0;
595 virtual std::string get_tx_antenna(
size_t chan = 0) = 0;
602 virtual std::vector<std::string> get_tx_antennas(
size_t chan = 0) = 0;
610 return this->get_tx_sensor(
"lo_locked", chan).to_bool();
618 virtual void set_tx_bandwidth(
double bandwidth,
size_t chan = 0) = 0;
625 virtual double get_tx_bandwidth(
size_t chan = 0) = 0;
642 virtual sensor_value_t get_tx_sensor(
const std::string &name,
size_t chan = 0) = 0;
649 virtual std::vector<std::string> get_tx_sensor_names(
size_t chan = 0) = 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:371
Definition: stream_cmd.hpp:46
UHD_DEPRECATED bool get_tx_lo_locked(size_t chan=0)
Definition: multi_usrp.hpp:609
Definition: tune_result.hpp:29
double get_tx_gain(size_t chan=0)
A convenience wrapper for getting overall TX gain.
Definition: multi_usrp.hpp:557
#define UHD_DEPRECATED
Definition: config.hpp:68
void set_tx_gain(double gain, size_t chan=0)
A convenience wrapper for setting overall TX gain.
Definition: multi_usrp.hpp:543
Definition: time_spec.hpp:39
boost::shared_ptr< device > sptr
Definition: device.hpp:40
boost::shared_ptr< multi_usrp > sptr
Definition: multi_usrp.hpp:86
double get_rx_gain(size_t chan=0)
A convenience wrapper for getting overall RX gain.
Definition: multi_usrp.hpp:357
Definition: tune_request.hpp:32
static const std::string ALL_GAINS
A wildcard gain element name.
Definition: multi_usrp.hpp:95
#define UHD_API
Definition: config.hpp:76
Definition: convert.hpp:28
Definition: sensors.hpp:38
Definition: clock_config.hpp:33
Definition: multi_usrp.hpp:84
boost::shared_ptr< mboard_iface > sptr
Definition: mboard_iface.hpp:38
UHD_DEPRECATED bool get_rx_lo_locked(size_t chan=0)
Definition: multi_usrp.hpp:409
boost::shared_ptr< dboard_iface > sptr
Definition: dboard_iface.hpp:60
void set_rx_gain(double gain, size_t chan=0)
A convenience wrapper for setting overall RX gain.
Definition: multi_usrp.hpp:343
Definition: subdev_spec.hpp:71
UHD_DEPRECATED double read_rssi(size_t chan=0)
Definition: multi_usrp.hpp:433
gain_range_t get_tx_gain_range(size_t chan=0)
A convenience wrapper for getting overall TX gain range.
Definition: multi_usrp.hpp:571
Definition: device_addr.hpp:47