NodeOPCUA API Documentation
    Preparing search index...

    Interface IServerEngineForServer

    What the services of an OPC UA server (OPCUAServerCore) ask of their engine: ServerEngine in the thread of the server, or an engine that forwards to one elsewhere.

    interface IServerEngineForServer {
        _internalState:
            | "initialized"
            | "creating"
            | "initializing"
            | "shutdown"
            | "disposed";
        addressSpace: AddressSpace
        | null;
        buildInfo: BuildInfo;
        currentSessionCount: number;
        currentSubscriptionCount: number;
        isAuditing: boolean;
        nodeFinder: INodeFinder;
        publishingIntervalCount: number;
        rejectedRequestsCount: number;
        rejectedSessionCount: number;
        serverCapabilities: ServerCapabilities;
        sessionAbortCount: number;
        admitSession(): Promise<boolean>;
        browseWithAutomaticExpansion(
            nodesToBrowse: BrowseDescription[],
            context: ISessionContext,
        ): Promise<BrowseResult[]>;
        call(
            context: ISessionContext,
            methodsToCall: CallMethodRequest[],
        ): Promise<CallMethodResultOptions[]>;
        closeSession(
            authenticationToken: NodeId,
            deleteSubscriptions: boolean,
            reason?: ClosingReason,
            auditEntryId?: string,
        ): void;
        createSession(options?: CreateSessionOption): ServerSession;
        deleteOrphanSubscription(subscription: Subscription): StatusCode;
        dispose(): void;
        findOrphanSubscription(subscriptionId: number): Subscription | null;
        getInApplicationSetup(): boolean;
        getServerState(): ServerState;
        getSession(
            authenticationToken: NodeId,
            activeOnly?: boolean,
        ): ServerSession | null;
        historyRead(
            context: ISessionContext,
            historyReadRequest: HistoryReadRequest,
        ): Promise<HistoryReadResult[]>;
        incrementRejectedSessionCount(): void;
        incrementSecurityRejectedSessionCount(): void;
        initialize(
            options: OPCUAServerOptions,
            callback: (err?: Error | null) => void,
        ): void;
        isStarted(): boolean;
        monitoredItemsReady(): Promise<void> | undefined;
        prepareMonitoredItems(
            _context: ISessionContext,
            _itemsToCreate: MonitoredItemCreateRequest[],
        ): Promise<void> | undefined;
        prepareRead(
            context: ISessionContext,
            readRequest: ReadRequestOptions,
            callback: (err?: Error | null) => void,
        ): void;
        readSync(
            context: ISessionContext,
            readRequest: ReadRequestOptions,
        ): DataValue[];
        refreshValues(
            nodesToRefresh: HistoryReadValueId[] | ReadValueId[],
            maxAge: number,
            callback: (err: Error | null, dataValues?: DataValue[]) => void,
            context?: ISessionContext,
        ): void;
        registerCompactNamespace(namespaceUri: string): number;
        setInApplicationSetup(value: boolean): void;
        setServerState(serverState: ServerState): void;
        setShutdownTime(date: Date): void;
        shutdown(): Promise<void>;
        transferSubscription(
            session: ServerSession,
            subscriptionId: number,
            sendInitialValues: boolean,
        ): Promise<TransferResult>;
        translateBrowsePaths(
            browsePaths: BrowsePath[],
            context?: ISessionContext,
        ): Promise<BrowsePathResult[]>;
        write(
            context: ISessionContext,
            nodesToWrite: WriteValue[],
        ): Promise<StatusCode[]>;
    }

    Hierarchy

    • Pick<
          ServerEngine,
          | "initialize"
          | "shutdown"
          | "dispose"
          | "_internalState"
          | "isStarted"
          | "getServerState"
          | "setServerState"
          | "setShutdownTime"
          | "getInApplicationSetup"
          | "setInApplicationSetup"
          | "buildInfo"
          | "serverCapabilities"
          | "isAuditing"
          | "addressSpace"
          | "registerCompactNamespace"
          | "createSession"
          | "closeSession"
          | "getSession"
          | "admitSession"
          | "currentSessionCount"
          | "rejectedSessionCount"
          | "rejectedRequestsCount"
          | "sessionAbortCount"
          | "incrementRejectedSessionCount"
          | "incrementSecurityRejectedSessionCount"
          | "currentSubscriptionCount"
          | "publishingIntervalCount"
          | "findOrphanSubscription"
          | "deleteOrphanSubscription"
          | "transferSubscription"
          | "prepareMonitoredItems"
          | "monitoredItemsReady"
          | "nodeFinder"
          | "readSync"
          | "prepareRead"
          | "refreshValues"
          | "browseWithAutomaticExpansion"
          | "translateBrowsePaths"
          | "write"
          | "call"
          | "historyRead",
      >
      • IServerEngineForServer
    Index
    _internalState:
        | "initialized"
        | "creating"
        | "initializing"
        | "shutdown"
        | "disposed"
    addressSpace: AddressSpace | null
    buildInfo: BuildInfo
    currentSessionCount: number
    currentSubscriptionCount: number
    isAuditing: boolean
    nodeFinder: INodeFinder
    publishingIntervalCount: number
    rejectedRequestsCount: number
    rejectedSessionCount: number
    serverCapabilities: ServerCapabilities
    sessionAbortCount: number
    • Parameters

      • authenticationToken: NodeId
      • deleteSubscriptions: boolean

        {Boolean} : true if session's subscription shall be deleted

      • Optionalreason: ClosingReason

        the reason for closing the session ( shall be "Timeout", "Terminated" or "CloseSession")

      • OptionalauditEntryId: string

        the RequestHeader.auditEntryId of the CloseSession request that caused this close, when there is one. See ServerSession#close.

        If a Client invokes the CloseSession Service then all Subscriptions associated with the Session are also deleted if the deleteSubscriptions flag is set to TRUE. If a Server terminates a Session for any other reason, Subscriptions associated with the Session, are not deleted. Each Subscription has its own lifetime to protect against data loss in the case of a Session termination. In these cases, the Subscription can be reassigned to another Client before its lifetime expires.

      Returns void

    • once the items of a CreateMonitoredItems (or a SetMonitoringMode, a ModifyMonitoredItems) are made: what they must wait for before the client hears of them. Nothing here, where items sample this engine's nodes directly (a session worker waits for its engine to watch them).

      Returns Promise<void> | undefined

    • a namespace of the application served by the compact address space: registered on the node objects as well, so that the NamespaceArray and the indexes are one; nodes are then added through the compact space's own API (addVariable, addObject, bindings)

      Parameters

      • namespaceUri: string

      Returns number