23 #ifndef INCLUDED_GR_UHD_USRP_BLOCK_H
24 #define INCLUDED_GR_UHD_USRP_BLOCK_H
28 #include <uhd/usrp/multi_usrp.hpp>
56 virtual void set_subdev_spec(
const std::string &spec,
size_t mboard = 0) = 0;
64 virtual std::string get_subdev_spec(
size_t mboard = 0) = 0;
69 virtual size_t get_num_mboards() = 0;
76 virtual void set_samp_rate(
double rate) = 0;
84 virtual double get_samp_rate(
void) = 0;
91 virtual ::uhd::meta_range_t get_samp_rates(
void) = 0;
100 virtual ::uhd::tune_result_t set_center_freq(
101 const ::uhd::tune_request_t tune_request,
118 return set_center_freq(::uhd::tune_request_t(freq), chan);
127 virtual double get_center_freq(
size_t chan = 0) = 0;
135 virtual ::uhd::freq_range_t get_freq_range(
size_t chan = 0) = 0;
143 virtual void set_gain(
double gain,
size_t chan = 0) = 0;
152 virtual void set_gain(
double gain,
153 const std::string &name,
154 size_t chan = 0) = 0;
172 virtual void set_normalized_gain(
double norm_gain,
size_t chan = 0) = 0;
180 virtual double get_gain(
size_t chan = 0) = 0;
189 virtual double get_gain(
const std::string &name,
190 size_t chan = 0) = 0;
203 virtual double get_normalized_gain(
size_t chan = 0) = 0;
211 virtual std::vector<std::string> get_gain_names(
size_t chan = 0) = 0;
219 virtual ::uhd::gain_range_t get_gain_range(
size_t chan = 0) = 0;
228 virtual ::uhd::gain_range_t get_gain_range(
const std::string &name,
229 size_t chan = 0) = 0;
237 virtual void set_antenna(
const std::string &ant,
238 size_t chan = 0) = 0;
246 virtual std::string get_antenna(
size_t chan = 0) = 0;
254 virtual std::vector<std::string> get_antennas(
size_t chan = 0) = 0;
262 virtual void set_bandwidth(
double bandwidth,
size_t chan = 0) = 0;
270 virtual double get_bandwidth(
size_t chan = 0) = 0;
278 virtual ::uhd::freq_range_t get_bandwidth_range(
size_t chan = 0) = 0;
286 virtual ::uhd::sensor_value_t get_sensor(
const std::string &name,
287 size_t chan = 0) = 0;
294 virtual std::vector<std::string> get_sensor_names(
size_t chan = 0) = 0;
300 return this->get_sensor(name, chan);
306 return this->get_sensor_names(chan);
316 virtual ::uhd::sensor_value_t get_mboard_sensor(
const std::string &name,
317 size_t mboard = 0) = 0;
325 virtual std::vector<std::string> get_mboard_sensor_names(
size_t mboard = 0) = 0;
333 virtual std::string get_time_source(
const size_t mboard) = 0;
341 virtual std::vector<std::string> get_time_sources(
const size_t mboard) = 0;
352 virtual void set_clock_source(
const std::string &source,
353 const size_t mboard = 0) = 0;
361 virtual std::string get_clock_source(
const size_t mboard) = 0;
369 virtual std::vector<std::string> get_clock_sources(
const size_t mboard) = 0;
377 virtual double get_clock_rate(
size_t mboard = 0) = 0;
385 virtual void set_clock_rate(
double rate,
size_t mboard = 0) = 0;
393 virtual ::uhd::time_spec_t get_time_now(
size_t mboard = 0) = 0;
400 virtual ::uhd::time_spec_t get_time_last_pps(
size_t mboard = 0) = 0;
407 virtual void set_time_now(const ::uhd::time_spec_t &time_spec,
size_t mboard = 0) = 0;
413 virtual void set_time_next_pps(const ::uhd::time_spec_t &time_spec) = 0;
419 virtual void set_time_unknown_pps(const ::uhd::time_spec_t &time_spec) = 0;
431 virtual void set_command_time(const ::uhd::time_spec_t &time_spec,
432 size_t mboard = 0) = 0;
439 virtual void clear_command_time(
size_t mboard = 0) = 0;
446 virtual ::uhd::usrp::dboard_iface::sptr get_dboard_iface(
size_t chan = 0) = 0;
454 virtual ::uhd::usrp::multi_usrp::sptr get_device(
void) = 0;
465 virtual void set_user_register(
const uint8_t addr,
467 size_t mboard = 0) = 0;
476 virtual void set_clock_config(const ::uhd::clock_config_t &clock_config,
477 size_t mboard = 0) = 0;
488 virtual void set_time_source(
const std::string &source,
489 const size_t mboard = 0) = 0;
506 virtual void set_stream_args(const ::uhd::stream_args_t &stream_args) = 0;
516 virtual std::vector<std::string> get_gpio_banks(
const size_t mboard) = 0;
534 virtual void set_gpio_attr(
535 const std::string &bank,
536 const std::string &attr,
537 const boost::uint32_t value,
538 const boost::uint32_t mask = 0xffffffff,
539 const size_t mboard = 0
558 virtual boost::uint32_t get_gpio_attr(
559 const std::string &bank,
560 const std::string &attr,
561 const size_t mboard = 0
boost::shared_ptr< io_signature > sptr
Definition: io_signature.h:45
Definition: usrp_block.h:41
::uhd::tune_result_t set_center_freq(double freq, size_t chan=0)
Definition: usrp_block.h:116
Definition: usrp_sink.h:30
usrp_block()
Definition: usrp_block.h:44
Include this header to use the message passing features.
Definition: logger.h:131
synchronous 1:1 input to output with historyOverride work to provide the signal processing implementa...
Definition: sync_block.h:37
#define GR_UHD_API
Definition: gr-uhd/include/gnuradio/uhd/api.h:30
std::vector< std::string > get_dboard_sensor_names(size_t chan=0)
DEPRECATED use get_sensor_names.
Definition: usrp_block.h:304
::uhd::sensor_value_t get_dboard_sensor(const std::string &name, size_t chan=0)
DEPRECATED use get_sensor.
Definition: usrp_block.h:297