public class UaStackClient extends Object
| Constructor and Description |
|---|
UaStackClient(UaStackClientConfig config,
Function<UaStackClient,UaTransport> transportFactory) |
public UaStackClient(UaStackClientConfig config, Function<UaStackClient,UaTransport> transportFactory)
public UaStackClientConfig getConfig()
UaStackClientConfig this client was created with.public CompletableFuture<UaStackClient> connect()
UaStackClient to the server in the configured endpoint.
Depending on the underlying transport this may or may not actually make a connection attempt.
UaStackClient.public CompletableFuture<UaStackClient> disconnect()
UaStackClient from the server in the configured endpoint.
Depending on the underlying transport this may or may not actually make a disconnect attempt.
UaStackClient.public NamespaceTable getNamespaceTable()
NamespaceTable.NamespaceTable.public DataTypeManager getStaticDataTypeManager()
DataTypeManager.
This DataTypeManager is for static codecs that serialize classes that exist at
compile time, e.g. structures from namespace 0 and or code-generated structures.
DataTypeManager.public DataTypeManager getDynamicDataTypeManager()
DataTypeManager.
This DataTypeManager is for dynamic codecs that were created by reading the server's
DataType Dictionary at runtime and serializes generic representations of structures used by
instances of a BsdParser implementation.
DataTypeManager.public SerializationContext getStaticSerializationContext()
SerializationContext instance.
This SerializationContext instance returns the client's static DataTypeManager.
SerializationContext instance.getStaticDataTypeManager()public SerializationContext getDynamicSerializationContext()
SerializationContext.
This SerializationContext instance returns the client's dynamic DataTypeManager.
SerializationContext.getDynamicDataTypeManager()public RequestHeader newRequestHeader()
RequestHeader with a null authentication token.
A unique request handle will be automatically assigned to the header.
RequestHeader with a null authentication token.public RequestHeader newRequestHeader(NodeId authToken)
RequestHeader with authToken.
A unique request handle will be automatically assigned to the header.
authToken - the authentication token to create the header with.RequestHeader created with authToken.public RequestHeader newRequestHeader(NodeId authToken, UInteger requestTimeout)
RequestHeader with authToken and requestTimeout.
A unique request handle will be automatically assigned to the header.
authToken - the authentication token to create the header with.requestTimeout - the timeout hint to create the header with.fRequestHeader created with authToken and requestTimeout.public CompletableFuture<UaResponseMessage> sendRequest(UaRequestMessage request)
UaRequestMessage to the connected server.
The RequestHeader of request must have a unique request handle. Use the
newRequestHeader helper functions to create headers for UaRequestMessages.
request - the UaRequestMessage to send.CompletableFuture containing the eventual UaResponseMessage from the server.newRequestHeader(),
newRequestHeader(NodeId),
newRequestHeader(NodeId, UInteger)public static UaStackClient create(UaStackClientConfig config) throws UaException
UaStackClient with config.
The UaTransport instance to create will be inferred from the transport profile URI in the configured
endpoint.
Supported transports:
Experimentally supported:
Not supported:
config - the UaStackClientConfig.UaStackClient created with config.UaException - if the transport is unsupported.Copyright © 2021. All rights reserved.