interface OPCUAClientOptions {
    applicationName?: string;
    applicationUri?: string;
    certificateFile?: string;
    clientCertificateManager?: OPCUACertificateManager;
    clientName?: string;
    connectionStrategy?: ConnectionStrategyOptions;
    dataTypeExtractStrategy?: DataTypeExtractStrategy;
    defaultSecureTokenLifetime?: number;
    defaultTransactionTimeout?: number;
    discoveryUrl?: string;
    endpoint_must_exist?: boolean;
    endpointMustExist?: boolean;
    keepAliveInterval?: number;
    keepPendingSessionsOnDisconnect?: boolean;
    keepSessionAlive?: boolean;
    privateKeyFile?: string;
    requestedSessionTimeout?: number;
    securityMode?: string | MessageSecurityMode;
    securityPolicy?: string;
    serverCertificate?: Buffer;
    tokenRenewalInterval?: number;
    transportSettings?: TransportSettings;
    transportTimeout?: number;
}

Hierarchy (view full)

Properties

applicationName?: string

the client application name

"NodeOPCUA-Client"
applicationUri?: string

the application Uri @default: urn:${hostname}:${applicationName}

certificateFile?: string

client certificate pem file.

`${clientCertificateManager/rootFolder}/own/certs/client_certificate.pem"
clientCertificateManager?: OPCUACertificateManager

certificate Manager

clientName?: string

a client name string that will be used to generate session names.

connectionStrategy?: ConnectionStrategyOptions
dataTypeExtractStrategy?: DataTypeExtractStrategy

optional parameter to specify strategy used to extract DataTypeDefinition from server default value : "Auto" : the client will attempt to extract DataTypeDefinition using the most efficient strategy

defaultSecureTokenLifetime?: number

default secure token lifetime in ms

defaultTransactionTimeout?: number

defaultTransactionTimeout

discoveryUrl?: string

discovery url:

endpoint_must_exist?: boolean

@deprecated(use endpointMustExist instead)

endpointMustExist?: boolean

set to false if the client should accept server endpoint mismatch

true
keepAliveInterval?: number

the number of milliseconds that the client should wait until it sends a keep alive message to the server.

keepPendingSessionsOnDisconnect?: boolean

if set to true, pending session will not be automatically closed when disconnect is called

keepSessionAlive?: boolean

can be set when the client doesn't create subscription. In this case, the client will send a dummy request on a regular basis to keep the connection active.

false
privateKeyFile?: string

client private key pem file.

`${clientCertificateManager/rootFolder}/own/private/private_key.pem"
requestedSessionTimeout?: number

the requested session timeout in CreateSession (ms)

Note:

  • make sure that this value is large enough, especially larger than the time between two transactions to the server.

  • If your client establishes a subscription with the server, make sure that (maxKeepAliveCount * publishingInterval) calculated with negotiated values from the server stay by large below the session time out, as you make encountered unexpected behavior.

60000 - default value is 60 secondes
securityMode?: string | MessageSecurityMode

the security mode

MessageSecurityMode.None
securityPolicy?: string

the security policy

SecurityPolicy.None
serverCertificate?: Buffer

the server certificate.

tokenRenewalInterval?: number

if not specify or set to 0 , token renewal will happen around 75% of the defaultSecureTokenLifetime

transportSettings?: TransportSettings

specify some transport settings that will override the default transport settings for the end point.

transportTimeout?: number

transport timeout