C++ Based OPC UA Client/Server SDK
1.6.5.478
|
The UaIODevice class is the base interface class of all I/O devices. More...
#include <uaiodevice.h>
Inherited by UaFile.
Public Types | |
enum | OpenModeFlag { , OpenModeRead = 0x01, OpenModeWrite = 0x02, OpenModeEraseExisiting = 0x04, OpenModeEraseExisting = 0x04, OpenModeAppend = 0x08, OpenModeText = 0x10 } |
OpenMode enumeration. More... | |
enum | SeekMode { SeekModeBeginning = SEEK_SET, SeekModeCurrent = SEEK_CUR, SeekModeEnd = SEEK_END } |
SeekMode enumeration. More... | |
Public Member Functions | |
virtual OpcUa_Boolean | open (OpenMode mode)=0 |
Open a file in the mode specified. More... | |
virtual void | close ()=0 |
Close a file the was opened before with. More... | |
virtual OpcUa_Int64 | pos () const =0 |
Return the current position to read or write. More... | |
virtual OpcUa_Boolean | seek (OpcUa_Int64 pos, SeekMode origin)=0 |
Set the current position to the position specified. More... | |
virtual OpcUa_Int64 | size () const =0 |
Returns the size of the file. More... | |
virtual OpcUa_Int64 | read (char *data, OpcUa_Int64 maxSize)=0 |
Reads data from a file opened with open(). More... | |
virtual OpcUa_Int64 | readLine (char *data, OpcUa_Int64 maxSize)=0 |
Reads a line of characters from a file opened with open(). More... | |
virtual OpcUa_Int64 | write (const char *data, OpcUa_Int64 size)=0 |
Write data to a file opened with open(). More... | |
The UaIODevice class is the base interface class of all I/O devices.
OpenMode enumeration.
Enumerator | |
---|---|
OpenModeRead |
Open the file for reading. |
OpenModeWrite |
Open the file for writing. This creates a new file if the file does not exist. |
OpenModeEraseExisiting |
|
OpenModeEraseExisting |
If the file is opened for writing the existing content of the file is erased and an empty file is provided. |
OpenModeAppend |
The file is opened at the end of the file. |
OpenModeText |
Open the file in text mode - default is binary. |
enum UaIODevice::SeekMode |
|
pure virtual |
|
pure virtual |
Open a file in the mode specified.
Returns true on success; otherwise returns false.
mode | Indicates whether the file should be opened only for read operations or for read and write operations and where the initial position is set. |
|
pure virtual |
Return the current position to read or write.
Returns true on success; otherwise returns false.
Implemented in UaFile.
|
pure virtual |
Reads data from a file opened with open().
data | A buffer to store the read data. |
maxSize | The number of elements to read. One element has the size of one char. |
Implemented in UaFile.
|
pure virtual |
|
pure virtual |
Set the current position to the position specified.
Returns true on success; otherwise returns false.
pos | the position to set. If pos is bigger than the end of the file seek() sets the position to the end of the file. |
origin | the origin from where to start seeking. See |
Implemented in UaFile.
|
pure virtual |
Returns the size of the file.
Implemented in UaFile.
|
pure virtual |
Write data to a file opened with open().
data | A buffer to store the read data. |
size | The number of elements to write. One element has the size of one char. |
Implemented in UaFile.