OPCUAClientBase Class
packages\node-opcua-client\src\client_base.js:41
        Constructor
OPCUAClientBase
        
                - 
                                
options 
Parameters:
- 
                                
optionsObject- 
                                            
defaultSecureTokenLifetimeNumberdefault secure token lifetime in ms
 - 
                                            
[securityMode=MessageSecurityMode.None]MessageSecurityMode optionalthe default security mode.
 - 
                                            
[securityPolicy=SecurityPolicy.NONE]SecurityPolicy optionalthe security mode.
 - 
                                            
[serverCertificate=null]Certificate optionalthe server certificate.
 - 
                                            
[certificateFile="certificates/client_selfsigned_cert_1024.pem"]String optionalclient certificate pem file.
 - 
                                            
[privateKeyFile="certificates/client_key_1024.pem"]String optionalclient private key pem file.
 - 
                                            
[connectionStrategy]Object optional - 
                                            
[keepSessionAlive=false]Boolean optional - 
                                            
[tokenRenewalInterval=0]Number optionalif not specify or set to 0 , token renewal will happen around 75% of the defaultSecureTokenLifetime
 - 
                                            
[keepPendingSessionsOnDisconnect=false]optionalif set to true, pending session will not be automatically closed * when disconnect is called
 - 
                                            
[clientName=""]optionalthe client Name
 
 - 
                                            
 
Item Index
Methods
Properties
Methods
connect
                    
                            - 
                                            
endpointUrl - 
                                            
callback 
connect the OPC-UA client to a server end point.
Parameters:
- 
                                            
endpointUrlString - 
                                            
callbackFunction 
connect
                    
                            - 
                                            
endpointUrl 
Parameters:
- 
                                            
endpointUrlString 
Returns:
disconnect
                    
                            - 
                                            
callback 
disconnect client from server
Parameters:
- 
                                            
callbackObject[Function}
 
findEndpoint
                    
                            ()
                    
                            
                                EndPoint
                            
                    
                    
                    
                    
                    
                    
                    
                        
                    
                        return the endpoint information matching security mode and security policy.
Returns:
findEndpoint
                    
                            ()
                    
                            
                                EndPoint
                            
                    
                    
                    
                    
                    
                    
                    
                        
                    
                        return the endpoint information matching the specified url , security mode and security policy.
Returns:
findServers
                    
                            - 
                                            
callback 
send a FindServers request to a discovery server
Parameters:
- 
                                            
callbackObject[Function}
 
findServers
                    
                            - 
                                            
options - 
                                            
callback 
Parameters:
- 
                                            
optionsObject- 
                                                        
[endpointUrl]optional - 
                                                        
[localeIds]optionalArray
 - 
                                                        
[serverUris]optionalArray
 
 - 
                                                        
 - 
                                            
callbackObject 
getEndpoints
                    
                            - 
                                            
[options] - 
                                            
[options.localeIds} - 
                                            
[options.profileUris} - 
                                            
callback 
Parameters:
- 
                                            
[options]Object optional- 
                                                        
[endpointUrl]String optionalthe network address that the Client used to access the Discovery Endpoint .
 
 - 
                                                        
 - 
                                            
[options.localeIds}ArrayList of locales to use.
 - 
                                            
[options.profileUris}ArrayList of transport profiles that the returned Endpoints shall support.
 - 
                                            
callbackFunction- 
                                                        
errError | Null - 
                                                        
serverEndpointsArraythe array of endpoint descriptions
 
 - 
                                                        
 
perform_findServers
                    
                            - 
                                            
discovery_server_endpointUrl - 
                                            
callback 
extract the server endpoints exposed by a discovery server
Parameters:
- 
                                            
discovery_server_endpointUrlObject - 
                                            
callbackObject 
perform_findServers
                    
                            - 
                                            
discovery_server_endpointUrl - 
                                            
callback 
extract the server endpoints exposed by a discovery server
Parameters:
- 
                                            
discovery_server_endpointUrlObject - 
                                            
callbackObject 
Properties
bytesRead
                        Number
                    
                    
                    
                    
                    
                        
                    
                        total number of bytes read by the client
bytesWritten
                        Number
                    
                    
                    
                    
                    
                        
                    
                        total number of bytes written by the client
connectionStrategy
                        options.connectionStrategy | MaxRetry, initialDelay, maxDelay, randomisationFactor |  | MaxRetry: number, initialDelay: number, maxDelay: number, randomisationFactor: number
                    
                    
                    
                    
                    
                        
                    
                        isReconnecting
                        Boolean true if the client is trying to reconnect to the server after a connection break.
                    
                    
                    
                    
                    
                        
                    
                        keepPendingSessionsOnDisconnect²
                        Boolean
                    
                    
                    
                    
                    
                        
                    
                        keepSessionAlive
                        Boolean
                    
                    
                    
                    
                    
                        
                    
                        true if session shall periodically probe the server to keep the session alive and prevent timeout
knowsServerEndpoint
                        Boolean
                    
                    
                    
                    
                    
                        
                    
                        is true when the client has already requested the server end points.
reconnectOnFailure
                        Boolean
                    
                    
                    
                    
                    
                        
                    
                        true if the connection strategy is set to automatically try to reconnect in case of failure
securityMode
                        MessageSecurityMode
                    
                    
                    
                    
                    
                        
                    
                        serverCertificate
                        Certificate
                    
                    
                    
                    
                    
                        
                    
                        transactionsPerformed
                        Number
                    
                    
                    
                    
                    
                        
                    
                        total number of transactions performed by the client
Events
after_reconnection
                        
                    
                    
                    
                    
                    
                        
                    
                        notify the observers that the reconnection process has been completed
Event Payload:
- 
                                            
errObject 
close
                        
                    
                    
                    
                    
                    
                        
                    
                        Event Payload:
- 
                                            
errorError 
close
                        
                    
                    
                    
                    
                    
                        
                    
                        connection_reestablished
                           send when the connection is reestablished after a connection break
                        
                    
                    
                    
                    
                    
                        
                    
                        receive_chunk
                        
                    
                    
                    
                    
                    
                        
                    
                        notify the observer that a message_chunk has been received
Event Payload:
- 
                                            
message_chunkObject 
receive_response
                        
                    
                    
                    
                    
                    
                        
                    
                        notify the observer that a response has been received from the server.
Event Payload:
- 
                                            
messageObject 
send_chunk
                        
                    
                    
                    
                    
                    
                        
                    
                        notify the observer that a message_chunk has been sent
Event Payload:
- 
                                            
message_chunkObject 
send_request
                        
                    
                    
                    
                    
                    
                        
                    
                        notify the observer that a request has been sent to the server.
Event Payload:
- 
                                            
messageObject 
start_reconnection
                        
                    
                    
                    
                    
                    
                        
                    
                        notifies the observer that the OPCUA is now trying to reestablish the connection after having received a connection break...
timed_out_request
                        
                    
                    
                    
                    
                    
                        
                    
                        send when a request has timed out without receiving a response
Event Payload:
- 
                                            
requestObject 
            The NodeOPCUA API