Options
All
  • Public
  • Public/Protected
  • All
Menu

  subscribe now with sterfive to access the online-user manual

Construct a node ID

example
const nodeId = new NodeId(NodeIdType.NUMERIC,123,1);

Hierarchy

Index

Constructors

constructor

  • new NodeId(identifierType?: NodeIdType, value?: string | number | Buffer, namespace?: number): NodeId
  • Parameters

    • Optional identifierType: NodeIdType

      the nodeID type

    • Optional value: string | number | Buffer

      the node id value. The type of Value depends on identifierType.

    • Optional namespace: number

      the index of the related namespace (optional , default value = 0 )

    Returns NodeId

Properties

identifierType

identifierType: NodeIdType

namespace

namespace: number

value

value: string | number | Buffer

Static NodeIdType

NodeIdType: typeof NodeIdType

Static nullNodeId

nullNodeId: NodeId

Static resolveNodeId

resolveNodeId: (a: string | NodeId) => NodeId

Type declaration

Static sameNodeId

sameNodeId: (n1: NodeId, n2: NodeId) => boolean

Type declaration

Methods

displayText

  • displayText(): string
  • Returns string

isEmpty

  • isEmpty(): boolean
  • returns true if the NodeId is null or empty

    Returns boolean

toJSON

  • toJSON(): string
  • convert nodeId to a JSON string. same as {@link NodeId#toString }

    Returns string

toString

  • toString(options?: { addressSpace?: any }): string
  • get the string representation of the nodeID.

    method

    toString

    example
    const nodeid = new NodeId(NodeIdType.NUMERIC, 123,1);
    console.log(nodeid.toString());
    
    >"ns=1;i=123"
    

    Parameters

    • Optional options: { addressSpace?: any }
      • Optional addressSpace?: any

    Returns string

Generated using TypeDoc