Adapter between the std::iostreambuf and the SFNC Features representing the device filesystem.
More...
#include <GenApi/Filestream.h>
|
| FileProtocolAdapter () |
| Constructor. More...
|
|
virtual bool | attach (GenApi::INodeMap *pInterface) |
| attach file protocol adapter to nodemap More...
|
|
virtual bool | openFile (const char *pFileName, std::ios_base::openmode mode) |
| open a file on the device More...
|
|
virtual bool | closeFile (const char *pFileName) |
| close a file on the device More...
|
|
virtual GenICam_streamsize | write (const char *buf, int64_t offs, int64_t len, const char *pFileName) |
| writes data into a file. More...
|
|
virtual GenICam_streamsize | read (char *buf, int64_t offs, GenICam_streamsize len, const char *pFileName) |
| read data from the device into a buffer More...
|
|
virtual int64_t | getBufSize (const char *pFileName, std::ios_base::openmode mode) |
| fetch max FileAccessBuffer length for a file More...
|
|
virtual bool | deleteFile (const char *pFileName) |
| Delete the content of the file. More...
|
|
Adapter between the std::iostreambuf and the SFNC Features representing the device filesystem.
The adapter assumes, that the features provide stdio fileaccess compatible semantic
GenApi::FileProtocolAdapter::FileProtocolAdapter |
( |
| ) |
|
virtual bool GenApi::FileProtocolAdapter::attach |
( |
GenApi::INodeMap * |
pInterface | ) |
|
|
virtual |
attach file protocol adapter to nodemap
- Parameters
-
- Returns
- true if attach was successful, false if not
Implements GenApi::IFileProtocolAdapter.
virtual bool GenApi::FileProtocolAdapter::closeFile |
( |
const char * |
pFileName | ) |
|
|
virtual |
close a file on the device
- Parameters
-
pFileName | filename of the file to open. The filename must exist in the Enumeration FileSelector |
- Returns
- true on success, false on error
Implements GenApi::IFileProtocolAdapter.
virtual bool GenApi::FileProtocolAdapter::deleteFile |
( |
const char * |
pFileName | ) |
|
|
virtual |
Delete the content of the file.
- Parameters
-
pFileName | filename of the file to open. The filename must exist in the Enumeration FileSelector |
- Returns
- true on success, false on error
Implements GenApi::IFileProtocolAdapter.
virtual int64_t GenApi::FileProtocolAdapter::getBufSize |
( |
const char * |
pFileName, |
|
|
std::ios_base::openmode |
mode |
|
) |
| |
|
virtual |
fetch max FileAccessBuffer length for a file
- Parameters
-
pFileName | filename of the file to open. The filename must exist in the Enumeration FileSelector |
mode | mode to open the file. The mode must exist in the Enunmeration FileOpenMode |
- Returns
- max length of FileAccessBuffer in the given mode on the given file
Implements GenApi::IFileProtocolAdapter.
virtual bool GenApi::FileProtocolAdapter::openFile |
( |
const char * |
pFileName, |
|
|
std::ios_base::openmode |
mode |
|
) |
| |
|
virtual |
open a file on the device
- Parameters
-
pFileName | filename of the file to open. The filename must exist in the Enumeration FileSelector |
mode | mode to open the file. The mode must exist in the Enumeration FileOpenMode |
- Returns
- true on success, false on error
Implements GenApi::IFileProtocolAdapter.
virtual GenICam_streamsize GenApi::FileProtocolAdapter::read |
( |
char * |
buf, |
|
|
int64_t |
offs, |
|
|
GenICam_streamsize |
len, |
|
|
const char * |
pFileName |
|
) |
| |
|
virtual |
read data from the device into a buffer
- Parameters
-
buf | target buffer |
offs | offset in the device file to read from |
len | count of bytes to read |
pFileName | filename of the file to write into The filename must exist in the Enumeration FileSelector |
- Returns
- count of bytes successfully read
Implements GenApi::IFileProtocolAdapter.
virtual GenICam_streamsize GenApi::FileProtocolAdapter::write |
( |
const char * |
buf, |
|
|
int64_t |
offs, |
|
|
int64_t |
len, |
|
|
const char * |
pFileName |
|
) |
| |
|
virtual |
writes data into a file.
- Parameters
-
buf | source buffer |
offs | offset into the device file |
len | count of bytes to write |
pFileName | filename of the file to write into The filename must exist in the Enumeration FileSelector |
- Returns
- count of bytes written
Implements GenApi::IFileProtocolAdapter.
The documentation for this class was generated from the following file: