NodeOPCUA API Documentation
    Preparing search index...

    Interface INamespace

    Enumerating the nodes a namespace holds.

    The iterators walk the namespace's own index, so they yield only nodes belonging to this namespace, in insertion order, and they do not follow references into any other. A count is a plain size lookup rather than a walk, so preferring it to [...iterator()].length is worth doing on a large model.

    None of these iterators tolerate the namespace being modified while one is open, for the same reason a Map iterator does not: adding or removing a node invalidates it. Collect into an array first when the loop body adds nodes.

    interface INamespace {
        $emulateVersion103?: boolean;
        addressSpace: IAddressSpace;
        index: number;
        namespaceUri: string;
        publicationDate: Date;
        version: string;
        _aliasCount(): number;
        _dataTypeCount(): number;
        _dataTypeIterator(): IterableIterator<UADataType>;
        _objectTypeCount(): number;
        _objectTypeIterator(): IterableIterator<UAObjectType>;
        _referenceTypeCount(): number;
        _referenceTypeIterator(): IterableIterator<UAReferenceType>;
        _variableTypeCount(): number;
        _variableTypeIterator(): IterableIterator<UAVariableType>;
        addAlias(aliasName: string, nodeId: NodeId): void;
        addEnumerationType(options: AddEnumerationTypeOptions): UADataType;
        addEventType(
            options: {
                browseName: QualifiedNameLike;
                isAbstract?: boolean;
                subtypeOf?: string | UAEventType;
            },
        ): UAEventType;
        addFolder(
            parentFolder: NodeIdLike | UAObject<UAObjectEvents>,
            options: string | AddBaseNodeOptions,
        ): UAObject;
        addMethod(
            parent: UAObjectType | UAObject<UAObjectEvents>,
            options: AddMethodOptions,
        ): UAMethod;
        addObject(options: AddObjectOptions): UAObject;
        addObjectType(options: AddObjectTypeOptions): UAObjectType;
        addReferenceType(options: AddReferenceTypeOptions): UAReferenceType;
        addVariable(options: AddVariableOptions): UAVariable;
        addVariableType(options: AddVariableTypeOptions): UAVariableType;
        addView(options: AddViewOptions): UAView;
        aliasCount(): number;
        constructNodeId(options: ConstructNodeIdOptions): NodeId;
        createDataType(options: CreateDataTypeOptions): UADataType;
        createNode(options: CreateNodeOptions): BaseNode;
        dataTypeCount(): number;
        dataTypeIterator(): IterableIterator<UADataType>;
        deleteNode(node: NodeId | BaseNode<BaseNodeEvents>): void;
        findDataType(dataType: string): UADataType | null;
        findNode(nodeId: NodeIdLike): BaseNode<BaseNodeEvents> | null;
        findNode2(nodeId: NodeId): BaseNode<BaseNodeEvents> | null;
        findObjectType(objectType: string): UAObjectType | null;
        findReferenceType(referenceType: string): UAReferenceType | null;
        findReferenceTypeFromInverseName(
            referenceType: string,
        ): UAReferenceType | null;
        findVariableType(variableType: string): UAVariableType | null;
        getDefaultAccessRestrictions(): AccessRestrictionsFlag;
        getDefaultRolePermissions(): RolePermissionType[] | null;
        getRequiredModels(): RequiredModel[] | undefined;
        nodeIterator(): IterableIterator<BaseNode<BaseNodeEvents>>;
        objectTypeCount(): number;
        objectTypeIterator(): IterableIterator<UAObjectType>;
        referenceTypeCount(): number;
        referenceTypeIterator(): IterableIterator<UAReferenceType>;
        setDefaultAccessRestrictions(
            accessRestrictions: AccessRestrictionsFlag,
        ): void;
        setDefaultRolePermissions(
            rolePermissions: RolePermissionTypeOptions[] | null,
        ): void;
        toNodeset2XML(): string;
        variableTypeCount(): number;
        variableTypeIterator(): IterableIterator<UAVariableType>;
    }

    Hierarchy (View Summary)

    Index
    $emulateVersion103?: boolean
    addressSpace: IAddressSpace
    index: number
    namespaceUri: string
    publicationDate: Date
    version: string
    • Parameters

      • aliasName: string
      • nodeId: NodeId

      Returns void

    • add a new event type to the address space

      Parameters

      Returns UAEventType

      const evtType = namespace.addEventType({
      browseName: "MyAuditEventType",
      subtypeOf: "AuditEventType"
      });
      const myConditionType = namespace.addEventType({
      browseName: "MyConditionType",
      subtypeOf: "ConditionType",
      isAbstract: false
      });
    • how many aliases this namespace declares

      Returns number

    • how many data types this namespace defines

      Returns number

    • the data types defined in this namespace

      Returns IterableIterator<UADataType>

    • Parameters

      • dataType: string

      Returns UADataType | null

    • Parameters

      • objectType: string

      Returns UAObjectType | null

    • Parameters

      • referenceType: string

      Returns UAReferenceType | null

    • Parameters

      • referenceType: string

      Returns UAReferenceType | null

    • Parameters

      • variableType: string

      Returns UAVariableType | null

    • Returns RolePermissionType[] | null

    • Returns RequiredModel[] | undefined

    • how many object types this namespace defines

      Returns number

    • how many reference types this namespace defines

      Returns number

    • Parameters

      Returns void

    • Parameters

      Returns void

    • Returns string

    • how many variable types this namespace defines

      Returns number