Hot Search : Source embeded web remote control p2p game More...
Location : Home Search - java CommPortIdentifier
Search - java CommPortIdentifier - List
通过该程序可以获取机子上的所有串口和并行口,进行串口通信/。-The program can be accessed through the machine all the serial and parallel port for serial communication /.
Date : 2025-07-02 Size : 6kb User : dai

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
Date : 2025-07-02 Size : 10kb User : lts
CodeBus is one of the largest source code repositories on the Internet!
Contact us :
1999-2046 CodeBus All Rights Reserved.