OpcFileWriteMethodNode.FileWriteExCallback Delegate

Namespace: Opc.UaFx
Assemblies: Opc.UaFx.Advanced.dll

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.

C#

[CLSCompliant(false)]
public delegate void FileWriteExCallback(OpcMethodContext context, [OpcArgument("FileHandle", Description = "The file handle associated with the file the data is to be written into.")] uint fileHandle, [OpcArgument("Data", Description = "The buffer containing the bytes to write.")] byte[] data);


Attributes CLSCompliantAttribute


Parameters

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 Byte[]

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