protected class OpcUaConnector.OpcUaModelAccess
extends de.iip_ecosphere.platform.connectors.model.AbstractModelAccess
| Modifier and Type | Field and Description |
|---|---|
private OpcUaConnector.NodeCacheEntry |
base |
private String |
basePath |
private Map<String,OpcUaConnector.NodeCacheEntry> |
nodes |
private OpcUaConnector.OpcUaModelAccess |
parent |
| Modifier | Constructor and Description |
|---|---|
protected |
OpcUaModelAccess()
Creates the instance and binds the listener to the creating connector instance.
|
protected |
OpcUaModelAccess(OpcUaConnector.NodeCacheEntry base,
String basePath,
OpcUaConnector.OpcUaModelAccess parent,
Map<String,OpcUaConnector.NodeCacheEntry> nodes)
Creates the instance and binds the listener to the creating connector instance.
|
| Modifier and Type | Method and Description |
|---|---|
private void |
browseNode(String indent,
org.eclipse.milo.opcua.stack.core.types.builtin.NodeId browseRoot)
Just for testing, see Identifiers.RootFolder.
|
Object |
call(String qName,
Object... args) |
Object |
get(String qName) |
Object |
get(String qName,
int lifetime) |
protected de.iip_ecosphere.platform.connectors.ConnectorParameter |
getConnectorParameter() |
private org.eclipse.milo.opcua.stack.core.types.builtin.ExpandedNodeId |
getEncodingId(Class<?> cls)
Returns the encodingId of a custom type.
|
String |
getQSeparator() |
<T> T |
getStruct(String qName,
Class<T> type) |
void |
monitor(int notificationInterval,
String... qName) |
void |
monitorModelChanges(int notificationInterval) |
private void |
onEvent(org.eclipse.milo.opcua.sdk.client.api.subscriptions.UaMonitoredItem item,
org.eclipse.milo.opcua.stack.core.types.builtin.Variant[] var)
Is called when a monitoring event occurs.
|
private void |
onSubscriptionValue(org.eclipse.milo.opcua.sdk.client.api.subscriptions.UaMonitoredItem item,
org.eclipse.milo.opcua.stack.core.types.builtin.DataValue value)
Is called on changing a monitored item.
|
void |
registerCustomType(Class<?> cls) |
private OpcUaConnector.NodeCacheEntry |
retrieveCacheEntry(String qName)
Retrieves a node starting at the root of the OPC UA model based on the node's qualified name
qName. |
private org.eclipse.milo.opcua.sdk.client.nodes.UaNode |
retrieveNode(org.eclipse.milo.opcua.sdk.client.nodes.UaNode current,
String qName)
Retrieves a node starting at
current recursively following the path given by qName. |
private org.eclipse.milo.opcua.sdk.client.nodes.UaVariableNode |
retrieveVariableNode(String qName,
OpcUaConnector.NodeCacheEntry entry)
Retrieves an OPC UA variable node from a cache node entry.
|
void |
set(String qName,
Object value) |
void |
setStruct(String qName,
Object value) |
OpcUaConnector.OpcUaModelAccess |
stepInto(String name) |
OpcUaConnector.OpcUaModelAccess |
stepOut() |
String |
topInstancesQName() |
iqName, isDetailNotifiedItemEnabled, monitor, monitorModelChanges, qName, setDetailNotifiedItem, useNotifications, useNotificationsprivate Map<String,OpcUaConnector.NodeCacheEntry> nodes
private OpcUaConnector.NodeCacheEntry base
private String basePath
private OpcUaConnector.OpcUaModelAccess parent
protected OpcUaModelAccess()
protected OpcUaModelAccess(OpcUaConnector.NodeCacheEntry base, String basePath, OpcUaConnector.OpcUaModelAccess parent, Map<String,OpcUaConnector.NodeCacheEntry> nodes)
base - the context node to resolve non-nested names onbasePath - the base path this context representeparent - the parent to return to in stepOut()nodes - the (parent) nodes cache to usepublic String topInstancesQName()
public String getQSeparator()
public Object call(String qName, Object... args) throws IOException
IOExceptionprivate void browseNode(String indent, org.eclipse.milo.opcua.stack.core.types.builtin.NodeId browseRoot)
indent - output indentbrowseRoot - the node id to start browsing atprivate org.eclipse.milo.opcua.sdk.client.nodes.UaVariableNode retrieveVariableNode(String qName, OpcUaConnector.NodeCacheEntry entry) throws org.eclipse.milo.opcua.stack.core.UaException, IOException
qName - the qualified node name (for exception message)entry - the cache entry to read the variable node fromIOException - if no node can be found for qName or if the found node is not a variable nodeorg.eclipse.milo.opcua.stack.core.UaException - if accessing/browsing the OPC UA model failsprivate OpcUaConnector.NodeCacheEntry retrieveCacheEntry(String qName) throws org.eclipse.milo.opcua.stack.core.UaException, IOException
qName.
Takes into account the nodes cache.qName - the qualified node nameIOException - if no node can be found for qNameorg.eclipse.milo.opcua.stack.core.UaException - if accessing/browsing the OPC UA model failsprivate org.eclipse.milo.opcua.sdk.client.nodes.UaNode retrieveNode(org.eclipse.milo.opcua.sdk.client.nodes.UaNode current,
String qName)
throws org.eclipse.milo.opcua.stack.core.UaException
current recursively following the path given by qName.current - the current node to start searching for, may be null for top-levelqName - the qualified node nameorg.eclipse.milo.opcua.stack.core.UaException - if accessing/browsing the OPC UA model failspublic Object get(String qName) throws IOException
IOExceptionpublic Object get(String qName, int lifetime) throws IOException
IOExceptionpublic void set(String qName, Object value) throws IOException
IOExceptionpublic <T> T getStruct(String qName, Class<T> type) throws IOException
IOExceptionpublic void setStruct(String qName, Object value) throws IOException
IOExceptionprivate org.eclipse.milo.opcua.stack.core.types.builtin.ExpandedNodeId getEncodingId(Class<?> cls) throws IOException
cls - the type classIOException - if the encodingID cannot be foundpublic void registerCustomType(Class<?> cls) throws IOException
IOExceptionprotected de.iip_ecosphere.platform.connectors.ConnectorParameter getConnectorParameter()
getConnectorParameter in class de.iip_ecosphere.platform.connectors.model.AbstractModelAccesspublic void monitor(int notificationInterval,
String... qName)
throws IOException
IOExceptionpublic void monitorModelChanges(int notificationInterval)
throws IOException
IOExceptionprivate void onSubscriptionValue(org.eclipse.milo.opcua.sdk.client.api.subscriptions.UaMonitoredItem item,
org.eclipse.milo.opcua.stack.core.types.builtin.DataValue value)
item - the monitored itemvalue - the new data valueprivate void onEvent(org.eclipse.milo.opcua.sdk.client.api.subscriptions.UaMonitoredItem item,
org.eclipse.milo.opcua.stack.core.types.builtin.Variant[] var)
item - the monitored itemvar - the changed values/variantspublic OpcUaConnector.OpcUaModelAccess stepInto(String name) throws IOException
IOExceptionpublic OpcUaConnector.OpcUaModelAccess stepOut()
Copyright © 2022. All rights reserved.