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
71 static sptr make(const ::uhd::device_addr_t &device_addr,
72 const ::uhd::io_type_t &io_type,
140 static sptr make(const ::uhd::device_addr_t &device_addr,
141 const ::uhd::stream_args_t &stream_args,
142 const std::string &length_tag_name =
"");
155 virtual void set_start_time(const ::uhd::time_spec_t &time) = 0;
164 virtual ::uhd::dict<std::string, std::string> get_usrp_info(
size_t chan = 0) = 0;
171 virtual void set_subdev_spec(
const std::string &spec,
size_t mboard = 0) = 0;
178 virtual std::string get_subdev_spec (
size_t mboard = 0) = 0;
184 virtual void set_samp_rate(
double rate) = 0;
191 virtual double get_samp_rate(
void) = 0;
197 virtual ::uhd::meta_range_t get_samp_rates(
void) = 0;
205 virtual ::uhd::tune_result_t set_center_freq
206 (const ::uhd::tune_request_t tune_request,
size_t chan = 0) = 0;
218 return set_center_freq(::uhd::tune_request_t(freq), chan);
226 virtual double get_center_freq(
size_t chan = 0) = 0;
233 virtual ::uhd::freq_range_t get_freq_range(
size_t chan = 0) = 0;
240 virtual void set_gain(
double gain,
size_t chan = 0) = 0;
248 virtual void set_gain(
double gain,
249 const std::string &
name,
250 size_t chan = 0) = 0;
257 virtual double get_gain(
size_t chan = 0) = 0;
265 virtual double get_gain(
const std::string &
name,
266 size_t chan = 0) = 0;
273 virtual std::vector<std::string> get_gain_names(
size_t chan = 0) = 0;
280 virtual ::uhd::gain_range_t get_gain_range(
size_t chan = 0) = 0;
288 virtual ::uhd::gain_range_t get_gain_range(
const std::string &
name,
289 size_t chan = 0) = 0;
296 virtual void set_antenna(
const std::string &ant,
297 size_t chan = 0) = 0;
304 virtual std::string get_antenna(
size_t chan = 0) = 0;
311 virtual std::vector<std::string> get_antennas(
size_t chan = 0) = 0;
318 virtual void set_bandwidth(
double bandwidth,
size_t chan = 0) = 0;
325 virtual double get_bandwidth(
size_t chan = 0) = 0;
332 virtual ::uhd::freq_range_t get_bandwidth_range(
size_t chan = 0) = 0;
340 virtual void set_dc_offset(
const std::complex<double> &offset,
341 size_t chan = 0) = 0;
350 virtual void set_iq_balance(
const std::complex<double> &correction,
351 size_t chan = 0) = 0;
359 virtual ::uhd::sensor_value_t get_sensor(
const std::string &
name,
360 size_t chan = 0) = 0;
367 virtual std::vector<std::string> get_sensor_names(
size_t chan = 0) = 0;
373 return this->get_sensor(name, chan);
379 return this->get_sensor_names(chan);
388 virtual ::uhd::sensor_value_t get_mboard_sensor(
const std::string &
name,
389 size_t mboard = 0) = 0;
396 virtual std::vector<std::string> get_mboard_sensor_names(
size_t mboard = 0) = 0;
404 virtual void set_clock_config(const ::uhd::clock_config_t &clock_config,
405 size_t mboard = 0) = 0;
415 virtual void set_time_source(
const std::string &source,
416 const size_t mboard = 0) = 0;
423 virtual std::string get_time_source(
const size_t mboard) = 0;
430 virtual std::vector<std::string> get_time_sources(
const size_t mboard) = 0;
439 virtual void set_clock_source(
const std::string &source,
440 const size_t mboard = 0) = 0;
447 virtual std::string get_clock_source(
const size_t mboard) = 0;
454 virtual std::vector<std::string> get_clock_sources(
const size_t mboard) = 0;
461 virtual double get_clock_rate(
size_t mboard = 0) = 0;
468 virtual void set_clock_rate(
double rate,
size_t mboard = 0) = 0;
475 virtual ::uhd::time_spec_t get_time_now(
size_t mboard = 0) = 0;
482 virtual ::uhd::time_spec_t get_time_last_pps(
size_t mboard = 0) = 0;
489 virtual void set_time_now(const ::uhd::time_spec_t &time_spec,
size_t mboard = 0) = 0;
495 virtual void set_time_next_pps(const ::uhd::time_spec_t &time_spec) = 0;
501 virtual void set_time_unknown_pps(const ::uhd::time_spec_t &time_spec) = 0;
513 virtual void set_command_time(const ::uhd::time_spec_t &time_spec,
514 size_t mboard = 0) = 0;
521 virtual void clear_command_time(
size_t mboard = 0) = 0;
527 virtual ::uhd::usrp::dboard_iface::sptr get_dboard_iface(
size_t chan = 0) = 0;
535 virtual ::uhd::usrp::multi_usrp::sptr get_device(
void) = 0;
545 virtual void set_user_register(
const uint8_t addr,
547 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:377
::uhd::tune_result_t set_center_freq(double freq, size_t chan=0)
Definition: usrp_sink.h:216
::uhd::sensor_value_t get_dboard_sensor(const std::string &name, size_t chan=0)
DEPRECATED use get_sensor.
Definition: usrp_sink.h:370
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