GNU Radio 3.6.5 C++ API

gr::blocks::file_meta_source Class Reference

Reads stream from file with meta-data headers. Headers are parsed into tags. More...

#include <file_meta_source.h>

Inheritance diagram for gr::blocks::file_meta_source:
gr_sync_block gr_block gr_basic_block gr_msg_accepter gruel::msg_accepter gr::blocks::file_meta_source_impl

List of all members.

Public Types

typedef boost::shared_ptr
< file_meta_source
sptr

Public Member Functions

virtual bool open (const std::string &filename, const std::string &hdr_filename="")=0
virtual void close ()=0
virtual void do_update ()=0

Static Public Member Functions

static sptr make (const std::string &filename, bool repeat=false, bool detached_header=false, const std::string &hdr_filename="")
 Create a meta-data file source.

Detailed Description

Reads stream from file with meta-data headers. Headers are parsed into tags.

The information in the metadata headers includes:

rx_rate (double): sample rate of data. rx_time (uint64_t, double): time stamp of first sample in segment. size (uint32_t): item size in bytes. type (gr_file_types as int32_t): data type. cplx (bool): Is data complex? strt (uint64_t): Starting byte of data in this segment. bytes (uint64_t): Size in bytes of data in this segment.

Any item inside of the extra header dictionary is ready out and made into a stream tag.


Member Typedef Documentation


Member Function Documentation

virtual void gr::blocks::file_meta_source::close ( ) [pure virtual]
virtual void gr::blocks::file_meta_source::do_update ( ) [pure virtual]
static sptr gr::blocks::file_meta_source::make ( const std::string &  filename,
bool  repeat = false,
bool  detached_header = false,
const std::string &  hdr_filename = "" 
) [static]

Create a meta-data file source.

Parameters:
filename(string): Name of file to write data to.
repeat(bool): Repeats file when EOF is found.
detached_header(bool): Set to true if header info is stored in a separate file (usually named filename.hdr)
hdr_filename(string): Name of detached header file if used. Defaults to 'filename.hdr' if detached_header is true but this field is an empty string.
virtual bool gr::blocks::file_meta_source::open ( const std::string &  filename,
const std::string &  hdr_filename = "" 
) [pure virtual]

The documentation for this class was generated from the following file: