gr::baz::file_source
gr::sync_block
baz_file_source.h
boost::shared_ptr< file_source > typedef boost::shared_ptr<file_source> gr::baz::file_source::sptr sptr gr::baz::file_source::sptr
sptr static sptr gr::baz::file_source::make (size_t itemsize, const char *filename, bool repeat=false, long offset=0, const char *timing_filename=NULL, bool pad=false, double rate=0.0, bool auto_load=true, const std::vector< std::string > &files=std::vector< std::string >()) make gr::baz::file_source::make size_t itemsize const char * filename bool repeat false long offset 0 const char * timing_filename NULL bool pad false double rate 0.0 bool auto_load true const std::vector< std::string > & files std::vector< std::string >()

Create a file source.

Opens `filename` as a source of items into a flowgraph. The data is expected to be in binary format, item after item. The `itemsize` of the block determines the conversion from bits to items.

If `repeat` is turned on, the file will repeat the file after it's reached the end.

itemsize

the size of each item in the file, in bytes

filename

name of the file to source from

repeat

repeat file from start

bool virtual bool gr::baz::file_source::seek (long seek_point)=0 seek gr::baz::file_source::seek long seek_point

seek file to `seek_point` relative to `whence`

seek_point

sample offset in file

whence

one of SEEK_SET, SEEK_CUR, SEEK_END (man fseek)

bool virtual bool gr::baz::file_source::seek (long seek_point, int whence)=0 seek gr::baz::file_source::seek long seek_point int whence
void virtual void gr::baz::file_source::open (const char *filename, bool repeat=false, long offset=0, const char *timing_filename=NULL, bool pad=false, double rate=0.0, bool auto_load=true, const std::vector< std::string > &files=std::vector< std::string >())=0 open gr::baz::file_source::open const char * filename bool repeat false long offset 0 const char * timing_filename NULL bool pad false double rate 0.0 bool auto_load true const std::vector< std::string > & files std::vector< std::string >()

Opens a new file.

filename

name of the file to source from

repeat

repeat file from start

void virtual void gr::baz::file_source::close ()=0 close gr::baz::file_source::close

Close the file handle.

size_t virtual size_t gr::baz::file_source::offset ()=0 offset gr::baz::file_source::offset
size_t virtual size_t gr::baz::file_source::file_offset ()=0 file_offset gr::baz::file_source::file_offset
double virtual double gr::baz::file_source::time (bool relative=false, bool raw=false)=0 time gr::baz::file_source::time bool relative false bool raw false
double virtual double gr::baz::file_source::sample_rate ()=0 sample_rate gr::baz::file_source::sample_rate
double virtual double gr::baz::file_source::sample_count (bool raw=false)=0 sample_count gr::baz::file_source::sample_count bool raw false
double virtual double gr::baz::file_source::duration ()=0 duration gr::baz::file_source::duration
size_t virtual size_t gr::baz::file_source::file_index ()=0 file_index gr::baz::file_source::file_index
std::string virtual std::string gr::baz::file_source::file_path ()=0 file_path gr::baz::file_source::file_path
std::vector< std::string > virtual std::vector< std::string > gr::baz::file_source::files ()=0 files gr::baz::file_source::files

Read stream from file.

gr::baz::file_source
gr::sync_block
gr::baz::file_source
gr::sync_block
- gr::baz::file_source
  close
- gr::baz::file_source
  duration
- gr::baz::file_source
  file_index
- gr::baz::file_source
  file_offset
- gr::baz::file_source
  file_path
- gr::baz::file_source
  files
- gr::baz::file_source
  make
- gr::baz::file_source
  offset
- gr::baz::file_source
  open
- gr::baz::file_source
  sample_count
- gr::baz::file_source
  sample_rate
- gr::baz::file_source
  seek
- gr::baz::file_source
  seek
- gr::baz::file_source
  sptr
- gr::baz::file_source
  time