Async
1.4.0
|
#include <AsyncFileReader.h>
Public Member Functions | |
FileReader (int buf_size) | |
Constuctor. More... | |
~FileReader (void) | |
Destructor. More... | |
bool | open (const std::string &name) |
Open a file for binary reading. More... | |
bool | close (void) |
Close a previously opened file. More... | |
bool | isOpen (void) const |
Check if a file is currently opened. More... | |
int | read (void *buf, int len) |
Read data from a previously opened file. More... | |
Definition at line 112 of file AsyncFileReader.h.
Async::FileReader::FileReader | ( | int | buf_size | ) |
Constuctor.
buf_size | The device name of the serial port to use |
This is the constructor for the file reader class. The buffer size should be assigned at least twice as large as the maximum block size to be read.
Async::FileReader::~FileReader | ( | void | ) |
Destructor.
bool Async::FileReader::close | ( | void | ) |
Close a previously opened file.
|
inline |
Check if a file is currently opened.
Definition at line 150 of file AsyncFileReader.h.
References read().
bool Async::FileReader::open | ( | const std::string & | name | ) |
Open a file for binary reading.
name | The file name to be opened |
int Async::FileReader::read | ( | void * | buf, |
int | len | ||
) |
Read data from a previously opened file.
buf | A read target data buffer |
len | The number of bytes to be read |
Referenced by isOpen().