Welcome![Sign In][Sign Up]
Location:
Search - CommPortIdentifier

Search list

[Com PortCommPortIdentifier

Description: 通过该程序可以获取机子上的所有串口和并行口,进行串口通信/。-The program can be accessed through the machine all the serial and parallel port for serial communication /.
Platform: | Size: 6144 | Author: dai | Hits:

[JSP/JavaSerialDemo

Description: Serial Communication-package aa import javax.comm.* import java.util.Properties import java.util.Enumeration import org.omg.Dynamic.* import java.awt.Choice public class serialcomm { void listPortChoices() { SerialParameters parameters=new SerialParameters() Choice portChoice=new Choice() CommPortIdentifier portId Enumeration en = CommPortIdentifier.getPortIdentifiers() while (en.hasMoreElements()) { portId = (CommPortIdentifier) en.nextElement() if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { System.out.println(portId.getName()) } } portChoice.select(parameters.getPortName()) } public static void main(String args[]) { serialcomm scomm=new serialcomm() scomm.listPortChoices() } } class SerialParameters { private String portName private int baudRate private int flowControlIn pri
Platform: | Size: 10240 | Author: lts | Hits:

CodeBus www.codebus.net