/**
* Get a vector of all the ports identified on this computer
*
* @return
*/
public static Vector enumerateSerialPorts() {
Enumeration ports = CommPortIdentifier.getPortIdentifiers();
Vector portStrings = new Vector();
while(ports.hasMoreElements()) {
CommPortIdentifier currentPort = (CommPortIdentifier)ports.nextElement();
if(currentPort.getPortType() != CommPortIdentifier.PORT_SERIAL)
continue;
portStrings.add(new String(currentPort.getName()));
}
return portStrings;
}
AbstractSerialMeasuringDevice.java 文件源码
java
阅读 19
收藏 0
点赞 0
评论 0
项目:tellervo
作者:
评论列表
文章目录