NodeOPCUA API Documentation
    Preparing search index...

    Class PseudoSession

    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.

    Implements

    Index

    Constructors

    Properties

    maxBrowseContinuationPoints: number
    requestedMaxReferencesPerNode: number

    Methods

    • Parameters

      • continuationPoint: Buffer
      • releaseContinuationPoints: boolean

        a Boolean parameter with the following values: * true passed continuationPoints shall be reset to free resources in the Server. The continuation points are released and the results and diagnosticInfos arrays are empty. * false passed continuationPoints shall be used to get the next set of browse information.

        A Client shall always use the continuation point returned by a Browse or BrowseNext response to free the resources for the continuation point in the Server. If the Client does not want to get the next set of browse information, BrowseNext shall be called with this parameter set to true.

      • callback: ResponseCallback<BrowseResult>

      Returns void

    • Parameters

      Returns void

    • Parameters

      • continuationPoint: Buffer
      • releaseContinuationPoints: boolean

      Returns Promise<BrowseResult>

    • Parameters

      • continuationPoints: Buffer<ArrayBufferLike>[]
      • releaseContinuationPoints: boolean

      Returns Promise<BrowseResult[]>

    • Parameters

      Returns void

      const methodToCall = {
      objectId: "ns=2;i=12",
      methodId: "ns=2;i=13",
      inputArguments: [
      new Variant({...}),
      new Variant({...}),
      ]
      }
      session.call(methodToCall,function(err,callResult) {
      if (!err) {
      console.log(" statusCode = ",callResult.statusCode);
      console.log(" inputArgumentResults[0] = ",callResult.inputArgumentResults[0].toString());
      console.log(" inputArgumentResults[1] = ",callResult.inputArgumentResults[1].toString());
      console.log(" outputArgument[0] = ",callResult.outputArgument[0].toString()); // array of variant
      }
      });
      const methodsToCall = [ {
      objectId: "ns=2;i=12",
      methodId: "ns=2;i=13",
      inputArguments: [
      new Variant({...}),
      new Variant({...}),
      ]
      }];
      session.call(methodsToCall,function(err,callResults) {
      if (!err) {
      const callResult = callResults[0];
      console.log(" statusCode = ",rep.statusCode);
      console.log(" inputArgumentResults[0] = ",callResult.inputArgumentResults[0].toString());
      console.log(" inputArgumentResults[1] = ",callResult.inputArgumentResults[1].toString());
      console.log(" outputArgument[0] = ",callResult.outputArgument[0].toString()); // array of variant
      }
      });
    • Parameters

      Returns void

    • Parameters

      Returns Promise<CallMethodResult>

    • Parameters

      Returns Promise<CallMethodResult[]>

    • Returns NodeId