import { DataValue } from "node-opcua-data-value"; import { NodeId } from "node-opcua-nodeid"; import { ArgumentDefinition, BrowseDescriptionLike, CallMethodRequestLike, IBasicSession, MethodId, ResponseCallback } from "node-opcua-pseudo-session"; import { BrowseResult } from "node-opcua-service-browse"; import { CallMethodResult } from "node-opcua-service-call"; import { BrowsePath, BrowsePathResult } from "node-opcua-service-translate-browse-path"; import { StatusCode } from "node-opcua-status-code"; import { WriteValueOptions, ReadValueIdOptions, BrowseDescriptionOptions } from "node-opcua-types"; import { IAddressSpace, ISessionContext } from "node-opcua-address-space-base"; import { ContinuationPointManager } from "./continuation_points/continuation_point_manager"; export interface InnerBrowseEngine { requestedMaxReferencesPerNode: number; maxBrowseContinuationPoints: number; continuationPointManager: ContinuationPointManager; context: ISessionContext; browseAll: (nodesToBrowse: BrowseDescriptionOptions[], callback: ResponseCallback) => void; } export declare function innerBrowse(engine: InnerBrowseEngine, nodesToBrowse: BrowseDescriptionOptions[], callback?: ResponseCallback): void; export interface InnerBrowseNextEngine { continuationPointManager: ContinuationPointManager; } export declare function innerBrowseNext(engine: InnerBrowseNextEngine, continuationPoints: Buffer[], releaseContinuationPoints: boolean, callback?: ResponseCallback): void; declare const $addressSpace: unique symbol; declare const $context: unique symbol; /** * Pseudo session is an helper object that exposes the same async methods * than the ClientSession. It can be used on a server address space. * * Code reused ! * The primary benefit of this object is that its makes advanced OPCUA * operations that uses browse, translate, read, write etc similar * whether we work inside a server or through a client session. * */ export declare class PseudoSession implements IBasicSession { requestedMaxReferencesPerNode: number; maxBrowseContinuationPoints: number; private _sessionId; private readonly [$addressSpace]; private readonly continuationPointManager; private readonly [$context]; constructor(addressSpace: IAddressSpace, context?: ISessionContext); getSessionId(): NodeId; browse(nodeToBrowse: BrowseDescriptionLike, callback: ResponseCallback): void; browse(nodesToBrowse: BrowseDescriptionLike[], callback: ResponseCallback): void; browse(nodeToBrowse: BrowseDescriptionLike): Promise; browse(nodesToBrowse: BrowseDescriptionLike[]): Promise; read(nodeToRead: ReadValueIdOptions, callback: ResponseCallback): void; read(nodesToRead: ReadValueIdOptions[], callback: ResponseCallback): void; read(nodeToRead: ReadValueIdOptions): Promise; read(nodesToRead: ReadValueIdOptions[]): Promise; browseNext(continuationPoint: Buffer, releaseContinuationPoints: boolean, callback: ResponseCallback): void; browseNext(continuationPoints: Buffer[], releaseContinuationPoints: boolean, callback: ResponseCallback): void; browseNext(continuationPoint: Buffer, releaseContinuationPoints: boolean): Promise; browseNext(continuationPoints: Buffer[], releaseContinuationPoints: boolean): Promise; call(methodToCall: CallMethodRequestLike, callback: ResponseCallback): void; call(methodsToCall: CallMethodRequestLike[], callback: ResponseCallback): void; call(methodToCall: CallMethodRequestLike): Promise; call(methodsToCall: CallMethodRequestLike[]): Promise; getArgumentDefinition(methodId: MethodId): Promise; getArgumentDefinition(methodId: MethodId, callback: ResponseCallback): void; translateBrowsePath(browsePaths: BrowsePath[], callback: ResponseCallback): void; translateBrowsePath(browsePath: BrowsePath, callback: ResponseCallback): void; translateBrowsePath(browsePath: BrowsePath): Promise; translateBrowsePath(browsePaths: BrowsePath[]): Promise; write(nodeToWrite: WriteValueOptions, callback: ResponseCallback): void; write(nodesToWrite: WriteValueOptions[], callback: ResponseCallback): void; write(nodeToWrite: WriteValueOptions): Promise; write(nodesToWrite: WriteValueOptions[]): Promise; } export {};