Options
All
  • Public
  • Public/Protected
  • All
Menu

Class BaseNode

Base class for all Node classes

BaseNode is the base class for all the OPCUA objects in the address space It provides attributes and a set of references to other nodes. see: {{#crossLink "UAObject"}}{{/crossLink}}, {{#crossLink "UAVariable"}}{{/crossLink}}, {{#crossLink "Reference"}}{{/crossLink}}, {{#crossLink "UAMethod"}}{{/crossLink}}, {{#crossLink "UAView"}}{{/crossLink}}, {{#crossLink "UAObjectType"}}{{/crossLink}}, {{#crossLink "UADataType"}}{{/crossLink}}, {{#crossLink "UAVariableType"}}{{/crossLink}},

Hierarchy

Implements

  • BaseNode

Constructors

constructor

Properties

Readonly browseName

browseName: QualifiedName

nodeClass

nodeClass: NodeClass = NodeClass.Unspecified

Readonly nodeId

nodeId: NodeId

Optional nodeVersion

nodeVersion: UAVariableT<string, String>

NodeVersion (Optional) String The NodeVersion Property is used to indicate the version of a Node. The NodeVersion Property is updated each time a Reference is added or deleted to the Node the Property belongs to. Attribute value changes do not cause the NodeVersion to change. Clients may read the NodeVersion Property or subscribe to it to determine when the structure of a Node has changed.

Optional onFirstBrowseAction

onFirstBrowseAction: function

Type declaration

    • (this: BaseNode): Promise<void>
    • Parameters

      • this: BaseNode

      Returns Promise<void>

Static defaultMaxListeners

defaultMaxListeners: number

Static Readonly errorMonitor

errorMonitor: unique symbol

This symbol shall be used to install a listener for only monitoring 'error' events. Listeners installed using this symbol are called before the regular 'error' listeners are called.

Installing a listener using this symbol does not change the behavior once an 'error' event is emitted, therefore the process will still crash if no regular 'error' listener is installed.

Accessors

addressSpace

  • Returns AddressSpacePrivate

description

  • get description(): LocalizedText
  • set description(value: LocalizedText): void
  • Returns LocalizedText

  • Parameters

    • value: LocalizedText

    Returns void

displayName

  • get displayName(): LocalizedText[]
  • set displayName(value: LocalizedText[]): void
  • Returns LocalizedText[]

  • Parameters

    • value: LocalizedText[]

    Returns void

fromStateNode

  • Returns BaseNode

isFalseSubStateOf

  • get isFalseSubStateOf(): BaseNodePublic | null
  • property

    isFalseSubStateOf

    Returns BaseNodePublic | null

isTrueSubStateOf

  • get isTrueSubStateOf(): BaseNodePublic | null
  • property

    isTrueSubStateOf

    Returns BaseNodePublic | null

modellingRule

  • property

    modellingRule

    Returns ModellingRuleType

namespace

  • Returns Namespace

namespaceIndex

  • get namespaceIndex(): number
  • namespace index

    Returns number

namespaceUri

  • get namespaceUri(): string
  • namespace uri

    Returns string

parent

  • get parent(): BaseNodePublic | null
  • the parent node

    Returns BaseNodePublic | null

parentNodeId

  • get parentNodeId(): NodeId | undefined
  • Returns NodeId | undefined

toStateNode

  • Returns BaseNode

typeDefinition

  • get typeDefinition(): NodeId
  • returns the nodeId of this node's Type Definition

    Returns NodeId

typeDefinitionObj

  • get typeDefinitionObj(): UAObjectTypePublic | UAVariableTypePublic
  • returns the nodeId of this node's Type Definition

    Returns UAObjectTypePublic | UAVariableTypePublic

Methods

_on_child_added

  • _on_child_added(): void
  • Returns void

_on_child_removed

  • _on_child_removed(obj: BaseNode): void
  • Parameters

    Returns void

addListener

  • addListener(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

addReference

  • method

    addReference

    example
    view.addReference({ referenceType: "Organizes", nodeId: myDevice });

    or

    myDevice1.addReference({ referenceType: "OrganizedBy", nodeId: view });

    Parameters

    Returns void

  • Parameters

    Returns void

allReferences

  • Returns Reference[]

  • Returns Reference[]

browseNode

  • browseNode(browseDescription: BrowseDescription, context?: SessionContext): ReferenceDescription[]
  • browseNode(browseDescription: BrowseDescriptionOptions, session?: SessionContext): ReferenceDescription[]
  • browse the node to extract information requested in browseDescription

    method

    browseNode

    Parameters

    • browseDescription: BrowseDescription
    • Optional context: SessionContext

    Returns ReferenceDescription[]

    an array with reference descriptions

  • browse the node to extract information requested in browseDescription

    method

    browseNode

    Parameters

    • browseDescription: BrowseDescriptionOptions
    • Optional session: SessionContext

    Returns ReferenceDescription[]

browseNodeByTargetName

  • browseNodeByTargetName(relativePathElement: RelativePathElement, isLast: boolean): NodeId[]
  • method

    browseNodeByTargetName

    Parameters

    • relativePathElement: RelativePathElement
    • isLast: boolean

    Returns NodeId[]

dispose

  • dispose(): void
  • the dispose method should be called when the node is no longer used, to release back pointer to the address space and clear caches.

    method

    dispose

    Returns void

dumpXML

  • Parameters

    Returns void

emit

  • emit(event: string | symbol, ...args: any[]): boolean

eventNames

  • eventNames(): Array<string | symbol>

findHierarchicalReferences

  • Returns UAReference[]

findReference

  • findReference(strReference: string, isForward?: boolean): UAReferencePublic | null
  • findReference(strReference: string, isForward?: boolean): UAReference | null
  • method

    findReference

    Parameters

    • strReference: string

      the referenceType as a string.

    • Optional isForward: boolean

    Returns UAReferencePublic | null

  • Parameters

    • strReference: string
    • Optional isForward: boolean

    Returns UAReference | null

findReferences

  • findReferences(referenceType: string | NodeId | UAReferenceTypePublic, isForward?: boolean): UAReferencePublic[]
  • findReferences(referenceType: string | NodeId | UAReferenceType, isForward?: boolean): UAReference[]
  • method

    findReferences

    Parameters

    • referenceType: string | NodeId | UAReferenceTypePublic

      the referenceType as a string.

    • Optional isForward: boolean

    Returns UAReferencePublic[]

    an array with references

  • Parameters

    • referenceType: string | NodeId | UAReferenceType
    • Optional isForward: boolean

    Returns UAReference[]

findReferencesAsObject

  • findReferencesAsObject(strReference: string, isForward?: boolean): BaseNode[]
  • findReferencesAsObject(strReference: string, isForward: boolean): BaseNode[]
  • Parameters

    • strReference: string
    • Optional isForward: boolean

    Returns BaseNode[]

  • Parameters

    • strReference: string
    • isForward: boolean

    Returns BaseNode[]

findReferencesEx

  • Parameters

    Returns UAReferencePublic[]

  • Parameters

    Returns UAReference[]

findReferencesExAsObject

  • Parameters

    Returns BaseNode[]

  • Parameters

    Returns BaseNode[]

fullName

  • fullName(): string
  • fullName(): string
  • Returns string

  • return a complete name of this object by pre-pending name of its parent(s) to its own name

    Returns string

getAggregates

  • return an array with the Aggregates of this object.

    Returns BaseNode[]

getChildByName

  • getChildByName(browseName: string | QualifiedName): BaseNode | null
  • getChildByName(browseName: string | QualifiedName): BaseNode | null
  • Parameters

    • browseName: string | QualifiedName

    Returns BaseNode | null

  • Parameters

    • browseName: string | QualifiedName

    Returns BaseNode | null

getComponentByName

  • getComponentByName(browseName: QualifiedNameLike, namespaceIndex?: number): UAVariablePublic | UAObjectPublic | null
  • retrieve a component by name

    Parameters

    Returns UAVariablePublic | UAObjectPublic | null

getComponents

  • return an array with the components of this object.

    Returns BaseNode[]

getDisplayName

  • getDisplayName(locale?: string): string
  • Parameters

    • Optional locale: string

    Returns string

getEventSourceOfs

  • getEventSourceOfs(): BaseNode[]
  • getEventSourceOfs(): BaseNode[]
  • return a array of the objects for which this node is an EventSource

    Returns BaseNode[]

  • return a array of the objects for which this node is an EventSource nodes = HasEventSource => self

    Returns BaseNode[]

getEventSources

  • getEventSources(): BaseNode[]
  • getEventSources(): BaseNode[]
  • return a array with the event source of this object.

    Returns BaseNode[]

  • return a array with the event source of this object. self = HasEventSource => nodes

    Returns BaseNode[]

getFalseSubStates

  • method

    getFalseSubStates

    Returns UAStateVariable[]

    return an array with the SubStates of this object.

getFolderElementByName

  • getFolderElementByName(browseName: string, namespaceIndex?: number): BaseNode | null
  • retrieve a folder by name

    Parameters

    • browseName: string
    • Optional namespaceIndex: number

    Returns BaseNode | null

getFolderElements

  • returns the list of nodes that this folder object organizes

    Returns BaseNode[]

getMaxListeners

  • getMaxListeners(): number

getMethodById

  • getMethodById(nodeId: NodeId): UAMethodPublic | null
  • returns the method exposed by this object and with the given nodeId

    Parameters

    • nodeId: NodeId

    Returns UAMethodPublic | null

getMethodByName

  • getMethodByName(browseName: string, namespaceIndex?: number): UAMethodPublic | null
  • Parameters

    • browseName: string
    • Optional namespaceIndex: number

    Returns UAMethodPublic | null

getMethods

  • getMethods(): UAMethodPublic[]
  • returns the list of methods that this object provides

    method

    getMethods

    Returns UAMethodPublic[]

    an array with Method objects.

    Note: internally, methods are special types of components

getNotifiers

  • return a array with the notifiers of this object.

    Returns BaseNode[]

getProperties

  • return a array with the properties of this object.

    Returns BaseNode[]

getPropertyByName

  • getPropertyByName(browseName: string, namespaceIndex?: number): UAVariablePublic | null
  • retrieve a property by name

    Parameters

    • browseName: string
    • Optional namespaceIndex: number

    Returns UAVariablePublic | null

getTrueSubStates

  • method

    getTrueSubStates

    Returns UAStateVariable[]

    return an array with the SubStates of this object.

getUserWriteMask

  • getUserWriteMask(): number
  • Returns number

getWriteMask

  • getWriteMask(): number
  • Returns number

installPostInstallFunc

  • installPostInstallFunc(f: any): void
  • Parameters

    • f: any

    Returns void

install_extra_properties

  • install_extra_properties(): void
  • install_extra_properties(): void
  • Returns void

  • Returns void

listenerCount

  • listenerCount(event: string | symbol): number

listeners

  • listeners(event: string | symbol): Function[]

off

  • off(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

on

  • on(event: string | symbol, listener: function): this

once

  • once(event: string | symbol, listener: function): this

ownReferences

  • Returns Reference[]

prependListener

  • prependListener(event: string | symbol, listener: function): this

prependOnceListener

  • prependOnceListener(event: string | symbol, listener: function): this

propagate_back_references

  • propagate_back_references(): void
  • propagate_back_references(): void
  • this methods propagates the forward references to the pointed node by inserting backward references to the counter part node

    Returns void

  • this methods propagates the forward references to the pointed node by inserting backward references to the counter part node

    Returns void

rawListeners

  • rawListeners(event: string | symbol): Function[]

readAttribute

  • Parameters

    Returns DataValue

  • Parameters

    Returns DataValue

removeAllListeners

  • removeAllListeners(event?: string | symbol): this

removeListener

  • removeListener(event: string | symbol, listener: function): this

removeReference

  • Parameters

    Returns void

  • Parameters

    Returns void

resolveNodeId

  • Parameters

    Returns NodeId

setMaxListeners

  • setMaxListeners(n: number): this

toString

  • toString(): string
  • Returns string

uninstall_extra_properties

  • uninstall_extra_properties(reference: Reference): void
  • Parameters

    Returns void

unpropagate_back_references

  • unpropagate_back_references(): void
  • Undo the effect of propagate_back_references

    Returns void

writeAttribute

  • writeAttribute(context: SessionContext, writeValue: any, callback: function): void
  • writeAttribute(context: SessionContext, writeValue: any, callback: function): void
  • Parameters

    • context: SessionContext
    • writeValue: any
    • callback: function
        • (err: Error | null, statusCode?: StatusCode): void
        • Parameters

          • err: Error | null
          • Optional statusCode: StatusCode

          Returns void

    Returns void

  • Parameters

    • context: SessionContext
    • writeValue: any
    • callback: function
        • (err: Error | null, statusCode?: StatusCode): void
        • Parameters

          • err: Error | null
          • Optional statusCode: StatusCode

          Returns void

    Returns void

Static listenerCount

  • listenerCount(emitter: EventEmitter, event: string | symbol): number

Static makeAttributeEventName

  • Parameters

    Returns string

Generated using TypeDoc