public class JscSerialPort extends Object implements net.solarnetwork.io.modbus.serial.SerialPort
SerialPort.| Constructor and Description |
|---|
JscSerialPort(String name)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
InputStream |
getInputStream() |
String |
getName() |
OutputStream |
getOutputStream() |
boolean |
isOpen() |
void |
open(net.solarnetwork.io.modbus.serial.SerialParameters parameters) |
public JscSerialPort(String name)
name - the device name of the serial port to use, such as
/dev/ttyUSB0 or COM1public String getName()
getName in interface net.solarnetwork.io.modbus.serial.SerialPortpublic void open(net.solarnetwork.io.modbus.serial.SerialParameters parameters)
throws IOException
open in interface net.solarnetwork.io.modbus.serial.SerialPortIOExceptionpublic void close()
throws IOException
close in interface net.solarnetwork.io.modbus.serial.SerialPortIOExceptionpublic boolean isOpen()
isOpen in interface net.solarnetwork.io.modbus.serial.SerialPortpublic InputStream getInputStream() throws IOException
getInputStream in interface net.solarnetwork.io.modbus.serial.SerialPortIOExceptionpublic OutputStream getOutputStream() throws IOException
getOutputStream in interface net.solarnetwork.io.modbus.serial.SerialPortIOException