NodeOPCUA API Documentation
    Preparing search index...

    Interface OPCUAClientBaseOptions

    interface OPCUAClientBaseOptions {
        applicationName?: string;
        applicationUri?: string;
        certificateFile?: string;
        certificateKeyPairProvider?: ICertificateKeyPairProvider;
        clientCertificateManager?: ICertificateStore | OPCUACertificateManager;
        clientName?: string;
        connectionStrategy?: ConnectionStrategyOptions;
        defaultSecureTokenLifetime?: number;
        defaultTransactionTimeout?: number;
        discoveryUrl?: string;
        keepAliveInterval?: number;
        keepPendingSessionsOnDisconnect?: boolean;
        keepSessionAlive?: boolean;
        privateKeyFile?: string;
        securityMode?: string | MessageSecurityMode;
        securityPolicy?: string;
        serverCertificate?: DER | DER[];
        tokenRenewalInterval?: number;
        transportFactory?: IClientTransportFactory;
        transportSettings?: TransportSettings;
        transportTimeout?: number;
    }

    Hierarchy (View Summary)

    Index

    Properties

    applicationName?: string

    the client application name

    "NodeOPCUA-Client"
    
    applicationUri?: string

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

    certificateFile?: string

    The client certificate pem file.

    Note:

    • most of the time, you won't need to overload the certificate PEM fiel
    • don't specify the certificateFile if you are using the PushCertificate built-in feature provided by NodeOPCUA as it may interfere.
    `${clientCertificateManager/rootFolder}/own/certs/client_certificate.pem"
    
    certificateKeyPairProvider?: ICertificateKeyPairProvider

    An optional in-memory certificate/key provider.

    When supplied, the client skips disk-based certificate path resolution and uses the provider directly.

    clientCertificateManager?: ICertificateStore | OPCUACertificateManager

    The certificate Manager

    If not specified your Client will create and use a default Certificate manager.

    You will have pass your own OPCUACertificateManager if you are in one of the following situation:

    • you want to control the location of your PKI
    • you want multiple instances of OPCUAClient to share the same OPCUACertificateManager
    clientName?: string

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

    connectionStrategy?: ConnectionStrategyOptions
    defaultSecureTokenLifetime?: number

    default secure token lifetime in ms

    defaultTransactionTimeout?: number

    defaultTransactionTimeout

    discoveryUrl?: string

    discovery url:

    keepAliveInterval?: number

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

    If not specified, node-opcua will use a suitable default value.

    Tips:

    • make sure to tune the value appropriately to be lesser than the sessionTimeOut and the tcp.ip socket timeout.
    keepPendingSessionsOnDisconnect?: boolean

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

    keepSessionAlive?: boolean

    When set to true, the session will send a Read request on a regular interval specified by the keepAliveInterval.

    This ensure that the connection will remain active and that the socket will not timeout.

    When the keepAlive manager is not able to perform the Read operation, then it breaks the connection and force the client to enter a reconnection phase.

    On some network settings and operating system, it might be quite tricky to detect when the communication as the the

    Tips:

    You don't ned to use keepSessionAlive: true when your session have a subscription active. A OPCUA subscription has already a built-in keepAlive mechanism that can replace the regular Read pooling offered by this flag.

    false
    
    privateKeyFile?: string

    client private key pem file. Note:

    • most of the time, you won't need to overload the private key file
    • don't specify the privateKeyFile if you are using the PushCertificate built-in feature provided by NodeOPCUA as it may interfere.
    • ensure that the provided client certificate matches the private pey.
    `${clientCertificateManager/rootFolder}/own/private/private_key.pem"
    
    securityMode?: string | MessageSecurityMode

    the security mode

    MessageSecurityMode.None
    
    securityPolicy?: string

    the security policy

    SecurityPolicy.None
    
    serverCertificate?: DER | DER[]

    the server certificate or certificate chain.

    tokenRenewalInterval?: number

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

    transportFactory?: IClientTransportFactory

    Optional factory for the underlying client transport. When omitted, the secure-channel layer uses defaultClientTransportFactory (a Node-only TCP transport). Consumers that need a different transport — browser WebSocket, in-process stub, tracing wrapper — pass a factory here and it is threaded through to ClientSecureChannelLayer.

    transportSettings?: TransportSettings

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

    transportTimeout?: number

    transport timeout

    • the devffault