@Override
protected void connectPort() throws Exception {
CommPortIdentifier portIdentifier = CommPortIdentifier.getPortIdentifier(device);
CommPort commPort = portIdentifier.open(this.getClass().getName(), 2000);
serialPort = (SerialPort) commPort;
setSerialPortParameters(baudrate);
in = serialPort.getInputStream();
out = new DataOutputStream(serialPort.getOutputStream());
}
SerialPortConnector.java 文件源码
java
阅读 19
收藏 0
点赞 0
评论 0
项目:openhab1-addons
作者:
评论列表
文章目录