public class RxTxPortCreator extends Object implements SerialPortCreator<RXTXPort>
LOCAL| 构造器和说明 |
|---|
RxTxPortCreator() |
| 限定符和类型 | 方法和说明 |
|---|---|
RXTXPort |
createPort(String port)
Creates the
SerialPort and opens it for communication. |
String |
getProtocol()
Gets the protocol type of the Port to create.
|
boolean |
isApplicable(String portName,
Class<RXTXPort> expectedClass)
Gets whether this
SerialPortCreator is applicable to create and open the given port. |
public boolean isApplicable(String portName, Class<RXTXPort> expectedClass)
SerialPortCreatorSerialPortCreator is applicable to create and open the given port.isApplicable 在接口中 SerialPortCreator<RXTXPort>portName - The ports name.public RXTXPort createPort(String port) throws NoSuchPortException, UnsupportedCommOperationException, PortInUseException
SerialPortCreatorSerialPort and opens it for communication.createPort 在接口中 SerialPortCreator<RXTXPort>port - The ports name.SerialPort.NoSuchPortException - If the serial port does not exist.UnsupportedCommOperationExceptionPortInUseExceptionpublic String getProtocol()
SerialPortCreatorgetProtocol 在接口中 SerialPortCreator<RXTXPort>Copyright © 2020. All rights reserved.