Interface OpcConnectionManager
- All Superinterfaces:
ExtensionPointManager
Manages
OpcConnection
instances and provides an interface to read, write, browse,
and subscribe to OPC values via those connections.-
Method Summary
Modifier and TypeMethodDescriptionbrowse
(ServerNodeId nodeId) Browse the nodes immediately under the given nodecreateSubscription
(String connectionName, String subscriptionName, PropertySet properties) Create anOpcSubscription
on the named connection.void
deleteSubscription
(OpcSubscription subscription) Delete anOpcSubscription
.getConnection
(String name) Returns all registered connections.default OpcConnection.State
getConnectionState
(String name) Returns theOpcConnection.State
of a named connection.Get theOpcSubscriptionModel
.read
(List<ServerNodeId> nodes) Reads the values addressed by the given nodesRegister aOpcConnectionType
that provides a new kind ofOpcConnection
.Unregister a previously-registeredOpcConnectionType
.write
(List<OPCWriteRequest> values) Writes the values to their node idsMethods inherited from interface com.inductiveautomation.ignition.gateway.model.ExtensionPointManager
getExtensionPoint
-
Method Details
-
getConnection
- Parameters:
name
- the name or alias for theOpcConnection
.- Returns:
- the
OpcConnection
identified byname
, ornull
if none exists.
-
getConnections
List<OpcConnection> getConnections()Returns all registered connections. -
getConnectionState
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(String connectionName, String subscriptionName, PropertySet properties) throws 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:
Exception
- if a subscription bysubscriptionName
already exists on the named connection.
-
deleteSubscription
Delete anOpcSubscription
.- Parameters:
subscription
- theOpcSubscription
to delete.
-
read
Reads the values addressed by the given nodes -
write
Writes the values to their node ids -
browse
Browse the nodes immediately under the given node- Throws:
Exception
-
registerConnectionType
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:
Exception
-
unregisterConnectionType
Unregister a previously-registeredOpcConnectionType
.- Returns:
- a
CompletableFuture
that completes when existing instances of the unregistered type have finished shutting down. - Throws:
Exception
-
getSubscriptionModel
OpcSubscriptionModel getSubscriptionModel()Get theOpcSubscriptionModel
.This is the same instance provided to connections in
OpcConnection.startup(OpcSubscriptionModel)
.- Returns:
- the
OpcSubscriptionModel
.
-
getExtensionPoints
List<OpcConnectionType> getExtensionPoints()- Specified by:
getExtensionPoints
in interfaceExtensionPointManager
- Returns:
- all
ExtensionPointType
s managed by thisExtensionPointManager
.
-