diff --git a/android/android.iml b/android/android.iml
deleted file mode 100644
index f6e5e11..0000000
--- a/android/android.iml
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
| Modifier and Type | -Constant Field | -Value | -
|---|---|---|
-
-public static final int |
-ALL |
--1 |
-
-
-public static final int |
-ASSERT |
-7 |
-
-
-public static final int |
-DEBUG |
-3 |
-
-
-public static final int |
-ERROR |
-6 |
-
-
-public static final int |
-INFO |
-4 |
-
-
-public static final int |
-NONE |
-2147483647 |
-
-
-public static final int |
-VERBOSE |
-2 |
-
-
-public static final int |
-WARN |
-5 |
-
| Modifier and Type | -Constant Field | -Value | -
|---|---|---|
-
-public static final int |
-BAUDRATE_110 |
-110 |
-
-
-public static final int |
-BAUDRATE_115200 |
-115200 |
-
-
-public static final int |
-BAUDRATE_1200 |
-1200 |
-
-
-public static final int |
-BAUDRATE_128000 |
-128000 |
-
-
-public static final int |
-BAUDRATE_14400 |
-14400 |
-
-
-public static final int |
-BAUDRATE_153600 |
-153600 |
-
-
-public static final int |
-BAUDRATE_230400 |
-230400 |
-
-
-public static final int |
-BAUDRATE_2400 |
-2400 |
-
-
-public static final int |
-BAUDRATE_256000 |
-256000 |
-
-
-public static final int |
-BAUDRATE_28800 |
-28800 |
-
-
-public static final int |
-BAUDRATE_300 |
-300 |
-
-
-public static final int |
-BAUDRATE_38400 |
-38400 |
-
-
-public static final int |
-BAUDRATE_460800 |
-460800 |
-
-
-public static final int |
-BAUDRATE_4800 |
-4800 |
-
-
-public static final int |
-BAUDRATE_56000 |
-56000 |
-
-
-public static final int |
-BAUDRATE_57600 |
-57600 |
-
-
-public static final int |
-BAUDRATE_600 |
-600 |
-
-
-public static final int |
-BAUDRATE_921600 |
-921600 |
-
-
-public static final int |
-BAUDRATE_9600 |
-9600 |
-
-
-public static final java.lang.String |
-EOL_CR |
-"\r" |
-
-
-public static final java.lang.String |
-EOL_CRLF |
-"\r\n" |
-
-
-public static final java.lang.String |
-EOL_LF |
-"\n" |
-
| Modifier and Type | -Constant Field | -Value | -
|---|---|---|
-
-public static final int |
-MAX |
--1 |
-
Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain six categories:
-Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:
-Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.
-Each annotation type has its own separate page with the following sections:
-Each enum has its own separate page with the following sections:
-There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with java.lang.Object. The interfaces do not inherit from java.lang.Object.
The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.
-The Index contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.
-These links take you to the next or previous class, interface, package, or related page.
-These links show and hide the HTML frames. All pages are available with or without frames.
-The All Classes link shows all classes and interfaces except non-static nested types.
-Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description.
-The Constant Field Values page lists the static final fields and their values.
-Log.println(int, String, String) or
- Log.setFilterLevel(int) method.android.util.Log.Serial.Serial.Builder for serial port.Serial.Builder for serial port.Serial.Builder for serial port.SerialException with the current stack trace
- and the specified detail message.PortNotOpenedException with the current stack trace,
- the specified detail message and the specified cause.SerialIOException with its stack trace and detail
- message filled in.Log.VERBOSE log message.Log.VERBOSE log message.Log.VERBOSE log message.Log.VERBOSE log message and log the exception.Log.println(int, String, String) or
- Log.setFilterLevel(int) methods; use Log.v.Log.WARN log message.Log.WARN log message.Log.WARN log message.Log.WARN log message and log the exception.Log.println(int, String, String) or
- Log.setFilterLevel(int) method; use Log.w.Log.DEBUG log message.Log.DEBUG log message.Log.DEBUG log message.Log.DEBUG log message and log the exception.Log.println(int, String, String) or
- Log.setFilterLevel(int) method; use Log.d.Log.ERROR log message.Log.ERROR log message.Log.ERROR log message.Log.ERROR log message.Log.ERROR log message and log the exception.Log.ERROR log message and log the exception.Log.println(int, String, String) or
- Log.setFilterLevel(int) method; use Log.e.StackTraceElement for current method's caller.StackTraceElement for current method.StackTraceElement on the call stack, relative to current method.Log.INFO log message.Log.INFO log message.Log.INFO log message.Log.INFO log message and log the exception.Log.println(int, String, String) or
- Log.setFilterLevel(int) method; use Log.i.| Enum Constant and Description | -
|---|
EightBits
-Use 8 bits in a byte.
- |
-
FiveBits
-Use 5 bits in a byte.
- |
-
SevenBits
-Use 7 bits in a byte.
- |
-
SixBits
-Use 6 bits in a byte.
- |
-
| Modifier and Type | -Field and Description | -
|---|---|
int |
-bitLength
-Number of bits in a single byte.
- |
-
| Modifier and Type | -Method and Description | -
|---|---|
static ByteSize |
-valueOf(java.lang.String name)
-Returns the enum constant of this type with the specified name.
- |
-
static ByteSize[] |
-values()
-Returns an array containing the constants of this enum type, in
-the order they are declared.
- |
-
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOfgetClass, notify, notifyAll, wait, wait, waitpublic static final ByteSize FiveBits-
public static final ByteSize SixBits-
public static final ByteSize SevenBits-
public static final ByteSize EightBits-
public final int bitLength-
public static ByteSize[] values()-
-for (ByteSize c : ByteSize.values()) - System.out.println(c); -
public static ByteSize valueOf(java.lang.String name)-
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is nullpublic enum FlowControl -extends java.lang.Enum<FlowControl>-
| Enum Constant and Description | -
|---|
Hardware
-Use hardware flow control.
- |
-
None
-Use none flow control.
- |
-
Software
-Use software flow control.
- |
-
| Modifier and Type | -Method and Description | -
|---|---|
static FlowControl |
-valueOf(java.lang.String name)
-Returns the enum constant of this type with the specified name.
- |
-
static FlowControl[] |
-values()
-Returns an array containing the constants of this enum type, in
-the order they are declared.
- |
-
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOfgetClass, notify, notifyAll, wait, wait, waitpublic static final FlowControl None-
public static final FlowControl Software-
public static final FlowControl Hardware-
public static FlowControl[] values()-
-for (FlowControl c : FlowControl.values()) - System.out.println(c); -
public static FlowControl valueOf(java.lang.String name)-
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is nullpublic final class Log
-extends java.lang.Object
-android.util.Log.| Modifier and Type | -Field and Description | -
|---|---|
static int |
-ALL
-Priority constant for enable all loggings.
- |
-
static int |
-ASSERT
-Priority constant for the
-println(int, String, String) or
- setFilterLevel(int) method. |
-
static int |
-DEBUG
-Priority constant for the
-println(int, String, String) or
- setFilterLevel(int) method; use Log.d. |
-
static int |
-ERROR
-Priority constant for the
-println(int, String, String) or
- setFilterLevel(int) method; use Log.e. |
-
static int |
-INFO
-Priority constant for the
-println(int, String, String) or
- setFilterLevel(int) method; use Log.i. |
-
static int |
-NONE
-Priority constant for disable all loggings.
- |
-
static int |
-VERBOSE
-Priority constant for
-println(int, String, String) or
- setFilterLevel(int) methods; use Log.v. |
-
static int |
-WARN
-Priority constant for the
-println(int, String, String) or
- setFilterLevel(int) method; use Log.w. |
-
| Modifier and Type | -Method and Description | -
|---|---|
static int |
-d(java.lang.String msg)
-Send a
-DEBUG log message. |
-
static int |
-d(java.lang.String tag,
- java.lang.String msg)
-Send a
-DEBUG log message. |
-
static int |
-d(java.lang.String tag,
- java.lang.String format,
- java.lang.Object... args)
-Send a
-DEBUG log message. |
-
static int |
-d(java.lang.String tag,
- java.lang.String msg,
- java.lang.Throwable tr)
-Send a
-DEBUG log message and log the exception. |
-
static int |
-e(java.lang.String msg)
-Send an
-ERROR log message. |
-
static int |
-e(java.lang.String tag,
- java.lang.String msg)
-Send an
-ERROR log message. |
-
static int |
-e(java.lang.String tag,
- java.lang.String format,
- java.lang.Object... args)
-Send an
-ERROR log message. |
-
static int |
-e(java.lang.String tag,
- java.lang.String msg,
- java.lang.Throwable tr)
-Send a
-ERROR log message and log the exception. |
-
static int |
-e(java.lang.String msg,
- java.lang.Throwable tr)
-Send a
-ERROR log message and log the exception. |
-
static int |
-e(java.lang.Throwable tr)
-Send an
-ERROR log message. |
-
static java.lang.String |
-getApplicationTag()
-Gets the default tag of the application.
- |
-
static java.lang.StackTraceElement |
-getCallerFrame()
-Return the
-StackTraceElement for current method's caller. |
-
static java.lang.StackTraceElement |
-getCurrentFrame()
-Return the
-StackTraceElement for current method. |
-
static int |
-getFilterLevel()
-Gets the filter level of logs.
- |
-
static java.lang.StackTraceElement |
-getStackFrameAt(int offset)
-Return specified
-StackTraceElement on the call stack, relative to current method. |
-
static java.lang.String |
-getStackTraceString(java.lang.Throwable tr)
-Handy function to get a loggable stack trace from a Throwable
- |
-
static int |
-i(java.lang.String msg)
-Send an
-INFO log message. |
-
static int |
-i(java.lang.String tag,
- java.lang.String msg)
-Send an
-INFO log message. |
-
static int |
-i(java.lang.String tag,
- java.lang.String format,
- java.lang.Object... args)
-Send an
-INFO log message. |
-
static int |
-i(java.lang.String tag,
- java.lang.String msg,
- java.lang.Throwable tr)
-Send a
-INFO log message and log the exception. |
-
static boolean |
-isLoggable(java.lang.String tag,
- int level)
-Checks to see whether or not a log for the specified tag is loggable at
- the specified level.
- |
-
static void |
-myAssert(boolean condition,
- java.lang.String message) |
-
static int |
-println(int priority,
- java.lang.String tag,
- java.lang.String msg)
-Low-level logging call.
- |
-
static void |
-setApplicationTag(java.lang.String tag)
-Set the default tag for this application.
- |
-
static void |
-setFilterLevel(int level)
-Sets the filter level of logs.
- |
-
static int |
-v(java.lang.String msg)
-Send a
-VERBOSE log message. |
-
static int |
-v(java.lang.String tag,
- java.lang.String msg)
-Send a
-VERBOSE log message. |
-
static int |
-v(java.lang.String tag,
- java.lang.String format,
- java.lang.Object... args)
-Send a
-VERBOSE log message. |
-
static int |
-v(java.lang.String tag,
- java.lang.String msg,
- java.lang.Throwable tr)
-Send a
-VERBOSE log message and log the exception. |
-
static int |
-w(java.lang.String msg)
-Send a
-WARN log message. |
-
static int |
-w(java.lang.String tag,
- java.lang.String msg)
-Send a
-WARN log message. |
-
static int |
-w(java.lang.String tag,
- java.lang.String format,
- java.lang.Object... args)
-Send a
-WARN log message. |
-
static int |
-w(java.lang.String tag,
- java.lang.String msg,
- java.lang.Throwable tr)
-Send a
-WARN log message and log the exception. |
-
static int |
-w(java.lang.String tag,
- java.lang.Throwable tr) |
-
static int |
-w(java.lang.Throwable tr) |
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpublic static final int ALL-
public static final int VERBOSE-
println(int, String, String) or
- setFilterLevel(int) methods; use Log.v.public static final int DEBUG-
println(int, String, String) or
- setFilterLevel(int) method; use Log.d.public static final int INFO-
println(int, String, String) or
- setFilterLevel(int) method; use Log.i.public static final int WARN-
println(int, String, String) or
- setFilterLevel(int) method; use Log.w.public static final int ERROR-
println(int, String, String) or
- setFilterLevel(int) method; use Log.e.public static final int ASSERT-
println(int, String, String) or
- setFilterLevel(int) method.public static final int NONE-
public static void setApplicationTag(java.lang.String tag)-
tag - The tag of the application.public static java.lang.String getApplicationTag()-
public static void setFilterLevel(int level)-
level - The filter level.public static int getFilterLevel()-
public static int v(java.lang.String msg)-
VERBOSE log message.msg - The message you would like logged.public static int v(java.lang.String tag, - java.lang.String msg)-
VERBOSE log message.tag - Used to identify the source of a log message. It usually
- identifies the class or activity where the log call occurs.msg - The message you would like logged.public static int v(java.lang.String tag, - java.lang.String format, - java.lang.Object... args)-
VERBOSE log message.tag - Used to identify the source of a log message. It usually
- identifies the class or activity where the log call occurs.format - The format of the message you would like logged.args - The arguments used to format the message.public static int v(java.lang.String tag, - java.lang.String msg, - java.lang.Throwable tr)-
VERBOSE log message and log the exception.tag - Used to identify the source of a log message. It usually
- identifies the class or activity where the log call occurs.msg - The message you would like logged.tr - An exception to logpublic static int d(java.lang.String msg)-
DEBUG log message.msg - The message you would like logged.public static int d(java.lang.String tag, - java.lang.String msg)-
DEBUG log message.tag - Used to identify the source of a log message. It usually
- identifies the class or activity where the log call occurs.msg - The message you would like logged.public static int d(java.lang.String tag, - java.lang.String format, - java.lang.Object... args)-
DEBUG log message.tag - Used to identify the source of a log message. It usually
- identifies the class or activity where the log call occurs.format - The format of the message you would like logged.args - The arguments used to format the message.public static int d(java.lang.String tag, - java.lang.String msg, - java.lang.Throwable tr)-
DEBUG log message and log the exception.tag - Used to identify the source of a log message. It usually
- identifies the class or activity where the log call occurs.msg - The message you would like logged.tr - An exception to logpublic static int i(java.lang.String msg)-
INFO log message.msg - The message you would like logged.public static int i(java.lang.String tag, - java.lang.String msg)-
INFO log message.tag - Used to identify the source of a log message. It usually
- identifies the class or activity where the log call occurs.msg - The message you would like logged.public static int i(java.lang.String tag, - java.lang.String format, - java.lang.Object... args)-
INFO log message.tag - Used to identify the source of a log message. It usually
- identifies the class or activity where the log call occurs.format - The format of the message you would like logged.args - The arguments used to format the message.public static int i(java.lang.String tag, - java.lang.String msg, - java.lang.Throwable tr)-
INFO log message and log the exception.tag - Used to identify the source of a log message. It usually
- identifies the class or activity where the log call occurs.msg - The message you would like logged.tr - An exception to logpublic static int w(java.lang.String msg)-
WARN log message.msg - The message you would like logged.public static int w(java.lang.String tag, - java.lang.String msg)-
WARN log message.tag - Used to identify the source of a log message. It usually
- identifies the class or activity where the log call occurs.msg - The message you would like logged.public static int w(java.lang.String tag, - java.lang.String format, - java.lang.Object... args)-
WARN log message.tag - Used to identify the source of a log message. It usually
- identifies the class or activity where the log call occurs.format - The format of the message you would like logged.args - The arguments used to format the message.public static int w(java.lang.String tag, - java.lang.String msg, - java.lang.Throwable tr)-
WARN log message and log the exception.tag - Used to identify the source of a log message. It usually
- identifies the class or activity where the log call occurs.msg - The message you would like logged.tr - An exception to logpublic static boolean isLoggable(java.lang.String tag, - int level)-
tag - The tag to check.level - The level to check.java.lang.IllegalArgumentException - is thrown if the tag.length() > 23.public static int w(java.lang.String tag, - java.lang.Throwable tr)-
public static int w(java.lang.Throwable tr)-
public static int e(java.lang.String tag, - java.lang.String format, - java.lang.Object... args)-
ERROR log message.tag - Used to identify the source of a log message. It usually
- identifies the class or activity where the log call occurs.format - The format of the message you would like logged.args - The arguments used to format the message.public static int e(java.lang.String msg)-
ERROR log message.msg - The message you would like logged.public static int e(java.lang.Throwable tr)-
ERROR log message.tr - The throwable you would like logged.public static int e(java.lang.String tag, - java.lang.String msg)-
ERROR log message.tag - Used to identify the source of a log message. It usually
- identifies the class or activity where the log call occurs.msg - The message you would like logged.public static int e(java.lang.String msg, - java.lang.Throwable tr)-
ERROR log message and log the exception.msg - The message you would like logged.tr - An exception to logpublic static int e(java.lang.String tag, - java.lang.String msg, - java.lang.Throwable tr)-
ERROR log message and log the exception.tag - Used to identify the source of a log message. It usually
- identifies the class or activity where the log call occurs.msg - The message you would like logged.tr - An exception to logpublic static java.lang.String getStackTraceString(java.lang.Throwable tr)-
tr - An exception to logpublic static int println(int priority, - java.lang.String tag, - java.lang.String msg)-
priority - The priority/type of this log messagetag - Used to identify the source of a log message. It usually
- identifies the class or activity where the log call occurs.msg - The message you would like logged.public static void myAssert(boolean condition, - java.lang.String message)-
public static java.lang.StackTraceElement getCallerFrame()-
StackTraceElement for current method's caller.
-
- For example:
-
- void foo() {
- bar();
- }
-
- void bar() {
- StackTraceElement caller = getCallerFrame();
-
- // Will print "foo".
- System.println(caller.getMethodName());
- }
-
-
- Might be null. If you call this from static void main(String[]).
public static java.lang.StackTraceElement getCurrentFrame()-
StackTraceElement for current method.
-
- For example:
-
- void foo() {
- bar();
- }
-
- void bar() {
- StackTraceElement current = getCurrentFrame();
-
- // Will print "bar".
- System.println(current.getMethodName());
- }
- public static java.lang.StackTraceElement getStackFrameAt(int offset)-
StackTraceElement on the call stack, relative to current method.
-
- For example:
-
- void main() {
- stub();
- }
-
- void stub() {
- foo();
- }
- void foo() {
- bar();
- }
-
- void bar() {
- // Will print "bar"
- System.println(getStackFrameAt(0).getMethodName());
- // Will print "foo"
- System.println(getStackFrameAt(1).getMethodName());
- // Will print "stub"
- System.println(getStackFrameAt(2).getMethodName());
- // Will print "main"
- System.println(getStackFrameAt(3).getMethodName());
- // Will print "null"
- System.println(getStackFrameAt(4));
- System.println(getStackFrameAt(-1));
- }
- offset - the offset of the call stack from current method. 0 means current methods, 1 means caller, etc.| Enum Constant and Description | -
|---|
Even
-Use even parity type
- |
-
Mark
-Use mark parity type.
- |
-
None
-Use none parity type.
- |
-
Odd
-Use odd parity types
- |
-
Space
-Use space parity type.
- |
-
| Modifier and Type | -Method and Description | -
|---|---|
static Parity |
-valueOf(java.lang.String name)
-Returns the enum constant of this type with the specified name.
- |
-
static Parity[] |
-values()
-Returns an array containing the constants of this enum type, in
-the order they are declared.
- |
-
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOfgetClass, notify, notifyAll, wait, wait, waitpublic static final Parity None-
public static final Parity Odd-
public static final Parity Even-
public static final Parity Mark-
public static final Parity Space-
public static Parity[] values()-
-for (Parity c : Parity.values()) - System.out.println(c); -
public static Parity valueOf(java.lang.String name)-
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is nullpublic final class PortInfo
-extends java.lang.Object
-| Modifier and Type | -Field and Description | -
|---|---|
java.lang.String |
-description
-Human readable description of serial device if available.
- |
-
java.lang.String |
-hardwareId
-Hardware ID (e.g.
- |
-
java.lang.String |
-port
-Address of the serial port (this can be passed to the constructor of Serial).
- |
-
public final java.lang.String port-
public final java.lang.String description-
public final java.lang.String hardwareId-
public class PortNotOpenedException
-extends java.lang.IllegalStateException
-addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait| Constructor and Description | -
|---|
Serial.Builder()
-Initial a
-Serial.Builder for serial port. |
-
Serial.Builder(java.lang.String port)
-Initial a
-Serial.Builder for serial port. |
-
Serial.Builder(java.lang.String port,
- int baudrate)
-Initial a
-Serial.Builder for serial port. |
-
| Modifier and Type | -Method and Description | -
|---|---|
Serial |
-create()
-Create the serial object with give parameters.
- |
-
Serial.Builder |
-setBaudrate(int baudrate) |
-
Serial.Builder |
-setBytesize(ByteSize bytesize) |
-
Serial.Builder |
-setFlowcontrol(FlowControl flowcontrol) |
-
Serial.Builder |
-setParity(Parity parity) |
-
Serial.Builder |
-setPort(java.lang.String port) |
-
Serial.Builder |
-setStopbits(Stopbits stopbits) |
-
Serial.Builder |
-setTimeout(Timeout timeout) |
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpublic Serial.Builder()-
Serial.Builder for serial port.public Serial.Builder(java.lang.String port)-
Serial.Builder for serial port.port - the path of the serial port.public Serial.Builder(java.lang.String port, - int baudrate)-
Serial.Builder for serial port.port - the path of the serial port.baudrate - the baudrate to use.public Serial.Builder setPort(java.lang.String port)-
Serial.setPort(String)public Serial.Builder setBaudrate(int baudrate)-
Serial.setBaudrate(int)public Serial.Builder setTimeout(Timeout timeout)-
Serial.setTimeout(Timeout)public Serial.Builder setBytesize(ByteSize bytesize)-
Serial.setBytesize(ByteSize)public Serial.Builder setParity(Parity parity)-
Serial.setParity(Parity)public Serial.Builder setStopbits(Stopbits stopbits)-
Serial.setStopbits(Stopbits)public Serial.Builder setFlowcontrol(FlowControl flowcontrol)-
Serial.setFlowcontrol(FlowControl)public Serial create() - throws SerialIOException-
Serial.SerialIOException - I/O error.public class Serial
-extends java.lang.Object
-implements java.io.Closeable
-| Modifier and Type | -Class and Description | -
|---|---|
static class |
-Serial.Builder
-Builder for
-Serial. |
-
| Modifier and Type | -Field and Description | -
|---|---|
static int |
-BAUDRATE_110
-Baudrate 110 bits/s.
- |
-
static int |
-BAUDRATE_115200
-Baudrate 115200 bits/s.
- |
-
static int |
-BAUDRATE_1200
-Baudrate 1200 bits/s.
- |
-
static int |
-BAUDRATE_128000
-Baudrate 128000 bits/s.
- |
-
static int |
-BAUDRATE_14400
-Baudrate 14400 bits/s.
- |
-
static int |
-BAUDRATE_153600
-Baudrate 153600 bits/s.
- |
-
static int |
-BAUDRATE_230400
-Baudrate 230400 bits/s.
- |
-
static int |
-BAUDRATE_2400
-Baudrate 2400 bits/s.
- |
-
static int |
-BAUDRATE_256000
-Baudrate 256000 bits/s.
- |
-
static int |
-BAUDRATE_28800
-Baudrate 28800 bits/s.
- |
-
static int |
-BAUDRATE_300
-Baudrate 300 bits/s.
- |
-
static int |
-BAUDRATE_38400
-Baudrate 38400 bits/s.
- |
-
static int |
-BAUDRATE_460800
-Baudrate 460800 bits/s.
- |
-
static int |
-BAUDRATE_4800
-Baudrate 4800 bits/s.
- |
-
static int |
-BAUDRATE_56000
-Baudrate 56000 bits/s.
- |
-
static int |
-BAUDRATE_57600
-Baudrate 57600 bits/s.
- |
-
static int |
-BAUDRATE_600
-Baudrate 600 bits/s.
- |
-
static int |
-BAUDRATE_921600
-Baudrate 921600 bits/s.
- |
-
static int |
-BAUDRATE_9600
-Baudrate 9600 bits/s.
- |
-
static java.nio.charset.Charset |
-CHARSET_DEFAULT
-Default charset.
- |
-
static java.nio.charset.Charset |
-CHARSET_ISO_8859_1
-ISO-8859-1 charset.
- |
-
static java.nio.charset.Charset |
-CHARSET_US_ASCII
-US-ASCII charset.
- |
-
static java.nio.charset.Charset |
-CHARSET_UTF16
-UTF-16 charset.
- |
-
static java.nio.charset.Charset |
-CHARSET_UTF16BE
-UTF-16BE charset.
- |
-
static java.nio.charset.Charset |
-CHARSET_UTF16LE
-UTF-16LE charset.
- |
-
static java.nio.charset.Charset |
-CHARSET_UTF8
-UTF-8 charset.
- |
-
static java.lang.String |
-EOL_CR
-End-of-line: carriage-return (\n).
- |
-
static java.lang.String |
-EOL_CRLF
-End-of-line: CR & LF (\r\n).
- |
-
static java.lang.String |
-EOL_LF
-End-of-line: line-feed (\n).
- |
-
| Modifier and Type | -Method and Description | -
|---|---|
int |
-available()
-Return the number of characters in the buffer.
- |
-
void |
-close()
-Closes the serial port.
- |
-
protected void |
-finalize() |
-
void |
-flush()
-Flush the input and output buffers
- |
-
void |
-flushInput()
-Flush only the input buffer
- |
-
void |
-flushOutput()
-Flush only the output buffer
- |
-
int |
-getBaudrate()
-Gets the baudrate for the serial port.
- |
-
ByteSize |
-getBytesize()
-Gets the bytesize for the serial port.
- |
-
boolean |
-getCD()
-Returns the current status of the CD line.
- |
-
boolean |
-getCTS() |
-
boolean |
-getDSR()
-Returns the current status of the DSR line.
- |
-
FlowControl |
-getFlowcontrol()
-Gets the flow control for the serial port.
- |
-
Parity |
-getParity()
-Gets the parity for the serial port.
- |
-
java.lang.String |
-getPort()
-Gets the serial port identifier.
- |
-
boolean |
-getRI()
-Returns the current status of the RI line.
- |
-
Stopbits |
-getStopbits()
-Gets the stopbits for the serial port.
- |
-
Timeout |
-getTimeout()
-Gets the timeout for reads in seconds.
- |
-
boolean |
-isOpen()
-Gets the open status of the serial port.
- |
-
boolean |
-isValid()
-Determine whether this instance has a valid port.
- |
-
static PortInfo[] |
-listPorts()
-List available ports on this device.
- |
-
void |
-open()
-Opens the serial port as long as the port is set and the port isn't
- already open.
- |
-
byte[] |
-read()
-Read all data available from the serial port.
- |
-
int |
-read(byte[] buffer,
- int offset,
- int size)
-Read a given amount of bytes from the serial port into a given buffer.
- |
-
int |
-read(java.nio.ByteBuffer buffer,
- int size)
-Read a given amount of bytes from the serial port into a give buffer.
- |
-
java.lang.String |
-read(int size,
- java.nio.charset.Charset charset)
-Read a given amount of bytes from the serial port and return a string
- containing the data.
- |
-
int |
-read(java.lang.StringBuilder buffer,
- int size,
- java.nio.charset.Charset charset)
-Read a given amount of bytes from the serial port into a give buffer.
- |
-
java.lang.String |
-readline(int size,
- java.lang.String eol)
-Reads in a line or until a given delimiter has been processed.
- |
-
int |
-readline(java.lang.StringBuilder buffer,
- int size,
- java.lang.String eol)
-Reads in a line or until a given delimiter has been processed.
- |
-
java.lang.String[] |
-readlines(int size,
- java.lang.String eol)
-Reads in multiple lines until the serial port times out.
- |
-
void |
-sendBreak(int duration)
-Sends the RS-232 break signal.
- |
-
void |
-setBaudrate(int baudrate)
-Sets the baudrate for the serial port.
- |
-
void |
-setBreak()
-Set the break condition to true level.
- |
-
void |
-setBreak(boolean level)
-Set the break condition to a given level.
- |
-
void |
-setBytesize(ByteSize bytesize)
-Sets the bytesize for the serial port.
- |
-
void |
-setDTR()
-Set the DTR handshaking line to the given level.
- |
-
void |
-setDTR(boolean level)
-Set the DTR handshaking line to the given level.
- |
-
void |
-setFlowcontrol(FlowControl flowcontrol)
-Sets the flow control for the serial port.
- |
-
void |
-setParity(Parity parity)
-Sets the parity for the serial port.
- |
-
void |
-setPort(java.lang.String port)
-Sets the serial port identifier.
- |
-
void |
-setRTS()
-Set the RTS handshaking line to the true level.
- |
-
void |
-setRTS(boolean level)
-Set the RTS handshaking line to the given level.
- |
-
void |
-setStopbits(Stopbits stopbits)
-Sets the stopbits for the serial port.
- |
-
void |
-setTimeout(int inter_byte_timeout,
- int read_timeout_constant,
- int read_timeout_multiplier,
- int write_timeout_constant,
- int write_timeout_multiplier)
-Sets the timeout for reads and writes.
- |
-
void |
-setTimeout(Timeout timeout)
-Sets the timeout for reads and writes using the Timeout struct.
- |
-
void |
-waitByteTimes(int count)
-Block for a period of time corresponding to the transmission time of
- count characters at present serial settings.
- |
-
boolean |
-waitForChange()
-Blocks until CTS, DSR, RI, CD changes or something interrupts it.
- |
-
boolean |
-waitReadable()
-Block until there is serial data to read or read_timeout_constant
- number of milliseconds have elapsed.
- |
-
int |
-write(byte[] data,
- int size)
-Write a string to the serial port.
- |
-
int |
-write(java.lang.String s)
-Write a string to the serial port.
- |
-
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpublic static final int BAUDRATE_110-
public static final int BAUDRATE_300-
public static final int BAUDRATE_600-
public static final int BAUDRATE_1200-
public static final int BAUDRATE_2400-
public static final int BAUDRATE_4800-
public static final int BAUDRATE_9600-
public static final int BAUDRATE_14400-
public static final int BAUDRATE_28800-
public static final int BAUDRATE_38400-
public static final int BAUDRATE_56000-
public static final int BAUDRATE_57600-
public static final int BAUDRATE_115200-
public static final int BAUDRATE_128000-
public static final int BAUDRATE_153600-
public static final int BAUDRATE_230400-
public static final int BAUDRATE_256000-
public static final int BAUDRATE_460800-
public static final int BAUDRATE_921600-
public static final java.lang.String EOL_LF-
public static final java.lang.String EOL_CR-
public static final java.lang.String EOL_CRLF-
public static final java.nio.charset.Charset CHARSET_DEFAULT-
public static final java.nio.charset.Charset CHARSET_UTF8-
public static final java.nio.charset.Charset CHARSET_ISO_8859_1-
public static final java.nio.charset.Charset CHARSET_US_ASCII-
public static final java.nio.charset.Charset CHARSET_UTF16-
public static final java.nio.charset.Charset CHARSET_UTF16LE-
public static final java.nio.charset.Charset CHARSET_UTF16BE-
public static PortInfo[] listPorts()-
protected void finalize() - throws java.lang.Throwable-
finalize in class java.lang.Objectjava.lang.Throwablepublic boolean isValid()-
public void open() - throws SerialIOException-
SerialException - Generic serial error.SerialIOException - I/O error.java.lang.IllegalArgumentException - Invalid arguments are given.Serial(String, int, Timeout, ByteSize, Parity, Stopbits, FlowControl)public boolean isOpen()-
public void close() - throws java.io.IOException-
close in interface java.io.Closeableclose in interface java.lang.AutoCloseablejava.io.IOException - I/O error.public int available() - throws SerialIOException-
SerialIOException - I/O Error.public boolean waitReadable() - throws SerialIOException-
SerialIOException - I/O Error.public void waitByteTimes(int count)-
public int read(byte[] buffer, - int offset, - int size) - throws SerialIOException-
buffer - An array of at least the requested size.offset - the offset of the buffer to receive data.size - how many bytes to be read.SerialIOException - I/O Error.public byte[] read() - throws SerialIOException-
SerialIOException - I/O Error.public int read(java.nio.ByteBuffer buffer, - int size) - throws SerialIOException-
buffer - A reference to a std::vector of uint8_t.size - A size_t defining how many bytes to be read.SerialIOException - I/O Error.public int read(java.lang.StringBuilder buffer, - int size, - java.nio.charset.Charset charset) - throws SerialIOException-
buffer - A reference to a std::string.size - A size_t defining how many bytes to be read.charset - The charset of the data.SerialIOException - I/O Error.public java.lang.String read(int size, - java.nio.charset.Charset charset) - throws SerialIOException-
size - A size_t defining how many bytes to be read.SerialIOException - I/O Error.public int readline(java.lang.StringBuilder buffer, - int size, - java.lang.String eol) - throws SerialIOException-
buffer - A std::string reference used to store the data.size - A maximum length of a line, defaults to 65536 (2^16)eol - A string to match against for the EOL.SerialIOException - I/O Error.public java.lang.String readline(int size, - java.lang.String eol) - throws SerialIOException-
size - A maximum length of a line, defaults to 65536 (2^16)eol - A string to match against for the EOL.SerialIOException - I/O Error.public java.lang.String[] readlines(int size, - java.lang.String eol) - throws SerialIOException-
size - A maximum length of combined lines, defaults to 65536 (2^16)eol - A string to match against for the EOL.SerialIOException - I/O Error.public int write(byte[] data, - int size) - throws SerialIOException-
data - A const reference containing the data to be written
- to the serial port.size - A size_t that indicates how many bytes should be written from
- the given data buffer.SerialIOException - I/O Error.public int write(java.lang.String s) - throws SerialIOException-
s - A const reference containing the data to be written
- to the serial port.SerialIOException - I/O Error.public void setPort(java.lang.String port)-
port - A const std::string reference containing the address of the
- serial port, which would be something like 'COM1' on Windows and
- '/dev/ttyS0' on Linux.java.lang.IllegalArgumentExceptionpublic java.lang.String getPort()-
setPort(String)public void setTimeout(Timeout timeout)-
timeout - A serial::Timeout struct containing the inter byte
- timeout, and the read and write timeout constants and multipliers.Timeoutpublic void setTimeout(int inter_byte_timeout, - int read_timeout_constant, - int read_timeout_multiplier, - int write_timeout_constant, - int write_timeout_multiplier)-
public Timeout getTimeout()-
setTimeout(Timeout)public void setBaudrate(int baudrate) - throws SerialIOException-
baudrate - An integer that sets the baud rate for the serial port.SerialIOException - I/O Error.public int getBaudrate()-
setBaudrate(int)public void setBytesize(ByteSize bytesize) - throws SerialIOException-
bytesize - Size of each byte in the serial transmission of data,
- default is eightbits, possible values are: fivebits, sixbits, sevenbits,
- eightbitsSerialIOException - I/O Error.public ByteSize getBytesize()-
setBytesize(ByteSize)public void setParity(Parity parity) - throws SerialIOException-
parity - Method of parity, default is parity_none, possible values
- are: parity_none, parity_odd, parity_evenSerialIOException - I/O Error.public Parity getParity()-
setParity(Parity)public void setStopbits(Stopbits stopbits) - throws SerialIOException-
stopbits - Number of stop bits used, default is stopbits_one,
- possible values are: stopbits_one, stopbits_one_point_five, stopbits_twoSerialIOException - I/O Error.public Stopbits getStopbits()-
setStopbits(Stopbits)public void setFlowcontrol(FlowControl flowcontrol) - throws SerialIOException-
flowcontrol - Type of flowcontrol used, default is flowcontrol_none,
- possible values are: flowcontrol_none, flowcontrol_software,
- flowcontrol_hardwareSerialIOException - I/O Error.public FlowControl getFlowcontrol()-
setFlowcontrol(FlowControl)public void flush()-
public void flushInput()-
public void flushOutput()-
public void sendBreak(int duration)-
public void setBreak(boolean level)-
public void setBreak()-
public void setRTS(boolean level)-
public void setRTS()-
public void setDTR(boolean level)-
public void setDTR()-
public boolean waitForChange()-
SerialExceptionpublic boolean getCTS()-
public boolean getDSR()-
public boolean getRI()-
public boolean getCD()-
public class SerialException
-extends java.lang.RuntimeException
-| Constructor and Description | -
|---|
SerialException(java.lang.String detailMessage)
-Constructs a new
-SerialException with the current stack trace
- and the specified detail message. |
-
SerialException(java.lang.String detailMessage,
- java.lang.Throwable throwable)
-Constructs a new
-PortNotOpenedException with the current stack trace,
- the specified detail message and the specified cause. |
-
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic SerialException(java.lang.String detailMessage)-
SerialException with the current stack trace
- and the specified detail message.detailMessage - the detail message for this exception.public SerialException(java.lang.String detailMessage, - java.lang.Throwable throwable)-
PortNotOpenedException with the current stack trace,
- the specified detail message and the specified cause.detailMessage - the detail message for this exception.throwable - public class SerialIOException
-extends java.io.IOException
-| Constructor and Description | -
|---|
SerialIOException(java.lang.String detailMessage)
-Constructs a new
-SerialIOException with its stack trace and detail
- message filled in. |
-
SerialIOException(java.lang.String message,
- java.lang.Throwable cause)
-Constructs a new instance of this class with detail message and cause
- filled in.
- |
-
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic SerialIOException(java.lang.String detailMessage)-
SerialIOException with its stack trace and detail
- message filled in.detailMessage - the detail message for this exception.public SerialIOException(java.lang.String message, - java.lang.Throwable cause)-
message - The detail message for the exception.cause - The detail cause for the exception.| Enum Constant and Description | -
|---|
One
-Use 1 as stop bit.
- |
-
OnePointFive
-Use 1.5 as stopbit.
- |
-
Two
-Use 2 as stop bit.
- |
-
| Modifier and Type | -Field and Description | -
|---|---|
int |
-value
-Internal value of the enumeration.
- |
-
| Modifier and Type | -Method and Description | -
|---|---|
static Stopbits |
-valueOf(java.lang.String name)
-Returns the enum constant of this type with the specified name.
- |
-
static Stopbits[] |
-values()
-Returns an array containing the constants of this enum type, in
-the order they are declared.
- |
-
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOfgetClass, notify, notifyAll, wait, wait, waitpublic static final Stopbits One-
public static final Stopbits Two-
public static final Stopbits OnePointFive-
public final int value-
public static Stopbits[] values()-
-for (Stopbits c : Stopbits.values()) - System.out.println(c); -
public static Stopbits valueOf(java.lang.String name)-
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is nullpublic final class Timeout
-extends java.lang.Object
-MAX.| Modifier and Type | -Field and Description | -
|---|---|
static int |
-MAX
-Value that represents interbyte timeout should be disabled.
- |
-
| Constructor and Description | -
|---|
Timeout() |
-
Timeout(int timeout)
-Convenience function to generate Timeout structs using a
- single absolute timeout.
- |
-
Timeout(int inter_byte_timeout,
- int read_timeout_constant,
- int read_timeout_multiplier,
- int write_timeout_constant,
- int write_timeout_multiplier) |
-
| Modifier and Type | -Method and Description | -
|---|---|
static Timeout |
-simpleTimeout(int timeout)
-Convenience function to generate Timeout structs using a
- single absolute timeout.
- |
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpublic static final int MAX-
public Timeout()-
public Timeout(int timeout)-
timeout - A long that defines the time in milliseconds until a
- timeout occurs after a call to read or write is made.public Timeout(int inter_byte_timeout, - int read_timeout_constant, - int read_timeout_multiplier, - int write_timeout_constant, - int write_timeout_multiplier)-
public static final Timeout simpleTimeout(int timeout)-
timeout - A long that defines the time in milliseconds until a
- timeout occurs after a call to read or write is made.| Class | -Description | -
|---|---|
| Log | -
- Log replacement for
-android.util.Log. |
-
| PortInfo | -
- Created by chzhong on 1/20/16.
- |
-
| Serial | -
- Serial Port.
- |
-
| Serial.Builder | -
- Builder for
-Serial. |
-
| Timeout | -
- Structure for setting the timeout of the serial port, times are
- in milliseconds.
- |
-
| Enum | -Description | -
|---|---|
| ByteSize | -
- Enumeration defines the possible bytesizes for the serial port.
- |
-
| FlowControl | -
- Enumeration defines the possible flowcontrol types for the serial port.
- |
-
| Parity | -
- Enumeration defines the possible parity types for the serial port.
- |
-
| Stopbits | -
- Enumeration defines the possible stopbit types for the serial port.
- |
-
| Exception | -Description | -
|---|---|
| PortNotOpenedException | -
- Created by chzhong on 1/20/16.
- |
-
| SerialException | -
- Created by chzhong on 1/20/16.
- |
-
| SerialIOException | -
- Created by chzhong on 1/20/16.
- |
-