Reference
OpcFileNode Members
Defines a file node.
Reference
OpcFileNode Members
- Type
- OpcFileNode
- Namespace
- Opc.UaFx
- Assembly
- Opc.UaFx.Advanced.dll
- Package
- Opc.UaFx.Advanced v2.59.0
Inherits members from OpcObjectNode, OpcInstanceNode, OpcNode.
Constructors
OpcFileNode
| Overload | Description |
|---|---|
| OpcFileNode( | Initializes a new instance of the OpcFileNode class accessible by the name specified with the file to represent given by fileInfo. |
| OpcFileNode( | Initializes a new instance of the OpcFileNode class accessible by the name specified with the file to represent given by fileInfo. |
| OpcFileNode( | Initializes a new instance of the OpcFileNode class accessible by the name specified with the file to represent given by filePath. |
| OpcFileNode( | Initializes a new instance of the OpcFileNode class accessible by the name and id specified with the file to represent given by fileInfo. |
| OpcFileNode( | Initializes a new instance of the OpcFileNode class accessible by the name and id specified with the file to represent given by fileInfo. |
| OpcFileNode( | Initializes a new instance of the OpcFileNode class accessible by the name and id specified with the file to represent given by filePath. |
| OpcFileNode( | Initializes a new instance of the OpcFileNode class accessible by the name specified with the file to represent defined by fileInfo as a child node of the parent node given. |
| OpcFileNode( | Initializes a new instance of the OpcFileNode class accessible by the name specified with the file to represent defined by fileInfo as a child node of the parent node given. |
| OpcFileNode( | Initializes a new instance of the OpcFileNode class accessible by the name specified with the file to represent defined by filePath as a child node of the parent node given. |
| OpcFileNode( | Initializes a new instance of the OpcFileNode class accessible by the name and id specified with the file information defined by fileInfo as a child node of the parent node given. |
| OpcFileNode( | Initializes a new instance of the OpcFileNode class accessible by the name and id specified with the file information defined by fileInfo as a child node of the parent node given. |
| OpcFileNode( | Initializes a new instance of the OpcFileNode class accessible by the name and id specified with the file information defined by filePath as a child node of the parent node given. |
| OpcFileNode( | Initializes a new instance of the OpcFileNode class using the content as the instance to wrap. |
| OpcFileNode( | Initializes a new instance of the OpcFileNode class using the content as the instance to wrap. |
| OpcFileNode( | Initializes a new instance of the OpcFileNode class accessible by the name specified with the file to represent given by fileInfo. |
| OpcFileNode( | Initializes a new instance of the OpcFileNode class accessible by the name and id specified with the file to represent given by fileInfo. |
| OpcFileNode( | Initializes a new instance of the OpcFileNode class accessible by the name specified with the file to represent defined by fileInfo as a child node of the parent node given. |
| OpcFileNode( | Initializes a new instance of the OpcFileNode class accessible by the name and id specified with the file information defined by fileInfo as a child node of the parent node given. |
OpcFileNode(OpcName, IOpcFileInfo)
Initializes a new instance of the OpcFileNode class accessible by the name specified with the file to represent given by fileInfo.
public OpcFileNode(OpcName name, IOpcFileInfo fileInfo)Public Sub New(name As OpcName, fileInfo As IOpcFileInfo)Parameters
| Name | Type | Description |
|---|---|---|
name | OpcName | The OpcName through that the new file node can be accessed. |
fileInfo | IOpcFileInfo | The file information to use by the new file node. |
Exceptions
| Exception | Condition |
|---|---|
| Argument | The fileInfo is a null reference ( |
OpcFileNode(OpcName, FileInfo)
Initializes a new instance of the OpcFileNode class accessible by the name specified with the file to represent given by fileInfo.
public OpcFileNode(OpcName name, FileInfo fileInfo)Public Sub New(name As OpcName, fileInfo As FileInfo)Parameters
| Name | Type | Description |
|---|---|---|
name | OpcName | The OpcName through that the new file node can be accessed. |
fileInfo | FileInfo | The file information to use by the new file node. |
Exceptions
| Exception | Condition |
|---|---|
| Argument | The fileInfo is a null reference ( |
OpcFileNode(OpcName, string)
Initializes a new instance of the OpcFileNode class accessible by the name specified with the file to represent given by filePath.
public OpcFileNode(OpcName name, string filePath)Public Sub New(name As OpcName, filePath As String)Parameters
| Name | Type | Description |
|---|---|---|
name | OpcName | The OpcName through that the new file node can be accessed. |
filePath | String | The path to the file to use by the new file node. |
Exceptions
| Exception | Condition |
|---|---|
| Argument | The filePath is an empty string. |
| Argument | The filePath is a null reference ( |
OpcFileNode(OpcName, OpcNodeId, IOpcFileInfo)
Initializes a new instance of the OpcFileNode class accessible by the name and id specified with the file to represent given by fileInfo.
public OpcFileNode(OpcName name, OpcNodeId id, IOpcFileInfo fileInfo)Public Sub New(name As OpcName, id As OpcNodeId, fileInfo As IOpcFileInfo)Parameters
| Name | Type | Description |
|---|---|---|
name | OpcName | The OpcName through that the new file node can be accessed. |
id | OpcNodeId | The OpcNodeId through that the new file node can be identified and accessed. |
fileInfo | IOpcFileInfo | The file information to use by the new file node. |
Exceptions
| Exception | Condition |
|---|---|
| Argument | The fileInfo is a null reference ( |
OpcFileNode(OpcName, OpcNodeId, FileInfo)
Initializes a new instance of the OpcFileNode class accessible by the name and id specified with the file to represent given by fileInfo.
public OpcFileNode(OpcName name, OpcNodeId id, FileInfo fileInfo)Public Sub New(name As OpcName, id As OpcNodeId, fileInfo As FileInfo)Parameters
| Name | Type | Description |
|---|---|---|
name | OpcName | The OpcName through that the new file node can be accessed. |
id | OpcNodeId | The OpcNodeId through that the new file node can be identified and accessed. |
fileInfo | FileInfo | The file information to use by the new file node. |
Exceptions
| Exception | Condition |
|---|---|
| Argument | The fileInfo is a null reference ( |
OpcFileNode(OpcName, OpcNodeId, string)
Initializes a new instance of the OpcFileNode class accessible by the name and id specified with the file to represent given by filePath.
public OpcFileNode(OpcName name, OpcNodeId id, string filePath)Public Sub New(name As OpcName, id As OpcNodeId, filePath As String)Parameters
| Name | Type | Description |
|---|---|---|
name | OpcName | The OpcName through that the new file node can be accessed. |
id | OpcNodeId | The OpcNodeId through that the new file node can be identified and accessed. |
filePath | String | The path to the file to use by the new file node. |
Exceptions
| Exception | Condition |
|---|---|
| Argument | The filePath is an empty string. |
| Argument | The filePath is a null reference ( |
OpcFileNode(IOpcNode, OpcName, IOpcFileInfo)
Initializes a new instance of the OpcFileNode class accessible by the name specified with the file to represent defined by fileInfo as a child node of the parent node given.
public OpcFileNode(IOpcNode parent, OpcName name, IOpcFileInfo fileInfo)Public Sub New(parent As IOpcNode, name As OpcName, fileInfo As IOpcFileInfo)Parameters
| Name | Type | Description |
|---|---|---|
parent | IOpcNode | The IOpcNode used as the parent node or a null reference ( |
name | OpcName | The OpcName through that the new file node can be accessed. |
fileInfo | IOpcFileInfo | The file information to use by the new file node. |
Exceptions
| Exception | Condition |
|---|---|
| Argument | The fileInfo is a null reference ( |
OpcFileNode(IOpcNode, OpcName, FileInfo)
Initializes a new instance of the OpcFileNode class accessible by the name specified with the file to represent defined by fileInfo as a child node of the parent node given.
public OpcFileNode(IOpcNode parent, OpcName name, FileInfo fileInfo)Public Sub New(parent As IOpcNode, name As OpcName, fileInfo As FileInfo)Parameters
| Name | Type | Description |
|---|---|---|
parent | IOpcNode | The IOpcNode used as the parent node or a null reference ( |
name | OpcName | The OpcName through that the new file node can be accessed. |
fileInfo | FileInfo | The file information to use by the new file node. |
Exceptions
| Exception | Condition |
|---|---|
| Argument | The fileInfo is a null reference ( |
OpcFileNode(IOpcNode, OpcName, string)
Initializes a new instance of the OpcFileNode class accessible by the name specified with the file to represent defined by filePath as a child node of the parent node given.
public OpcFileNode(IOpcNode parent, OpcName name, string filePath)Public Sub New(parent As IOpcNode, name As OpcName, filePath As String)Parameters
| Name | Type | Description |
|---|---|---|
parent | IOpcNode | The IOpcNode used as the parent node or a null reference ( |
name | OpcName | The OpcName through that the new file node can be accessed. |
filePath | String | The path to the file to use by the new file node. |
Exceptions
| Exception | Condition |
|---|---|
| Argument | The filePath is an empty string. |
| Argument | The filePath is a null reference ( |
OpcFileNode(IOpcNode, OpcName, OpcNodeId, IOpcFileInfo)
Initializes a new instance of the OpcFileNode class accessible by the name and id specified with the file information defined by fileInfo as a child node of the parent node given.
public OpcFileNode(
IOpcNode parent,
OpcName name,
OpcNodeId id,
IOpcFileInfo fileInfo)Public Sub New(
parent As IOpcNode,
name As OpcName,
id As OpcNodeId,
fileInfo As IOpcFileInfo)Parameters
| Name | Type | Description |
|---|---|---|
parent | IOpcNode | The IOpcNode used as the parent node or a null reference ( |
name | OpcName | The OpcName through that the new file node can be accessed. |
id | OpcNodeId | The OpcNodeId through that the new file node can be identified and accessed. |
fileInfo | IOpcFileInfo | The file information to use by the new file node. |
Exceptions
| Exception | Condition |
|---|---|
| Argument | The fileInfo is a null reference ( |
OpcFileNode(IOpcNode, OpcName, OpcNodeId, FileInfo)
Initializes a new instance of the OpcFileNode class accessible by the name and id specified with the file information defined by fileInfo as a child node of the parent node given.
public OpcFileNode(
IOpcNode parent,
OpcName name,
OpcNodeId id,
FileInfo fileInfo)Public Sub New(
parent As IOpcNode,
name As OpcName,
id As OpcNodeId,
fileInfo As FileInfo)Parameters
| Name | Type | Description |
|---|---|---|
parent | IOpcNode | The IOpcNode used as the parent node or a null reference ( |
name | OpcName | The OpcName through that the new file node can be accessed. |
id | OpcNodeId | The OpcNodeId through that the new file node can be identified and accessed. |
fileInfo | FileInfo | The file information to use by the new file node. |
Exceptions
| Exception | Condition |
|---|---|
| Argument | The fileInfo is a null reference ( |
OpcFileNode(IOpcNode, OpcName, OpcNodeId, string)
Initializes a new instance of the OpcFileNode class accessible by the name and id specified with the file information defined by filePath as a child node of the parent node given.
public OpcFileNode(IOpcNode parent, OpcName name, OpcNodeId id, string filePath)Public Sub New(
parent As IOpcNode,
name As OpcName,
id As OpcNodeId,
filePath As String)Parameters
| Name | Type | Description |
|---|---|---|
parent | IOpcNode | The IOpcNode used as the parent node or a null reference ( |
name | OpcName | The OpcName through that the new file node can be accessed. |
id | OpcNodeId | The OpcNodeId through that the new file node can be identified and accessed. |
filePath | String | The path to the file to use by the new file node. |
Exceptions
| Exception | Condition |
|---|---|
| Argument | The filePath is an empty string. |
| Argument | The filePath is a null reference ( |
OpcFileNode(FileState)
Initializes a new instance of the OpcFileNode class using the content as the instance to wrap.
protected OpcFileNode(FileState content)Protected Sub New(content As FileState)Parameters
| Name | Type | Description |
|---|---|---|
content | FileState | The FileState to wrap. |
Exceptions
| Exception | Condition |
|---|---|
| Argument | The content is a null reference ( |
OpcFileNode(FileState, OpcNodeModel)
Initializes a new instance of the OpcFileNode class using the content as the instance to wrap.
protected OpcFileNode(FileState content, OpcNodeModel model)Protected Sub New(content As FileState, model As OpcNodeModel)Parameters
| Name | Type | Description |
|---|---|---|
content | FileState | The FileState to wrap. |
model | OpcNodeModel | The OpcNodeModel which defines the modelling directives for the new node or a null reference ( |
Exceptions
| Exception | Condition |
|---|---|
| Argument | The content is a null reference ( |
OpcFileNode(OpcNodeModel, OpcName, IOpcFileInfo)
Initializes a new instance of the OpcFileNode class accessible by the name specified with the file to represent given by fileInfo.
protected OpcFileNode(OpcNodeModel model, OpcName name, IOpcFileInfo fileInfo)Protected Sub New(
model As OpcNodeModel,
name As OpcName,
fileInfo As IOpcFileInfo)Parameters
| Name | Type | Description |
|---|---|---|
model | OpcNodeModel | The OpcNodeModel which defines the modelling directives for the new node or a null reference ( |
name | OpcName | The OpcName through that the new file node can be accessed. |
fileInfo | IOpcFileInfo | The file information to use by the new file node. |
Exceptions
| Exception | Condition |
|---|---|
| Argument | The fileInfo is a null reference ( |
OpcFileNode(OpcNodeModel, OpcName, OpcNodeId, IOpcFileInfo)
Initializes a new instance of the OpcFileNode class accessible by the name and id specified with the file to represent given by fileInfo.
protected OpcFileNode(
OpcNodeModel model,
OpcName name,
OpcNodeId id,
IOpcFileInfo fileInfo)Protected Sub New(
model As OpcNodeModel,
name As OpcName,
id As OpcNodeId,
fileInfo As IOpcFileInfo)Parameters
| Name | Type | Description |
|---|---|---|
model | OpcNodeModel | The OpcNodeModel which defines the modelling directives for the new node or a null reference ( |
name | OpcName | The OpcName through that the new file node can be accessed. |
id | OpcNodeId | The OpcNodeId through that the new file node can be identified and accessed. |
fileInfo | IOpcFileInfo | The file information to use by the new file node. |
Exceptions
| Exception | Condition |
|---|---|
| Argument | The fileInfo is a null reference ( |
OpcFileNode(OpcNodeModel, IOpcNode, OpcName, IOpcFileInfo)
Initializes a new instance of the OpcFileNode class accessible by the name specified with the file to represent defined by fileInfo as a child node of the parent node given.
protected OpcFileNode(
OpcNodeModel model,
IOpcNode parent,
OpcName name,
IOpcFileInfo fileInfo)Protected Sub New(
model As OpcNodeModel,
parent As IOpcNode,
name As OpcName,
fileInfo As IOpcFileInfo)Parameters
| Name | Type | Description |
|---|---|---|
model | OpcNodeModel | The OpcNodeModel which defines the modelling directives for the new node or a null reference ( |
parent | IOpcNode | The IOpcNode used as the parent node or a null reference ( |
name | OpcName | The OpcName through that the new file node can be accessed. |
fileInfo | IOpcFileInfo | The file information to use by the new file node. |
Exceptions
| Exception | Condition |
|---|---|
| Argument | The fileInfo is a null reference ( |
OpcFileNode(OpcNodeModel, IOpcNode, OpcName, OpcNodeId, IOpcFileInfo)
Initializes a new instance of the OpcFileNode class accessible by the name and id specified with the file information defined by fileInfo as a child node of the parent node given.
protected OpcFileNode(
OpcNodeModel model,
IOpcNode parent,
OpcName name,
OpcNodeId id,
IOpcFileInfo fileInfo)Protected Sub New(
model As OpcNodeModel,
parent As IOpcNode,
name As OpcName,
id As OpcNodeId,
fileInfo As IOpcFileInfo)Parameters
| Name | Type | Description |
|---|---|---|
model | OpcNodeModel | The OpcNodeModel which defines the modelling directives for the new node or a null reference ( |
parent | IOpcNode | The IOpcNode used as the parent node or a null reference ( |
name | OpcName | The OpcName through that the new file node can be accessed. |
id | OpcNodeId | The OpcNodeId through that the new file node can be identified and accessed. |
fileInfo | IOpcFileInfo | The file information to use by the new file node. |
Exceptions
| Exception | Condition |
|---|---|
| Argument | The fileInfo is a null reference ( |
Properties
CanUserWrite
Gets or sets a value indicating whether by default a user can access the file represented for writing taking user access rights into account.
public bool CanUserWrite { get; set; }Public Property CanUserWrite As BooleanProperty value
The value true if the file represented is accessible for writing by the user; otherwise the value false.
Remarks
The property does not take into account whether the file is currently opened for writing by another client and thus currently locked and not writable by others.
CanUserWriteNode
Gets the OpcPropertyNode<T> of the CanUserWrite property.
public OpcPropertyNode<bool> CanUserWriteNode { get; }Public ReadOnly Property CanUserWriteNode As OpcPropertyNode(Of Boolean)Property value
An instance of the OpcPropertyNode<T> class.
CanWrite
Gets or sets a value indicating whether the file is writable. It does not take any user access rights into account, i.e. although the file is writable this may be restricted to a certain user / user group.
public bool CanWrite { get; set; }Public Property CanWrite As BooleanProperty value
The value true if the file represented is accessible for writing; otherwise the value false.
Remarks
The property does not take into account whether the file is currently opened for writing by another client and thus currently locked and not writable by others.
CanWriteNode
Gets the OpcPropertyNode<T> of the CanWrite property.
public OpcPropertyNode<bool> CanWriteNode { get; }Public ReadOnly Property CanWriteNode As OpcPropertyNode(Of Boolean)Property value
An instance of the OpcPropertyNode<T> class.
CloseNode
Gets the OpcFileCloseMethodNode used to handle 'Close' method calls to close the file represented.
public OpcFileCloseMethodNode CloseNode { get; }Public ReadOnly Property CloseNode As OpcFileCloseMethodNodeProperty value
An instance of the OpcFileCloseMethodNode class. Which uses an OpcFileNode defined callback to close the file.
DefaultTypeDefinitionId
Gets the default identifier which identifies the node that defines the underlying node type from that this OpcInstanceNode has been created.
protected override OpcNodeId DefaultTypeDefinitionId { get; }Protected Overrides ReadOnly Property DefaultTypeDefinitionId As OpcNodeIdProperty value
The OpcNodeId of the type node from that this OpcInstanceNode has been created from. These type node defines the typical structure of an instance node of its type definition. If there exists no specific type definition node a null reference (Nothing in Visual Basic).
Overrides
File
Gets the IOpcFileInfo used to access the file represented.
public IOpcFileInfo File { get; }Public ReadOnly Property File As IOpcFileInfoProperty value
The IOpcFileInfo used to access the file and its metadata represented.
FileInfo
Gets the FileInfo of the file represented.
public FileInfo FileInfo { get; }Public ReadOnly Property FileInfo As FileInfoProperty value
The FileInfo used to access the file and its metadata represented or a null reference (Nothing in Visual Basic) if File represents a custom implementation of the IOpcFileInfo interface.
GetPositionNode
Gets the OpcFileGetPositionMethodNode used to handle 'GetPosition' method calls to query the position in the file represented.
public OpcFileGetPositionMethodNode GetPositionNode { get; }Public ReadOnly Property GetPositionNode As OpcFileGetPositionMethodNodeProperty value
An instance of the OpcFileGetPositionMethodNode class. Which uses an OpcFileNode defined callback to query the position in the file.
MimeType
Gets the media type of the file.
public string MimeType { get; }Public ReadOnly Property MimeType As StringProperty value
The type of media represented by the OpcFileNode based on RFC 2046.
MimeTypeNode
Gets the OpcPropertyNode<T> of the MimeType property.
public OpcPropertyNode<string> MimeTypeNode { get; }Public ReadOnly Property MimeTypeNode As OpcPropertyNode(Of String)Property value
An instance of the OpcPropertyNode<T> class.
OpenCount
Gets the number of currently valid file handles on the file.
[CLSCompliant(false)]
public ushort OpenCount { get; }<CLSCompliant(False)>
Public ReadOnly Property OpenCount As UShortProperty value
The number of currently valid file handles on the file.
OpenCountNode
Gets the OpcPropertyNode<T> of the OpenCount property.
[CLSCompliant(false)]
public OpcPropertyNode<ushort> OpenCountNode { get; }<CLSCompliant(False)>
Public ReadOnly Property OpenCountNode As OpcPropertyNode(Of UShort)Property value
An instance of the OpcPropertyNode<T> class.
OpenNode
Gets the OpcFileOpenMethodNode used to handle 'Open' method calls to open the file represented.
public OpcFileOpenMethodNode OpenNode { get; }Public ReadOnly Property OpenNode As OpcFileOpenMethodNodeProperty value
An instance of the OpcFileOpenMethodNode class. Which uses an OpcFileNode defined callback to open the file.
ReadNode
Gets the OpcFileReadMethodNode used to handle 'Read' method calls to read data from the file represented.
public OpcFileReadMethodNode ReadNode { get; }Public ReadOnly Property ReadNode As OpcFileReadMethodNodeProperty value
An instance of the OpcFileReadMethodNode class. Which uses an OpcFileNode defined callback to read data from the file.
SetPositionNode
Gets the OpcFileSetPositionMethodNode used to handle 'SetPosition' method calls to update the position in the file represented.
public OpcFileSetPositionMethodNode SetPositionNode { get; }Public ReadOnly Property SetPositionNode As OpcFileSetPositionMethodNodeProperty value
An instance of the OpcFileSetPositionMethodNode class. Which uses an OpcFileNode defined callback to update the position in the file.
Size
Gets the size of the file in bytes.
[CLSCompliant(false)]
public ulong Size { get; }<CLSCompliant(False)>
Public ReadOnly Property Size As ULongProperty value
The size of the file in bytes.
Remarks
When a file is opened for write and the file handle is still valid the size might not be accurate.
SizeNode
Gets the OpcPropertyNode<T> of the Size property.
[CLSCompliant(false)]
public OpcPropertyNode<ulong> SizeNode { get; }<CLSCompliant(False)>
Public ReadOnly Property SizeNode As OpcPropertyNode(Of ULong)Property value
An instance of the OpcPropertyNode<T> class.
WriteNode
Gets the OpcFileWriteMethodNode used to handle 'Write' method calls to write data to the file represented.
public OpcFileWriteMethodNode WriteNode { get; }Public ReadOnly Property WriteNode As OpcFileWriteMethodNodeProperty value
An instance of the OpcFileWriteMethodNode class. Which uses an OpcFileNode defined callback to write data to the file.
Methods
Close
Closes the file represented. When a client closes a file the handle becomes invalid.
public void Close(OpcContext context, uint fileHandle)Public Sub Close(context As OpcContext, fileHandle As UInteger)Parameters
| Name | Type | Description |
|---|---|---|
context | OpcContext | |
fileHandle | UInt32 | A file handle indicating the access request and thus indirectly the position inside the file. |
Exceptions
| Exception | Condition |
|---|---|
| Argument | |
| OpcException |
GetPosition
GetPosition is used to provide the current position of the file handle.
public ulong GetPosition(OpcContext context, uint fileHandle)Public Function GetPosition(
context As OpcContext,
fileHandle As UInteger) As ULongParameters
| Name | Type | Description |
|---|---|---|
context | OpcContext | |
fileHandle | UInt32 | A file handle indicating the access request and thus indirectly the position inside the file. |
Returns
The position of the file handle in the file. If a Read or Write is called it starts at that position.
Exceptions
| Exception | Condition |
|---|---|
| Argument | |
| OpcException |
InitializeDefaults
Initializes the default values used by the OpcFileNode.
protected override void InitializeDefaults()Protected Overrides Sub InitializeDefaults()Overrides
Remarks
This method is used to ensure the availability of appropriate node specific default values. For more information like when this method is to be overwritten see InitializeDefaults.
Open
Opens the file represented. When a client opens a file it gets a file handle that is valid while the session is open. Clients shall use the Close Method to release the file handle when they do not need access to the file anymore. Clients can open the same file several times for read.
public uint Open(OpcContext context, OpcFileMode mode)Public Function Open(context As OpcContext, mode As OpcFileMode) As UIntegerParameters
| Name | Type | Description |
|---|---|---|
context | OpcContext | |
mode | OpcFileMode | Indicates whether the file should be opened only for read operations or for read and write operations and where the initial position is set. |
Returns
A handle for the file used in other method calls indicating not the file but the access request and thus the position in the file. The file handle is generated by the server and is unique for the Session. Clients cannot transfer the file handle to another Session but need to get a new file handle by calling the Open Method.
Exceptions
| Exception | Condition |
|---|---|
| Argument | |
| OpcException |
Read
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.
public ByteString Read(OpcContext context, uint fileHandle, int length)Public Function Read(
context As OpcContext,
fileHandle As UInteger,
length As Integer) As ByteStringParameters
| Name | Type | Description |
|---|---|---|
context | OpcContext | |
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.
Exceptions
| Exception | Condition |
|---|---|
| Argument | |
| OpcException |
ReadCanUserWrite
Reads the value of the CanUserWrite property.
protected virtual OpcPropertyValue<bool> ReadCanUserWrite(
OpcReadPropertyValueContext<OpcPropertyNode<bool>> context,
OpcPropertyValue<bool> value)Protected Overridable Function ReadCanUserWrite(
context As OpcReadPropertyValueContext(Of OpcPropertyNode(Of Boolean)),
value As OpcPropertyValue(Of Boolean)) As OpcPropertyValue(Of Boolean)Parameters
| Name | Type | Description |
|---|---|---|
context | Opc | The Opc |
value | OpcPropertyValue<Boolean> | The preliminary OpcPropertyValue< |
Returns
The determined OpcPropertyValue<T>.
ReadCanWrite
Reads the value of the CanWrite property.
protected virtual OpcPropertyValue<bool> ReadCanWrite(
OpcReadPropertyValueContext<OpcPropertyNode<bool>> context,
OpcPropertyValue<bool> value)Protected Overridable Function ReadCanWrite(
context As OpcReadPropertyValueContext(Of OpcPropertyNode(Of Boolean)),
value As OpcPropertyValue(Of Boolean)) As OpcPropertyValue(Of Boolean)Parameters
| Name | Type | Description |
|---|---|---|
context | Opc | The Opc |
value | OpcPropertyValue<Boolean> | The preliminary OpcPropertyValue< |
Returns
The determined OpcPropertyValue<T>.
SetPosition
SetPosition is used to set the current position of the file handle.
public void SetPosition(OpcContext context, uint fileHandle, ulong position)Public Sub SetPosition(
context As OpcContext,
fileHandle As UInteger,
position As ULong)Parameters
| Name | Type | Description |
|---|---|---|
context | OpcContext | |
fileHandle | UInt32 | A file handle indicating the access request and thus indirectly the position inside the file. |
position | UInt64 | The position to be set for the file handle in the file. If a Read or Write is called it starts at that position. If the position is higher than the file size the position is set to the end of the file. |
Exceptions
| Exception | Condition |
|---|---|
| Argument | |
| OpcException |
Write
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.
public void Write(OpcContext context, uint fileHandle, ByteString data)Public Sub Write(
context As OpcContext,
fileHandle As UInteger,
data As ByteString)Parameters
| Name | Type | Description |
|---|---|---|
context | OpcContext | |
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. |
Exceptions
| Exception | Condition |
|---|---|
| Argument | |
| OpcException |

