Interface OpcConnectionManager
-
- All Superinterfaces:
ExtensionPointManager
public interface OpcConnectionManager extends ExtensionPointManager
ManagesOpcConnection
instances and provides an interface to read, write, browse, and subscribe to OPC values via those connections.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description java.util.List<OPCBrowseElement>
browse(ServerNodeId nodeId)
Browse the nodes immediately under the given nodeOpcSubscription
createSubscription(java.lang.String connectionName, java.lang.String subscriptionName, PropertySet properties)
Create anOpcSubscription
on the named connection.void
deleteSubscription(OpcSubscription subscription)
Delete anOpcSubscription
.OpcConnection
getConnection(java.lang.String name)
java.util.List<OpcConnection>
getConnections()
Returns all registered connections.default OpcConnection.State
getConnectionState(java.lang.String name)
Returns theOpcConnection.State
of a named connection.java.util.List<OpcConnectionType>
getExtensionPoints()
OpcSubscriptionModel
getSubscriptionModel()
Get theOpcSubscriptionModel
.java.util.List<QualifiedValue>
read(java.util.List<ServerNodeId> nodes)
Reads the values addressed by the given nodesjava.util.concurrent.CompletableFuture<java.lang.Void>
registerConnectionType(OpcConnectionType type)
Register aOpcConnectionType
that provides a new kind ofOpcConnection
.java.util.concurrent.CompletableFuture<java.lang.Void>
unregisterConnectionType(OpcConnectionType type)
Unregister a previously-registeredOpcConnectionType
.java.util.List<QualityCode>
write(java.util.List<OPCWriteRequest> values)
Writes the values to their node ids-
Methods inherited from interface com.inductiveautomation.ignition.gateway.model.ExtensionPointManager
getExtensionPoint
-
-
-
-
Method Detail
-
getConnection
@Nullable OpcConnection getConnection(java.lang.String name)
- Parameters:
name
- the name or alias for theOpcConnection
.- Returns:
- the
OpcConnection
identified byname
, ornull
if none exists.
-
getConnections
java.util.List<OpcConnection> getConnections()
Returns all registered connections.
-
getConnectionState
default OpcConnection.State getConnectionState(java.lang.String name)
Returns theOpcConnection.State
of a named connection.If the connection does not exist
OpcConnection.State.UNKNOWN
will be returned.- Parameters:
name
- the name of the connection.- Returns:
- the connection
OpcConnection.State
, orOpcConnection.State.UNKNOWN
if the connection doesn't exist.
-
createSubscription
OpcSubscription createSubscription(java.lang.String connectionName, java.lang.String subscriptionName, PropertySet properties) throws java.lang.Exception
Create anOpcSubscription
on the named connection.- Parameters:
connectionName
- the name of theOpcConnection
.subscriptionName
- the name to assign theOpcSubscription
.properties
- aPropertySet
containing additional properties that a subscription may need to configure itself.- Returns:
- an
OpcSubscription
. - Throws:
java.lang.Exception
- if a subscription bysubscriptionName
already exists on the named connection.
-
deleteSubscription
void deleteSubscription(OpcSubscription subscription)
Delete anOpcSubscription
.- Parameters:
subscription
- theOpcSubscription
to delete.
-
read
java.util.List<QualifiedValue> read(java.util.List<ServerNodeId> nodes)
Reads the values addressed by the given nodes
-
write
java.util.List<QualityCode> write(java.util.List<OPCWriteRequest> values)
Writes the values to their node ids
-
browse
java.util.List<OPCBrowseElement> browse(ServerNodeId nodeId) throws java.lang.Exception
Browse the nodes immediately under the given node- Throws:
java.lang.Exception
-
registerConnectionType
java.util.concurrent.CompletableFuture<java.lang.Void> registerConnectionType(OpcConnectionType type) throws java.lang.Exception
Register aOpcConnectionType
that provides a new kind ofOpcConnection
.- Returns:
- a
CompletableFuture
that completes when any existing instances of the registered type have finished shutting down and new instances have finished starting up. - Throws:
java.lang.Exception
-
unregisterConnectionType
java.util.concurrent.CompletableFuture<java.lang.Void> unregisterConnectionType(OpcConnectionType type) throws java.lang.Exception
Unregister a previously-registeredOpcConnectionType
.- Returns:
- a
CompletableFuture
that completes when existing instances of the unregistered type have finished shutting down. - Throws:
java.lang.Exception
-
getSubscriptionModel
OpcSubscriptionModel getSubscriptionModel()
Get theOpcSubscriptionModel
.This is the same instance provided to connections in
OpcConnection.startup(OpcSubscriptionModel)
.- Returns:
- the
OpcSubscriptionModel
.
-
getExtensionPoints
java.util.List<OpcConnectionType> getExtensionPoints()
- Specified by:
getExtensionPoints
in interfaceExtensionPointManager
- Returns:
- all
ExtensionPointType
s managed by thisExtensionPointManager
.
-
-