Options
All
  • Public
  • Public/Protected
  • All
Menu

  subscribe now with sterfive to access the online-user manual

Hierarchy

Index

Constructors

constructor

Events

on

  • Parameters

    Returns OPCUAServer

  • Parameters

    Returns OPCUAServer

  • Parameters

    • event: "session_closed"
    • eventHandler: (session: ServerSession, reason: string) => void

    Returns OPCUAServer

  • Parameters

    • event: "post_initialize"
    • eventHandler: () => void
        • (): void
        • Returns void

    Returns OPCUAServer

  • emitted when the server is trying to registered the LDS but when the connection to the lds has failed serverRegistrationPending is sent when the backoff signal of the connection process is raised

    Parameters

    • event: "serverRegistrationPending"
    • eventHandler: () => void
        • (): void
        • Returns void

    Returns OPCUAServer

  • event raised when server has been successfully registered on the local discovery server

    Parameters

    • event: "serverRegistered"
    • eventHandler: () => void
        • (): void
        • Returns void

    Returns OPCUAServer

  • event raised when server registration has been successfully renewed on the local discovery server

    Parameters

    • event: "serverRegistrationRenewed"
    • eventHandler: () => void
        • (): void
        • Returns void

    Returns OPCUAServer

  • event raised when server has been successfully unregistered from the local discovery server

    Parameters

    • event: "serverUnregistered"
    • eventHandler: () => void
        • (): void
        • Returns void

    Returns OPCUAServer

  • event raised after the server has raised an OPCUA event toward a client

    Parameters

    • event: "event"
    • eventHandler: (eventData: any) => void
        • (eventData: any): void
        • Parameters

          • eventData: any

          Returns void

    Returns OPCUAServer

  • event raised when the server received a request from one of its connected client. useful for trace purpose.

    Parameters

    Returns OPCUAServer

  • event raised when the server send an response to a request to one of its connected client. useful for trace purpose.

    Parameters

    Returns OPCUAServer

  • event raised when a new secure channel is opened

    Parameters

    Returns OPCUAServer

  • event raised when a new secure channel is closed

    Parameters

    Returns OPCUAServer

  • event raised when the server refused a tcp connection from a client. ( for instance because too any connections)

    Parameters

    Returns OPCUAServer

  • event raised when a OpenSecureChannel has failed, it could be a invalid certificate or malformed message

    Parameters

    • event: "openSecureChannelFailure"
    • eventHandler: (socketData: ISocketData, channelData: IChannelData, endpoint: OPCUAServerEndPoint) => void
        • Parameters

          Returns void

    Returns OPCUAServer

  • Parameters

    • event: string
    • eventHandler: (...args: [any?, ...any[]]) => void
        • (...args: [any?, ...any[]]): void
        • Parameters

          • Rest ...args: [any?, ...any[]]

          Returns void

    Returns OPCUAServer

Properties

allowAnonymous

allowAnonymous: boolean

false if anonymous connection are not allowed

capabilitiesForMDNS

capabilitiesForMDNS: string[]

Readonly certificateFile

certificateFile: string

discoveryServerEndpointUrl

discoveryServerEndpointUrl: string

endpoints

endpoints: OPCUAServerEndPoint[]

engine

engine: ServerEngine

maxAllowedSessionNumber

maxAllowedSessionNumber: number

the maximum number of concurrent sessions allowed on the server

maxConnectionsPerEndpoint

maxConnectionsPerEndpoint: number

the maximum number for concurrent connection per end point

Readonly options

Readonly privateKeyFile

privateKeyFile: string

Optional registerServerManager

registerServerManager: IRegisterServerManager

registerServerMethod

registerServerMethod: RegisterServerMethod

Readonly serverCertificateManager

serverCertificateManager: OPCUACertificateManager

serverInfo

userCertificateManager

userCertificateManager: OPCUACertificateManager

userManager

userManager: UAUserManagerBase

the user manager

Static MAX_SUBSCRIPTION

MAX_SUBSCRIPTION: number

the maximum number of subscription that can be created per server

Static defaultShutdownTimeout

defaultShutdownTimeout: number

Static fallbackSessionName

fallbackSessionName: string

Static makeServiceFault

makeServiceFault: (statusCode: StatusCode, messages: string[]) => ServiceFault = ...

Type declaration

Static registry

registry: ObjectRegistry

Static requestExactEndpointUrl

requestExactEndpointUrl: boolean

if requestExactEndpointUrl is set to true the server will only accept createSession that have a endpointUrl that strictly matches one of the provided endpoint. This mean that if the server expose a endpoint with url such as opc.tcp://MYHOSTNAME:1234, client will not be able to reach the server with the ip address of the server. requestExactEndpointUrl = true => emulates the Prosys Server behavior requestExactEndpointUrl = false => emulates the Unified Automation behavior.

