23 #ifndef INCLUDED_GR_UHD_USRP_SINK_H
24 #define INCLUDED_GR_UHD_USRP_SINK_H
28 #include <uhd/usrp/multi_usrp.hpp>
31 #ifndef INCLUDED_UHD_STREAM_HPP
36 const std::string &otw =
"")
47 # define INCLUDED_UHD_STREAM_HPP
49 # define GR_UHD_USE_STREAM_API
70 static sptr make(const ::uhd::device_addr_t &device_addr,
71 const ::uhd::io_type_t &io_type,
134 static sptr make(const ::uhd::device_addr_t &device_addr,
135 const ::uhd::stream_args_t &stream_args,
136 const std::string &tsb_tag_name =
"");
149 virtual void set_start_time(const ::uhd::time_spec_t &time) = 0;
158 virtual ::uhd::dict<std::string, std::string> get_usrp_info(
size_t chan = 0) = 0;
165 virtual void set_subdev_spec(
const std::string &spec,
size_t mboard = 0) = 0;
172 virtual std::string get_subdev_spec (
size_t mboard = 0) = 0;
178 virtual void set_samp_rate(
double rate) = 0;
185 virtual double get_samp_rate(
void) = 0;
191 virtual ::uhd::meta_range_t get_samp_rates(
void) = 0;
199 virtual ::uhd::tune_result_t set_center_freq
200 (const ::uhd::tune_request_t tune_request,
size_t chan = 0) = 0;
212 return set_center_freq(::uhd::tune_request_t(freq), chan);
220 virtual double get_center_freq(
size_t chan = 0) = 0;
227 virtual ::uhd::freq_range_t get_freq_range(
size_t chan = 0) = 0;
234 virtual void set_gain(
double gain,
size_t chan = 0) = 0;
242 virtual void set_gain(
double gain,
243 const std::string &
name,
244 size_t chan = 0) = 0;
251 virtual double get_gain(
size_t chan = 0) = 0;
259 virtual double get_gain(
const std::string &
name,
260 size_t chan = 0) = 0;
267 virtual std::vector<std::string> get_gain_names(
size_t chan = 0) = 0;
274 virtual ::uhd::gain_range_t get_gain_range(
size_t chan = 0) = 0;
282 virtual ::uhd::gain_range_t get_gain_range(
const std::string &
name,
283 size_t chan = 0) = 0;
290 virtual void set_antenna(
const std::string &ant,
291 size_t chan = 0) = 0;
298 virtual std::string get_antenna(
size_t chan = 0) = 0;
305 virtual std::vector<std::string> get_antennas(
size_t chan = 0) = 0;
312 virtual void set_bandwidth(
double bandwidth,
size_t chan = 0) = 0;
319 virtual double get_bandwidth(
size_t chan = 0) = 0;
326 virtual ::uhd::freq_range_t get_bandwidth_range(
size_t chan = 0) = 0;
334 virtual void set_dc_offset(
const std::complex<double> &offset,
335 size_t chan = 0) = 0;
344 virtual void set_iq_balance(
const std::complex<double> &correction,
345 size_t chan = 0) = 0;
353 virtual ::uhd::sensor_value_t get_sensor(
const std::string &
name,
354 size_t chan = 0) = 0;
361 virtual std::vector<std::string> get_sensor_names(
size_t chan = 0) = 0;
367 return this->get_sensor(name, chan);
373 return this->get_sensor_names(chan);
382 virtual ::uhd::sensor_value_t get_mboard_sensor(
const std::string &
name,
383 size_t mboard = 0) = 0;
390 virtual std::vector<std::string> get_mboard_sensor_names(
size_t mboard = 0) = 0;
398 virtual void set_clock_config(const ::uhd::clock_config_t &clock_config,
399 size_t mboard = 0) = 0;
409 virtual void set_time_source(
const std::string &source,
410 const size_t mboard = 0) = 0;
417 virtual std::string get_time_source(
const size_t mboard) = 0;
424 virtual std::vector<std::string> get_time_sources(
const size_t mboard) = 0;
433 virtual void set_clock_source(
const std::string &source,
434 const size_t mboard = 0) = 0;
441 virtual std::string get_clock_source(
const size_t mboard) = 0;
448 virtual std::vector<std::string> get_clock_sources(
const size_t mboard) = 0;
455 virtual double get_clock_rate(
size_t mboard = 0) = 0;
462 virtual void set_clock_rate(
double rate,
size_t mboard = 0) = 0;
469 virtual ::uhd::time_spec_t get_time_now(
size_t mboard = 0) = 0;
476 virtual ::uhd::time_spec_t get_time_last_pps(
size_t mboard = 0) = 0;
483 virtual void set_time_now(const ::uhd::time_spec_t &time_spec,
size_t mboard = 0) = 0;
489 virtual void set_time_next_pps(const ::uhd::time_spec_t &time_spec) = 0;
495 virtual void set_time_unknown_pps(const ::uhd::time_spec_t &time_spec) = 0;
507 virtual void set_command_time(const ::uhd::time_spec_t &time_spec,
508 size_t mboard = 0) = 0;
515 virtual void clear_command_time(
size_t mboard = 0) = 0;
521 virtual ::uhd::usrp::dboard_iface::sptr get_dboard_iface(
size_t chan = 0) = 0;
529 virtual ::uhd::usrp::multi_usrp::sptr get_device(
void) = 0;
539 virtual void set_user_register(
const uint8_t addr,
541 size_t mboard = 0) = 0;
std::vector< std::string > get_dboard_sensor_names(size_t chan=0)
DEPRECATED use get_sensor_names.
Definition: usrp_sink.h:371
::uhd::tune_result_t set_center_freq(double freq, size_t chan=0)
Definition: usrp_sink.h:210
::uhd::sensor_value_t get_dboard_sensor(const std::string &name, size_t chan=0)
DEPRECATED use get_sensor.
Definition: usrp_sink.h:364
Definition: usrp_sink.h:57
unsigned char uint8_t
Definition: stdint.h:78
shared_ptr documentation stub
Definition: shared_ptr_docstub.h:15
std::string otw_format
Definition: usrp_sink.h:42
unsigned int uint32_t
Definition: stdint.h:80
std::string cpu_format
Definition: usrp_sink.h:41
boost::shared_ptr< usrp_sink > sptr
Definition: usrp_sink.h:61
stream_args_t(const std::string &cpu="", const std::string &otw="")
Definition: usrp_sink.h:35
synchronous 1:1 input to output with historyOverride work to provide the signal processing implementa...
Definition: sync_block.h:37
device_addr_t args
Definition: usrp_sink.h:43
Definition: usrp_sink.h:33
#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< size_t > channels
Definition: usrp_sink.h:44