GNU Radio 3.6.5 C++ API

gr_file_source.h File Reference

#include <gr_core_api.h>
#include <gr_sync_block.h>
#include <boost/thread/mutex.hpp>

Go to the source code of this file.

Classes

class  gr_file_source
 Read stream from file. More...

Functions

GR_CORE_API gr_file_source_sptr gr_make_file_source (size_t itemsize, const char *filename, bool repeat=false)

Function Documentation

GR_CORE_API gr_file_source_sptr gr_make_file_source ( size_t  itemsize,
const char *  filename,
bool  repeat = false 
)

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.

Parameters:
itemsizethe size of each item in the file, in bytes
filenamename of the file to source from
repeatrepeat file from start