Interface OpcConnection
public interface OpcConnection
An
OpcConnection
is a connection to some kind of OPC server.
It is agnostic of the underlying technology (i.e. 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
, ornull
if not currently connected.getFault()
If theOpcConnection.State
isOpcConnection.State.FAULTED
then return aThrowable
containing the reason, otherwise, returnnull
.getName()
The name of this OPC connection.getState()
getType()
The type of this OPC connection.boolean
Returnstrue
if thisOpcConnection
is enabled.read
(List<ServerNodeId> nodes) void
shutdown()
void
startup
(OpcSubscriptionModel model) write
(List<OPCWriteRequest> writes)
-
Method Details
-
getName
String getName()The name of this OPC connection. Must match the name of the OPCServerProfileRecord that created it. -
getType
String getType()The type of this OPC connection. Must match the type of the OPCServerProfileRecord that created it. -
isEnabled
boolean isEnabled()Returnstrue
if thisOpcConnection
is enabled.- Returns:
- boolean
true
if thisOpcConnection
is enabled.
-
startup
-
shutdown
void shutdown() -
read
-
write
-
browse
- Throws:
Exception
-
getState
OpcConnection.State getState()- Returns:
- the current
OpcConnection.State
of the connection.
-
getConnectionTimestamp
The timestamp when this connection made the transition toOpcConnection.State.CONNECTED
, ornull
if not currently connected. -
getFault
If theOpcConnection.State
isOpcConnection.State.FAULTED
then return aThrowable
containing the reason, otherwise, returnnull
.- Returns:
- a
Throwable
containing the reason for a connection fault, ornull
if not faulted.
-
getAliases
Returns the "aliases", or alternative names, for a server.This exists primarily to help backwards compatibility, where OPC servers were referred to by their "progids" rather than names.
-