Interface OpcConnectionManager
- All Superinterfaces:
ExtensionPointManager<OpcConnectionExtensionPoint<?>>
Manages
OpcConnection instances and provides an interface to read, write, browse, and
subscribe to OPC values via those connections.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordAnOpcConnectionand its associated resource and configuration. -
Method Summary
Modifier and TypeMethodDescriptionbrowse(ServerNodeId nodeId) Browse the nodes immediately under the given nodecreateSubscription(String connectionName, String subscriptionName, PropertySet properties) Create anOpcSubscriptionon the named connection.voiddeleteSubscription(OpcSubscription subscription) Delete anOpcSubscription.@Nullable OpcConnectiongetConnection(String name) Get a List of all configured connections.default OpcConnection.StategetConnectionState(String name) Returns theOpcConnection.Stateof a named connection.Get theNamedResourceHandlermanagingOpcConnectionresources.Get theOpcSubscriptionModel.read(List<ServerNodeId> nodes) Reads the values addressed by the given nodeswrite(List<OPCWriteRequest> values) Writes the values to their node idsMethods inherited from interface com.inductiveautomation.ignition.gateway.config.ExtensionPointManager
getExtensionPointCollection, getExtensionPointResourceType
-
Method Details
-
getResourceHandler
NamedResourceHandler<ExtensionPointConfig<OpcConnectionConfig,?>> getResourceHandler()Get theNamedResourceHandlermanagingOpcConnectionresources.- Returns:
- the
NamedResourceHandlermanagingOpcConnectionresources.
-
getConnection
- Parameters:
name- the name or alias for theOpcConnection.- Returns:
- the
OpcConnectionidentified byname, ornullif none exists.
-
getConnections
List<OpcConnectionManager.ConfiguredConnection> getConnections()Get a List of all configured connections.- Returns:
- a List of all configured connections.
-
getConnectionState
Returns theOpcConnection.Stateof a named connection.If the connection does not exist
OpcConnection.State.UNKNOWNwill be returned.- Parameters:
name- the name of the connection.- Returns:
- the connection
OpcConnection.State, orOpcConnection.State.UNKNOWNif the connection doesn't exist.
-
createSubscription
OpcSubscription createSubscription(String connectionName, String subscriptionName, PropertySet properties) throws Exception Create anOpcSubscriptionon the named connection.- Parameters:
connectionName- the name of theOpcConnection.subscriptionName- the name to assign theOpcSubscription.properties- aPropertySetcontaining additional properties that a subscription may need to configure itself.- Returns:
- an
OpcSubscription. - Throws:
Exception- if a subscription bysubscriptionNamealready exists on the named connection.
-
deleteSubscription
Delete anOpcSubscription.- Parameters:
subscription- theOpcSubscriptionto 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
-
getSubscriptionModel
OpcSubscriptionModel getSubscriptionModel()Get theOpcSubscriptionModel.This is the same instance provided to connections in
OpcConnectionExtensionPoint.create(GatewayContext, OpcSubscriptionModel, String, OpcConnectionConfig, Object).
-