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).
|
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 |
private de.iip_ecosphere.platform.connectors.ConnectorParameter |
params |
| 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() |
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) |
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. |
String |
getName() |
protected DataItem |
read() |
protected void |
writeImpl(Object data) |
configureModelAccess, connect, disconnect, getConnectorInputType, getConnectorOutputType, getConnectorParameter, getProtocolInputType, getProtocolOutputType, getSelector, initializeModelAccess, installPollTask, isPolling, notificationsChanged, received, setReceptionCallback, uninstallPollTask, writepublic static final String NAME
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 nullprotected 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 builderconfigBuilderprotected 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>IOExceptionCopyright © 2021. All rights reserved.