All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
GenApi::FileProtocolAdapter Class Reference

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

#include <GenApi/Filestream.h>

Inheritance diagram for GenApi::FileProtocolAdapter:
Inheritance graph
[legend]

Public Member Functions

 FileProtocolAdapter ()
 Constructor. More...
 
virtual bool attach (GenApi::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...
 

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

GenApi::FileProtocolAdapter::FileProtocolAdapter ( )

Constructor.

Member Function Documentation

virtual bool GenApi::FileProtocolAdapter::attach ( GenApi::INodeMap *  pInterface)
virtual

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

Implements GenApi::IFileProtocolAdapter.

virtual bool GenApi::FileProtocolAdapter::closeFile ( const char *  pFileName)
virtual

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

Implements GenApi::IFileProtocolAdapter.

virtual bool GenApi::FileProtocolAdapter::deleteFile ( const char *  pFileName)
virtual

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

Implements GenApi::IFileProtocolAdapter.

virtual int64_t GenApi::FileProtocolAdapter::getBufSize ( const char *  pFileName,
std::ios_base::openmode  mode 
)
virtual

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

Implements GenApi::IFileProtocolAdapter.

virtual bool GenApi::FileProtocolAdapter::openFile ( const char *  pFileName,
std::ios_base::openmode  mode 
)
virtual

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 Enumeration FileOpenMode
Returns
true on success, false on error

Implements GenApi::IFileProtocolAdapter.

virtual GenICam_streamsize GenApi::FileProtocolAdapter::read ( char *  buf,
int64_t  offs,
GenICam_streamsize  len,
const char *  pFileName 
)
virtual

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

Implements GenApi::IFileProtocolAdapter.

virtual GenICam_streamsize GenApi::FileProtocolAdapter::write ( const char *  buf,
int64_t  offs,
int64_t  len,
const char *  pFileName 
)
virtual

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

Implements GenApi::IFileProtocolAdapter.


The documentation for this class was generated from the following file:

pylon 5.0.5
Copyright © 2006-2016 Basler AG (Thu Aug 11 2016 18:01:28)