aboutsummaryrefslogtreecommitdiffstats
path: root/lib/file
diff options
context:
space:
mode:
authorDimitri Stolnikov <horiz0n@gmx.net>2013-01-20 15:45:22 +0100
committerDimitri Stolnikov <horiz0n@gmx.net>2013-01-20 15:45:22 +0100
commit18c860281d980211d8b351ddd7d082939e48534a (patch)
tree0d55cc8346aa43fe732501d9785d08dbd0f6558b /lib/file
parent9e60a61f73a9e741ae596865f21a10e2e610446e (diff)
file: set repeat and throttle device args to true by default
Diffstat (limited to 'lib/file')
-rw-r--r--lib/file/file_source_c.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/file/file_source_c.cc b/lib/file/file_source_c.cc
index 16b56be..2816716 100644
--- a/lib/file/file_source_c.cc
+++ b/lib/file/file_source_c.cc
@@ -45,8 +45,8 @@ file_source_c::file_source_c(const std::string &args) :
gr_make_io_signature (1, 1, sizeof (gr_complex)))
{
std::string filename;
- bool repeat = false;
- bool throttle = false;
+ bool repeat = true;
+ bool throttle = true;
_freq = 0;
_rate = 0;
@@ -62,10 +62,10 @@ file_source_c::file_source_c(const std::string &args) :
_rate = boost::lexical_cast< double >( dict["rate"] );
if (dict.count("repeat"))
- repeat = "true" == dict["repeat"] ? true : false;
+ repeat = ("true" == dict["repeat"] ? true : false);
if (dict.count("throttle"))
- throttle = "true" == dict["throttle"] ? true : false;
+ throttle = ("true" == dict["throttle"] ? true : false);
if (!filename.length())
throw std::runtime_error("No file name specified.");
@@ -108,7 +108,7 @@ 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";
+ std::string args = "file='/path/to/your/file',rate=1e6,freq=100e6,repeat=true,throttle=true";
args += ",label='Complex Sampled (IQ) File'";
devices.push_back( args );