NodeOPCUA API Documentation
    Preparing search index...
    interface IAddressSpace {
        historizingNodes?: Set<UAVariable<UAVariableEvents>>;
        isFrugal: boolean;
        rootFolder: {
            objects: UARootFolder_Objects;
            types: UAObject;
            views: UAObject;
        };
        suspendModelChangeEvents: boolean;
        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;
        deleteNamespace(namespaceIndexOrUri: string | number): void;
        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;
        modelChangeTransaction(action: () => void): void;
        normalizeReferenceType(params: AddReferenceOpts | UAReference): UAReference;
        onHistorizingNodeAdded?(node: UAVariable): void;
        registerNamespace(namespaceUri: string): INamespace;
        registerShutdownTask(task: ShutdownTask): void;
        removeMethodCallInterceptor(interceptor: MethodCallInterceptor): void;
        resolveNodeId(nodeIdLike: NodeIdLike): NodeId;
        shutdown(): Promise<void>;
    }
    Index
    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 }
    suspendModelChangeEvents: boolean

    Stop collecting GeneralModelChangeEventType material, and stop bumping NodeVersion.

    Defaults to false. Set it only while nothing subscribes to model change events - around a bulk load or a bulk delete - where the per-node probe the bookkeeping performs is pure cost.

    • Empty a namespace, leaving the rest of the address space exactly as it was before that namespace was populated, and the namespace itself registered under the same index and uri, ready to be populated again.

      This is what lets an address space be recycled rather than rebuilt: the base nodesets stay loaded and only the namespace being edited is rebuilt. Every node of the namespace goes, and so does every reference between one of them and a node of another namespace, in one model-change transaction.

      Namespace 0 cannot be deleted.

      Parameters

      • namespaceIndexOrUri: string | number

        the namespace index, or its uri

      Returns void

    • 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");
    • Run action with the model-change bookkeeping batched: the changes every node addition and deletion inside it collects are reported as one GeneralModelChangeEventType event when the outermost transaction ends, rather than one event per change.

      Re-entrant - a nested call joins the transaction already open.

      Parameters

      • action: () => void

      Returns void

    • Called once a Variable has been turned into a HistoricalDataNode by installHistoricalDataNode, after the node has been recorded in historizingNodes.

      A Server uses this hook to advertise a history-related Profile or Facet URI (OPC 10000-7) only once it actually has a historized Variable to back it, since an AddressSpace with no historian installed has nothing for a HistoryRead conformance test to read. node-opcua-server sets this hook to add the HistoricalRawData Facet.

      Parameters

      Returns void