OpcFileNode Members

Namespace: Opc.UaFx
Assemblies: Opc.UaFx.Advanced.dll, Opc.UaFx.Advanced.dll
The OpcFileNode type exposes the following members.

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.

C#

public OpcFileNode(IOpcNode parent, OpcName name, FileInfo fileInfo)


Parameters

parent IOpcNode

The IOpcNode used as the parent node or a null reference (Nothing in Visual Basic) in the case there is no parent node available.

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

ArgumentNullException

The fileInfo is a null reference (Nothing in Visual Basic).

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.

C#

public OpcFileNode(IOpcNode parent, OpcName name, IOpcFileInfo fileInfo)


Parameters

parent IOpcNode

The IOpcNode used as the parent node or a null reference (Nothing in Visual Basic) in the case there is no parent node available.

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

ArgumentNullException

The fileInfo is a null reference (Nothing in Visual Basic).

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.

C#

public OpcFileNode(IOpcNode parent, OpcName name, OpcNodeId id, FileInfo fileInfo)


Parameters

parent IOpcNode

The IOpcNode used as the parent node or a null reference (Nothing in Visual Basic) in the case there is no parent node available.

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

ArgumentNullException

The fileInfo is a null reference (Nothing in Visual Basic).

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.

C#

public OpcFileNode(IOpcNode parent, OpcName name, OpcNodeId id, IOpcFileInfo fileInfo)


Parameters

parent IOpcNode

The IOpcNode used as the parent node or a null reference (Nothing in Visual Basic) in the case there is no parent node available.

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

ArgumentNullException

The fileInfo is a null reference (Nothing in Visual Basic).

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.

C#

public OpcFileNode(IOpcNode parent, OpcName name, OpcNodeId id, string filePath)


Parameters

parent IOpcNode

The IOpcNode used as the parent node or a null reference (Nothing in Visual Basic) in the case there is no parent node available.

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

ArgumentException

The filePath is an empty string.

ArgumentNullException

The filePath is a null reference (Nothing in Visual Basic).

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.

C#

public OpcFileNode(IOpcNode parent, OpcName name, string filePath)


Parameters

parent IOpcNode

The IOpcNode used as the parent node or a null reference (Nothing in Visual Basic) in the case there is no parent node available.

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

ArgumentException

The filePath is an empty string.

ArgumentNullException

The filePath is a null reference (Nothing in Visual Basic).

OpcFileNode(OpcName, FileInfo)

Initializes a new instance of the OpcFileNode class accessible by the name specified with the file to represent given by fileInfo.

C#

public OpcFileNode(OpcName name, FileInfo fileInfo)


Parameters

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

ArgumentNullException

The fileInfo is a null reference (Nothing in Visual Basic).

OpcFileNode(OpcName, IOpcFileInfo)

Initializes a new instance of the OpcFileNode class accessible by the name specified with the file to represent given by fileInfo.

C#

public OpcFileNode(OpcName name, IOpcFileInfo fileInfo)


Parameters

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

ArgumentNullException

The fileInfo is a null reference (Nothing in Visual Basic).

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.

C#

public OpcFileNode(OpcName name, OpcNodeId id, FileInfo fileInfo)


Parameters

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

ArgumentNullException

The fileInfo is a null reference (Nothing in Visual Basic).

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.

C#

public OpcFileNode(OpcName name, OpcNodeId id, IOpcFileInfo fileInfo)


Parameters

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

ArgumentNullException

The fileInfo is a null reference (Nothing in Visual Basic).

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.

C#

public OpcFileNode(OpcName name, OpcNodeId id, string filePath)


Parameters

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

ArgumentException

The filePath is an empty string.

ArgumentNullException

The filePath is a null reference (Nothing in Visual Basic).

OpcFileNode(OpcName, String)

Initializes a new instance of the OpcFileNode class accessible by the name specified with the file to represent given by filePath.

C#

public OpcFileNode(OpcName name, string filePath)


Parameters

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

ArgumentException

The filePath is an empty string.

ArgumentNullException

The filePath is a null reference (Nothing in Visual Basic).

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.

C#

public bool CanUserWrite { get; set; }


Property Value

Boolean

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´1 of the CanUserWrite property.

C#

public OpcPropertyNode<bool> CanUserWriteNode { get; }


Property Value

OpcPropertyNode<Boolean>

An instance of the OpcPropertyNode´1 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.

C#

public bool CanWrite { get; set; }


Property Value

Boolean

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´1 of the CanWrite property.

C#

