23 #ifndef INCLUDED_GR_UHD_USRP_SOURCE_H
24 #define INCLUDED_GR_UHD_USRP_SOURCE_H
28 #include <uhd/usrp/multi_usrp.hpp>
30 #ifndef INCLUDED_UHD_STREAM_HPP
35 const std::string &otw =
"")
40 std::string cpu_format;
41 std::string otw_format;
43 std::vector<size_t> channels;
46 # define INCLUDED_UHD_STREAM_HPP
48 # define GR_UHD_USE_STREAM_API
54 class uhd_usrp_source;
92 static sptr make(const ::uhd::device_addr_t &device_addr,
93 const ::uhd::io_type_t &io_type,
118 static sptr make(const ::uhd::device_addr_t &device_addr,
119 const ::uhd::stream_args_t &stream_args);
132 virtual void set_start_time(const ::uhd::time_spec_t &time) = 0;
146 virtual void issue_stream_cmd(const ::uhd::stream_cmd_t &cmd) = 0;
155 virtual ::uhd::dict<std::string, std::string> get_usrp_info(
size_t chan = 0) = 0;
162 virtual void set_subdev_spec(
const std::string &spec,
size_t mboard = 0) = 0;
169 virtual std::string get_subdev_spec(
size_t mboard = 0) = 0;
175 virtual void set_samp_rate(
double rate) = 0;
182 virtual double get_samp_rate(
void) = 0;
188 virtual ::uhd::meta_range_t get_samp_rates(
void) = 0;
196 virtual ::uhd::tune_result_t set_center_freq
197 (const ::uhd::tune_request_t tune_request,
size_t chan = 0) = 0;
209 return set_center_freq(::uhd::tune_request_t(freq), chan);
217 virtual double get_center_freq(
size_t chan = 0) = 0;
224 virtual ::uhd::freq_range_t get_freq_range(
size_t chan = 0) = 0;
231 virtual void set_gain(
double gain,
size_t chan = 0) = 0;
239 virtual void set_gain(
double gain,
240 const std::string &
name,
241 size_t chan = 0) = 0;
248 virtual double get_gain(
size_t chan = 0) = 0;
256 virtual double get_gain(
const std::string &
name,
257 size_t chan = 0) = 0;
264 virtual std::vector<std::string> get_gain_names(
size_t chan = 0) = 0;
271 virtual ::uhd::gain_range_t get_gain_range(
size_t chan = 0) = 0;
279 virtual ::uhd::gain_range_t get_gain_range(
const std::string &
name,
280 size_t chan = 0) = 0;
287 virtual void set_antenna(
const std::string &ant,
288 size_t chan = 0) = 0;
295 virtual std::string get_antenna(
size_t chan = 0) = 0;
302 virtual std::vector<std::string> get_antennas(
size_t chan = 0) = 0;
309 virtual void set_bandwidth(
double bandwidth,
size_t chan = 0) = 0;
316 virtual double get_bandwidth(
size_t chan = 0) = 0;
323 virtual ::uhd::freq_range_t get_bandwidth_range(
size_t chan = 0) = 0;
337 virtual void set_auto_dc_offset(
const bool enb,
size_t chan = 0) = 0;
346 virtual void set_dc_offset(
const std::complex<double> &offset,
size_t chan = 0) = 0;
355 virtual void set_iq_balance(
const std::complex<double> &correction,
356 size_t chan = 0) = 0;
364 virtual ::uhd::sensor_value_t get_sensor(
const std::string &
name,
365 size_t chan = 0) = 0;
372 virtual std::vector<std::string> get_sensor_names(
size_t chan = 0) = 0;
378 return this->get_sensor(name, chan);
384 return this->get_sensor_names(chan);
393 virtual ::uhd::sensor_value_t get_mboard_sensor(
const std::string &
name,
394 size_t mboard = 0) = 0;
401 virtual std::vector<std::string> get_mboard_sensor_names(
size_t mboard = 0) = 0;
409 virtual void set_clock_config(const ::uhd::clock_config_t &clock_config,
410 size_t mboard = 0) = 0;
420 virtual void set_time_source(
const std::string &source,
421 const size_t mboard = 0) = 0;
428 virtual std::string get_time_source(
const size_t mboard) = 0;
435 virtual std::vector<std::string> get_time_sources(
const size_t mboard) = 0;
444 virtual void set_clock_source(
const std::string &source,
445 const size_t mboard = 0) = 0;
452 virtual std::string get_clock_source(
const size_t mboard) = 0;
459 virtual std::vector<std::string> get_clock_sources(
const size_t mboard) = 0;
466 virtual double get_clock_rate(
size_t mboard = 0) = 0;
473 virtual void set_clock_rate(
double rate,
size_t mboard = 0) = 0;
480 virtual ::uhd::time_spec_t get_time_now(
size_t mboard = 0) = 0;
487 virtual ::uhd::time_spec_t get_time_last_pps(
size_t mboard = 0) = 0;
494 virtual void set_time_now(const ::uhd::time_spec_t &time_spec,
495 size_t mboard = 0) = 0;
501 virtual void set_time_next_pps(const ::uhd::time_spec_t &time_spec) = 0;
507 virtual void set_time_unknown_pps(const ::uhd::time_spec_t &time_spec) = 0;
520 virtual void set_command_time(const ::uhd::time_spec_t &time_spec,
521 size_t mboard = 0) = 0;
528 virtual void clear_command_time(
size_t mboard = 0) = 0;
534 virtual ::uhd::usrp::dboard_iface::sptr get_dboard_iface(
size_t chan = 0) = 0;
540 virtual ::uhd::usrp::multi_usrp::sptr get_device(
void) = 0;
550 virtual void set_user_register(
const uint8_t addr,
552 size_t mboard = 0) = 0;
562 virtual std::vector<std::complex<float> >
563 finite_acquisition(
const size_t nsamps) = 0;
574 virtual std::vector<std::vector<std::complex<float> > >
575 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:375
Definition: usrp_source.h:56
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:207
unsigned int uint32_t
Definition: stdint.h:80
stream_args_t(const std::string &cpu="", const std::string &otw="")
Definition: usrp_source.h:34
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:382
boost::shared_ptr< usrp_source > sptr
Definition: usrp_source.h:60