Adapter between the std::iostreambuf and the SFNC Features representing the device filesystem.
More...
Inherits IFileProtocolAdapter.
|
|
| FileProtocolAdapter () |
| | Constructor.
|
| |
| virtual bool | attach (GENAPI_NAMESPACE::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...
|
| |
The adapter assumes, that the features provide stdio fileaccess compatible semantic
◆ attach()
| virtual bool attach |
( |
GENAPI_NAMESPACE::INodeMap * |
pInterface | ) |
|
|
virtual |
- Parameters
-
- Returns
- true if attach was successful, false if not
◆ openFile()
| virtual bool openFile |
( |
const char * |
pFileName, |
|
|
std::ios_base::openmode |
mode |
|
) |
| |
|
virtual |
- Parameters
-
| pFileName | file name of the file to open. The file name 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
◆ closeFile()
| virtual bool closeFile |
( |
const char * |
pFileName | ) |
|
|
virtual |
- Parameters
-
| pFileName | file name of the file to open. The file name must exist in the Enumeration FileSelector |
- Returns
- true on success, false on error
◆ write()
| virtual GenICam_streamsize write |
( |
const char * |
buf, |
|
|
int64_t |
offs, |
|
|
int64_t |
len, |
|
|
const char * |
pFileName |
|
) |
| |
|
virtual |
- Parameters
-
| buf | source buffer |
| offs | offset into the device file |
| len | count of bytes to write |
| pFileName | file name of the file to write into. The file name must exist in the Enumeration FileSelector |
- Returns
- count of bytes written. If less than len bytes are written an error has occurred.
◆ read()
| virtual GenICam_streamsize read |
( |
char * |
buf, |
|
|
int64_t |
offs, |
|
|
GenICam_streamsize |
len, |
|
|
const char * |
pFileName |
|
) |
| |
|
virtual |
- Parameters
-
| buf | target buffer |
| offs | offset in the device file to read from |
| len | count of bytes to read |
| pFileName | file name of the file to write into. The file name must exist in the Enumeration FileSelector |
- Returns
- count of bytes successfully read. . If less than len bytes are written an error has occurred.
◆ getBufSize()
| virtual int64_t getBufSize |
( |
const char * |
pFileName, |
|
|
std::ios_base::openmode |
mode |
|
) |
| |
|
virtual |
- Parameters
-
| pFileName | file name of the file to open. The file name must exist in the Enumeration FileSelector |
| mode | mode to open the file. The mode must exist in the Enumeration FileOpenMode |
- Returns
- max length of FileAccessBuffer in the given mode on the given file
◆ deleteFile()
| virtual bool deleteFile |
( |
const char * |
pFileName | ) |
|
|
virtual |
- Parameters
-
| pFileName | file name of the file to open. The file name must exist in the Enumeration FileSelector |
- Returns
- true on success, false on error