Class Spinnaker::GenApi::FileProtocolAdapter¶
ClassList > GenApi > FileProtocolAdapter
Adapter between the std::iostreambuf and the SFNC Features representing the device file system. More...
#include <Filestream.h>
Public Functions¶
| Type | Name |
|---|---|
| FileProtocolAdapter () Constructor. |
|
| bool | attach (::Spinnaker::GenApi::INodeMap * pInterface) attach file protocol adapter to NodeMap __ |
| bool | closeFile (const char * pFileName) close a file on the device |
| bool | deleteFile (const char * pFileName) Delete the content of the file. |
| int64_t | getBufSize (const char * pFileName, std::ios_base::openmode mode) fetch max FileAccessBuffer length for a file |
| bool | openFile (const char * pFileName, std::ios_base::openmode mode) open a file on the device |
| std::streamsize | read (char * buf, int64_t offs, std::streamsize len, const char * pFileName) read data from the device into a buffer |
| std::streamsize | write (const char * buf, int64_t offs, int64_t len, const char * pFileName) writes data into a file. |
| virtual | ~FileProtocolAdapter () |
Detailed Description¶
The adapter assumes, that the features provide stdio file access compatible semantic
Public Functions Documentation¶
function FileProtocolAdapter¶
Constructor.
function attach¶
attach file protocol adapter to NodeMap __
Parameters:
pInterfaceNodeMap of the device to which the FileProtocolAdapter is attached
Returns:
true if attach was successful, false if not
function closeFile¶
close a file on the device
Parameters:
pFileNamefilename of the file to open. The filename must exist in the Enumeration FileSelector
Returns:
true on success, false on error
function deleteFile¶
Delete the content of the file.
Parameters:
pFileNamefilename of the file to open. The filename must exist in the Enumeration FileSelector
Returns:
true on success, false on error
function getBufSize¶
fetch max FileAccessBuffer length for a file
int64_t GenApi::FileProtocolAdapter::getBufSize (
const char * pFileName,
std::ios_base::openmode mode
)
Parameters:
pFileNamefilename of the file to open. The filename must exist in the Enumeration FileSelectormodemode 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
function openFile¶
open a file on the device
Parameters:
pFileNamefilename of the file to open. The filename must exist in the Enumeration FileSelectormodemode to open the file. The mode must exist in the Enumeration FileOpenMode
Returns:
true on success, false on error
function read¶
read data from the device into a buffer
std::streamsize GenApi::FileProtocolAdapter::read (
char * buf,
int64_t offs,
std::streamsize len,
const char * pFileName
)
Parameters:
buftarget bufferoffsoffset in the device file to read fromlencount of bytes to readpFileNamefilename of the file to write into The filename must exist in the Enumeration FileSelector
Returns:
count of bytes successfully read
function write¶
writes data into a file.
std::streamsize GenApi::FileProtocolAdapter::write (
const char * buf,
int64_t offs,
int64_t len,
const char * pFileName
)
Parameters:
bufsource bufferoffsoffset into the device filelencount of bytes to writepFileNamefilename of the file to write into The filename must exist in the Enumeration FileSelector
Returns:
count of bytes written
function ~FileProtocolAdapter¶
The documentation for this class was generated from the following file C:/workspace/include/SpinGenApi/Filestream.h