Home Manual Reference Source Test
public class | source

NodeId

An OPC-UA node's id.

Static Method Summary

Static Public Methods
public static

Creates a new NodeId based on its string representation.

Constructor Summary

Public Constructor
public

constructor(value: String | Number, type: NodeIdType, namespace: Number)

Creates a new NodeId based on it's type, value and (optional) namespace.

Member Summary

Public Members
public

The NodeId's type.

public

The NodeId's namespace.

public

The NodeId's value (e.g. a path or numeric reference).

Method Summary

Public Methods
public

Returns the string representation of a NodeId.

Static Public Methods

public static fromString(string: String): NodeId source

Creates a new NodeId based on its string representation.

Params:

NameTypeAttributeDescription
string String

The NodeId's string representation.

Return:

NodeId

Public Constructors

public constructor(value: String | Number, type: NodeIdType, namespace: Number) source

Creates a new NodeId based on it's type, value and (optional) namespace.

Params:

NameTypeAttributeDescription
value String | Number

The NodeId's value (e.g. a path or numeric reference).

type NodeIdType
  • optional

The NodeId's type. Defaults to NodeIdType.Numeric or NodeIdType.String based on the type of value.

namespace Number
  • optional
  • default: 1

The NodeId's namespace. Defaults to 1

Public Members

public identifierType: NodeIdType source

The NodeId's type.

public namespace: Number source

The NodeId's namespace.

public value: String | Number source

The NodeId's value (e.g. a path or numeric reference).

Public Methods

public toString(): String source

Returns the string representation of a NodeId.

Return:

String

Example:

const nodeId = new NodeId('AGENT', NodeIdType.String, 1);

console.log(nodeId.toString());
// Output: 'ns=1;s=AGENT'