org.refcodes.mixin.ReadTimeoutInMsAccessor
, org.refcodes.mixin.WriteTimeoutInMsAccessor
, PortMetrics
TtyPortMetricsBuilder
public class TtyPortMetrics extends Object implements PortMetrics, org.refcodes.mixin.ReadTimeoutInMsAccessor, org.refcodes.mixin.WriteTimeoutInMsAccessor
TtyPortMetrics
describe a COM or TTY serial Port
on your
computer.org.refcodes.mixin.ReadTimeoutInMsAccessor.ReadTimeoutInMsBuilder<B extends org.refcodes.mixin.ReadTimeoutInMsAccessor.ReadTimeoutInMsBuilder<B>>, org.refcodes.mixin.ReadTimeoutInMsAccessor.ReadTimeoutInMsMutator, org.refcodes.mixin.ReadTimeoutInMsAccessor.ReadTimeoutInMsProperty
org.refcodes.mixin.WriteTimeoutInMsAccessor.WriteTimeoutInMsBuilder<B extends org.refcodes.mixin.WriteTimeoutInMsAccessor.WriteTimeoutInMsBuilder<B>>, org.refcodes.mixin.WriteTimeoutInMsAccessor.WriteTimeoutInMsMutator, org.refcodes.mixin.WriteTimeoutInMsAccessor.WriteTimeoutInMsProperty
Modifier and Type | Field | Description |
---|---|---|
protected int |
_baudRate |
|
protected int |
_dataBits |
|
protected Handshake |
_handshake |
|
protected Parity |
_parity |
|
protected long |
_readTimeoutInMs |
|
protected StopBits |
_stopBits |
|
protected long |
_writeTimeoutInMs |
|
static int |
DEFAULT_DATA_BITS |
Default number of data bits to use.
|
Constructor | Description |
---|---|
TtyPortMetrics() |
Constructs the
PortMetrics instance. |
TtyPortMetrics(int aBaudRate) |
Constructs the
PortMetrics instance. |
TtyPortMetrics(int aBaudRate,
int aDataBits,
StopBits aStopBits,
Parity aParity) |
Constructs the
PortMetrics instance. |
TtyPortMetrics(int aBaudRate,
int aDataBits,
StopBits aStopBits,
Parity aParity,
Handshake aHandshake) |
Constructs the
PortMetrics instance. |
TtyPortMetrics(int aBaudRate,
int aDataBits,
StopBits aStopBits,
Parity aParity,
Handshake aHandshake,
long aReadTimeoutInMs,
long aWriteTimeoutInMs) |
Constructs the
PortMetrics instance. |
TtyPortMetrics(BaudRate aBaudRate) |
Constructs the
PortMetrics instance. |
TtyPortMetrics(BaudRate aBaudRate,
int aDataBits,
StopBits aStopBits,
Parity aParity) |
Constructs the
PortMetrics instance. |
TtyPortMetrics(BaudRate aBaudRate,
int aDataBits,
StopBits aStopBits,
Parity aParity,
Handshake aHandshake) |
Constructs the
PortMetrics instance. |
TtyPortMetrics(BaudRate aBaudRate,
int aDataBits,
StopBits aStopBits,
Parity aParity,
Handshake aHandshake,
long aReadTimeoutInMs,
long aWriteTimeoutInMs) |
Constructs the
PortMetrics instance. |
Modifier and Type | Method | Description |
---|---|---|
int |
getBaudRate() |
The baud rate of the port.
|
int |
getDataBits() |
The number of data bits used by the port.
|
Handshake |
getHandshake() |
The kind of
Handshake used by the port. |
Parity |
getParity() |
The
Parity of the port. |
long |
getReadTimeoutInMs() |
The read timeout in milliseconds.
|
StopBits |
getStopBits() |
The number of stop bits used by the port.
|
long |
getWriteTimeoutInMs() |
The write timeout in milliseconds.
|
String |
toString() |
public static final int DEFAULT_DATA_BITS
protected int _baudRate
protected Parity _parity
protected int _dataBits
protected StopBits _stopBits
protected Handshake _handshake
protected long _readTimeoutInMs
protected long _writeTimeoutInMs
public TtyPortMetrics(int aBaudRate, int aDataBits, StopBits aStopBits, Parity aParity, Handshake aHandshake, long aReadTimeoutInMs, long aWriteTimeoutInMs)
PortMetrics
instance.public TtyPortMetrics(BaudRate aBaudRate, int aDataBits, StopBits aStopBits, Parity aParity, Handshake aHandshake, long aReadTimeoutInMs, long aWriteTimeoutInMs)
PortMetrics
instance.public TtyPortMetrics(int aBaudRate, int aDataBits, StopBits aStopBits, Parity aParity, Handshake aHandshake)
PortMetrics
instance. Timeouts are disabled.public TtyPortMetrics(BaudRate aBaudRate, int aDataBits, StopBits aStopBits, Parity aParity, Handshake aHandshake)
PortMetrics
instance. Timeouts are disabled.public TtyPortMetrics(int aBaudRate, int aDataBits, StopBits aStopBits, Parity aParity)
PortMetrics
instance. Timeouts are disabled. The
underlying system's implementation or other implementation specific
handshaking is used (Handshake.AUTO
).public TtyPortMetrics(BaudRate aBaudRate, int aDataBits, StopBits aStopBits, Parity aParity)
PortMetrics
instance. Timeouts are disabled. The
underlying system's implementation or other implementation specific
handshaking is used (Handshake.AUTO
).public TtyPortMetrics(int aBaudRate)
PortMetrics
instance. Timeouts are disabled. The
underlying system's implementation or other implementation specific
handshaking, stop bits and parity are used (Handshake.AUTO
).aBaudRate
- The baud rate to be set.public TtyPortMetrics(BaudRate aBaudRate)
PortMetrics
instance. Timeouts are disabled. The
underlying system's implementation or other implementation specific
handshaking, stop bits and parity are used (Handshake.AUTO
).aBaudRate
- The BaudRate
to be set.public TtyPortMetrics()
PortMetrics
instance. Timeouts are disabled. The
underlying system's implementation or other implementation specific baud
rate, handshaking, stop bits and parity are used
(Handshake.AUTO
).public int getBaudRate()
public int getDataBits()
public StopBits getStopBits()
public Handshake getHandshake()
Handshake
used by the port.public long getReadTimeoutInMs()
getReadTimeoutInMs
in interface org.refcodes.mixin.ReadTimeoutInMsAccessor
public long getWriteTimeoutInMs()
getWriteTimeoutInMs
in interface org.refcodes.mixin.WriteTimeoutInMsAccessor
Copyright © 2021. All rights reserved.