Accessors

buildInfo

  • The server build info

    Returns BuildInfo

bytesRead

  • get bytesRead(): number
  • total number of bytes read by the server since startup

    Returns number

bytesWritten

  • get bytesWritten(): number
  • total number of bytes written by the server since startup

    Returns number

currentChannelCount

  • get currentChannelCount(): number
  • the number of connected channel on all existing end points

    Returns number

currentSessionCount

  • get currentSessionCount(): number
  • the number of sessions currently active

    Returns number

currentSubscriptionCount

  • get currentSubscriptionCount(): number
  • The number of active subscriptions from all sessions

    Returns number

initialized

  • get initialized(): boolean
  • true if the server has been initialized

    Returns boolean

isAuditing

  • get isAuditing(): boolean
  • is the server auditing ?

    Returns boolean

publishingIntervalCount

  • get publishingIntervalCount(): number
  • the publishing interval count

    Returns number

rejectedRequestsCount

  • get rejectedRequestsCount(): number
  • the number of request that have been rejected

    Returns number

rejectedSessionCount

  • get rejectedSessionCount(): number
  • the number of session activation requests that have been rejected

    Returns number

serverType

sessionAbortCount

  • get sessionAbortCount(): number
  • the number of sessions that have been aborted

    Returns number

transactionsCount

  • get transactionsCount(): number
  • Number of transactions processed by the server since startup

    Returns number

Methods

dispose

  • dispose(): void
  • Returns void

getCertificate

  • getCertificate(): Buffer

getCertificateChain

  • getCertificateChain(): Buffer

getDiscoveryUrls

  • getDiscoveryUrls(): string[]

getEndpointUrl

  • getEndpointUrl(): string

getPrivateKey

  • getPrivateKey(): string

getServers

initialize

  • initialize(): Promise<void>
  • initialize(done: () => void): void
  • Initialize the server by installing default node set.

    and instruct the server to listen to its endpoints.

    const server = new OPCUAServer();
    await server.initialize();
    
    // default server namespace is now initialized
    // it is a good time to create life instance objects
    const namespace = server.engine.addressSpace.getOwnNamespace();
    namespace.addObject({
        browseName: "SomeObject",
        organizedBy: server.engine.addressSpace.rootFolder.objects
    });
    
    // the addressSpace is now complete
    // let's now start listening to clients
    await server.start();
    

    Returns Promise<void>

  • Parameters

    • done: () => void
        • (): void
        • Returns void

    Returns void

initializeCM

  • initializeCM(): Promise<void>

raiseEvent

  • Parameters

    Returns void

  • Parameters

    Returns void

  • Parameters

    Returns void

  • Parameters

    Returns void

  • Parameters

    Returns void

  • Parameters

    Returns void

resumeEndPoints

  • resumeEndPoints(): Promise<void>
  • resumeEndPoints(callback: (err?: Error) => void): void

shutdown

  • shutdown(timeout?: number): Promise<void>
  • shutdown(callback: (err?: Error) => void): void
  • shutdown(timeout: number, callback: (err?: Error) => void): void
  • shutdown all server endpoints

    method

    shutdown

    async
    example
       // shutdown immediately
       server.shutdown(function(err) {
       });
    
      // in typescript with promises
      server.shutdown(10000).then(()=>{
         console.log("Server has shutdown");
      });
    
       // shutdown within 10 seconds
       server.engine.shutdownReason = coerceLocalizedText("Shutdown for maintenance");
       server.shutdown(10000,function(err) {
       });
    

    Parameters

    • Optional timeout: number

      the timeout (in ms) before the server is actually shutdown

    Returns Promise<void>

  • Parameters

    • callback: (err?: Error) => void
        • (err?: Error): void
        • Parameters

          • Optional err: Error

          Returns void

    Returns void

  • Parameters

    • timeout: number
    • callback: (err?: Error) => void
        • (err?: Error): void
        • Parameters

          • Optional err: Error

          Returns void

    Returns void

shutdownChannels

  • shutdownChannels(): Promise<void>
  • shutdownChannels(callback: (err?: Error) => void): void

start

  • start(): Promise<void>
  • start(done: () => void): void
  • Initiate the server by starting all its endpoints

    async

    Returns Promise<void>

  • Parameters

    • done: () => void
        • (): void
        • Returns void

    Returns void

suspendEndPoints

  • suspendEndPoints(): Promise<void>
  • suspendEndPoints(callback: (err?: Error) => void): void

Generated using TypeDoc