CO - the output type to the IIP-Ecosphere platformCI - the input type from the IIP-Ecosphere platform@MachineConnector public class OpcUaConnector<CO,CI> extends de.iip_ecosphere.platform.connectors.AbstractConnector<DataItem,Object,CO,CI>
META-INF/services.
For custom types such as structs, the following must apply: BINARY_ENCODING_ID of type
ExpandedNodeId.GenericDataTypeCodec having
an accessible no-arg constructor.ModelAccess.registerCustomType(Class)
in ConnectorOutputTypeTranslator.initializeModelAccess().| Modifier and Type | Class and Description |
|---|---|
static class |
OpcUaConnector.Descriptor
The descriptor of this connector (see META-INF/services).
|
private class |
OpcUaConnector.FallbackIdentityProder
A fallback identity provider.
|
private static class |
OpcUaConnector.NodeCacheEntry
Realizes a node cache entry with value lifetime.
|
protected class |
OpcUaConnector.OpcUaModelAccess
Implements the model access for OPC UA.
|
| Modifier and Type | Field and Description |
|---|---|
private org.eclipse.milo.opcua.sdk.client.OpcUaClient |
client |
private static DataItem |
DUMMY |
private static String |
FIELD_BINARY_ENCODING_ID |
private static org.slf4j.Logger |
LOGGER |
static String |
NAME
The name of this connector.
|
private de.iip_ecosphere.platform.connectors.ConnectorParameter |
params |
static char |
SEPARATOR_CHAR
Denotes the path separator for qualified model names.
|
static String |
SEPARATOR_STRING
Denotes the path separator for qualified model names (as String).
|
static String |
TOP_OBJECTS
Denotes the top-level folder "Objects".
|
static String |
TOP_TYPES
Denotes the top-level folder "Types".
|
static String |
TOP_VIEWS
Denotes the top-level folder "Views".
|
| Constructor and Description |
|---|
OpcUaConnector(de.iip_ecosphere.platform.connectors.AdapterSelector<DataItem,Object,CO,CI> selector,
de.iip_ecosphere.platform.connectors.types.ProtocolAdapter<DataItem,Object,CO,CI>... adapter)
Creates an instance and installs the protocol adapter(s).
|
OpcUaConnector(de.iip_ecosphere.platform.connectors.types.ProtocolAdapter<DataItem,Object,CO,CI>... adapter)
Creates an instance and installs the protocol adapter(s).
|
| Modifier and Type | Method and Description |
|---|---|
private org.eclipse.milo.opcua.sdk.client.api.config.OpcUaClientConfigBuilder |
configure(org.eclipse.milo.opcua.sdk.client.api.config.OpcUaClientConfigBuilder configBuilder)
Does the basic configuration of the OPC UA client.
|
protected void |
connectImpl(de.iip_ecosphere.platform.connectors.ConnectorParameter params) |
protected void |
disconnectImpl() |
void |
dispose() |
String |
enabledEncryption() |
protected Predicate<org.eclipse.milo.opcua.stack.core.types.structured.EndpointDescription> |
endpointFilter(de.iip_ecosphere.platform.connectors.ConnectorParameter params)
Provides a filter for OPC UA endpoints in case that multiple are present.
|
protected void |
error(String message,
Throwable th) |
private String |
getEndpointUrl(de.iip_ecosphere.platform.connectors.ConnectorParameter params)
Construct the endpoint URL.
|
protected org.eclipse.milo.opcua.sdk.client.api.identity.IdentityProvider |
getIdentityProvider(de.iip_ecosphere.platform.connectors.ConnectorParameter params)
Returns the identity provider by translating the token information in
params to Milo specific token
information. |
private de.iip_ecosphere.platform.support.identities.IdentityToken |
getIdToken(String endpointUrl)
Returns the id token for an endpoint URL considering
ConnectorParameter.ANY_ENDPOINT. |
String |
getName() |
protected DataItem |
read() |
String |
supportedEncryption() |
protected void |
writeImpl(Object data) |
configureModelAccess, connect, disconnect, doPolling, enableNotifications, enablePolling, getConnectorInputType, getConnectorOutputType, getConnectorParameter, getProtocolInputType, getProtocolOutputType, getSelector, initializeModelAccess, installPollTask, isPolling, notificationsChanged, received, received, request, setReceptionCallback, uninstallPollTask, writepublic static final String NAME
public static final String TOP_OBJECTS
public static final String TOP_TYPES
public static final String TOP_VIEWS
public static final char SEPARATOR_CHAR
public static final String SEPARATOR_STRING
private static final org.slf4j.Logger LOGGER
private static final DataItem DUMMY
private static final String FIELD_BINARY_ENCODING_ID
private org.eclipse.milo.opcua.sdk.client.OpcUaClient client
private de.iip_ecosphere.platform.connectors.ConnectorParameter params
@SafeVarargs public OpcUaConnector(de.iip_ecosphere.platform.connectors.types.ProtocolAdapter<DataItem,Object,CO,CI>... adapter)
adapter - the protocol adapter(s)IllegalArgumentException - if adapter is null or empty or adapters are null@SafeVarargs public OpcUaConnector(de.iip_ecosphere.platform.connectors.AdapterSelector<DataItem,Object,CO,CI> selector, de.iip_ecosphere.platform.connectors.types.ProtocolAdapter<DataItem,Object,CO,CI>... adapter)
selector - the adapter selector (null leads to a default selector for the first adapter)adapter - the protocol adapter(s)IllegalArgumentException - if adapter is null or empty or adapters are nullprivate String getEndpointUrl(de.iip_ecosphere.platform.connectors.ConnectorParameter params)
params - the connector parametersprotected void connectImpl(de.iip_ecosphere.platform.connectors.ConnectorParameter params)
throws IOException
connectImpl in class de.iip_ecosphere.platform.connectors.AbstractConnector<DataItem,Object,CO,CI>IOExceptionprotected Predicate<org.eclipse.milo.opcua.stack.core.types.structured.EndpointDescription> endpointFilter(de.iip_ecosphere.platform.connectors.ConnectorParameter params)
params - the connector parametersprivate org.eclipse.milo.opcua.sdk.client.api.config.OpcUaClientConfigBuilder configure(org.eclipse.milo.opcua.sdk.client.api.config.OpcUaClientConfigBuilder configBuilder)
configBuilder - the configuration builderconfigBuilderprivate de.iip_ecosphere.platform.support.identities.IdentityToken getIdToken(String endpointUrl)
ConnectorParameter.ANY_ENDPOINT.endpointUrl - the endpoint URLprotected org.eclipse.milo.opcua.sdk.client.api.identity.IdentityProvider getIdentityProvider(de.iip_ecosphere.platform.connectors.ConnectorParameter params)
params to Milo specific token
information.params - the connector paramsprotected void disconnectImpl()
throws IOException
disconnectImpl in class de.iip_ecosphere.platform.connectors.AbstractConnector<DataItem,Object,CO,CI>IOExceptionpublic String getName()
public void dispose()
protected void writeImpl(Object data) throws IOException
writeImpl in class de.iip_ecosphere.platform.connectors.AbstractConnector<DataItem,Object,CO,CI>IOExceptionprotected DataItem read() throws IOException
read in class de.iip_ecosphere.platform.connectors.AbstractConnector<DataItem,Object,CO,CI>IOExceptionpublic String supportedEncryption()
public String enabledEncryption()
Copyright © 2022. All rights reserved.