Adapter between the std::iostreambuf and the SFNC Features representing the device filesystem.
More...
#include <GenApi/Filestream.h>
|
| FileProtocolAdapter () |
| Constructor. More...
|
|
bool | attach (GenApi::INodeMap *pInterface) |
| attach file protocol adapter to nodemap More...
|
|
bool | openFile (const char *pFileName, std::ios_base::openmode mode) |
| open a file on the device More...
|
|
bool | closeFile (const char *pFileName) |
| close a file on the device More...
|
|
std::streamsize | write (const char *buf, int64_t offs, int64_t len, const char *pFileName) |
| writes data into a file. More...
|
|
std::streamsize | read (char *buf, int64_t offs, std::streamsize len, const char *pFileName) |
| read data from the device into a buffer More...
|
|
int64_t | getBufSize (const char *pFileName, std::ios_base::openmode mode) |
| fetch max FileAccessBuffer length for a file More...
|
|
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
GenICam::FileProtocolAdapter::FileProtocolAdapter |
( |
| ) |
|
|
inline |
attach file protocol adapter to nodemap
- Parameters
-
- Returns
- true if attach was successful, false if not
bool GenICam::FileProtocolAdapter::closeFile |
( |
const char * |
pFileName | ) |
|
|
inline |
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
bool GenICam::FileProtocolAdapter::deleteFile |
( |
const char * |
pFileName | ) |
|
|
inline |
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
int64_t GenICam::FileProtocolAdapter::getBufSize |
( |
const char * |
pFileName, |
|
|
std::ios_base::openmode |
mode |
|
) |
| |
|
inline |
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
bool GenICam::FileProtocolAdapter::openFile |
( |
const char * |
pFileName, |
|
|
std::ios_base::openmode |
mode |
|
) |
| |
|
inline |
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 Enunmeration FileOpenMode |
- Returns
- true on success, false on error
std::streamsize GenICam::FileProtocolAdapter::read |
( |
char * |
buf, |
|
|
int64_t |
offs, |
|
|
std::streamsize |
len, |
|
|
const char * |
pFileName |
|
) |
| |
|
inline |
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
std::streamsize GenICam::FileProtocolAdapter::write |
( |
const char * |
buf, |
|
|
int64_t |
offs, |
|
|
int64_t |
len, |
|
|
const char * |
pFileName |
|
) |
| |
|
inline |
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
The documentation for this class was generated from the following file: