23 #ifndef INCLUDED_GR_UHD_USRP_SINK_H
24 #define INCLUDED_GR_UHD_USRP_SINK_H
28 #include <uhd/usrp/multi_usrp.hpp>
30 #ifndef INCLUDED_UHD_STREAM_HPP
35 const std::string &otw =
"")
46 # define INCLUDED_UHD_STREAM_HPP
48 # define GR_UHD_USE_STREAM_API
90 static sptr make(const ::uhd::device_addr_t &device_addr,
91 const ::uhd::io_type_t &io_type,
120 static sptr make(const ::uhd::device_addr_t &device_addr,
121 const ::uhd::stream_args_t &stream_args);
134 virtual void set_start_time(const ::uhd::time_spec_t &time) = 0;
143 virtual ::uhd::dict<std::string, std::string> get_usrp_info(
size_t chan = 0) = 0;
150 virtual void set_subdev_spec(
const std::string &spec,
size_t mboard = 0) = 0;
157 virtual std::string get_subdev_spec (
size_t mboard = 0) = 0;
163 virtual void set_samp_rate(
double rate) = 0;
170 virtual double get_samp_rate(
void) = 0;
176 virtual ::uhd::meta_range_t get_samp_rates(
void) = 0;
184 virtual ::uhd::tune_result_t set_center_freq
185 (const ::uhd::tune_request_t tune_request,
size_t chan = 0) = 0;
197 return set_center_freq(::uhd::tune_request_t(freq), chan);
205 virtual double get_center_freq(
size_t chan = 0) = 0;
212 virtual ::uhd::freq_range_t get_freq_range(
size_t chan = 0) = 0;
219 virtual void set_gain(
double gain,
size_t chan = 0) = 0;
227 virtual void set_gain(
double gain,
228 const std::string &
name,
229 size_t chan = 0) = 0;
236 virtual double get_gain(
size_t chan = 0) = 0;
244 virtual double get_gain(
const std::string &
name,
245 size_t chan = 0) = 0;
252 virtual std::vector<std::string> get_gain_names(
size_t chan = 0) = 0;
259 virtual ::uhd::gain_range_t get_gain_range(
size_t chan = 0) = 0;
267 virtual ::uhd::gain_range_t get_gain_range(
const std::string &
name,
268 size_t chan = 0) = 0;
275 virtual void set_antenna(
const std::string &ant,
276 size_t chan = 0) = 0;
283 virtual std::string get_antenna(
size_t chan = 0) = 0;
290 virtual std::vector<std::string> get_antennas(
size_t chan = 0) = 0;
297 virtual void set_bandwidth(
double bandwidth,
size_t chan = 0) = 0;
304 virtual double get_bandwidth(
size_t chan = 0) = 0;
311 virtual ::uhd::freq_range_t get_bandwidth_range(
size_t chan = 0) = 0;
319 virtual void set_dc_offset(
const std::complex<double> &offset,
320 size_t chan = 0) = 0;
329 virtual void set_iq_balance(
const std::complex<double> &correction,
330 size_t chan = 0) = 0;
338 virtual ::uhd::sensor_value_t get_sensor(
const std::string &
name,
339 size_t chan = 0) = 0;
346 virtual std::vector<std::string> get_sensor_names(
size_t chan = 0) = 0;
352 return this->get_sensor(name, chan);
358 return this->get_sensor_names(chan);
367 virtual ::uhd::sensor_value_t get_mboard_sensor(
const std::string &
name,
368 size_t mboard = 0) = 0;
375 virtual std::vector<std::string> get_mboard_sensor_names(
size_t mboard = 0) = 0;
383 virtual void set_clock_config(const ::uhd::clock_config_t &clock_config,
384 size_t mboard = 0) = 0;
394 virtual void set_time_source(
const std::string &source,
395 const size_t mboard = 0) = 0;
402 virtual std::string get_time_source(
const size_t mboard) = 0;
409 virtual std::vector<std::string> get_time_sources(
const size_t mboard) = 0;
418 virtual void set_clock_source(
const std::string &source,
419 const size_t mboard = 0) = 0;
426 virtual std::string get_clock_source(
const size_t mboard) = 0;
433 virtual std::vector<std::string> get_clock_sources(
const size_t mboard) = 0;
440 virtual double get_clock_rate(
size_t mboard = 0) = 0;
447 virtual void set_clock_rate(
double rate,
size_t mboard = 0) = 0;
454 virtual ::uhd::time_spec_t get_time_now(
size_t mboard = 0) = 0;
461 virtual ::uhd::time_spec_t get_time_last_pps(
size_t mboard = 0) = 0;
468 virtual void set_time_now(const ::uhd::time_spec_t &time_spec,
size_t mboard = 0) = 0;
474 virtual void set_time_next_pps(const ::uhd::time_spec_t &time_spec) = 0;
480 virtual void set_time_unknown_pps(const ::uhd::time_spec_t &time_spec) = 0;
492 virtual void set_command_time(const ::uhd::time_spec_t &time_spec,
493 size_t mboard = 0) = 0;
500 virtual void clear_command_time(
size_t mboard = 0) = 0;
506 virtual ::uhd::usrp::dboard_iface::sptr get_dboard_iface(
size_t chan = 0) = 0;
512 virtual ::uhd::usrp::multi_usrp::sptr get_device(
void) = 0;
522 virtual void set_user_register(
const uint8_t addr,
524 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:356
::uhd::tune_result_t set_center_freq(double freq, size_t chan=0)
Definition: usrp_sink.h:195
::uhd::sensor_value_t get_dboard_sensor(const std::string &name, size_t chan=0)
DEPRECATED use get_sensor.
Definition: usrp_sink.h:349
Definition: usrp_sink.h:56
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:41
unsigned int uint32_t
Definition: stdint.h:80
std::string cpu_format
Definition: usrp_sink.h:40
boost::shared_ptr< usrp_sink > sptr
Definition: usrp_sink.h:60
stream_args_t(const std::string &cpu="", const std::string &otw="")
Definition: usrp_sink.h:34
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:42
Definition: usrp_sink.h:32
#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:43