@Override
public void serialEvent(SerialPortEvent event) {
if (event.getEventType() == SerialPortEvent.DATA_AVAILABLE) {
try {
synchronized (bufferSynchronisationObject) {
int recv;
while ((recv = inputStream.read()) != -1) {
buffer[end++] = recv;
if (end >= maxLength) {
end = 0;
}
}
}
} catch (IOException e) {
}
synchronized (this) {
this.notify();
}
}
}
ZigBeeSerialPort.java 文件源码
java
阅读 20
收藏 0
点赞 0
评论 0
项目:org.openhab.binding.zigbee
作者:
评论列表
文章目录