CVB.Net 14.0
NodeId Class Referenceabstract

Unique identifier for a single NodeBase. More...

Inherits INativeHandle, and IEquatable< NodeId >.

Inherited by GuidNodeId, NumericNodeId, OpaqueNodeId, and StringNodeId.

Public Member Functions

void Dispose ()
 Disposes the native object wrapped by this object immediately. More...
 
override string ToString ()
 Gets the string representation of this NodeId. More...
 
abstract bool Equals (NodeId other)
 Equality-compares this NodeId with the other one. More...
 
override bool Equals (object other)
 Equality-compares this NodeId with the other one. More...
 
override int GetHashCode ()
 Gets the hash code for this NodeId. More...
 

Static Public Member Functions

static NodeId FromHandle (IntPtr handle)
 Creates a new NodeId object from the given handle . More...
 
static NodeId FromHandle (IntPtr handle, ShareObject doShare)
 Creates a new NodeId object from the given handle . More...
 

Protected Member Functions

 NodeId (IntPtr handle)
 Creates a new node id from the given handle . More...
 
virtual void Dispose (bool disposing)
 IDispose helper function. More...
 

Properties

IntPtr Handle [get]
 Native CVB OPCNID handle. More...
 
bool IsDisposed [get]
 Tests whether the native handle has been disposed.
 
int NamespaceIndex [get]
 Gets the namespace index (or page) this identifier belongs to. More...
 
- Properties inherited from INativeHandle
IntPtr Handle [get]
 The native handle of the object.
 
bool IsDisposed [get]
 Possibility to check whether the object has already been disposed of.
 

Events

NativeHandleEventDelegate ObjectDisposing
 Raised when this object is about to be disposed via the IDisposable.Dispose method. More...
 
- Events inherited from INativeHandle
NativeHandleEventDelegate ObjectDisposing
 Raised when this object is about to be disposed via the IDisposable.Dispose method.
More...
 

Detailed Description

Unique identifier for a single NodeBase.

These IDs can have different types. To create one use one of these (like StringNodeId.

Constructor & Destructor Documentation

◆ NodeId()

NodeId ( IntPtr  handle)
protected

Creates a new node id from the given handle .

Parameters
handleNative node id handle.

Member Function Documentation

◆ Dispose() [1/2]

void Dispose ( )

Disposes the native object wrapped by this object immediately.

Call this method to release the resources allocated by this node immediately. Remember that after calling Dispose, any subsequent access to references to this image will result in an ObjectDisposedException.

◆ Dispose() [2/2]

virtual void Dispose ( bool  disposing)
protectedvirtual

IDispose helper function.

Parameters
disposingtrue when called via IDisposable.Dispose, false when called by the finalizer.

◆ Equals() [1/2]

abstract bool Equals ( NodeId  other)
pure virtual

Equality-compares this NodeId with the other one.

Two NodeIds are equal if they have the same identifier type and value and reside in the same namespace.

Parameters
otherOther NodeId to compare with.
Returns
true if this and the other object are equal.

Implemented in GuidNodeId, NumericNodeId, OpaqueNodeId, and StringNodeId.

◆ Equals() [2/2]

override bool Equals ( object  other)

Equality-compares this NodeId with the other one.

Two NodeIds are equal if they have the same identifier type and value and reside in the same namespace.

Parameters
otherOther NodeId to compare with.
Returns
true if this and the other object are equal.

◆ FromHandle() [1/2]

static NodeId FromHandle ( IntPtr  handle)
static

Creates a new NodeId object from the given handle .

Note that this function is not intended for general use. Providing invalid values on the handle parameter will most likely lead to severe problems in your application.

Parameters
handleNative node ID handle.
Returns
Concrete NodeId object.

◆ FromHandle() [2/2]

static NodeId FromHandle ( IntPtr  handle,
ShareObject  doShare 
)
static

Creates a new NodeId object from the given handle .

Note that this function is not intended for general use. Providing invalid values on the handle parameter will most likely lead to severe problems in your application.

Parameters
handleNative node ID handle.
doShareShareObject.Yes if you want to share ownership; ShareObject.No if you want to adopt the lifetime (e.g. after getting the handle from a classic API function.)
Returns
Concrete NodeId object.

◆ GetHashCode()

override int GetHashCode ( )

Gets the hash code for this NodeId.

Returns
Hash considering the NamespaceIndex and Identifier.

◆ ToString()

override string ToString ( )

Gets the string representation of this NodeId.

Returns
Text containing the ID type, namespace and value.

Property Documentation

◆ Handle

IntPtr Handle
get

Native CVB OPCNID handle.

It is normally not necessary to work with this handle in CVB.Net. Note that using this handle in connection with the legacy CVB managed wrappers may actually be disruptive to your application.

Implements INativeHandle.

◆ NamespaceIndex

int NamespaceIndex
get

Gets the namespace index (or page) this identifier belongs to.

Only index 0 is standardized by the OPC/UA.

Event Documentation

◆ ObjectDisposing

NativeHandleEventDelegate ObjectDisposing

Raised when this object is about to be disposed via the IDisposable.Dispose method.

This event is raised right before this object is disposed. The dispose itself cannot be canceled.