public OpcPropertyNode<bool> CanWriteNode { get; }


Property Value

OpcPropertyNode<Boolean>

An instance of the OpcPropertyNode´1 class.

CloseNode

Gets the OpcFileCloseMethodNode used to handle 'Close' method calls to close the file represented.

C#

public OpcFileCloseMethodNode CloseNode { get; }


Property Value

OpcFileCloseMethodNode

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.

C#

protected override OpcNodeId DefaultTypeDefinitionId { get; }


Property Value

OpcNodeId

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).

File

Gets the IOpcFileInfo used to access the file represented.

C#

public IOpcFileInfo File { get; }


Property Value

IOpcFileInfo

The IOpcFileInfo used to access the file and its metadata represented.

FileInfo

Gets the FileInfo of the file represented.

C#

public FileInfo FileInfo { get; }


Property Value

FileInfo

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.

C#

public OpcFileGetPositionMethodNode GetPositionNode { get; }


Property Value

OpcFileGetPositionMethodNode

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.

C#

public string MimeType { get; }


Property Value

String

The type of media represented by the OpcFileNode based on RFC 2046.

MimeTypeNode

Gets the OpcPropertyNode´1 of the MimeType property.

C#

public OpcPropertyNode<string> MimeTypeNode { get; }


Property Value

OpcPropertyNode<String>

An instance of the OpcPropertyNode´1 class.

OpenCount

Gets the number of currently valid file handles on the file.

C#

[CLSCompliant(false)]
public ushort OpenCount { get; }


Property Value

UInt16

The number of currently valid file handles on the file.

OpenCountNode

Gets the OpcPropertyNode´1 of the OpenCount property.

C#

[CLSCompliant(false)]
public OpcPropertyNode<ushort> OpenCountNode { get; }


Property Value

OpcPropertyNode<UInt16>

An instance of the OpcPropertyNode´1 class.

OpenNode

Gets the OpcFileOpenMethodNode used to handle 'Open' method calls to open the file represented.

C#

public OpcFileOpenMethodNode OpenNode { get; }


Property Value

OpcFileOpenMethodNode

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.

C#

public OpcFileReadMethodNode ReadNode { get; }


Property Value

OpcFileReadMethodNode

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.

C#

public OpcFileSetPositionMethodNode SetPositionNode { get; }


Property Value

OpcFileSetPositionMethodNode

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.

C#

[CLSCompliant(false)]
public ulong Size { get; }


Property Value

UInt64

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´1 of the Size property.

C#

[CLSCompliant(false)]
public OpcPropertyNode<ulong> SizeNode { get; }


Property Value

OpcPropertyNode<UInt64>

An instance of the OpcPropertyNode´1 class.

WriteNode

Gets the OpcFileWriteMethodNode used to handle 'Write' method calls to write data to the file represented.

C#

public OpcFileWriteMethodNode WriteNode { get; }


Property Value

OpcFileWriteMethodNode

An instance of the OpcFileWriteMethodNode class. Which uses an OpcFileNode defined callback to write data to the file.

InitializeDefaults()

Initializes the default values used by the OpcFileNode.

C#

protected override void InitializeDefaults()


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.

ReadCanUserWrite(OpcReadPropertyValueContext<OpcPropertyNode<Boolean>>, OpcPropertyValue<Boolean>)

Reads the value of the CanUserWrite property.

C#

protected virtual OpcPropertyValue<bool> ReadCanUserWrite(OpcReadPropertyValueContext<OpcPropertyNode<bool>> context, OpcPropertyValue<bool> value)


Parameters

context OpcReadPropertyValueContext<OpcPropertyNode>

The OpcReadPropertyValueContext´1 to use to read the property value.

value OpcPropertyValue<Boolean>

The preliminary OpcPropertyValue´1.


Returns

OpcPropertyValue<Boolean>

The determined OpcPropertyValue´1.

ReadCanWrite(OpcReadPropertyValueContext<OpcPropertyNode<Boolean>>, OpcPropertyValue<Boolean>)

Reads the value of the CanWrite property.

C#

protected virtual OpcPropertyValue<bool> ReadCanWrite(OpcReadPropertyValueContext<OpcPropertyNode<bool>> context, OpcPropertyValue<bool> value)


Parameters

context OpcReadPropertyValueContext<OpcPropertyNode>

The OpcReadPropertyValueContext´1 to use to read the property value.

value OpcPropertyValue<Boolean>

The preliminary OpcPropertyValue´1.


Returns

OpcPropertyValue<Boolean>

The determined OpcPropertyValue´1.