Reference
OpcFileWriteMethodNode.FileWriteExCallback Delegate
Write is used to write a part of the file starting from the current file position.
Reference
OpcFileWriteMethodNode.FileWriteExCallback Delegate
- Namespace
- Opc.UaFx
- Assembly
- Opc.UaFx.Advanced.dll
- Package
- Opc.UaFx.Advanced v2.59.0
Write is used to write a part of the file starting from the current file position. The file position is advanced by the number of bytes written.
Syntax
csharp
[CLSCompliant(false)]
public delegate void OpcFileWriteMethodNode.FileWriteExCallback(
OpcMethodContext context,
uint fileHandle,
ByteString data)vbnet
<CLSCompliant(False)>
Public Delegate Sub OpcFileWriteMethodNode.FileWriteExCallback(
context As OpcMethodContext,
fileHandle As UInteger,
data As ByteString)Parameters
| Name | Type | Description |
|---|---|---|
context | OpcMethodContext | The OpcMethodContext to use when writing data to 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. |
data | ByteString | Contains the data to be written at the position of the file. It is server-dependent whether the written data are persistently stored if the session is ended without calling the Close Method with the file handle. |
Remarks
This method does provide the following OpcResult information:
- BadInvalidArgumentThe file handle specified by
fileHandleor the SessionId is not known. - BadNotWritableThe file might be locked and thus not writable. This is also the case there neither 'CanWrite' nor 'CanUserWrite' grant write access.
- BadUnexpectedErrorAn unexpected error occurred while writing the file.
- BadInvalidStateThe file was not opened for write access.
Applies to
| Package | Versions |
|---|---|
| Opc. | v2. |

