Public Member Functions | List of all members
GenICam::FileProtocolAdapter Class Reference

Adapter between the std::iostreambuf and the SFNC Features representing the device filesystem. More...

#include <GenApi/Filestream.h>

Public Member Functions

 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...
 

Detailed Description

Adapter between the std::iostreambuf and the SFNC Features representing the device filesystem.

The adapter assumes, that the features provide stdio fileaccess compatible semantic

Constructor & Destructor Documentation

GenICam::FileProtocolAdapter::FileProtocolAdapter ( )
inline

Constructor.

Member Function Documentation

bool GenICam::FileProtocolAdapter::attach ( GenApi::INodeMap pInterface)
inline

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
bool GenICam::FileProtocolAdapter::closeFile ( const char *  pFileName)
inline

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
bool GenICam::FileProtocolAdapter::deleteFile ( const char *  pFileName)
inline

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
int64_t GenICam::FileProtocolAdapter::getBufSize ( const char *  pFileName,
std::ios_base::openmode  mode 
)
inline

fetch max FileAccessBuffer length for a file

Parameters
pFileNamefilename of the file to open. The filename must exist in the Enumeration FileSelector
modemode 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
pFileNamefilename of the file to open. The filename must exist in the Enumeration FileSelector
modemode 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
buftarget buffer
offsoffset in the device file to read from
lencount of bytes to read
pFileNamefilename 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
bufsource buffer
offsoffset into the device file
lencount of bytes to write
pFileNamefilename 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:

© 2006-2014 Basler (Tue Jul 22 2014 11:41:23)