public class SerialAddress extends SocketAddress
Modifier and Type | Class and Description |
---|---|
static class |
SerialAddress.DataBits
The number of data bits per byte
|
static class |
SerialAddress.FlowControl
The Flow control flags
|
static class |
SerialAddress.Parity
The error detection parity in use
|
static class |
SerialAddress.StopBits
Stop bits in use
|
Constructor and Description |
---|
SerialAddress(String name,
int bauds,
SerialAddress.DataBits dataBits,
SerialAddress.StopBits stopBits,
SerialAddress.Parity parity,
SerialAddress.FlowControl flowControl)
Create an address for a serial communication, associating a serial interface and
various serial signal carcteristics.
|
Modifier and Type | Method and Description |
---|---|
int |
getBauds()
Bauds rate for the communication.
|
SerialAddress.DataBits |
getDataBits()
Number of data bits for each communicated bytes.
|
SerialAddress.FlowControl |
getFlowControl()
The flow control policie used for this communication.
|
String |
getName()
The name of the device.
|
SerialAddress.Parity |
getParity()
The parity check for this communication.
|
SerialAddress.StopBits |
getStopBits()
Number of stop bits used.
|
String |
toString()
Convert this serial address to a human readable string.
|
public SerialAddress(String name, int bauds, SerialAddress.DataBits dataBits, SerialAddress.StopBits stopBits, SerialAddress.Parity parity, SerialAddress.FlowControl flowControl)
name
- name of the device, COM1 COM2 for Windows, /dev/ttyS0 for Unixbauds
- baud rate for the communicationdataBits
- number of data bits per bytesstopBits
- number of stop bitsparity
- parity usedflowControl
- flow control usedpublic int getBauds()
public SerialAddress.DataBits getDataBits()
public SerialAddress.FlowControl getFlowControl()
public String getName()
public SerialAddress.Parity getParity()
public SerialAddress.StopBits getStopBits()
Copyright © 2004–2021 Apache MINA Project. All rights reserved.