MODBUS_FRAME_TERMINATOR, SERIAL_BAUD, SERIAL_CHARACTERISTICS| Constructor and Description |
|---|
NetTransport(String hostname,
int portNo)
Opens the network socket.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the comm link to the device.
|
String |
receive(Duration timeout)
Receives a response from the device.
|
void |
send(String command)
Sends a command to the device.
|
public NetTransport(String hostname, int portNo) throws org.lsst.ccs.drivers.commons.DriverException
hostname - The server's host name or IP address.portNo - The server's port number.org.lsst.ccs.drivers.commons.DriverException - if the open fails.public void send(String command) throws org.lsst.ccs.drivers.commons.DriverException
public String receive(Duration timeout) throws org.lsst.ccs.drivers.commons.DriverException
receive in interface Transporttimeout - timeout.getSeconds() is how long to wait for the start of a response.org.lsst.ccs.drivers.commons.DriverTimeoutException - if no response bytes arrive before the deadline.org.lsst.ccs.drivers.commons.DriverException - for any other problem.Copyright © 2019 LSST. All rights reserved.