osmosdr: remove deprecated device arguments

gr3.6
Dimitri Stolnikov 10 years ago
parent 4c101ea44c
commit 193fd0ad88
  1. 2
      grc/gen_osmosdr_blocks.py
  2. 15
      lib/osmosdr/osmosdr_src_c.cc

@ -141,7 +141,7 @@ Source Mode:
rtl=2[,direct_samp=0|1|2][,offset_tune=0|1] ...
rtl_tcp=127.0.0.1:1234[,psize=16384][,direct_samp=0|1|2][,offset_tune=0|1] ...
uhd[,serial=...][,lo_offset=0][,mcr=52e6][,nchan=2][,subdev='\\\\'B:0 A:0\\\\''] ...
osmosdr=0[,mcr=64e6][,nchan=5][,buffers=32][,buflen=N*512] ...
osmosdr=0[,buffers=32][,buflen=N*512] ...
file='/path/to/your file',rate=1e6[,freq=100e6][,repeat=true][,throttle=true] ...
Sink Mode:

@ -74,26 +74,13 @@ osmosdr_src_c::osmosdr_src_c (const std::string &args)
_skipped(0)
{
int ret;
unsigned int dev_index = 0, mcr = 0;
size_t nchan = 1;
unsigned int dev_index = 0;
dict_t dict = params_to_dict(args);
if (dict.count("osmosdr"))
dev_index = boost::lexical_cast< unsigned int >( dict["osmosdr"] );
if (dict.count("mcr"))
mcr = (unsigned int) boost::lexical_cast< double >( dict["mcr"] );
if (mcr != 0)
throw std::runtime_error("FIXME: Setting the MCR is not supported.");
if (dict.count("nchan"))
nchan = boost::lexical_cast< size_t >( dict["nchan"] );
if (nchan != 1)
throw std::runtime_error("FIXME: Values of nchan != 1 are not supported.");
_buf_num = _buf_len = _buf_head = _buf_used = _buf_offset = 0;
if (dict.count("buffers"))

Loading…
Cancel
Save