Interface OpcConnection
- All Superinterfaces:
Lifecycle
An
OpcConnection
is a connection to some kind of OPC server.
It is agnostic of the underlying technology (e.g. OPC Classic vs OPC UA) and instead relies on basic abstractions for read, write, browse, and subscribe.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionbrowse
(ServerNodeId node) Returns the "aliases", or alternative names, for a server.The timestamp when this connection made the transition toOpcConnection.State.CONNECTED
, orOptional.empty()
if not currently connected.getFault()
If theOpcConnection.State
isOpcConnection.State.FAULTED
then return aThrowable
containing the reason, otherwise,Optional.empty()
.getState()
read
(List<ServerNodeId> nodes) write
(List<OPCWriteRequest> writes)
-
Method Details
-
read
-
write
-
browse
- Throws:
Exception
-
getState
OpcConnection.State getState()- Returns:
- the current
OpcConnection.State
of the connection.
-
getConnectionTimestamp
Optional<LocalDateTime> getConnectionTimestamp()The timestamp when this connection made the transition toOpcConnection.State.CONNECTED
, orOptional.empty()
if not currently connected. -
getFault
If theOpcConnection.State
isOpcConnection.State.FAULTED
then return aThrowable
containing the reason, otherwise,Optional.empty()
.- Returns:
- a
Throwable
containing the reason for a connection fault, orOptional.empty()
if not faulted.
-
getAliases
Returns the "aliases", or alternative names, for a server.This exists primarily to help backwards compatibility, where OPC Classic servers were referred to by their "progids" rather than names.
-