public interface SerialPortCreator<T extends SerialPort>
| 限定符和类型 | 方法和说明 |
|---|---|
T |
createPort(String portName)
Creates the
SerialPort and opens it for communication. |
String |
getProtocol()
Gets the protocol type of the Port to create.
|
boolean |
isApplicable(String portName,
Class<T> epectedClass)
Gets whether this
SerialPortCreator is applicable to create and open the given port. |
boolean isApplicable(String portName, Class<T> epectedClass)
SerialPortCreator is applicable to create and open the given port.portName - The ports name.T createPort(String portName) throws NoSuchPortException, UnsupportedCommOperationException, PortInUseException
SerialPort and opens it for communication.portName - The ports name.SerialPort.NoSuchPortException - If the serial port does not exist.UnsupportedCommOperationExceptionPortInUseExceptionString getProtocol()
Copyright © 2020. All rights reserved.