NodeOPCUA API Documentation
    Preparing search index...
    interface IAddressSpace {
        historizingNodes?: Set<UAVariable<UAVariableEvents>>;
        isFrugal: boolean;
        rootFolder: {
            objects: UARootFolder_Objects;
            types: UAObject;
            views: UAObject;
        };
        addMethodCallInterceptor(interceptor: MethodCallInterceptor): void;
        browsePath(browsePath: BrowsePath): BrowsePathResult;
        browseSingleNode(
            nodeId: NodeIdLike,
            browseDescription: BrowseDescription,
            context?: ISessionContext,
        ): BrowseResult;
        constructEventData(
            eventTypeId: UAEventType,
            data: Record<string, unknown>,
        ): IEventData;
        constructExtensionObject(
            dataType: NodeId | UADataType,
            options?: Record<string, unknown>,
        ): ExtensionObject;
        deleteNode(node: NodeId | BaseNode<BaseNodeEvents>): void;
        dispose(): void;
        findCorrespondingBasicDataType(dataType: NodeIdLike | UADataType): DataType;
        findDataType(
            dataType: string | NodeId | DataType | UADataType,
            namespaceIndex?: number,
        ): UADataType | null;
        findEventType(
            eventTypeId: NodeIdLike | UAObjectType,
            namespaceIndex?: number,
        ): UAObjectType | null;
        findMethod(nodeId: NodeIdLike): UAMethod<UAMethodEvents> | null;
        findNode(node: NodeIdLike): BaseNode<BaseNodeEvents> | null;
        findObjectType(
            objectTypeId: NodeIdLike,
            namespaceIndex?: number,
        ): UAObjectType | null;
        findReferenceType(
            referenceTypeId: NodeIdLike | UAReferenceType,
            namespaceIndex?: number,
        ): UAReferenceType | null;
        findReferenceTypeFromInverseName(
            inverseName: string,
        ): UAReferenceType | null;
        findVariableType(
            variableTypeId: NodeIdLike,
            namespaceIndex?: number,
        ): UAVariableType | null;
        generateEventId(): VariantByteString;
        getDefaultNamespace(): INamespace;
        getExtensionObjectConstructor(
            dataType: NodeId | UADataType,
        ): AnyConstructable;
        getNamespace(indexOrName: string | number): INamespace;
        getNamespaceArray(): INamespace[];
        getNamespaceIndex(namespaceUri: string): number;
        getNamespaceUri(namespaceIndex: number): string;
        getOwnNamespace(): INamespace;
        installAlarmsAndConditionsService(): void;
        installHistoricalDataNode(
            variableNode: UAVariable,
            options?: IHistoricalDataNodeOptions,
        ): void;
        inverseReferenceType(referenceType: string): string;
        normalizeReferenceType(params: AddReferenceOpts | UAReference): UAReference;
        registerNamespace(namespaceUri: string): INamespace;
        registerShutdownTask(task: ShutdownTask): void;
        removeMethodCallInterceptor(interceptor: MethodCallInterceptor): void;
        resolveNodeId(nodeIdLike: NodeIdLike): NodeId;
        shutdown(): Promise<void>;
    }
    Index

    Properties

    historizingNodes?: Set<UAVariable<UAVariableEvents>>
    isFrugal: boolean

    when this flag is set, properties and components are not added as javascript member of the UAObject/UAVariable node

    rootFolder: { objects: UARootFolder_Objects; types: UAObject; views: UAObject }

    Methods

    • find an EventType node in the address space

      Parameters

      • eventTypeId: NodeIdLike | UAObjectType

        the eventType to find

      • OptionalnamespaceIndex: number

        an optional index to restrict the search in a given namespace

      Returns UAObjectType | null

      the EventType found or null.

      note:

      • the method with throw an exception if a node is found that is not a BaseEventType or a subtype of it.
      • if eventTypeId is of type NodeId, the namespaceIndex shall not be specified
       const evtType = addressSpace.findEventType("AuditEventType");
      
    • find an EventType node in the address space

      Parameters

      • objectTypeId: NodeIdLike

        the eventType to find

      • OptionalnamespaceIndex: number

        an optional index to restrict the search in a given namespace

      Returns UAObjectType | null

      the EventType found or null.

      notes:

      • if objectTypeId is of type NodeId, the namespaceIndex shall not be specified
          const objectType = addressSpace.findObjectType("ns=0;i=58");
      objectType.browseName.toString().should.eql("BaseObjectType");

      const objectType = addressSpace.findObjectType("BaseObjectType");
      objectType.browseName.toString().should.eql("BaseObjectType");

      const objectType = addressSpace.findObjectType(resolveNodeId("ns=0;i=58"));
      objectType.browseName.toString().should.eql("BaseObjectType");

      const objectType = addressSpace.findObjectType("CustomObjectType",36);
      objectType.nodeId.namespace.should.eql(36);
      objectType.browseName.toString().should.eql("BaseObjectType");

      const objectType = addressSpace.findObjectType("36:CustomObjectType");
      objectType.nodeId.namespace.should.eql(36);
      objectType.browseName.toString().should.eql("BaseObjectType");
    • Parameters

      • variableTypeId: NodeIdLike
      • OptionalnamespaceIndex: number

      Returns UAVariableType | null

          const variableType = addressSpace.findVariableType("ns=0;i=62");
      variableType.browseName.toString().should.eql("BaseVariableType");

      const variableType = addressSpace.findVariableType("BaseVariableType");
      variableType.browseName.toString().should.eql("BaseVariableType");

      const variableType = addressSpace.findVariableType(resolveNodeId("ns=0;i=62"));
      variableType.browseName.toString().should.eql("BaseVariableType");