public class OPCDriver extends Object
| Constructor and Description |
|---|
OPCDriver() |
| Modifier and Type | Method and Description |
|---|---|
String |
close()
Closes the client connection to the server, if a client has been created.
|
String |
getData()
Prints the last set of items read from the server.
|
String |
isOpen()
Checks if the current client, if any, still has a connection to the server.
|
String |
open(String host,
String domain,
String classID,
String username)
Creates an OPCClient object for a Windows OPC DA server, closing any existing connection.
|
String |
readGroup()
Reads the group of items defined via
setGroup. |
String |
setGroup(String... itemNames)
Sets the group of items to read from the server, if the client exists.
|
public OPCDriver()
throws IOException
IOException@Command(description="Creates an OPCClient object for a Windows OPC DA server, closing any existing connection.") public String open(@Argument(name="host",description="A host name or a dotted IPv4 address.") String host, @Argument(name="domain",description="The local Windows domain of the host.") String domain, @Argument(name="classID",description="The CLSID string of the OPC service.") String classID, @Argument(name="username",description="A user name known on the host. You\'ll be prompted for the password which won\'t echo.") String username) throws Exception
host - The name, or dotted IPv4 address, of the machine running the OPC DA server.domain - The Windows domain for the user account used to access the server. Dur to
SLAC policy this has to be be the local domain for the machine in question, not "SLAC".classID - The full class ID (CLSID) of the server.username - The name of the user account to be used to access the server.Exception@Command(description="Call client.close() if a client has been created using open().") public String close()
@Command(description="Calls client.setGroup() if the client exists.") public String setGroup(@Argument(name="itemName",description="A set of item names separated by spaces.") String... itemNames) throws org.lsst.ccs.drivers.commons.DriverException
itemNames - The names, or tags, of the items.org.lsst.ccs.drivers.commons.DriverException@Command(description="Calls client.readGroup(true) if a client exists.") public String readGroup() throws Throwable
setGroup.Throwable@Command(description="Calls client.getData() if a client exists.") public String getData()
setGroup/readGroup commands.@Command(description="Calls client.isOpen() if the client exists.") public String isOpen()
Copyright © 2017 LSST. All rights reserved.