23 #ifndef INCLUDED_GR_UHD_USRP_SOURCE_H
24 #define INCLUDED_GR_UHD_USRP_SOURCE_H
28 #include <uhd/usrp/multi_usrp.hpp>
31 #ifndef INCLUDED_UHD_STREAM_HPP
36 const std::string &otw =
"")
41 std::string cpu_format;
42 std::string otw_format;
44 std::vector<size_t> channels;
47 # define INCLUDED_UHD_STREAM_HPP
49 # define GR_UHD_USE_STREAM_API
55 class uhd_usrp_source;
70 static sptr make(const ::uhd::device_addr_t &device_addr,
71 const ::uhd::io_type_t &io_type,
100 static sptr make(const ::uhd::device_addr_t &device_addr,
101 const ::uhd::stream_args_t &stream_args);
114 virtual void set_start_time(const ::uhd::time_spec_t &time) = 0;
128 virtual void issue_stream_cmd(const ::uhd::stream_cmd_t &cmd) = 0;
137 virtual ::uhd::dict<std::string, std::string> get_usrp_info(
size_t chan = 0) = 0;
144 virtual void set_subdev_spec(
const std::string &spec,
size_t mboard = 0) = 0;
151 virtual std::string get_subdev_spec(
size_t mboard = 0) = 0;
157 virtual void set_samp_rate(
double rate) = 0;
164 virtual double get_samp_rate(
void) = 0;
170 virtual ::uhd::meta_range_t get_samp_rates(
void) = 0;
178 virtual ::uhd::tune_result_t set_center_freq
179 (const ::uhd::tune_request_t tune_request,
size_t chan = 0) = 0;
191 return set_center_freq(::uhd::tune_request_t(freq), chan);
199 virtual double get_center_freq(
size_t chan = 0) = 0;
206 virtual ::uhd::freq_range_t get_freq_range(
size_t chan = 0) = 0;
213 virtual void set_gain(
double gain,
size_t chan = 0) = 0;
221 virtual void set_gain(
double gain,
222 const std::string &
name,
223 size_t chan = 0) = 0;
230 virtual double get_gain(
size_t chan = 0) = 0;
238 virtual double get_gain(
const std::string &
name,
239 size_t chan = 0) = 0;
246 virtual std::vector<std::string> get_gain_names(
size_t chan = 0) = 0;
253 virtual ::uhd::gain_range_t get_gain_range(
size_t chan = 0) = 0;
261 virtual ::uhd::gain_range_t get_gain_range(
const std::string &
name,
262 size_t chan = 0) = 0;
269 virtual void set_antenna(
const std::string &ant,
270 size_t chan = 0) = 0;
277 virtual std::string get_antenna(
size_t chan = 0) = 0;
284 virtual std::vector<std::string> get_antennas(
size_t chan = 0) = 0;
291 virtual void set_bandwidth(
double bandwidth,
size_t chan = 0) = 0;
298 virtual double get_bandwidth(
size_t chan = 0) = 0;
305 virtual ::uhd::freq_range_t get_bandwidth_range(
size_t chan = 0) = 0;
319 virtual void set_auto_dc_offset(
const bool enb,
size_t chan = 0) = 0;
328 virtual void set_dc_offset(
const std::complex<double> &offset,
size_t chan = 0) = 0;
337 virtual void set_iq_balance(
const std::complex<double> &correction,
338 size_t chan = 0) = 0;
346 virtual ::uhd::sensor_value_t get_sensor(
const std::string &
name,
347 size_t chan = 0) = 0;
354 virtual std::vector<std::string> get_sensor_names(
size_t chan = 0) = 0;
360 return this->get_sensor(name, chan);
366 return this->get_sensor_names(chan);
375 virtual ::uhd::sensor_value_t get_mboard_sensor(
const std::string &
name,
376 size_t mboard = 0) = 0;
383 virtual std::vector<std::string> get_mboard_sensor_names(
size_t mboard = 0) = 0;
391 virtual void set_clock_config(const ::uhd::clock_config_t &clock_config,
392 size_t mboard = 0) = 0;
402 virtual void set_time_source(
const std::string &source,
403 const size_t mboard = 0) = 0;
410 virtual std::string get_time_source(
const size_t mboard) = 0;
417 virtual std::vector<std::string> get_time_sources(
const size_t mboard) = 0;
426 virtual void set_clock_source(
const std::string &source,
427 const size_t mboard = 0) = 0;
434 virtual std::string get_clock_source(
const size_t mboard) = 0;
441 virtual std::vector<std::string> get_clock_sources(
const size_t mboard) = 0;
448 virtual double get_clock_rate(
size_t mboard = 0) = 0;
455 virtual void set_clock_rate(
double rate,
size_t mboard = 0) = 0;
462 virtual ::uhd::time_spec_t get_time_now(
size_t mboard = 0) = 0;
469 virtual ::uhd::time_spec_t get_time_last_pps(
size_t mboard = 0) = 0;
476 virtual void set_time_now(const ::uhd::time_spec_t &time_spec,
477 size_t mboard = 0) = 0;
483 virtual void set_time_next_pps(const ::uhd::time_spec_t &time_spec) = 0;
489 virtual void set_time_unknown_pps(const ::uhd::time_spec_t &time_spec) = 0;
502 virtual void set_command_time(const ::uhd::time_spec_t &time_spec,
503 size_t mboard = 0) = 0;
510 virtual void clear_command_time(
size_t mboard = 0) = 0;
516 virtual ::uhd::usrp::dboard_iface::sptr get_dboard_iface(
size_t chan = 0) = 0;
524 virtual ::uhd::usrp::multi_usrp::sptr get_device(
void) = 0;
534 virtual void set_user_register(
const uint8_t addr,
536 size_t mboard = 0) = 0;
546 virtual std::vector<std::complex<float> >
547 finite_acquisition(
const size_t nsamps) = 0;
558 virtual std::vector<std::vector<std::complex<float> > >
559 finite_acquisition_v(
const size_t nsamps) = 0;
::uhd::sensor_value_t get_dboard_sensor(const std::string &name, size_t chan=0)
DEPRECATED use get_sensor.
Definition: usrp_source.h:357
Definition: usrp_source.h:57
unsigned char uint8_t
Definition: stdint.h:78
shared_ptr documentation stub
Definition: shared_ptr_docstub.h:15
::uhd::tune_result_t set_center_freq(double freq, size_t chan=0)
Definition: usrp_source.h:189
unsigned int uint32_t
Definition: stdint.h:80
stream_args_t(const std::string &cpu="", const std::string &otw="")
Definition: usrp_source.h:35
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
VOLK_API $kern pname $kern name
A function pointer to the dispatcher implementation.
std::vector< std::string > get_dboard_sensor_names(size_t chan=0)
DEPRECATED use get_sensor_names.
Definition: usrp_source.h:364
boost::shared_ptr< usrp_source > sptr
Definition: usrp_source.h:61