file: add get_devices member which returns a default device

This commit is contained in:
Dimitri Stolnikov 2013-01-10 20:28:16 +01:00
parent 887dbb1457
commit 61674dd638
2 changed files with 14 additions and 1 deletions

View File

@ -101,7 +101,18 @@ gr_basic_block_sptr file_source_c::self()
std::string file_source_c::name()
{
return "File Source";
return "IQ File Source";
}
std::vector<std::string> file_source_c::get_devices()
{
std::vector<std::string> devices;
std::string args = "file=your.file,freq=100e6,rate=1e6,repeat=false,throttle=true";
args += ",label='Complex Sampled (IQ) File'";
devices.push_back( args );
return devices;
}
size_t file_source_c::get_num_channels( void )

View File

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