SerialTransport.java 文件源码

java
阅读 24 收藏 0 点赞 0 评论 0

项目:jzwave 作者:
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);
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号