public SerialTransport(String serialPortName) throws NoSuchPortException, PortInUseException, UnsupportedCommOperationException
{
CommPortIdentifier usablePort = CommPortIdentifier.getPortIdentifier(serialPortName);
commPort = (SerialPort)usablePort.open("SerialTransport", 0);
commPort.setSerialPortParams(115200, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE);
commPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE);
commPort.setDTR(true);
commPort.setRTS(true);
commPort.setEndOfInputChar((byte)0x0D);
}
SerialTransport.java 文件源码
java
阅读 24
收藏 0
点赞 0
评论 0
项目:jzwave
作者:
评论列表
文章目录