Reference
OpcFileReadMethodNode.FileReadExCallback Delegate
Read is used to read a part of the file starting from the current file position.
Reference
OpcFileReadMethodNode.FileReadExCallback Delegate
- Namespace
- Opc.UaFx
- Assembly
- Opc.UaFx.Advanced.dll
- Package
- Opc.UaFx.Advanced v2.59.0
Read is used to read a part of the file starting from the current file position. The file position is advanced by the number of bytes read.
Syntax
csharp
[CLSCompliant(false)]
public delegate ByteString OpcFileReadMethodNode.FileReadExCallback(
OpcMethodContext context,
uint fileHandle,
int length)vbnet
<CLSCompliant(False)>
Public Delegate Function OpcFileReadMethodNode.FileReadExCallback(
context As OpcMethodContext,
fileHandle As UInteger,
length As Integer) As ByteStringParameters
| Name | Type | Description |
|---|---|---|
context | OpcMethodContext | The OpcMethodContext to use when reading data from the file. This instance will be also updated with the outcome of the method call. |
fileHandle | UInt32 | A file handle indicating the access request and thus indirectly the position inside the file. |
length | Int32 | Defines the length in byte that should be returned in data, starting from the current position of the file handle. If the end of file is reached only all data till the end of the file are returned. If the specified length is longer than the maximum allowed message size of the communication, only those data fitting into the message size are returned. Only positive values are allowed. |
Returns
Contains the returned data of the file.
Remarks
This method does provide the following OpcResult information:
- BadInvalidArgumentThe file handle specified by
fileHandleor the SessionId is not known or thelengthis non-positive. - BadUnexpectedErrorAn unexpected error occurred while reading the file.
- BadInvalidStateThe file was not opened for read access.
Applies to
| Package | Versions |
|---|---|
| Opc. | v2. |

