Adapter between the std::iostreambuf and the SFNC Features representing the device file system. More...
#include <Filestream.h>
Public Member Functions | |
FileProtocolAdapter () | |
Constructor. | |
virtual | ~FileProtocolAdapter () |
bool | attach (::Spinnaker::GenApi::INodeMap *pInterface) |
attach file protocol adapter to NodeMap | |
bool | openFile (const char *pFileName, std::ios_base::openmode mode) |
open a file on the device | |
bool | closeFile (const char *pFileName) |
close a file on the device | |
std::streamsize | write (const char *buf, int64_t offs, int64_t len, const char *pFileName) |
writes data into a file. | |
std::streamsize | read (char *buf, int64_t offs, std::streamsize len, const char *pFileName) |
read data from the device into a buffer | |
int64_t | getBufSize (const char *pFileName, std::ios_base::openmode mode) |
fetch max FileAccessBuffer length for a file | |
bool | deleteFile (const char *pFileName) |
Delete the content of the file. | |
Adapter between the std::iostreambuf and the SFNC Features representing the device file system.
The adapter assumes, that the features provide stdio file access compatible semantic
Constructor.
|
virtual |
bool attach | ( | ::Spinnaker::GenApi::INodeMap * | pInterface | ) |
attach file protocol adapter to NodeMap
pInterface | NodeMap of the device to which the FileProtocolAdapter is attached |
bool closeFile | ( | const char * | pFileName | ) |
close a file on the device
pFileName | filename of the file to open. The filename must exist in the Enumeration FileSelector |
bool deleteFile | ( | const char * | pFileName | ) |
Delete the content of the file.
pFileName | filename of the file to open. The filename must exist in the Enumeration FileSelector |
int64_t getBufSize | ( | const char * | pFileName, |
std::ios_base::openmode | mode | ||
) |
fetch max FileAccessBuffer length for a file
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 |
bool openFile | ( | const char * | pFileName, |
std::ios_base::openmode | mode | ||
) |
open a file on the device
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 |
std::streamsize read | ( | char * | buf, |
int64_t | offs, | ||
std::streamsize | len, | ||
const char * | pFileName | ||
) |
read data from the device into a buffer
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 |
std::streamsize write | ( | const char * | buf, |
int64_t | offs, | ||
int64_t | len, | ||
const char * | pFileName | ||
) |
writes data into a file.
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 |