rtl_tcp: add get_devices member which returns a default device

This commit is contained in:
Dimitri Stolnikov 2013-01-10 20:27:56 +01:00
parent 9bfce2694f
commit 887dbb1457
2 changed files with 14 additions and 1 deletions

View File

@ -132,7 +132,18 @@ gr_basic_block_sptr rtl_tcp_source_c::self()
std::string rtl_tcp_source_c::name() std::string rtl_tcp_source_c::name()
{ {
return "RTL TCP Client Source"; return "RTL TCP Client";
}
std::vector<std::string> rtl_tcp_source_c::get_devices()
{
std::vector<std::string> devices;
std::string args = "rtl_tcp=localhost:1234";
args += ",label='RTL-SDR Spectrum Server'";
devices.push_back( args );
return devices;
} }
size_t rtl_tcp_source_c::get_num_channels( void ) size_t rtl_tcp_source_c::get_num_channels( void )

View File

@ -48,6 +48,8 @@ public:
std::string name(); std::string name();
static std::vector< std::string > get_devices();
size_t get_num_channels( void ); size_t get_num_channels( void );
osmosdr::meta_range_t get_sample_rates( void ); osmosdr::meta_range_t get_sample_rates( void );