/**
* Sets the speed for the serial port.
* @param speed the speed to set (e.g. 4800, 9600, 19200, 38400, ...)
*/
public void setSerialPortSpeed(int speed)
throws IOException
{
try
{
serial_port_.setSerialPortParams(speed,
SerialPort.DATABITS_8,
SerialPort.STOPBITS_1,
SerialPort.PARITY_NONE);
}
catch(UnsupportedCommOperationException e)
{
e.printStackTrace();
throw new IOException(e.getMessage());
}
}
GPSSerialDevice.java 文件源码
java
阅读 21
收藏 0
点赞 0
评论 0
项目:GpsdInspector
作者:
评论列表
文章目录