Options
All
  • Public
  • Public/Protected
  • All
Menu

  subscribe now with sterfive to access the online-user manual

Hierarchy

Index

Constructors

constructor

Properties

Readonly applicationName

applicationName: string

Readonly bytesRead

bytesRead: number

Readonly bytesWritten

bytesWritten: number

Readonly certificateFile

certificateFile: string

Readonly clientName

clientName: string

Readonly connectionStrategy

connectionStrategy: ConnectionStrategy

Readonly defaultSecureTokenLifetime

defaultSecureTokenLifetime: number

Optional Readonly endpoint

Readonly endpointUrl

endpointUrl: string

Readonly isReconnecting

isReconnecting: boolean

Readonly keepPendingSessionsOnDisconnect

keepPendingSessionsOnDisconnect: boolean

Readonly keepSessionAlive

keepSessionAlive: boolean

Readonly knowsServerEndpoint

knowsServerEndpoint: boolean

Readonly privateKeyFile

privateKeyFile: string

Readonly protocolVersion

protocolVersion: 0

Readonly reconnectOnFailure

reconnectOnFailure: boolean

Readonly securityMode

securityMode: MessageSecurityMode

Readonly securityPolicy

securityPolicy: SecurityPolicy

Optional Readonly serverCertificate

serverCertificate: Buffer

Readonly tokenRenewalInterval

tokenRenewalInterval: number

Readonly transactionsPerformed

transactionsPerformed: number

Static registry

registry: ObjectRegistry

Methods

addListener

  • addListener(event: string | symbol, listener: (...args: any[]) => void): OPCUAClientBase
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns OPCUAClientBase

connect

  • connect(endpointUrl: string): Promise<void>
  • connect(endpointUrl: string, callback: ErrorCallback): void
  • Parameters

    • endpointUrl: string

      the endpoint of the server to connect to ( i.e "opc.tcp://machine.name:3434/name" )

    Returns Promise<void>

  • Parameters

    Returns void

disconnect

  • disconnect(): Promise<void>
  • disconnect(callback: ErrorCallback): void
  • causes client to close and disconnect the communication with server

    Returns Promise<void>

  • Parameters

    Returns void

emit

  • emit(event: string | symbol, ...args: any[]): boolean
  • Parameters

    • event: string | symbol
    • Rest ...args: any[]

    Returns boolean

eventNames

  • eventNames(): (string | symbol)[]

findEndpointForSecurity

findServers

findServersOnNetwork

getCertificate

  • getCertificate(): Buffer

getCertificateChain

  • getCertificateChain(): Buffer

getEndpoints

getMaxListeners

  • getMaxListeners(): number

getPrivateKey

  • getPrivateKey(): string

listenerCount

  • listenerCount(event: string | symbol): number

listeners

  • listeners(event: string | symbol): Function[]
  • Parameters

    • event: string | symbol

    Returns Function[]

off

  • off(event: string | symbol, listener: (...args: any[]) => void): OPCUAClientBase
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns OPCUAClientBase

