GNU Radio Manual and C++ API Reference  3.7.9.2
The Free & Open Software Radio Ecosystem
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
gr::blocks::file_sink_base Class Reference

Common base class for file sinks. More...

#include <gnuradio/blocks/file_sink_base.h>

Public Member Functions

 file_sink_base ()
 
 ~file_sink_base ()
 
bool open (const char *filename)
 Open filename and begin output to it. More...
 
void close ()
 Close current output file. More...
 
void do_update ()
 if we've had an update, do it now. More...
 
void set_unbuffered (bool unbuffered)
 turn on unbuffered writes for slower outputs More...
 

Protected Member Functions

 file_sink_base (const char *filename, bool is_binary, bool append)
 

Protected Attributes

FILE * d_fp
 
FILE * d_new_fp
 
bool d_updated
 
bool d_is_binary
 
boost::mutex d_mutex
 
bool d_unbuffered
 
bool d_append
 

Detailed Description

Common base class for file sinks.

Constructor & Destructor Documentation

gr::blocks::file_sink_base::file_sink_base ( const char *  filename,
bool  is_binary,
bool  append 
)
protected
gr::blocks::file_sink_base::file_sink_base ( )
inline
gr::blocks::file_sink_base::~file_sink_base ( )

Member Function Documentation

void gr::blocks::file_sink_base::close ( )

Close current output file.

Closes current output file and ignores any output until open is called to connect to another file.

void gr::blocks::file_sink_base::do_update ( )

if we've had an update, do it now.

bool gr::blocks::file_sink_base::open ( const char *  filename)

Open filename and begin output to it.

void gr::blocks::file_sink_base::set_unbuffered ( bool  unbuffered)

turn on unbuffered writes for slower outputs

Member Data Documentation

bool gr::blocks::file_sink_base::d_append
protected
FILE* gr::blocks::file_sink_base::d_fp
protected
bool gr::blocks::file_sink_base::d_is_binary
protected
boost::mutex gr::blocks::file_sink_base::d_mutex
protected
FILE* gr::blocks::file_sink_base::d_new_fp
protected
bool gr::blocks::file_sink_base::d_unbuffered
protected
bool gr::blocks::file_sink_base::d_updated
protected

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