Location:
Search - java pri
Search list
Description: java环境编写,计算100以内的素数。使用于初学者。-prepared, calculated within the 100-number. Beginners in use.
Platform: |
Size: 5120 |
Author: 肖剑强 |
Hits:
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: