aboutsummaryrefslogtreecommitdiffstats
path: root/lib/file
diff options
context:
space:
mode:
Diffstat (limited to 'lib/file')
-rw-r--r--lib/file/file_source_c.cc13
-rw-r--r--lib/file/file_source_c.h2
2 files changed, 9 insertions, 6 deletions
diff --git a/lib/file/file_source_c.cc b/lib/file/file_source_c.cc
index 0669ec9..d4a0f1f 100644
--- a/lib/file/file_source_c.cc
+++ b/lib/file/file_source_c.cc
@@ -102,14 +102,17 @@ std::string file_source_c::name()
return "IQ File Source";
}
-std::vector<std::string> file_source_c::get_devices()
+std::vector<std::string> file_source_c::get_devices( bool fake )
{
std::vector<std::string> devices;
- std::string args = "file='/path/to/your/file'";
- args += ",rate=1e6,freq=100e6,repeat=true,throttle=true";
- args += ",label='Complex Sampled (IQ) File'";
- devices.push_back( args );
+ if ( fake )
+ {
+ std::string args = "file='/path/to/your/file'";
+ args += ",rate=1e6,freq=100e6,repeat=true,throttle=true";
+ args += ",label='Complex Sampled (IQ) File'";
+ devices.push_back( args );
+ }
return devices;
}
diff --git a/lib/file/file_source_c.h b/lib/file/file_source_c.h
index 298ecdc..d2d71ca 100644
--- a/lib/file/file_source_c.h
+++ b/lib/file/file_source_c.h
@@ -45,7 +45,7 @@ public:
std::string name();
- static std::vector< std::string > get_devices();
+ static std::vector< std::string > get_devices( bool fake = false );
size_t get_num_channels( void );