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, ornullif not currently connected.getFault()If theOpcConnection.StateisOpcConnection.State.FAULTEDthen return aThrowablecontaining the reason, otherwise, returnnull.getName()The name of this OPC connection.getState()getType()The type of this OPC connection.booleanReturnstrueif thisOpcConnectionis enabled.read(List<ServerNodeId> nodes) voidshutdown()voidstartup(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()Returnstrueif thisOpcConnectionis enabled.- Returns:
- boolean
trueif thisOpcConnectionis enabled.
-
startup
-
shutdown
void shutdown() -
read
-
write
-
browse
- Throws:
Exception
-
getState
OpcConnection.State getState()- Returns:
- the current
OpcConnection.Stateof the connection.
-
getConnectionTimestamp
The timestamp when this connection made the transition toOpcConnection.State.CONNECTED, ornullif not currently connected. -
getFault
If theOpcConnection.StateisOpcConnection.State.FAULTEDthen return aThrowablecontaining the reason, otherwise, returnnull.- Returns:
- a
Throwablecontaining the reason for a connection fault, ornullif 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.
-