package edu.stanford.hci.exemplar;
import java.util.Enumeration;
import gnu.io.*;
public class ListCommPorts {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
Enumeration port_list = gnu.io.CommPortIdentifier.getPortIdentifiers();
while (port_list.hasMoreElements ()) {
CommPortIdentifier port_id =
(CommPortIdentifier)port_list.nextElement ();
if (port_id.getPortType () == CommPortIdentifier.PORT_SERIAL) {
System.out.println("Found port "+port_id.getName()+ "id "+port_id);
}
}
}
}
Comments (0)
You don't have permission to comment on this page.