on

  • on(event: "connected", eventHandler: () => void): OPCUAClientBase
  • on(event: "connection_failed", eventHandler: (err: Error) => void): OPCUAClientBase
  • on(event: "backoff", eventHandler: (count: number, delay: number) => void): OPCUAClientBase
  • on(event: "start_reconnection", eventHandler: () => void): OPCUAClientBase
  • on(event: "reconnection_attempt_has_failed", eventHandler: (err: Error, message: string) => void): OPCUAClientBase
  • on(event: "after_reconnection", eventHandler: (err?: Error) => void): OPCUAClientBase
  • on(event: "abort", eventHandler: () => void): OPCUAClientBase
  • on(event: "close", eventHandler: () => void): OPCUAClientBase
  • on(event: "send_chunk", eventHandler: (chunk: Buffer) => void): OPCUAClientBase
  • on(event: "receive_chunk", eventHandler: (chunk: Buffer) => void): OPCUAClientBase
  • on(event: "send_request", eventHandler: (request: Request) => void): OPCUAClientBase
  • on(event: "receive_response", eventHandler: (response: Response) => void): OPCUAClientBase
  • on(event: "lifetime_75", eventHandler: (token: SecurityToken) => void): OPCUAClientBase
  • on(event: "security_token_renewed", eventHandler: () => void): OPCUAClientBase
  • on(event: "connection_lost", eventHandler: () => void): OPCUAClientBase
  • on(event: "connection_reestablished", eventHandler: () => void): OPCUAClientBase
  • on(event: "timed_out_request", eventHandler: (request: Request) => void): OPCUAClientBase
  • on(event: string | symbol, listener: (...args: any[]) => void): OPCUAClientBase
  • this Event is raised when the initial connection has succeeded

    Parameters

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

    Returns OPCUAClientBase

  • this Event is raised when the initial connection has failed

    Parameters

    • event: "connection_failed"
    • eventHandler: (err: Error) => void
        • (err: Error): void
        • Parameters

          • err: Error

          Returns void

    Returns OPCUAClientBase

  • this Event is raised when a failing connection is about to be tried again

    Parameters

    • event: "backoff"
    • eventHandler: (count: number, delay: number) => void
        • (count: number, delay: number): void
        • Parameters

          • count: number
          • delay: number

          Returns void

    Returns OPCUAClientBase

  • this event is raised when the client has encountered a connection failure and and is going to reconnection mode. You can intercept start_reconnection event to pause your interaction with the remote OPCUA server.

    Parameters

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

    Returns OPCUAClientBase

  • this event is raised when the client has failed one attempt to reconnect to the server This event will be raised if the socket has successfully being created to the server but if something went wrong during the reconnection process.

    Parameters

    • event: "reconnection_attempt_has_failed"
    • eventHandler: (err: Error, message: string) => void
        • (err: Error, message: string): void
        • Parameters

          • err: Error
          • message: string

          Returns void

    Returns OPCUAClientBase

  • this event is raised after the client has successfully managed to re-establish the connection with the remote OPCUA Server. You can intercept after_reconnection event to resume your interaction with the remote OPCUA server.

    Parameters

    • event: "after_reconnection"
    • eventHandler: (err?: Error) => void
        • (err?: Error): void
        • Parameters

          • Optional err: Error

          Returns void

    Returns OPCUAClientBase

  • the event is raised when the connection has been aborted by the remote OPCUA Server

    Parameters

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

    Returns OPCUAClientBase

  • this event is raised when the connection is closed

    Parameters

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

    Returns OPCUAClientBase

  • this event is raised when the client is sending a message chunk to the server (advanced use only)

    Parameters

    • event: "send_chunk"
    • eventHandler: (chunk: Buffer) => void
        • (chunk: Buffer): void
        • Parameters

          • chunk: Buffer

          Returns void

    Returns OPCUAClientBase

  • this event is raised when the client has received a new message chunk from the servers (advanced use only)

    Parameters

    • event: "receive_chunk"
    • eventHandler: (chunk: Buffer) => void
        • (chunk: Buffer): void
        • Parameters

          • chunk: Buffer

          Returns void

    Returns OPCUAClientBase

  • Parameters

    • event: "send_request"
    • eventHandler: (request: Request) => void
        • (request: Request): void
        • Parameters

          • request: Request

          Returns void

    Returns OPCUAClientBase

  • Parameters

    • event: "receive_response"
    • eventHandler: (response: Response) => void
        • (response: Response): void
        • Parameters

          • response: Response

          Returns void

    Returns OPCUAClientBase

  • this event is raised when the current security token has reached 75% of its lifetime and is therefore about to expired.

    Parameters

    Returns OPCUAClientBase

  • this event is raised after the (about ) security token as been renewed and renegotiated with the server.to expire

    Parameters

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

    Returns OPCUAClientBase

  • this event is raised when the connection has been broken

    Parameters

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

    Returns OPCUAClientBase

  • this event is raised when a broken connection with the remote Server has been reestablished

    Parameters

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

    Returns OPCUAClientBase

  • This event is raised when a request sent to the remote OPCUA server has reach it's timeout value without a Response from the server.

    Parameters

    • event: "timed_out_request"
    • eventHandler: (request: Request) => void
        • (request: Request): void
        • Parameters

          • request: Request

          Returns void

    Returns OPCUAClientBase

  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns OPCUAClientBase

once

  • once(event: string | symbol, listener: (...args: any[]) => void): OPCUAClientBase
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns OPCUAClientBase

prependListener

  • prependListener(event: string | symbol, listener: (...args: any[]) => void): OPCUAClientBase
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns OPCUAClientBase

prependOnceListener

  • prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): OPCUAClientBase
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns OPCUAClientBase

rawListeners

  • rawListeners(event: string | symbol): Function[]
  • Parameters

    • event: string | symbol

    Returns Function[]

removeAllListeners

removeListener

  • removeListener(event: string | symbol, listener: (...args: any[]) => void): OPCUAClientBase
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns OPCUAClientBase

setMaxListeners

Static create

Generated using TypeDoc