public final class SerialPort extends Object implements Peripheral
http://www.lammertbies.nl/comm/info/RS-232_specs.html| Modifier and Type | Class and Description |
|---|---|
static class |
SerialPort.BaudRate |
static class |
SerialPort.DataBits
The number of data bits in a word.
|
static class |
SerialPort.FlowControl
The flow control used by the port.
|
static class |
SerialPort.Parity
The parity mode used to detect errors.
|
static class |
SerialPort.StopBits
The minimum period of time the line must be idle at the end of each word.
|
| Constructor and Description |
|---|
SerialPort(String name)
Creates a new SerialPort.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
String |
getName()
Returns the peripheral name.
|
int |
hashCode() |
SerialChannel |
newAsynchronousChannel(PeripheralChannelGroup group)
Returns a new AsynchronousChannel for communicating with the peripheral.
|
String |
toString() |
public SerialPort(String name)
name - the port nameNullPointerException - if name is nullIllegalStateException - if name.trim().isEmpty()public SerialChannel newAsynchronousChannel(PeripheralChannelGroup group) throws PeripheralNotFoundException, PeripheralInUseException
PeripheralnewAsynchronousChannel in interface Peripheralgroup - the channel groupPeripheralNotFoundException - if the comport does not existPeripheralInUseException - if the peripheral is locked by another applicationpublic String getName()
PeripheralgetName in interface PeripheralCopyright © 2011. All Rights Reserved.