65class rtl_tcp_signal_source_c :
public gr::sync_block
68 ~rtl_tcp_signal_source_c();
70 int work(
int noutput_items,
71 gr_vector_const_void_star &input_items,
72 gr_vector_void_star &output_items);
74 void set_frequency(
int frequency);
75 void set_sample_rate(
int sample_rate);
76 void set_agc_mode(
bool agc);
77 void set_gain(
int gain);
78 void set_if_gain(
int gain);
81 friend rtl_tcp_signal_source_c_sptr
82 rtl_tcp_make_signal_source_c(
const std::string &address,
86 rtl_tcp_signal_source_c(
const std::string &address,
91 void handle_read(
const boost::system::error_code &ec,
92 size_t bytes_transferred);
94 inline bool not_full()
const
96 return unread_ < buffer_.capacity();
99 inline bool not_empty()
const
101 return unread_ > 0 || io_context_.stopped();
104 boost::circular_buffer_space_optimized<float> buffer_;
107 boost::condition not_full_;
108 boost::condition not_empty_;
111 boost::array<float, 0xff> lookup_{};
114 b_io_context io_context_;
115 boost::asio::ip::tcp::socket socket_;
116 std::vector<unsigned char> data_;