diff --git a/HelloSerial4j/.gitignore b/HelloSerial4j/.gitignore new file mode 100644 index 00000000..e69de29b diff --git a/HelloSerial4j/CommonVariables.sh b/HelloSerial4j/CommonVariables.sh new file mode 100644 index 00000000..5fbfb6b0 --- /dev/null +++ b/HelloSerial4j/CommonVariables.sh @@ -0,0 +1,36 @@ +#** +#* Ccoffee Build tool, manual build, alpha-v1. +#* +#* @author pavl_g. +#*# + +# Bash colors using ANSI +# favored the 24-bit (3 colors * 8-bit for each one<255>) color system +# Colors +# process failure color +RED_C='\033[38;2;255;50;50m' +# success color +GREEN_C='\e[38;2;0;180;0m' +# extra +WHITE_C='\e[38;2;255;255;255m' +# Java color +ORANGE_C='\e[38;2;250;155;0m' +# C alternative color +DARK_GREY_C='\e[1;30m' +# kotlin color +VIOLET_C='\e[38;2;217;80;223m' +# groovy color +CYAN_C='\e[38;2;0;155;255m' +# C++ color +MAGNETA_C='\e[38;2;170;150;150m' +# Scala color +BRIGHT_RED_C='\e[38;2;200;120;120m' +# Highlights +RED_H='\033[1;41m' +GREEN_H='\033[1;42m' +WHITE_H='\e[1;47m' +# Flashes +RED_C_F='\033[1;5;41m' +GREEN_C_F='\033[1;5;42m' +WHITE_C_F='\e[1;5;47m' +RESET_Cs='\033[0;0m' diff --git a/HelloSerial4j/HAL (Hardware abstraction layer) Architecture/Serial4j Architecture.docx b/HelloSerial4j/HAL (Hardware abstraction layer) Architecture/Serial4j Architecture.docx new file mode 100644 index 00000000..904328eb Binary files /dev/null and b/HelloSerial4j/HAL (Hardware abstraction layer) Architecture/Serial4j Architecture.docx differ diff --git a/HelloSerial4j/HAL (Hardware abstraction layer) Architecture/Serial4j Architecture.pdf b/HelloSerial4j/HAL (Hardware abstraction layer) Architecture/Serial4j Architecture.pdf new file mode 100644 index 00000000..a12fae1e Binary files /dev/null and b/HelloSerial4j/HAL (Hardware abstraction layer) Architecture/Serial4j Architecture.pdf differ diff --git a/HelloSerial4j/HAL (Hardware abstraction layer) Architecture/output.svg b/HelloSerial4j/HAL (Hardware abstraction layer) Architecture/output.svg new file mode 100644 index 00000000..963f5d1f --- /dev/null +++ b/HelloSerial4j/HAL (Hardware abstraction layer) Architecture/output.svg @@ -0,0 +1,1970 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HelloSerial4j/JAVAHOME.sh b/HelloSerial4j/JAVAHOME.sh new file mode 100644 index 00000000..e0647b92 --- /dev/null +++ b/HelloSerial4j/JAVAHOME.sh @@ -0,0 +1,13 @@ +#** +#* Ccoffee Build tool, manual build, alpha-v1. +#* @author pavl_g. +#*# +# DONOT DELETE OR RENAME +## EDIT YOUR CUSTOM JAVAHOME FROM HERE, Ccoffee uses this custom java home to create new aliases for your script ! +compile_dir=`pwd` +build_dir="${compile_dir%/*}" +project_dir="${build_dir%/*}" +root_dir="${project_dir%/*}" +JAVA__HOME=$root_dir'/jdk-19/bin' +export JAVA_HOME="${JAVA__HOME%/*}" + diff --git a/HelloSerial4j/NDKPATH.sh b/HelloSerial4j/NDKPATH.sh new file mode 100644 index 00000000..c1f983e0 --- /dev/null +++ b/HelloSerial4j/NDKPATH.sh @@ -0,0 +1,7 @@ +#** +#* Ccoffee Build tool, manual build, alpha-v1. +#* @author pavl_g. +#*# +# DONOT DELETE OR RENAME +## EDIT YOUR CUSTOM NDKBASEHOME FROM HERE, Ccoffee uses this custom NDK home to create new aliases for your script ! +NDK__BASEHOME=/home/twisted/Android/Sdk/ndk/21.1.6352462 diff --git a/HelloSerial4j/README.md b/HelloSerial4j/README.md new file mode 100644 index 00000000..9dfa302a --- /dev/null +++ b/HelloSerial4j/README.md @@ -0,0 +1,36 @@ +## The Serial4j Architectural HAL: + +![image](https://user-images.githubusercontent.com/60224159/189999625-fd667e7c-b219-4aa8-a91f-c9809dcef225.png) + +Serial4j is a terminal io library primarialy built on top of POSIX base file API `` for file control operations, `` for Unix std R/W operations and `` for directory entry dir operations. + +## Quick Overview: + +- Java Implementation of the binding library: + +| Entity/Class | Usages | +|---------------|----------------| +| `com.serial4j.core.serial` | A java package that provides the base implementation code for the serial4j API to control a terminal device. | +| `TerminalDevice.java` | A java class that provides a final implementation code for the `NativeTerminalDevice.java`, the api opens, initializes and R/W from/to a terminal device. | +| `Permissions.java` | A java class that provides the permissions for the terminal io operations. | +| `BaudRate.java` | A java enum class that provides the constants for the available POSIX termios bit speed. | +| `SerialPort.java` | A java wrapper class that wraps a serial port with a name and a port descriptor. | +| `ReadConfiguration.java` | A java enum class that provides an implementation for the various read configurations defined by the POSIX `termios-c_cc.h`. | +| `NativeTerminalDevice.java` | A java class that provides a base implementation for the Serial4j base native code. | +| | | +| `com.serial4j.core.control` | A java package that provides the terminal flags for the terminal device including control, local, input and output flags. | +| `TerminalFlag.java` | A java abstract class that provides the base implementation for a terminal flag. | +| `TerminalControlFlag.java` | A java class that provides an implementation for the POSIX terminal control mode flags, e.g: CREAD for receive enable, CS8 for charachter size 8-bits,...etc. | +| `TerminalLocalFlag.java` | A java class that provides an implementation for the POSIX terminal local mode flags, e.g: ECHO for enabling echoing charachters, ECHOCTL for enabling echoing control charachters visually on the terminal. | +| `TerminalInputFlag.java` | A java class that provides an implementation for the POSIX terminal input mode flags, e.g: IUTF8 for enabling utf-8 input, ICRNL for mapping (translating) CR into NL on input. | +| `TerminalOutputFlag.java` | A java class that provides an implementation for the POSIX terminal output mode flags, e.g: OCRNL for mapping (translating) CR to NL on output. | +| | | +| `com.serial4j.core.throwable` | A java package that provides java exceptions as translations to C native error codes. | + +- Java Binding library for the native API: + +- Direct Implementation of the POSIX base file/directory and terminal IO APIs: + + +- Unix/POSIX Base APIs: + diff --git a/HelloSerial4j/analysis of native error logs/example0/README.md b/HelloSerial4j/analysis of native error logs/example0/README.md new file mode 100644 index 00000000..e69de29b diff --git a/HelloSerial4j/analysis of native error logs/example0/hs_err_pid58096.log b/HelloSerial4j/analysis of native error logs/example0/hs_err_pid58096.log new file mode 100644 index 00000000..a8cf545b --- /dev/null +++ b/HelloSerial4j/analysis of native error logs/example0/hs_err_pid58096.log @@ -0,0 +1,630 @@ +# +# A fatal error has been detected by the Java Runtime Environment: +# +# SIGSEGV (0xb) at pc=0x00007fd15409ccd9, pid=58096, tid=0x00007fd13a56f700 +# +# JRE version: Java(TM) SE Runtime Environment (8.0_201-b09) (build 1.8.0_201-b09) +# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.201-b09 mixed mode linux-amd64 compressed oops) +# Problematic frame: +# C [libserial4j.so+0x4cd9] +# +# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again +# +# If you would like to submit a bug report, please visit: +# http://bugreport.java.com/bugreport/crash.jsp +# The crash happened outside the Java Virtual Machine in native code. +# See problematic frame for where to report the bug. +# + +--------------- T H R E A D --------------- + +Current thread (0x00007fd150251000): JavaThread "Thread-0" [_thread_in_native, id=58111, stack(0x00007fd13a46f000,0x00007fd13a570000)] + +siginfo: si_signo: 11 (SIGSEGV), si_code: 1 (SEGV_MAPERR), si_addr: 0x0000000000000000 + +Registers: +RAX=0x00007fd0f8002e20, RBX=0x0000000000000000, RCX=0x0000000000000520, RDX=0x0000000000000018 +RSP=0x00007fd13a56e7b0, RBP=0x00007fd13a56e7f0, RSI=0x00007fd0f80008d0, RDI=0x00007fd0f8002e10 +R8 =0x00007fd0f8002e20, R9 =0x00007fd0f8003350, R10=0x0000000000000000, R11=0x00007fd0f8000080 +R12=0x0000000000000000, R13=0x00007fd14063ad18, R14=0x00007fd13a56e900, R15=0x00007fd150251000 +RIP=0x00007fd15409ccd9, EFLAGS=0x0000000000010206, CSGSFS=0x002b000000000033, ERR=0x0000000000000006 + TRAPNO=0x000000000000000e + +Top of Stack: (sp=0x00007fd13a56e7b0) +0x00007fd13a56e7b0: 000000770000007c 00007fd1540a02bc +0x00007fd13a56e7c0: 00007fd1540a02b8 0000000000000000 +0x00007fd13a56e7d0: 00007fd0f8002d40 0000000100000000 +0x00007fd13a56e7e0: 00007fd1540a02bc 00007fd1540a02bc +0x00007fd13a56e7f0: 00007fd13a56e820 00007fd15409ce09 +0x00007fd13a56e800: 000000004063ad18 00007fd1540a02b8 +0x00007fd13a56e810: 00007fd14063ad18 00007fd14063ad18 +0x00007fd13a56e820: 00007fd13a56e860 00007fd15409b74e +0x00007fd13a56e830: 00007fd14063ad18 00007fd1540a0260 +0x00007fd13a56e840: 00007fd14063ad18 00007fd0f8002d40 +0x00007fd13a56e850: 0000000000000000 00007fd0f8003b30 +0x00007fd13a56e860: 00007fd13a56e880 00007fd15409c520 +0x00007fd13a56e870: 00007fd13a56e900 00007fd1502511f8 +0x00007fd13a56e880: 00007fd13a56e8e0 00007fd1410186c7 +0x00007fd13a56e890: fffffffe00000000 00007fd1410183e2 +0x00007fd13a56e8a0: 00007fd13a56e8a0 00007fd14063ad18 +0x00007fd13a56e8b0: 00007fd13a56e900 00007fd14063b538 +0x00007fd13a56e8c0: 0000000000000000 00007fd14063ad18 +0x00007fd13a56e8d0: 0000000000000000 00007fd13a56e900 +0x00007fd13a56e8e0: 00007fd13a56e948 00007fd141007d00 +0x00007fd13a56e8f0: 0000000000000000 00007fd141011d16 +0x00007fd13a56e900: 0000000781fe8170 00007fd13a56e908 +0x00007fd13a56e910: 00007fd140634866 00007fd13a56e960 +0x00007fd13a56e920: 00007fd140634d08 0000000000000000 +0x00007fd13a56e930: 00007fd140634890 00007fd13a56e900 +0x00007fd13a56e940: 00007fd13a56e960 00007fd13a56e9a8 +0x00007fd13a56e950: 00007fd1410082bd 0000000000000000 +0x00007fd13a56e960: 0000000781fe8148 00007fd13a56e968 +0x00007fd13a56e970: 00007fd140634051 00007fd13a56e9b8 +0x00007fd13a56e980: 00007fd140634d08 0000000000000000 +0x00007fd13a56e990: 00007fd140634078 00007fd13a56e960 +0x00007fd13a56e9a0: 00007fd13a56e9b8 00007fd13a56ea10 + +Instructions: (pc=0x00007fd15409ccd9) +0x00007fd15409ccb9: 98 48 8d 14 c5 00 00 00 00 48 8b 45 d8 48 8d 1c +0x00007fd15409ccc9: 02 be 08 00 00 00 bf 01 00 00 00 e8 57 e5 ff ff +0x00007fd15409ccd9: 48 89 03 8b 45 ec 48 98 48 8d 14 c5 00 00 00 00 +0x00007fd15409cce9: 48 8b 45 e0 48 01 d0 8b 55 e8 48 63 d2 48 8d 0c + +Register to memory mapping: + +RAX=0x00007fd0f8002e20 is an unknown value +RBX=0x0000000000000000 is an unknown value +RCX=0x0000000000000520 is an unknown value +RDX=0x0000000000000018 is an unknown value +RSP=0x00007fd13a56e7b0 is pointing into the stack for thread: 0x00007fd150251000 +RBP=0x00007fd13a56e7f0 is pointing into the stack for thread: 0x00007fd150251000 +RSI=0x00007fd0f80008d0 is an unknown value +RDI=0x00007fd0f8002e10 is an unknown value +R8 =0x00007fd0f8002e20 is an unknown value +R9 =0x00007fd0f8003350 is an unknown value +R10=0x0000000000000000 is an unknown value +R11=0x00007fd0f8000080 is an unknown value +R12=0x0000000000000000 is an unknown value +R13={method} {0x00007fd14063ad18} 'fetchSerialPorts0' '()I' in 'com/serial4j/core/serial/NativeTerminalDevice' +R14=0x00007fd13a56e900 is pointing into the stack for thread: 0x00007fd150251000 +R15=0x00007fd150251000 is a thread + + +Stack: [0x00007fd13a46f000,0x00007fd13a570000], sp=0x00007fd13a56e7b0, free space=1021k +Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) +C [libserial4j.so+0x4cd9] +C [libserial4j.so+0x4e09] DynamicBuffer::remove(int)+0x59 +C [libserial4j.so+0x374e] Terminal::TerminalDevice::fetchSerialPorts()+0x114 +C [libserial4j.so+0x4520] Java_com_serial4j_core_serial_NativeTerminalDevice_fetchSerialPorts0+0x1f +j com.serial4j.core.serial.NativeTerminalDevice.fetchSerialPorts0()I+0 +j com.serial4j.core.serial.TerminalDevice.fetchSerialPorts()V+22 +j com.serial4j.core.serial.TerminalDevice.getSerialPorts()[Ljava/lang/String;+1 +j com.serial4j.example.HelloNativeSerial4J.run()V+356 +v ~StubRoutines::call_stub +V [libjvm.so+0x68825b] JavaCalls::call_helper(JavaValue*, methodHandle*, JavaCallArguments*, Thread*)+0xddb +V [libjvm.so+0x685b23] JavaCalls::call_virtual(JavaValue*, KlassHandle, Symbol*, Symbol*, JavaCallArguments*, Thread*)+0x263 +V [libjvm.so+0x6860e7] JavaCalls::call_virtual(JavaValue*, Handle, KlassHandle, Symbol*, Symbol*, Thread*)+0x47 +V [libjvm.so+0x6f225c] thread_entry(JavaThread*, Thread*)+0x6c +V [libjvm.so+0xa7bb6b] JavaThread::thread_main_inner()+0xdb +V [libjvm.so+0xa7be71] JavaThread::run()+0x2d1 +V [libjvm.so+0x90d922] java_start(Thread*)+0x102 +C [libpthread.so.0+0x8f27] start_thread+0xd7 + +Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) +j com.serial4j.core.serial.NativeTerminalDevice.fetchSerialPorts0()I+0 +j com.serial4j.core.serial.TerminalDevice.fetchSerialPorts()V+22 +j com.serial4j.core.serial.TerminalDevice.getSerialPorts()[Ljava/lang/String;+1 +j com.serial4j.example.HelloNativeSerial4J.run()V+356 +v ~StubRoutines::call_stub + +--------------- P R O C E S S --------------- + +Java Threads: ( => current thread ) +=>0x00007fd150251000 JavaThread "Thread-0" [_thread_in_native, id=58111, stack(0x00007fd13a46f000,0x00007fd13a570000)] + 0x00007fd150195000 JavaThread "Service Thread" daemon [_thread_blocked, id=58109, stack(0x00007fd13a671000,0x00007fd13a772000)] + 0x00007fd15018a000 JavaThread "C1 CompilerThread2" daemon [_thread_blocked, id=58108, stack(0x00007fd13a773000,0x00007fd13a873000)] + 0x00007fd150188000 JavaThread "C2 CompilerThread1" daemon [_thread_blocked, id=58107, stack(0x00007fd13a874000,0x00007fd13a974000)] + 0x00007fd150185000 JavaThread "C2 CompilerThread0" daemon [_thread_blocked, id=58106, stack(0x00007fd13a975000,0x00007fd13aa75000)] + 0x00007fd150184000 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=58105, stack(0x00007fd13aa75000,0x00007fd13ab76000)] + 0x00007fd15014c800 JavaThread "Finalizer" daemon [_thread_blocked, id=58104, stack(0x00007fd13adee000,0x00007fd13aeef000)] + 0x00007fd15014a000 JavaThread "Reference Handler" daemon [_thread_blocked, id=58103, stack(0x00007fd13aeef000,0x00007fd13aff0000)] + 0x00007fd15000b000 JavaThread "main" [_thread_blocked, id=58097, stack(0x00007fd155a79000,0x00007fd155b79000)] + +Other Threads: + 0x00007fd150140000 VMThread [stack: 0x00007fd13aff1000,0x00007fd13b0f1000] [id=58102] + 0x00007fd150197800 WatcherThread [stack: 0x00007fd13a571000,0x00007fd13a671000] [id=58110] + +VM state:not at safepoint (normal execution) + +VM Mutex/Monitor currently owned by a thread: None + +heap address: 0x0000000705c00000, size: 2980 MB, Compressed Oops mode: Zero based, Oop shift amount: 3 +Narrow klass base: 0x0000000000000000, Narrow klass shift: 3 +Compressed class space size: 1073741824 Address: 0x00000007c0000000 + +Heap: + PSYoungGen total 56320K, used 2918K [0x0000000781f00000, 0x0000000785d80000, 0x00000007c0000000) + eden space 48640K, 6% used [0x0000000781f00000,0x00000007821d99d0,0x0000000784e80000) + from space 7680K, 0% used [0x0000000785600000,0x0000000785600000,0x0000000785d80000) + to space 7680K, 0% used [0x0000000784e80000,0x0000000784e80000,0x0000000785600000) + ParOldGen total 128512K, used 0K [0x0000000705c00000, 0x000000070d980000, 0x0000000781f00000) + object space 128512K, 0% used [0x0000000705c00000,0x0000000705c00000,0x000000070d980000) + Metaspace used 3115K, capacity 4664K, committed 4864K, reserved 1056768K + class space used 350K, capacity 424K, committed 512K, reserved 1048576K + +Card table byte_map: [0x00007fd154a35000,0x00007fd155008000] byte_map_base: 0x00007fd151207000 + +Marking Bits: (ParMarkBitMap*) 0x00007fd156c89d80 + Begin Bits: [0x00007fd1262e0000, 0x00007fd129170000) + End Bits: [0x00007fd129170000, 0x00007fd12c000000) + +Polling page: 0x00007fd1570f0000 + +CodeCache: size=245760Kb used=1178Kb max_used=1178Kb free=244581Kb + bounds [0x00007fd141000000, 0x00007fd141270000, 0x00007fd150000000] + total_blobs=290 nmethods=54 adapters=150 + compilation: enabled + +Compilation events (10 events): +Event: 0.097 Thread 0x00007fd15018a000 50 3 java.lang.String:: (10 bytes) +Event: 0.097 Thread 0x00007fd15018a000 nmethod 50 0x00007fd141125650 code [0x00007fd1411257c0, 0x00007fd141125990] +Event: 0.098 Thread 0x00007fd15018a000 53 3 java.util.Arrays::copyOf (19 bytes) +Event: 0.098 Thread 0x00007fd15018a000 nmethod 53 0x00007fd141125a50 code [0x00007fd141125be0, 0x00007fd141125f08] +Event: 0.098 Thread 0x00007fd15018a000 51 3 java.lang.StringBuilder:: (7 bytes) +Event: 0.099 Thread 0x00007fd15018a000 nmethod 51 0x00007fd141126210 code [0x00007fd141126380, 0x00007fd141126630] +Event: 0.099 Thread 0x00007fd15018a000 52 3 java.lang.StringBuilder::toString (17 bytes) +Event: 0.099 Thread 0x00007fd15018a000 nmethod 52 0x00007fd141126750 code [0x00007fd1411268c0, 0x00007fd141126ac8] +Event: 0.099 Thread 0x00007fd15018a000 54 1 java.util.zip.ZipFile::access$000 (5 bytes) +Event: 0.099 Thread 0x00007fd15018a000 nmethod 54 0x00007fd141126b90 code [0x00007fd141126ce0, 0x00007fd141126dd0] + +GC Heap History (0 events): +No events + +Deoptimization events (0 events): +No events + +Classes redefined (0 events): +No events + +Internal exceptions (6 events): +Event: 0.031 Thread 0x00007fd15000b000 Exception (0x0000000781f07cb0) thrown at [/HUDSON/workspace/8-2-build-linux-amd64/jdk8u201/12317/hotspot/src/sh +Event: 0.031 Thread 0x00007fd15000b000 Exception (0x0000000781f07f98) thrown at [/HUDSON/workspace/8-2-build-linux-amd64/jdk8u201/12317/hotspot/src/share/vm/prims/jni.c +Event: 0.088 Thread 0x00007fd15000b000 Exception (0x0000000781fc0720) thrown at [/HUDSON/workspace/8-2-build-linux-amd64/jdk8u201/12317/hotspot/src/share/vm/prims/jvm.cpp, line 1502] +Event: 0.088 Thread 0x00007fd15000b000 Exception (0x0000000781fc0930) thrown at [/HUDSON/workspace/8-2-build-linux-amd64/jdk8u201/12317/hotspot/src/share/vm/prims/jvm.cpp, line 1502] +Event: 0.089 Thread 0x00007fd15000b000 Exception (0x0000000781fc2d98) thrown at [/HUDSON/workspace/8-2-build-linux-amd64/jdk8u201/12317/hotspot/src/share/vm/prims/jvm.cpp, line 1502] +Event: 0.089 Thread 0x00007fd15000b000 Exception (0x0000000781fc2fa8) thrown at [/HUDSON/workspace/8-2-build-linux-amd64/jdk8u201/12317/hotspot/src/share/vm/prims/jvm.cpp, line 1502] + +Events (10 events): +Event: 0.095 loading class com/serial4j/core/serial/control/TerminalLocalFlag +Event: 0.095 loading class com/serial4j/core/serial/control/TerminalLocalFlag done +Event: 0.096 loading class com/serial4j/core/serial/control/TerminalOutputFlag +Event: 0.096 loading class com/serial4j/core/serial/control/TerminalOutputFlag done +Event: 0.096 loading class com/serial4j/core/serial/control/TerminalInputFlag +Event: 0.096 loading class com/serial4j/core/serial/control/TerminalInputFlag done +Event: 0.097 loading class com/serial4j/core/serial/BaudRate +Event: 0.097 loading class com/serial4j/core/serial/BaudRate done +Event: 0.098 loading class com/serial4j/core/serial/ReadConfiguration +Event: 0.098 loading class com/serial4j/core/serial/ReadConfiguration done + + +Dynamic libraries: +00400000-00401000 r-xp 00000000 08:0b 8396377 /home/twisted/jdk1.8.0_201/bin/java +00600000-00601000 r--p 00000000 08:0b 8396377 /home/twisted/jdk1.8.0_201/bin/java +00601000-00602000 rw-p 00001000 08:0b 8396377 /home/twisted/jdk1.8.0_201/bin/java +01e92000-01eb3000 rw-p 00000000 00:00 0 [heap] +705c00000-70d980000 rw-p 00000000 00:00 0 +70d980000-781f00000 ---p 00000000 00:00 0 +781f00000-785d80000 rw-p 00000000 00:00 0 +785d80000-7c0000000 ---p 00000000 00:00 0 +7c0000000-7c0080000 rw-p 00000000 00:00 0 +7c0080000-800000000 ---p 00000000 00:00 0 +7fd0f8000000-7fd0f8021000 rw-p 00000000 00:00 0 +7fd0f8021000-7fd0fc000000 ---p 00000000 00:00 0 +7fd100000000-7fd100021000 rw-p 00000000 00:00 0 +7fd100021000-7fd104000000 ---p 00000000 00:00 0 +7fd104000000-7fd104021000 rw-p 00000000 00:00 0 +7fd104021000-7fd108000000 ---p 00000000 00:00 0 +7fd108000000-7fd108021000 rw-p 00000000 00:00 0 +7fd108021000-7fd10c000000 ---p 00000000 00:00 0 +7fd10c000000-7fd10c142000 rw-p 00000000 00:00 0 +7fd10c142000-7fd110000000 ---p 00000000 00:00 0 +7fd110000000-7fd110021000 rw-p 00000000 00:00 0 +7fd110021000-7fd114000000 ---p 00000000 00:00 0 +7fd114000000-7fd114066000 rw-p 00000000 00:00 0 +7fd114066000-7fd118000000 ---p 00000000 00:00 0 +7fd118000000-7fd118021000 rw-p 00000000 00:00 0 +7fd118021000-7fd11c000000 ---p 00000000 00:00 0 +7fd11c000000-7fd11c021000 rw-p 00000000 00:00 0 +7fd11c021000-7fd120000000 ---p 00000000 00:00 0 +7fd120000000-7fd120021000 rw-p 00000000 00:00 0 +7fd120021000-7fd124000000 ---p 00000000 00:00 0 +7fd1262e0000-7fd12c000000 rw-p 00000000 00:00 0 +7fd12c000000-7fd12c021000 rw-p 00000000 00:00 0 +7fd12c021000-7fd130000000 ---p 00000000 00:00 0 +7fd130000000-7fd130021000 rw-p 00000000 00:00 0 +7fd130021000-7fd134000000 ---p 00000000 00:00 0 +7fd134000000-7fd134021000 rw-p 00000000 00:00 0 +7fd134021000-7fd138000000 ---p 00000000 00:00 0 +7fd13a1da000-7fd13a46f000 rw-p 00000000 00:00 0 +7fd13a46f000-7fd13a472000 ---p 00000000 00:00 0 +7fd13a472000-7fd13a570000 rw-p 00000000 00:00 0 +7fd13a570000-7fd13a571000 ---p 00000000 00:00 0 +7fd13a571000-7fd13a671000 rw-p 00000000 00:00 0 +7fd13a671000-7fd13a674000 ---p 00000000 00:00 0 +7fd13a674000-7fd13a772000 rw-p 00000000 00:00 0 +7fd13a772000-7fd13a773000 ---p 00000000 00:00 0 +7fd13a773000-7fd13a776000 ---p 00000000 00:00 0 +7fd13a776000-7fd13a873000 rw-p 00000000 00:00 0 +7fd13a873000-7fd13a874000 ---p 00000000 00:00 0 +7fd13a874000-7fd13a877000 ---p 00000000 00:00 0 +7fd13a877000-7fd13a974000 rw-p 00000000 00:00 0 +7fd13a974000-7fd13a975000 ---p 00000000 00:00 0 +7fd13a975000-7fd13a978000 ---p 00000000 00:00 0 +7fd13a978000-7fd13aa75000 rw-p 00000000 00:00 0 +7fd13aa75000-7fd13aa78000 ---p 00000000 00:00 0 +7fd13aa78000-7fd13ab76000 rw-p 00000000 00:00 0 +7fd13ab76000-7fd13adee000 r--p 00000000 08:0a 4328903 /usr/lib/locale/aa_DJ.utf8/LC_COLLATE +7fd13adee000-7fd13adf1000 ---p 00000000 00:00 0 +7fd13adf1000-7fd13aeef000 rw-p 00000000 00:00 0 +7fd13aeef000-7fd13aef2000 ---p 00000000 00:00 0 +7fd13aef2000-7fd13aff0000 rw-p 00000000 00:00 0 +7fd13aff0000-7fd13aff1000 ---p 00000000 00:00 0 +7fd13aff1000-7fd13c000000 rw-p 00000000 00:00 0 +7fd13c000000-7fd13c021000 rw-p 00000000 00:00 0 +7fd13c021000-7fd140000000 ---p 00000000 00:00 0 +7fd140054000-7fd14022e000 r--s 03d6f000 08:0b 8543644 /home/twisted/jdk1.8.0_201/jre/lib/rt.jar +7fd14022e000-7fd14066e000 rw-p 00000000 00:00 0 +7fd14066e000-7fd140a2e000 ---p 00000000 00:00 0 +7fd140a2e000-7fd141000000 rw-p 00000000 00:00 0 +7fd141000000-7fd141270000 rwxp 00000000 00:00 0 +7fd141270000-7fd150000000 ---p 00000000 00:00 0 +7fd150000000-7fd150253000 rw-p 00000000 00:00 0 +7fd150253000-7fd154000000 ---p 00000000 00:00 0 +7fd154098000-7fd15409b000 r--p 00000000 08:0b 8530741 /home/twisted/GradleProjects/AVR-Sandbox/HelloSerial4j/output/serial4j/libserial4j.so +7fd15409b000-7fd15409d000 r-xp 00003000 08:0b 8530741 /home/twisted/GradleProjects/AVR-Sandbox/HelloSerial4j/output/serial4j/libserial4j.so +7fd15409d000-7fd15409f000 r--p 00005000 08:0b 8530741 /home/twisted/GradleProjects/AVR-Sandbox/HelloSerial4j/output/serial4j/libserial4j.so +7fd15409f000-7fd1540a0000 r--p 00006000 08:0b 8530741 /home/twisted/GradleProjects/AVR-Sandbox/HelloSerial4j/output/serial4j/libserial4j.so +7fd1540a0000-7fd1540a1000 rw-p 00007000 08:0b 8530741 /home/twisted/GradleProjects/AVR-Sandbox/HelloSerial4j/output/serial4j/libserial4j.so +7fd1540a1000-7fd1540f4000 r--p 00000000 08:0a 4328904 /usr/lib/locale/aa_DJ.utf8/LC_CTYPE +7fd1540f4000-7fd15424f000 rw-p 00000000 00:00 0 +7fd15424f000-7fd154250000 ---p 00000000 00:00 0 +7fd154250000-7fd154350000 rw-p 00000000 00:00 0 +7fd154350000-7fd154351000 ---p 00000000 00:00 0 +7fd154351000-7fd154451000 rw-p 00000000 00:00 0 +7fd154451000-7fd154452000 ---p 00000000 00:00 0 +7fd154452000-7fd154552000 rw-p 00000000 00:00 0 +7fd154552000-7fd154553000 ---p 00000000 00:00 0 +7fd154553000-7fd154692000 rw-p 00000000 00:00 0 +7fd154692000-7fd154a35000 ---p 00000000 00:00 0 +7fd154a35000-7fd154a74000 rw-p 00000000 00:00 0 +7fd154a74000-7fd154e16000 ---p 00000000 00:00 0 +7fd154e16000-7fd154e36000 rw-p 00000000 00:00 0 +7fd154e36000-7fd155007000 ---p 00000000 00:00 0 +7fd155007000-7fd155012000 rw-p 00000000 00:00 0 +7fd155012000-7fd1553c8000 ---p 00000000 00:00 0 +7fd1553c8000-7fd1553e3000 r-xp 00000000 08:0b 8782383 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libzip.so +7fd1553e3000-7fd1555e2000 ---p 0001b000 08:0b 8782383 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libzip.so +7fd1555e2000-7fd1555e3000 r--p 0001a000 08:0b 8782383 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libzip.so +7fd1555e3000-7fd1555e4000 rw-p 0001b000 08:0b 8782383 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libzip.so +7fd1555e4000-7fd1555e7000 r--p 00000000 08:0a 4334780 /usr/lib/x86_64-linux-gnu/libnss_files-2.30.so +7fd1555e7000-7fd1555ee000 r-xp 00003000 08:0a 4334780 /usr/lib/x86_64-linux-gnu/libnss_files-2.30.so +7fd1555ee000-7fd1555f0000 r--p 0000a000 08:0a 4334780 /usr/lib/x86_64-linux-gnu/libnss_files-2.30.so +7fd1555f0000-7fd1555f1000 r--p 0000b000 08:0a 4334780 /usr/lib/x86_64-linux-gnu/libnss_files-2.30.so +7fd1555f1000-7fd1555f2000 rw-p 0000c000 08:0a 4334780 /usr/lib/x86_64-linux-gnu/libnss_files-2.30.so +7fd1555f2000-7fd1555f8000 rw-p 00000000 00:00 0 +7fd1555f8000-7fd1555fd000 r--p 00000000 08:0a 4334771 /usr/lib/x86_64-linux-gnu/libnsl-2.30.so +7fd1555fd000-7fd15560a000 r-xp 00005000 08:0a 4334771 /usr/lib/x86_64-linux-gnu/libnsl-2.30.so +7fd15560a000-7fd15560e000 r--p 00012000 08:0a 4334771 /usr/lib/x86_64-linux-gnu/libnsl-2.30.so +7fd15560e000-7fd15560f000 r--p 00015000 08:0a 4334771 /usr/lib/x86_64-linux-gnu/libnsl-2.30.so +7fd15560f000-7fd155610000 rw-p 00016000 08:0a 4334771 /usr/lib/x86_64-linux-gnu/libnsl-2.30.so +7fd155610000-7fd155612000 rw-p 00000000 00:00 0 +7fd155617000-7fd155619000 r--s 0000a000 08:0b 8531695 /home/twisted/GradleProjects/AVR-Sandbox/HelloSerial4j/output/serial4j/serial4j.jar +7fd155619000-7fd15561a000 r--p 00000000 08:0a 4328933 /usr/lib/locale/aa_ET/LC_NUMERIC +7fd15561a000-7fd15561b000 r--p 00000000 08:0a 4330095 /usr/lib/locale/en_US.utf8/LC_TIME +7fd15561b000-7fd15561c000 r--p 00000000 08:0a 4329578 /usr/lib/locale/chr_US/LC_MONETARY +7fd15561c000-7fd15561d000 r--p 00000000 08:0a 4329874 /usr/lib/locale/en_AG/LC_MESSAGES/SYS_LC_MESSAGES +7fd15561d000-7fd15561e000 r--p 00000000 08:0a 4329579 /usr/lib/locale/chr_US/LC_PAPER +7fd15561e000-7fd15561f000 r--p 00000000 08:0a 4329410 /usr/lib/locale/bi_VU/LC_NAME +7fd15561f000-7fd155620000 r--p 00000000 08:0a 4330092 /usr/lib/locale/en_US.utf8/LC_ADDRESS +7fd155620000-7fd155627000 r--s 00000000 08:0a 4332592 /usr/lib/x86_64-linux-gnu/gconv/gconv-modules.cache +7fd155627000-7fd15562f000 rw-s 00000000 08:0a 2105293 /tmp/hsperfdata_pavl-machine/58096 +7fd15562f000-7fd15565b000 r-xp 00000000 08:0b 8782377 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libjava.so +7fd15565b000-7fd15585b000 ---p 0002c000 08:0b 8782377 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libjava.so +7fd15585b000-7fd15585c000 r--p 0002c000 08:0b 8782377 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libjava.so +7fd15585c000-7fd15585e000 rw-p 0002d000 08:0b 8782377 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libjava.so +7fd15585e000-7fd15586b000 r-xp 00000000 08:0b 8782382 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libverify.so +7fd15586b000-7fd155a6a000 ---p 0000d000 08:0b 8782382 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libverify.so +7fd155a6a000-7fd155a6c000 r--p 0000c000 08:0b 8782382 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libverify.so +7fd155a6c000-7fd155a6d000 rw-p 0000e000 08:0b 8782382 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libverify.so +7fd155a6d000-7fd155a70000 r--p 00000000 08:0a 4335156 /usr/lib/x86_64-linux-gnu/librt-2.30.so +7fd155a70000-7fd155a74000 r-xp 00003000 08:0a 4335156 /usr/lib/x86_64-linux-gnu/librt-2.30.so +7fd155a74000-7fd155a76000 r--p 00007000 08:0a 4335156 /usr/lib/x86_64-linux-gnu/librt-2.30.so +7fd155a76000-7fd155a77000 r--p 00008000 08:0a 4335156 /usr/lib/x86_64-linux-gnu/librt-2.30.so +7fd155a77000-7fd155a78000 rw-p 00009000 08:0a 4335156 /usr/lib/x86_64-linux-gnu/librt-2.30.so +7fd155a78000-7fd155a79000 ---p 00000000 00:00 0 +7fd155a79000-7fd155a7c000 ---p 00000000 00:00 0 +7fd155a7c000-7fd155b79000 rw-p 00000000 00:00 0 +7fd155b79000-7fd155b88000 r--p 00000000 08:0a 4334559 /usr/lib/x86_64-linux-gnu/libm-2.30.so +7fd155b88000-7fd155c23000 r-xp 0000f000 08:0a 4334559 /usr/lib/x86_64-linux-gnu/libm-2.30.so +7fd155c23000-7fd155cbc000 r--p 000aa000 08:0a 4334559 /usr/lib/x86_64-linux-gnu/libm-2.30.so +7fd155cbc000-7fd155cbd000 r--p 00142000 08:0a 4334559 /usr/lib/x86_64-linux-gnu/libm-2.30.so +7fd155cbd000-7fd155cbe000 rw-p 00143000 08:0a 4334559 /usr/lib/x86_64-linux-gnu/libm-2.30.so +7fd155cbe000-7fd1569a6000 r-xp 00000000 08:0b 8782359 /home/twisted/jdk1.8.0_201/jre/lib/amd64/server/libjvm.so +7fd1569a6000-7fd156ba5000 ---p 00ce8000 08:0b 8782359 /home/twisted/jdk1.8.0_201/jre/lib/amd64/server/libjvm.so +7fd156ba5000-7fd156c3b000 r--p 00ce7000 08:0b 8782359 /home/twisted/jdk1.8.0_201/jre/lib/amd64/server/libjvm.so +7fd156c3b000-7fd156c6c000 rw-p 00d7d000 08:0b 8782359 /home/twisted/jdk1.8.0_201/jre/lib/amd64/server/libjvm.so +7fd156c6c000-7fd156ca9000 rw-p 00000000 00:00 0 +7fd156ca9000-7fd156cce000 r--p 00000000 08:0a 4333575 /usr/lib/x86_64-linux-gnu/libc-2.30.so +7fd156cce000-7fd156e18000 r-xp 00025000 08:0a 4333575 /usr/lib/x86_64-linux-gnu/libc-2.30.so +7fd156e18000-7fd156e62000 r--p 0016f000 08:0a 4333575 /usr/lib/x86_64-linux-gnu/libc-2.30.so +7fd156e62000-7fd156e65000 r--p 001b8000 08:0a 4333575 /usr/lib/x86_64-linux-gnu/libc-2.30.so +7fd156e65000-7fd156e68000 rw-p 001bb000 08:0a 4333575 /usr/lib/x86_64-linux-gnu/libc-2.30.so +7fd156e68000-7fd156e6c000 rw-p 00000000 00:00 0 +7fd156e6c000-7fd156e6d000 r--p 00000000 08:0a 4333777 /usr/lib/x86_64-linux-gnu/libdl-2.30.so +7fd156e6d000-7fd156e6e000 r-xp 00001000 08:0a 4333777 /usr/lib/x86_64-linux-gnu/libdl-2.30.so +7fd156e6e000-7fd156e6f000 r--p 00002000 08:0a 4333777 /usr/lib/x86_64-linux-gnu/libdl-2.30.so +7fd156e6f000-7fd156e70000 r--p 00002000 08:0a 4333777 /usr/lib/x86_64-linux-gnu/libdl-2.30.so +7fd156e70000-7fd156e71000 rw-p 00003000 08:0a 4333777 /usr/lib/x86_64-linux-gnu/libdl-2.30.so +7fd156e71000-7fd156e88000 r-xp 00000000 08:0b 8543590 /home/twisted/jdk1.8.0_201/lib/amd64/jli/libjli.so +7fd156e88000-7fd157087000 ---p 00017000 08:0b 8543590 /home/twisted/jdk1.8.0_201/lib/amd64/jli/libjli.so +7fd157087000-7fd157088000 r--p 00016000 08:0b 8543590 /home/twisted/jdk1.8.0_201/lib/amd64/jli/libjli.so +7fd157088000-7fd157089000 rw-p 00017000 08:0b 8543590 /home/twisted/jdk1.8.0_201/lib/amd64/jli/libjli.so +7fd157089000-7fd157090000 r--p 00000000 08:0a 4335024 /usr/lib/x86_64-linux-gnu/libpthread-2.30.so +7fd157090000-7fd15709f000 r-xp 00007000 08:0a 4335024 /usr/lib/x86_64-linux-gnu/libpthread-2.30.so +7fd15709f000-7fd1570a4000 r--p 00016000 08:0a 4335024 /usr/lib/x86_64-linux-gnu/libpthread-2.30.so +7fd1570a4000-7fd1570a5000 r--p 0001a000 08:0a 4335024 /usr/lib/x86_64-linux-gnu/libpthread-2.30.so +7fd1570a5000-7fd1570a6000 rw-p 0001b000 08:0a 4335024 /usr/lib/x86_64-linux-gnu/libpthread-2.30.so +7fd1570a6000-7fd1570ac000 rw-p 00000000 00:00 0 +7fd1570ac000-7fd1570ad000 r--p 00000000 08:0a 4329580 /usr/lib/locale/chr_US/LC_TELEPHONE +7fd1570ad000-7fd1570ae000 r--p 00000000 08:0a 4329575 /usr/lib/locale/chr_US/LC_MEASUREMENT +7fd1570ae000-7fd1570af000 r--p 00000000 08:0a 4330093 /usr/lib/locale/en_US.utf8/LC_IDENTIFICATION +7fd1570af000-7fd1570b2000 r--p 00000000 08:0a 4334790 /usr/lib/x86_64-linux-gnu/libnss_nis-2.30.so +7fd1570b2000-7fd1570b9000 r-xp 00003000 08:0a 4334790 /usr/lib/x86_64-linux-gnu/libnss_nis-2.30.so +7fd1570b9000-7fd1570bb000 r--p 0000a000 08:0a 4334790 /usr/lib/x86_64-linux-gnu/libnss_nis-2.30.so +7fd1570bb000-7fd1570bc000 r--p 0000b000 08:0a 4334790 /usr/lib/x86_64-linux-gnu/libnss_nis-2.30.so +7fd1570bc000-7fd1570bd000 rw-p 0000c000 08:0a 4334790 /usr/lib/x86_64-linux-gnu/libnss_nis-2.30.so +7fd1570bd000-7fd1570bf000 r--p 00000000 08:0a 4334776 /usr/lib/x86_64-linux-gnu/libnss_compat-2.30.so +7fd1570bf000-7fd1570c4000 r-xp 00002000 08:0a 4334776 /usr/lib/x86_64-linux-gnu/libnss_compat-2.30.so +7fd1570c4000-7fd1570c5000 r--p 00007000 08:0a 4334776 /usr/lib/x86_64-linux-gnu/libnss_compat-2.30.so +7fd1570c5000-7fd1570c6000 ---p 00008000 08:0a 4334776 /usr/lib/x86_64-linux-gnu/libnss_compat-2.30.so +7fd1570c6000-7fd1570c7000 r--p 00008000 08:0a 4334776 /usr/lib/x86_64-linux-gnu/libnss_compat-2.30.so +7fd1570c7000-7fd1570c8000 rw-p 00009000 08:0a 4334776 /usr/lib/x86_64-linux-gnu/libnss_compat-2.30.so +7fd1570c8000-7fd1570c9000 rw-p 00000000 00:00 0 +7fd1570c9000-7fd1570ca000 r--p 00000000 08:0a 4333008 /usr/lib/x86_64-linux-gnu/ld-2.30.so +7fd1570ca000-7fd1570e8000 r-xp 00001000 08:0a 4333008 /usr/lib/x86_64-linux-gnu/ld-2.30.so +7fd1570e8000-7fd1570f0000 r--p 0001f000 08:0a 4333008 /usr/lib/x86_64-linux-gnu/ld-2.30.so +7fd1570f0000-7fd1570f1000 r--p 00000000 00:00 0 +7fd1570f1000-7fd1570f2000 r--p 00027000 08:0a 4333008 /usr/lib/x86_64-linux-gnu/ld-2.30.so +7fd1570f2000-7fd1570f3000 rw-p 00028000 08:0a 4333008 /usr/lib/x86_64-linux-gnu/ld-2.30.so +7fd1570f3000-7fd1570f4000 rw-p 00000000 00:00 0 +7ffda4fcc000-7ffda4fed000 rw-p 00000000 00:00 0 [stack] +7ffda4ff2000-7ffda4ff5000 r--p 00000000 00:00 0 [vvar] +7ffda4ff5000-7ffda4ff6000 r-xp 00000000 00:00 0 [vdso] + +VM Arguments: +java_command: serial4j.jar +java_class_path (initial): serial4j.jar +Launcher Type: SUN_STANDARD + +Environment Variables: +JAVA_HOME=/home/twisted/jdk1.8.0_201 +PATH=/home/pavl-machine/.local/bin:/snap/bin:/usr/sandbox/:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/usr/share/games:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games +SHELL=/bin/bash +DISPLAY=:0 + +Signal Handlers: +SIGSEGV: [libjvm.so+0xad3e60], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO +SIGBUS: [libjvm.so+0xad3e60], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO +SIGFPE: [libjvm.so+0x90b880], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO +SIGPIPE: [libjvm.so+0x90b880], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO +SIGXFSZ: [libjvm.so+0x90b880], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO +SIGILL: [libjvm.so+0x90b880], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO +SIGUSR1: SIG_DFL, sa_mask[0]=00000000000000000000000000000000, sa_flags=none +SIGUSR2: [libjvm.so+0x90b750], sa_mask[0]=00000000000000000000000000000000, sa_flags=SA_RESTART|SA_SIGINFO +SIGHUP: [libjvm.so+0x90bd70], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO +SIGINT: [libjvm.so+0x90bd70], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO +SIGTERM: [libjvm.so+0x90bd70], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO +SIGQUIT: [libjvm.so+0x90bd70], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO + + +--------------- S Y S T E M --------------- + +OS:DISTRIB_ID=Parrot +DISTRIB_RELEASE=4.9 +DISTRIB_CODENAME=rolling +DISTRIB_DESCRIPTION="Parrot 4.9" + +uname:Linux 5.5.0-1parrot1-amd64 #1 SMP Parrot 5.5.17-1parrot1 (2020-04-25) x86_64 +libc:glibc 2.30 NPTL 2.30 +rlimit: STACK 8192k, CORE 0k, NPROC 47123, NOFILE 1048576, AS infinity +load average:1.51 1.15 1.03 + +/proc/meminfo: +MemTotal: 12202288 kB +MemFree: 2275368 kB +MemAvailable: 7461700 kB +Buffers: 1148772 kB +Cached: 4917296 kB +SwapCached: 240 kB +Active: 5510692 kB +Inactive: 3398344 kB +Active(anon): 2641468 kB +Inactive(anon): 1147704 kB +Active(file): 2869224 kB +Inactive(file): 2250640 kB +Unevictable: 330672 kB +Mlocked: 176 kB +SwapTotal: 6836220 kB +SwapFree: 6834872 kB +Dirty: 1964 kB +Writeback: 0 kB +AnonPages: 3090820 kB +Mapped: 918104 kB +Shmem: 999988 kB +KReclaimable: 389396 kB +Slab: 527920 kB +SReclaimable: 389396 kB +SUnreclaim: 138524 kB +KernelStack: 14640 kB +PageTables: 47952 kB +NFS_Unstable: 0 kB +Bounce: 0 kB +WritebackTmp: 0 kB +CommitLimit: 12937364 kB +Committed_AS: 13187912 kB +VmallocTotal: 34359738367 kB +VmallocUsed: 46304 kB +VmallocChunk: 0 kB +Percpu: 3872 kB +HardwareCorrupted: 0 kB +AnonHugePages: 542720 kB +ShmemHugePages: 0 kB +ShmemPmdMapped: 0 kB +FileHugePages: 0 kB +FilePmdMapped: 0 kB +HugePages_Total: 0 +HugePages_Free: 0 +HugePages_Rsvd: 0 +HugePages_Surp: 0 +Hugepagesize: 2048 kB +Hugetlb: 0 kB +DirectMap4k: 459028 kB +DirectMap2M: 11986944 kB +DirectMap1G: 1048576 kB + +container (cgroup) information: +container_type: cgroupv1 +cpu_cpuset_cpus: 0-3 +cpu_memory_nodes: 0 +active_processor_count: 4 +cpu_quota: -1 +cpu_period: 100000 +cpu_shares: -1 +memory_limit_in_bytes: -1 +memory_and_swap_limit_in_bytes: -2 +memory_soft_limit_in_bytes: -1 +memory_usage_in_bytes: 2611412992 +memory_max_usage_in_bytes: 4470431744 + + +CPU:total 4 (initial active 4) (2 cores per cpu, 2 threads per core) family 6 model 142 stepping 9, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, avx, avx2, aes, clmul, erms, 3dnowpref, lzcnt, ht, tsc, tscinvbit, bmi1, bmi2, adx + +/proc/cpuinfo: +processor : 0 +vendor_id : GenuineIntel +cpu family : 6 +model : 142 +model name : Intel(R) Core(TM) i3-7020U CPU @ 2.30GHz +stepping : 9 +microcode : 0xca +cpu MHz : 2300.001 +cache size : 3072 KB +physical id : 0 +siblings : 4 +core id : 0 +cpu cores : 2 +apicid : 0 +initial apicid : 0 +fpu : yes +fpu_exception : yes +cpuid level : 22 +wp : yes +flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_clear flush_l1d +bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit +bogomips : 4599.93 +clflush size : 64 +cache_alignment : 64 +address sizes : 39 bits physical, 48 bits virtual +power management: + +processor : 1 +vendor_id : GenuineIntel +cpu family : 6 +model : 142 +model name : Intel(R) Core(TM) i3-7020U CPU @ 2.30GHz +stepping : 9 +microcode : 0xca +cpu MHz : 2300.003 +cache size : 3072 KB +physical id : 0 +siblings : 4 +core id : 1 +cpu cores : 2 +apicid : 2 +initial apicid : 2 +fpu : yes +fpu_exception : yes +cpuid level : 22 +wp : yes +flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm arat pln pts hwp hwp_notify hwp_act_window hwp_epp flush_l1d +bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit +bogomips : 4599.93 +clflush size : 64 +cache_alignment : 64 +address sizes : 39 bits physical, 48 bits virtual +power management: + +processor : 2 +vendor_id : GenuineIntel +cpu family : 6 +model : 142 +model name : Intel(R) Core(TM) i3-7020U CPU @ 2.30GHz +stepping : 9 +microcode : 0xca +cpu MHz : 2299.998 +cache size : 3072 KB +physical id : 0 +siblings : 4 +core id : 0 +cpu cores : 2 +apicid : 1 +initial apicid : 1 +fpu : yes +fpu_exception : yes +cpuid level : 22 +wp : yes +flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_clear flush_l1d +bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit +bogomips : 4599.93 +clflush size : 64 +cache_alignment : 64 +address sizes : 39 bits physical, 48 bits virtual +power management: + +processor : 3 +vendor_id : GenuineIntel +cpu family : 6 +model : 142 +model name : Intel(R) Core(TM) i3-7020U CPU @ 2.30GHz +stepping : 9 +microcode : 0xca +cpu MHz : 2300.001 +cache size : 3072 KB +physical id : 0 +siblings : 4 +core id : 1 +cpu cores : 2 +apicid : 3 +initial apicid : 3 +fpu : yes +fpu_exception : yes +cpuid level : 22 +wp : yes +flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_clear flush_l1d +bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit +bogomips : 4599.93 +clflush size : 64 +cache_alignment : 64 +address sizes : 39 bits physical, 48 bits virtual +power management: + + + +Memory: 4k page, physical 12202288k(2275076k free), swap 6836220k(6834872k free) + +vm_info: Java HotSpot(TM) 64-Bit Server VM (25.201-b09) for linux-amd64 JRE (1.8.0_201-b09), built on Dec 15 2018 11:35:59 by "java_re" with gcc 7.3.0 + +time: Tue Sep 13 22:25:56 2022 +timezone: CDT +elapsed time: 0 seconds (0d 0h 0m 0s) + diff --git a/HelloSerial4j/analysis of native error logs/example1/README.md b/HelloSerial4j/analysis of native error logs/example1/README.md new file mode 100644 index 00000000..e69de29b diff --git a/HelloSerial4j/analysis of native error logs/example1/hs_err_pid58426.log b/HelloSerial4j/analysis of native error logs/example1/hs_err_pid58426.log new file mode 100644 index 00000000..22c60cb7 --- /dev/null +++ b/HelloSerial4j/analysis of native error logs/example1/hs_err_pid58426.log @@ -0,0 +1,628 @@ +# +# A fatal error has been detected by the Java Runtime Environment: +# +# SIGSEGV (0xb) at pc=0x00007fbea610a6e1, pid=58426, tid=0x00007fbe8994c700 +# +# JRE version: Java(TM) SE Runtime Environment (8.0_201-b09) (build 1.8.0_201-b09) +# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.201-b09 mixed mode linux-amd64 compressed oops) +# Problematic frame: +# C [libc.so.6+0x15e6e1] +# +# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again +# +# If you would like to submit a bug report, please visit: +# http://bugreport.java.com/bugreport/crash.jsp +# The crash happened outside the Java Virtual Machine in native code. +# See problematic frame for where to report the bug. +# + +--------------- T H R E A D --------------- + +Current thread (0x00007fbea0239000): JavaThread "Thread-0" [_thread_in_native, id=58441, stack(0x00007fbe8984c000,0x00007fbe8994d000)] + +siginfo: si_signo: 11 (SIGSEGV), si_code: 1 (SEGV_MAPERR), si_addr: 0x0000000000000000 + +Registers: +RAX=0x0000000000000000, RBX=0x00007fbe8b63ad18, RCX=0x0000000000000000, RDX=0x0000000000000000 +RSP=0x00007fbe8994b7f8, RBP=0x00007fbe8994b860, RSI=0x0000000000000000, RDI=0x0000000000000000 +R8 =0x00007fbe48003000, R9 =0x00007fbe48003350, R10=0xfffffffffffff23c, R11=0x00007fbea6022000 +R12=0x0000000000000000, R13=0x00007fbe8b63ad18, R14=0x00007fbe8994b900, R15=0x00007fbea0239000 +RIP=0x00007fbea610a6e1, EFLAGS=0x0000000000010283, CSGSFS=0x002b000000000033, ERR=0x0000000000000004 + TRAPNO=0x000000000000000e + +Top of Stack: (sp=0x00007fbe8994b7f8) +0x00007fbe8994b7f8: 00007fbea6022010 00007fbe8b63ad18 +0x00007fbe8994b808: 00007fbe8994b860 0000000000000000 +0x00007fbe8994b818: 00007fbe8b63ad18 00007fbe8994b900 +0x00007fbe8994b828: 00007fbe9000d780 00007fbe8b63ad18 +0x00007fbe8994b838: 00007fbe90012260 00007fbe8b63ad18 +0x00007fbe8994b848: 00007fbe48002d40 0000000000000000 +0x00007fbe8994b858: 00007fbe48003b30 00007fbe8994b880 +0x00007fbe8994b868: 00007fbe9000e520 00007fbe8994b900 +0x00007fbe8994b878: 00007fbea02391f8 00007fbe8994b8e0 +0x00007fbe8994b888: 00007fbe910186c7 fffffffe00000000 +0x00007fbe8994b898: 00007fbe910183e2 00007fbe8994b8a0 +0x00007fbe8994b8a8: 00007fbe8b63ad18 00007fbe8994b900 +0x00007fbe8994b8b8: 00007fbe8b63b538 0000000000000000 +0x00007fbe8994b8c8: 00007fbe8b63ad18 0000000000000000 +0x00007fbe8994b8d8: 00007fbe8994b900 00007fbe8994b948 +0x00007fbe8994b8e8: 00007fbe91007d00 0000000000000000 +0x00007fbe8994b8f8: 00007fbe91011d16 0000000781fe81b0 +0x00007fbe8994b908: 00007fbe8994b908 00007fbe8b634866 +0x00007fbe8994b918: 00007fbe8994b960 00007fbe8b634d08 +0x00007fbe8994b928: 0000000000000000 00007fbe8b634890 +0x00007fbe8994b938: 00007fbe8994b900 00007fbe8994b960 +0x00007fbe8994b948: 00007fbe8994b9a8 00007fbe910082bd +0x00007fbe8994b958: 0000000000000000 0000000781fe8188 +0x00007fbe8994b968: 00007fbe8994b968 00007fbe8b634051 +0x00007fbe8994b978: 00007fbe8994b9b8 00007fbe8b634d08 +0x00007fbe8994b988: 0000000000000000 00007fbe8b634078 +0x00007fbe8994b998: 00007fbe8994b960 00007fbe8994b9b8 +0x00007fbe8994b9a8: 00007fbe8994ba10 00007fbe91008040 +0x00007fbe8994b9b8: 0000000781fe8188 00000007821029f0 +0x00007fbe8994b9c8: 0000000781f1d970 00007fbe8994b9d0 +0x00007fbe8994b9d8: 00007fbe8b62f1bc 00007fbe8994ba48 +0x00007fbe8994b9e8: 00007fbe8b631028 0000000000000000 + +Instructions: (pc=0x00007fbea610a6e1) +0x00007fbea610a6c1: c0 c5 f8 77 c3 66 2e 0f 1f 84 00 00 00 00 00 89 +0x00007fbea610a6d1: f9 48 89 fa c5 f9 ef c0 83 e1 3f 83 f9 20 77 1f +0x00007fbea610a6e1: c5 fd 74 0f c5 fd d7 c1 85 c0 0f 85 df 00 00 00 +0x00007fbea610a6f1: 48 83 c7 20 83 e1 1f 48 83 e7 e0 eb 36 66 90 83 + +Register to memory mapping: + +RAX=0x0000000000000000 is an unknown value +RBX={method} {0x00007fbe8b63ad18} 'fetchSerialPorts0' '()I' in 'com/serial4j/core/serial/NativeTerminalDevice' +RCX=0x0000000000000000 is an unknown value +RDX=0x0000000000000000 is an unknown value +RSP=0x00007fbe8994b7f8 is pointing into the stack for thread: 0x00007fbea0239000 +RBP=0x00007fbe8994b860 is pointing into the stack for thread: 0x00007fbea0239000 +RSI=0x0000000000000000 is an unknown value +RDI=0x0000000000000000 is an unknown value +R8 =0x00007fbe48003000 is an unknown value +R9 =0x00007fbe48003350 is an unknown value +R10=0xfffffffffffff23c is an unknown value +R11=0x00007fbea6022000: _IO_puts+0 in /lib/x86_64-linux-gnu/libc.so.6 at 0x00007fbea5fac000 +R12=0x0000000000000000 is an unknown value +R13={method} {0x00007fbe8b63ad18} 'fetchSerialPorts0' '()I' in 'com/serial4j/core/serial/NativeTerminalDevice' +R14=0x00007fbe8994b900 is pointing into the stack for thread: 0x00007fbea0239000 +R15=0x00007fbea0239000 is a thread + + +Stack: [0x00007fbe8984c000,0x00007fbe8994d000], sp=0x00007fbe8994b7f8, free space=1021k +Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) +C [libc.so.6+0x15e6e1] +C [libserial4j.so+0x4520] Java_com_serial4j_core_serial_NativeTerminalDevice_fetchSerialPorts0+0x1f +j com.serial4j.core.serial.NativeTerminalDevice.fetchSerialPorts0()I+0 +j com.serial4j.core.serial.TerminalDevice.fetchSerialPorts()V+22 +j com.serial4j.core.serial.TerminalDevice.getSerialPorts()[Ljava/lang/String;+1 +j com.serial4j.example.HelloNativeSerial4J.run()V+356 +v ~StubRoutines::call_stub +V [libjvm.so+0x68825b] JavaCalls::call_helper(JavaValue*, methodHandle*, JavaCallArguments*, Thread*)+0xddb +V [libjvm.so+0x685b23] JavaCalls::call_virtual(JavaValue*, KlassHandle, Symbol*, Symbol*, JavaCallArguments*, Thread*)+0x263 +V [libjvm.so+0x6860e7] JavaCalls::call_virtual(JavaValue*, Handle, KlassHandle, Symbol*, Symbol*, Thread*)+0x47 +V [libjvm.so+0x6f225c] thread_entry(JavaThread*, Thread*)+0x6c +V [libjvm.so+0xa7bb6b] JavaThread::thread_main_inner()+0xdb +V [libjvm.so+0xa7be71] JavaThread::run()+0x2d1 +V [libjvm.so+0x90d922] java_start(Thread*)+0x102 +C [libpthread.so.0+0x8f27] start_thread+0xd7 + +Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) +j com.serial4j.core.serial.NativeTerminalDevice.fetchSerialPorts0()I+0 +j com.serial4j.core.serial.TerminalDevice.fetchSerialPorts()V+22 +j com.serial4j.core.serial.TerminalDevice.getSerialPorts()[Ljava/lang/String;+1 +j com.serial4j.example.HelloNativeSerial4J.run()V+356 +v ~StubRoutines::call_stub + +--------------- P R O C E S S --------------- + +Java Threads: ( => current thread ) +=>0x00007fbea0239000 JavaThread "Thread-0" [_thread_in_native, id=58441, stack(0x00007fbe8984c000,0x00007fbe8994d000)] + 0x00007fbea018d000 JavaThread "Service Thread" daemon [_thread_blocked, id=58439, stack(0x00007fbe89a4e000,0x00007fbe89b4f000)] + 0x00007fbea018a000 JavaThread "C1 CompilerThread2" daemon [_thread_blocked, id=58438, stack(0x00007fbe89b50000,0x00007fbe89c50000)] + 0x00007fbea0188000 JavaThread "C2 CompilerThread1" daemon [_thread_blocked, id=58437, stack(0x00007fbe89c51000,0x00007fbe89d51000)] + 0x00007fbea0185000 JavaThread "C2 CompilerThread0" daemon [_thread_blocked, id=58436, stack(0x00007fbe89d52000,0x00007fbe89e52000)] + 0x00007fbea0184000 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=58435, stack(0x00007fbe89e52000,0x00007fbe89f53000)] + 0x00007fbea014c800 JavaThread "Finalizer" daemon [_thread_blocked, id=58434, stack(0x00007fbe8a21e000,0x00007fbe8a31f000)] + 0x00007fbea014a000 JavaThread "Reference Handler" daemon [_thread_blocked, id=58433, stack(0x00007fbe8a31f000,0x00007fbe8a420000)] + 0x00007fbea000b000 JavaThread "main" [_thread_blocked, id=58427, stack(0x00007fbea4d7c000,0x00007fbea4e7c000)] + +Other Threads: + 0x00007fbea0140000 VMThread [stack: 0x00007fbe8a421000,0x00007fbe8a521000] [id=58432] + 0x00007fbea018f800 WatcherThread [stack: 0x00007fbe8994e000,0x00007fbe89a4e000] [id=58440] + +VM state:not at safepoint (normal execution) + +VM Mutex/Monitor currently owned by a thread: None + +heap address: 0x0000000705c00000, size: 2980 MB, Compressed Oops mode: Zero based, Oop shift amount: 3 +Narrow klass base: 0x0000000000000000, Narrow klass shift: 3 +Compressed class space size: 1073741824 Address: 0x00000007c0000000 + +Heap: + PSYoungGen total 56320K, used 2918K [0x0000000781f00000, 0x0000000785d80000, 0x00000007c0000000) + eden space 48640K, 6% used [0x0000000781f00000,0x00000007821d99d0,0x0000000784e80000) + from space 7680K, 0% used [0x0000000785600000,0x0000000785600000,0x0000000785d80000) + to space 7680K, 0% used [0x0000000784e80000,0x0000000784e80000,0x0000000785600000) + ParOldGen total 128512K, used 0K [0x0000000705c00000, 0x000000070d980000, 0x0000000781f00000) + object space 128512K, 0% used [0x0000000705c00000,0x0000000705c00000,0x000000070d980000) + Metaspace used 3113K, capacity 4664K, committed 4864K, reserved 1056768K + class space used 350K, capacity 424K, committed 512K, reserved 1048576K + +Card table byte_map: [0x00007fbe90a2d000,0x00007fbe91000000] byte_map_base: 0x00007fbe8d1ff000 + +Marking Bits: (ParMarkBitMap*) 0x00007fbea5f8cd80 + Begin Bits: [0x00007fbe7e2e0000, 0x00007fbe81170000) + End Bits: [0x00007fbe81170000, 0x00007fbe84000000) + +Polling page: 0x00007fbea63f3000 + +CodeCache: size=245760Kb used=1174Kb max_used=1174Kb free=244585Kb + bounds [0x00007fbe91000000, 0x00007fbe91270000, 0x00007fbea0000000] + total_blobs=286 nmethods=50 adapters=150 + compilation: enabled + +Compilation events (10 events): +Event: 0.106 Thread 0x00007fbea018a000 47 3 java.util.concurrent.ConcurrentHashMap::setTabAt (19 bytes) +Event: 0.106 Thread 0x00007fbea018a000 nmethod 47 0x00007fbe911246d0 code [0x00007fbe91124820, 0x00007fbe91124990] +Event: 0.106 Thread 0x00007fbea018a000 46 3 java.util.zip.ZStreamRef::address (5 bytes) +Event: 0.106 Thread 0x00007fbea018a000 nmethod 46 0x00007fbe91124a10 code [0x00007fbe91124b60, 0x00007fbe91124cb0] +Event: 0.107 Thread 0x00007fbea018a000 48 s 1 java.util.Vector::size (5 bytes) +Event: 0.107 Thread 0x00007fbea018a000 nmethod 48 0x00007fbe91124d10 code [0x00007fbe91124e60, 0x00007fbe911250d0] +Event: 0.107 Thread 0x00007fbea018a000 49 3 java.lang.String:: (10 bytes) +Event: 0.107 Thread 0x00007fbea018a000 nmethod 49 0x00007fbe91125150 code [0x00007fbe911252c0, 0x00007fbe91125490] +Event: 0.108 Thread 0x00007fbea018a000 50 1 java.util.zip.ZipFile::access$000 (5 bytes) +Event: 0.109 Thread 0x00007fbea018a000 nmethod 50 0x00007fbe91125550 code [0x00007fbe911256a0, 0x00007fbe91125790] + +GC Heap History (0 events): +No events + +Deoptimization events (0 events): +No events + +Classes redefined (0 events): +No events + +Internal exceptions (6 events): +Event: 0.039 Thread 0x00007fbea000b000 Exception (0x0000000781f07cb0) thrown at [/HUDSON/workspace/8-2-build-linux-amd64/jdk8u201/12317/hotspot/src/sh +Event: 0.039 Thread 0x00007fbea000b000 Exception (0x0000000781f07f98) thrown at [/HUDSON/workspace/8-2-build-linux-amd64/jdk8u201/12317/hotspot/src/share/vm/prims/jni.c +Event: 0.098 Thread 0x00007fbea000b000 Exception (0x0000000781fc0760) thrown at [/HUDSON/workspace/8-2-build-linux-amd64/jdk8u201/12317/hotspot/src/share/vm/prims/jvm.cpp, line 1502] +Event: 0.098 Thread 0x00007fbea000b000 Exception (0x0000000781fc0970) thrown at [/HUDSON/workspace/8-2-build-linux-amd64/jdk8u201/12317/hotspot/src/share/vm/prims/jvm.cpp, line 1502] +Event: 0.098 Thread 0x00007fbea000b000 Exception (0x0000000781fc2dd8) thrown at [/HUDSON/workspace/8-2-build-linux-amd64/jdk8u201/12317/hotspot/src/share/vm/prims/jvm.cpp, line 1502] +Event: 0.098 Thread 0x00007fbea000b000 Exception (0x0000000781fc2fe8) thrown at [/HUDSON/workspace/8-2-build-linux-amd64/jdk8u201/12317/hotspot/src/share/vm/prims/jvm.cpp, line 1502] + +Events (10 events): +Event: 0.105 loading class com/serial4j/core/serial/control/TerminalLocalFlag +Event: 0.105 loading class com/serial4j/core/serial/control/TerminalLocalFlag done +Event: 0.105 loading class com/serial4j/core/serial/control/TerminalOutputFlag +Event: 0.105 loading class com/serial4j/core/serial/control/TerminalOutputFlag done +Event: 0.106 loading class com/serial4j/core/serial/control/TerminalInputFlag +Event: 0.106 loading class com/serial4j/core/serial/control/TerminalInputFlag done +Event: 0.107 loading class com/serial4j/core/serial/BaudRate +Event: 0.107 loading class com/serial4j/core/serial/BaudRate done +Event: 0.108 loading class com/serial4j/core/serial/ReadConfiguration +Event: 0.108 loading class com/serial4j/core/serial/ReadConfiguration done + + +Dynamic libraries: +00400000-00401000 r-xp 00000000 08:0b 8396377 /home/twisted/jdk1.8.0_201/bin/java +00600000-00601000 r--p 00000000 08:0b 8396377 /home/twisted/jdk1.8.0_201/bin/java +00601000-00602000 rw-p 00001000 08:0b 8396377 /home/twisted/jdk1.8.0_201/bin/java +02501000-02522000 rw-p 00000000 00:00 0 [heap] +705c00000-70d980000 rw-p 00000000 00:00 0 +70d980000-781f00000 ---p 00000000 00:00 0 +781f00000-785d80000 rw-p 00000000 00:00 0 +785d80000-7c0000000 ---p 00000000 00:00 0 +7c0000000-7c0080000 rw-p 00000000 00:00 0 +7c0080000-800000000 ---p 00000000 00:00 0 +7fbe48000000-7fbe48035000 rw-p 00000000 00:00 0 +7fbe48035000-7fbe4c000000 ---p 00000000 00:00 0 +7fbe50000000-7fbe50021000 rw-p 00000000 00:00 0 +7fbe50021000-7fbe54000000 ---p 00000000 00:00 0 +7fbe54000000-7fbe54021000 rw-p 00000000 00:00 0 +7fbe54021000-7fbe58000000 ---p 00000000 00:00 0 +7fbe58000000-7fbe58042000 rw-p 00000000 00:00 0 +7fbe58042000-7fbe5c000000 ---p 00000000 00:00 0 +7fbe5c000000-7fbe5c15a000 rw-p 00000000 00:00 0 +7fbe5c15a000-7fbe60000000 ---p 00000000 00:00 0 +7fbe60000000-7fbe60021000 rw-p 00000000 00:00 0 +7fbe60021000-7fbe64000000 ---p 00000000 00:00 0 +7fbe64000000-7fbe6403e000 rw-p 00000000 00:00 0 +7fbe6403e000-7fbe68000000 ---p 00000000 00:00 0 +7fbe68000000-7fbe68021000 rw-p 00000000 00:00 0 +7fbe68021000-7fbe6c000000 ---p 00000000 00:00 0 +7fbe6c000000-7fbe6c021000 rw-p 00000000 00:00 0 +7fbe6c021000-7fbe70000000 ---p 00000000 00:00 0 +7fbe70000000-7fbe70021000 rw-p 00000000 00:00 0 +7fbe70021000-7fbe74000000 ---p 00000000 00:00 0 +7fbe74000000-7fbe74021000 rw-p 00000000 00:00 0 +7fbe74021000-7fbe78000000 ---p 00000000 00:00 0 +7fbe78000000-7fbe78021000 rw-p 00000000 00:00 0 +7fbe78021000-7fbe7c000000 ---p 00000000 00:00 0 +7fbe7e2e0000-7fbe84000000 rw-p 00000000 00:00 0 +7fbe84000000-7fbe84021000 rw-p 00000000 00:00 0 +7fbe84021000-7fbe88000000 ---p 00000000 00:00 0 +7fbe895b7000-7fbe8984c000 rw-p 00000000 00:00 0 +7fbe8984c000-7fbe8984f000 ---p 00000000 00:00 0 +7fbe8984f000-7fbe8994d000 rw-p 00000000 00:00 0 +7fbe8994d000-7fbe8994e000 ---p 00000000 00:00 0 +7fbe8994e000-7fbe89a4e000 rw-p 00000000 00:00 0 +7fbe89a4e000-7fbe89a51000 ---p 00000000 00:00 0 +7fbe89a51000-7fbe89b4f000 rw-p 00000000 00:00 0 +7fbe89b4f000-7fbe89b50000 ---p 00000000 00:00 0 +7fbe89b50000-7fbe89b53000 ---p 00000000 00:00 0 +7fbe89b53000-7fbe89c50000 rw-p 00000000 00:00 0 +7fbe89c50000-7fbe89c51000 ---p 00000000 00:00 0 +7fbe89c51000-7fbe89c54000 ---p 00000000 00:00 0 +7fbe89c54000-7fbe89d51000 rw-p 00000000 00:00 0 +7fbe89d51000-7fbe89d52000 ---p 00000000 00:00 0 +7fbe89d52000-7fbe89d55000 ---p 00000000 00:00 0 +7fbe89d55000-7fbe89e52000 rw-p 00000000 00:00 0 +7fbe89e52000-7fbe89e55000 ---p 00000000 00:00 0 +7fbe89e55000-7fbe89f53000 rw-p 00000000 00:00 0 +7fbe89f53000-7fbe89fa6000 r--p 00000000 08:0a 4328904 /usr/lib/locale/aa_DJ.utf8/LC_CTYPE +7fbe89fa6000-7fbe8a21e000 r--p 00000000 08:0a 4328903 /usr/lib/locale/aa_DJ.utf8/LC_COLLATE +7fbe8a21e000-7fbe8a221000 ---p 00000000 00:00 0 +7fbe8a221000-7fbe8a31f000 rw-p 00000000 00:00 0 +7fbe8a31f000-7fbe8a322000 ---p 00000000 00:00 0 +7fbe8a322000-7fbe8a420000 rw-p 00000000 00:00 0 +7fbe8a420000-7fbe8a421000 ---p 00000000 00:00 0 +7fbe8a421000-7fbe8b66e000 rw-p 00000000 00:00 0 +7fbe8b66e000-7fbe8ba2e000 ---p 00000000 00:00 0 +7fbe8ba2e000-7fbe8c000000 rw-p 00000000 00:00 0 +7fbe8c000000-7fbe8c021000 rw-p 00000000 00:00 0 +7fbe8c021000-7fbe90000000 ---p 00000000 00:00 0 +7fbe9000a000-7fbe9000d000 r--p 00000000 08:0b 8530741 /home/twisted/GradleProjects/AVR-Sandbox/HelloSerial4j/output/serial4j/libserial4j.so +7fbe9000d000-7fbe9000f000 r-xp 00003000 08:0b 8530741 /home/twisted/GradleProjects/AVR-Sandbox/HelloSerial4j/output/serial4j/libserial4j.so +7fbe9000f000-7fbe90011000 r--p 00005000 08:0b 8530741 /home/twisted/GradleProjects/AVR-Sandbox/HelloSerial4j/output/serial4j/libserial4j.so +7fbe90011000-7fbe90012000 r--p 00006000 08:0b 8530741 /home/twisted/GradleProjects/AVR-Sandbox/HelloSerial4j/output/serial4j/libserial4j.so +7fbe90012000-7fbe90013000 rw-p 00007000 08:0b 8530741 /home/twisted/GradleProjects/AVR-Sandbox/HelloSerial4j/output/serial4j/libserial4j.so +7fbe90013000-7fbe90264000 rw-p 00000000 00:00 0 +7fbe90264000-7fbe9043e000 r--s 03d6f000 08:0b 8543644 /home/twisted/jdk1.8.0_201/jre/lib/rt.jar +7fbe9043e000-7fbe9054a000 rw-p 00000000 00:00 0 +7fbe9054a000-7fbe9054b000 ---p 00000000 00:00 0 +7fbe9054b000-7fbe9068a000 rw-p 00000000 00:00 0 +7fbe9068a000-7fbe90a2d000 ---p 00000000 00:00 0 +7fbe90a2d000-7fbe90a6c000 rw-p 00000000 00:00 0 +7fbe90a6c000-7fbe90e0e000 ---p 00000000 00:00 0 +7fbe90e0e000-7fbe90e2e000 rw-p 00000000 00:00 0 +7fbe90e2e000-7fbe90fff000 ---p 00000000 00:00 0 +7fbe90fff000-7fbe91000000 rw-p 00000000 00:00 0 +7fbe91000000-7fbe91270000 rwxp 00000000 00:00 0 +7fbe91270000-7fbea0000000 ---p 00000000 00:00 0 +7fbea0000000-7fbea023b000 rw-p 00000000 00:00 0 +7fbea023b000-7fbea4000000 ---p 00000000 00:00 0 +7fbea4008000-7fbea4009000 ---p 00000000 00:00 0 +7fbea4009000-7fbea4109000 rw-p 00000000 00:00 0 +7fbea4109000-7fbea410a000 ---p 00000000 00:00 0 +7fbea410a000-7fbea420a000 rw-p 00000000 00:00 0 +7fbea420a000-7fbea420b000 ---p 00000000 00:00 0 +7fbea420b000-7fbea4315000 rw-p 00000000 00:00 0 +7fbea4315000-7fbea46cb000 ---p 00000000 00:00 0 +7fbea46cb000-7fbea46e6000 r-xp 00000000 08:0b 8782383 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libzip.so +7fbea46e6000-7fbea48e5000 ---p 0001b000 08:0b 8782383 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libzip.so +7fbea48e5000-7fbea48e6000 r--p 0001a000 08:0b 8782383 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libzip.so +7fbea48e6000-7fbea48e7000 rw-p 0001b000 08:0b 8782383 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libzip.so +7fbea48e7000-7fbea48ea000 r--p 00000000 08:0a 4334780 /usr/lib/x86_64-linux-gnu/libnss_files-2.30.so +7fbea48ea000-7fbea48f1000 r-xp 00003000 08:0a 4334780 /usr/lib/x86_64-linux-gnu/libnss_files-2.30.so +7fbea48f1000-7fbea48f3000 r--p 0000a000 08:0a 4334780 /usr/lib/x86_64-linux-gnu/libnss_files-2.30.so +7fbea48f3000-7fbea48f4000 r--p 0000b000 08:0a 4334780 /usr/lib/x86_64-linux-gnu/libnss_files-2.30.so +7fbea48f4000-7fbea48f5000 rw-p 0000c000 08:0a 4334780 /usr/lib/x86_64-linux-gnu/libnss_files-2.30.so +7fbea48f5000-7fbea48fb000 rw-p 00000000 00:00 0 +7fbea48fb000-7fbea4900000 r--p 00000000 08:0a 4334771 /usr/lib/x86_64-linux-gnu/libnsl-2.30.so +7fbea4900000-7fbea490d000 r-xp 00005000 08:0a 4334771 /usr/lib/x86_64-linux-gnu/libnsl-2.30.so +7fbea490d000-7fbea4911000 r--p 00012000 08:0a 4334771 /usr/lib/x86_64-linux-gnu/libnsl-2.30.so +7fbea4911000-7fbea4912000 r--p 00015000 08:0a 4334771 /usr/lib/x86_64-linux-gnu/libnsl-2.30.so +7fbea4912000-7fbea4913000 rw-p 00016000 08:0a 4334771 /usr/lib/x86_64-linux-gnu/libnsl-2.30.so +7fbea4913000-7fbea4915000 rw-p 00000000 00:00 0 +7fbea491a000-7fbea491c000 r--s 0000a000 08:0b 8531740 /home/twisted/GradleProjects/AVR-Sandbox/HelloSerial4j/output/serial4j/serial4j.jar +7fbea491c000-7fbea491d000 r--p 00000000 08:0a 4328933 /usr/lib/locale/aa_ET/LC_NUMERIC +7fbea491d000-7fbea491e000 r--p 00000000 08:0a 4330095 /usr/lib/locale/en_US.utf8/LC_TIME +7fbea491e000-7fbea491f000 r--p 00000000 08:0a 4329578 /usr/lib/locale/chr_US/LC_MONETARY +7fbea491f000-7fbea4920000 r--p 00000000 08:0a 4329874 /usr/lib/locale/en_AG/LC_MESSAGES/SYS_LC_MESSAGES +7fbea4920000-7fbea4921000 r--p 00000000 08:0a 4329579 /usr/lib/locale/chr_US/LC_PAPER +7fbea4921000-7fbea4922000 r--p 00000000 08:0a 4329410 /usr/lib/locale/bi_VU/LC_NAME +7fbea4922000-7fbea4923000 r--p 00000000 08:0a 4330092 /usr/lib/locale/en_US.utf8/LC_ADDRESS +7fbea4923000-7fbea492a000 r--s 00000000 08:0a 4332592 /usr/lib/x86_64-linux-gnu/gconv/gconv-modules.cache +7fbea492a000-7fbea4932000 rw-s 00000000 08:0a 2105307 /tmp/hsperfdata_pavl-machine/58426 +7fbea4932000-7fbea495e000 r-xp 00000000 08:0b 8782377 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libjava.so +7fbea495e000-7fbea4b5e000 ---p 0002c000 08:0b 8782377 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libjava.so +7fbea4b5e000-7fbea4b5f000 r--p 0002c000 08:0b 8782377 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libjava.so +7fbea4b5f000-7fbea4b61000 rw-p 0002d000 08:0b 8782377 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libjava.so +7fbea4b61000-7fbea4b6e000 r-xp 00000000 08:0b 8782382 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libverify.so +7fbea4b6e000-7fbea4d6d000 ---p 0000d000 08:0b 8782382 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libverify.so +7fbea4d6d000-7fbea4d6f000 r--p 0000c000 08:0b 8782382 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libverify.so +7fbea4d6f000-7fbea4d70000 rw-p 0000e000 08:0b 8782382 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libverify.so +7fbea4d70000-7fbea4d73000 r--p 00000000 08:0a 4335156 /usr/lib/x86_64-linux-gnu/librt-2.30.so +7fbea4d73000-7fbea4d77000 r-xp 00003000 08:0a 4335156 /usr/lib/x86_64-linux-gnu/librt-2.30.so +7fbea4d77000-7fbea4d79000 r--p 00007000 08:0a 4335156 /usr/lib/x86_64-linux-gnu/librt-2.30.so +7fbea4d79000-7fbea4d7a000 r--p 00008000 08:0a 4335156 /usr/lib/x86_64-linux-gnu/librt-2.30.so +7fbea4d7a000-7fbea4d7b000 rw-p 00009000 08:0a 4335156 /usr/lib/x86_64-linux-gnu/librt-2.30.so +7fbea4d7b000-7fbea4d7c000 ---p 00000000 00:00 0 +7fbea4d7c000-7fbea4d7f000 ---p 00000000 00:00 0 +7fbea4d7f000-7fbea4e7c000 rw-p 00000000 00:00 0 +7fbea4e7c000-7fbea4e8b000 r--p 00000000 08:0a 4334559 /usr/lib/x86_64-linux-gnu/libm-2.30.so +7fbea4e8b000-7fbea4f26000 r-xp 0000f000 08:0a 4334559 /usr/lib/x86_64-linux-gnu/libm-2.30.so +7fbea4f26000-7fbea4fbf000 r--p 000aa000 08:0a 4334559 /usr/lib/x86_64-linux-gnu/libm-2.30.so +7fbea4fbf000-7fbea4fc0000 r--p 00142000 08:0a 4334559 /usr/lib/x86_64-linux-gnu/libm-2.30.so +7fbea4fc0000-7fbea4fc1000 rw-p 00143000 08:0a 4334559 /usr/lib/x86_64-linux-gnu/libm-2.30.so +7fbea4fc1000-7fbea5ca9000 r-xp 00000000 08:0b 8782359 /home/twisted/jdk1.8.0_201/jre/lib/amd64/server/libjvm.so +7fbea5ca9000-7fbea5ea8000 ---p 00ce8000 08:0b 8782359 /home/twisted/jdk1.8.0_201/jre/lib/amd64/server/libjvm.so +7fbea5ea8000-7fbea5f3e000 r--p 00ce7000 08:0b 8782359 /home/twisted/jdk1.8.0_201/jre/lib/amd64/server/libjvm.so +7fbea5f3e000-7fbea5f6f000 rw-p 00d7d000 08:0b 8782359 /home/twisted/jdk1.8.0_201/jre/lib/amd64/server/libjvm.so +7fbea5f6f000-7fbea5fac000 rw-p 00000000 00:00 0 +7fbea5fac000-7fbea5fd1000 r--p 00000000 08:0a 4333575 /usr/lib/x86_64-linux-gnu/libc-2.30.so +7fbea5fd1000-7fbea611b000 r-xp 00025000 08:0a 4333575 /usr/lib/x86_64-linux-gnu/libc-2.30.so +7fbea611b000-7fbea6165000 r--p 0016f000 08:0a 4333575 /usr/lib/x86_64-linux-gnu/libc-2.30.so +7fbea6165000-7fbea6168000 r--p 001b8000 08:0a 4333575 /usr/lib/x86_64-linux-gnu/libc-2.30.so +7fbea6168000-7fbea616b000 rw-p 001bb000 08:0a 4333575 /usr/lib/x86_64-linux-gnu/libc-2.30.so +7fbea616b000-7fbea616f000 rw-p 00000000 00:00 0 +7fbea616f000-7fbea6170000 r--p 00000000 08:0a 4333777 /usr/lib/x86_64-linux-gnu/libdl-2.30.so +7fbea6170000-7fbea6171000 r-xp 00001000 08:0a 4333777 /usr/lib/x86_64-linux-gnu/libdl-2.30.so +7fbea6171000-7fbea6172000 r--p 00002000 08:0a 4333777 /usr/lib/x86_64-linux-gnu/libdl-2.30.so +7fbea6172000-7fbea6173000 r--p 00002000 08:0a 4333777 /usr/lib/x86_64-linux-gnu/libdl-2.30.so +7fbea6173000-7fbea6174000 rw-p 00003000 08:0a 4333777 /usr/lib/x86_64-linux-gnu/libdl-2.30.so +7fbea6174000-7fbea618b000 r-xp 00000000 08:0b 8543590 /home/twisted/jdk1.8.0_201/lib/amd64/jli/libjli.so +7fbea618b000-7fbea638a000 ---p 00017000 08:0b 8543590 /home/twisted/jdk1.8.0_201/lib/amd64/jli/libjli.so +7fbea638a000-7fbea638b000 r--p 00016000 08:0b 8543590 /home/twisted/jdk1.8.0_201/lib/amd64/jli/libjli.so +7fbea638b000-7fbea638c000 rw-p 00017000 08:0b 8543590 /home/twisted/jdk1.8.0_201/lib/amd64/jli/libjli.so +7fbea638c000-7fbea6393000 r--p 00000000 08:0a 4335024 /usr/lib/x86_64-linux-gnu/libpthread-2.30.so +7fbea6393000-7fbea63a2000 r-xp 00007000 08:0a 4335024 /usr/lib/x86_64-linux-gnu/libpthread-2.30.so +7fbea63a2000-7fbea63a7000 r--p 00016000 08:0a 4335024 /usr/lib/x86_64-linux-gnu/libpthread-2.30.so +7fbea63a7000-7fbea63a8000 r--p 0001a000 08:0a 4335024 /usr/lib/x86_64-linux-gnu/libpthread-2.30.so +7fbea63a8000-7fbea63a9000 rw-p 0001b000 08:0a 4335024 /usr/lib/x86_64-linux-gnu/libpthread-2.30.so +7fbea63a9000-7fbea63af000 rw-p 00000000 00:00 0 +7fbea63af000-7fbea63b0000 r--p 00000000 08:0a 4329580 /usr/lib/locale/chr_US/LC_TELEPHONE +7fbea63b0000-7fbea63b1000 r--p 00000000 08:0a 4329575 /usr/lib/locale/chr_US/LC_MEASUREMENT +7fbea63b1000-7fbea63b2000 r--p 00000000 08:0a 4330093 /usr/lib/locale/en_US.utf8/LC_IDENTIFICATION +7fbea63b2000-7fbea63b5000 r--p 00000000 08:0a 4334790 /usr/lib/x86_64-linux-gnu/libnss_nis-2.30.so +7fbea63b5000-7fbea63bc000 r-xp 00003000 08:0a 4334790 /usr/lib/x86_64-linux-gnu/libnss_nis-2.30.so +7fbea63bc000-7fbea63be000 r--p 0000a000 08:0a 4334790 /usr/lib/x86_64-linux-gnu/libnss_nis-2.30.so +7fbea63be000-7fbea63bf000 r--p 0000b000 08:0a 4334790 /usr/lib/x86_64-linux-gnu/libnss_nis-2.30.so +7fbea63bf000-7fbea63c0000 rw-p 0000c000 08:0a 4334790 /usr/lib/x86_64-linux-gnu/libnss_nis-2.30.so +7fbea63c0000-7fbea63c2000 r--p 00000000 08:0a 4334776 /usr/lib/x86_64-linux-gnu/libnss_compat-2.30.so +7fbea63c2000-7fbea63c7000 r-xp 00002000 08:0a 4334776 /usr/lib/x86_64-linux-gnu/libnss_compat-2.30.so +7fbea63c7000-7fbea63c8000 r--p 00007000 08:0a 4334776 /usr/lib/x86_64-linux-gnu/libnss_compat-2.30.so +7fbea63c8000-7fbea63c9000 ---p 00008000 08:0a 4334776 /usr/lib/x86_64-linux-gnu/libnss_compat-2.30.so +7fbea63c9000-7fbea63ca000 r--p 00008000 08:0a 4334776 /usr/lib/x86_64-linux-gnu/libnss_compat-2.30.so +7fbea63ca000-7fbea63cb000 rw-p 00009000 08:0a 4334776 /usr/lib/x86_64-linux-gnu/libnss_compat-2.30.so +7fbea63cb000-7fbea63cc000 rw-p 00000000 00:00 0 +7fbea63cc000-7fbea63cd000 r--p 00000000 08:0a 4333008 /usr/lib/x86_64-linux-gnu/ld-2.30.so +7fbea63cd000-7fbea63eb000 r-xp 00001000 08:0a 4333008 /usr/lib/x86_64-linux-gnu/ld-2.30.so +7fbea63eb000-7fbea63f3000 r--p 0001f000 08:0a 4333008 /usr/lib/x86_64-linux-gnu/ld-2.30.so +7fbea63f3000-7fbea63f4000 r--p 00000000 00:00 0 +7fbea63f4000-7fbea63f5000 r--p 00027000 08:0a 4333008 /usr/lib/x86_64-linux-gnu/ld-2.30.so +7fbea63f5000-7fbea63f6000 rw-p 00028000 08:0a 4333008 /usr/lib/x86_64-linux-gnu/ld-2.30.so +7fbea63f6000-7fbea63f7000 rw-p 00000000 00:00 0 +7ffc39d7e000-7ffc39d9f000 rw-p 00000000 00:00 0 [stack] +7ffc39de5000-7ffc39de8000 r--p 00000000 00:00 0 [vvar] +7ffc39de8000-7ffc39de9000 r-xp 00000000 00:00 0 [vdso] + +VM Arguments: +java_command: serial4j.jar +java_class_path (initial): serial4j.jar +Launcher Type: SUN_STANDARD + +Environment Variables: +JAVA_HOME=/home/twisted/jdk1.8.0_201 +PATH=/home/pavl-machine/.local/bin:/snap/bin:/usr/sandbox/:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/usr/share/games:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games +SHELL=/bin/bash +DISPLAY=:0 + +Signal Handlers: +SIGSEGV: [libjvm.so+0xad3e60], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO +SIGBUS: [libjvm.so+0xad3e60], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO +SIGFPE: [libjvm.so+0x90b880], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO +SIGPIPE: [libjvm.so+0x90b880], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO +SIGXFSZ: [libjvm.so+0x90b880], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO +SIGILL: [libjvm.so+0x90b880], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO +SIGUSR1: SIG_DFL, sa_mask[0]=00000000000000000000000000000000, sa_flags=none +SIGUSR2: [libjvm.so+0x90b750], sa_mask[0]=00000000000000000000000000000000, sa_flags=SA_RESTART|SA_SIGINFO +SIGHUP: [libjvm.so+0x90bd70], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO +SIGINT: [libjvm.so+0x90bd70], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO +SIGTERM: [libjvm.so+0x90bd70], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO +SIGQUIT: [libjvm.so+0x90bd70], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO + + +--------------- S Y S T E M --------------- + +OS:DISTRIB_ID=Parrot +DISTRIB_RELEASE=4.9 +DISTRIB_CODENAME=rolling +DISTRIB_DESCRIPTION="Parrot 4.9" + +uname:Linux 5.5.0-1parrot1-amd64 #1 SMP Parrot 5.5.17-1parrot1 (2020-04-25) x86_64 +libc:glibc 2.30 NPTL 2.30 +rlimit: STACK 8192k, CORE 0k, NPROC 47123, NOFILE 1048576, AS infinity +load average:1.65 1.18 1.05 + +/proc/meminfo: +MemTotal: 12202288 kB +MemFree: 2279016 kB +MemAvailable: 7464072 kB +Buffers: 1149436 kB +Cached: 4912256 kB +SwapCached: 240 kB +Active: 5510708 kB +Inactive: 3395288 kB +Active(anon): 2640644 kB +Inactive(anon): 1146792 kB +Active(file): 2870064 kB +Inactive(file): 2248496 kB +Unevictable: 330688 kB +Mlocked: 176 kB +SwapTotal: 6836220 kB +SwapFree: 6834872 kB +Dirty: 4304 kB +Writeback: 0 kB +AnonPages: 3100228 kB +Mapped: 913840 kB +Shmem: 999092 kB +KReclaimable: 389424 kB +Slab: 527792 kB +SReclaimable: 389424 kB +SUnreclaim: 138368 kB +KernelStack: 14448 kB +PageTables: 47828 kB +NFS_Unstable: 0 kB +Bounce: 0 kB +WritebackTmp: 0 kB +CommitLimit: 12937364 kB +Committed_AS: 13129156 kB +VmallocTotal: 34359738367 kB +VmallocUsed: 46160 kB +VmallocChunk: 0 kB +Percpu: 3872 kB +HardwareCorrupted: 0 kB +AnonHugePages: 542720 kB +ShmemHugePages: 0 kB +ShmemPmdMapped: 0 kB +FileHugePages: 0 kB +FilePmdMapped: 0 kB +HugePages_Total: 0 +HugePages_Free: 0 +HugePages_Rsvd: 0 +HugePages_Surp: 0 +Hugepagesize: 2048 kB +Hugetlb: 0 kB +DirectMap4k: 459028 kB +DirectMap2M: 11986944 kB +DirectMap1G: 1048576 kB + +container (cgroup) information: +container_type: cgroupv1 +cpu_cpuset_cpus: 0-3 +cpu_memory_nodes: 0 +active_processor_count: 4 +cpu_quota: -1 +cpu_period: 100000 +cpu_shares: -1 +memory_limit_in_bytes: -1 +memory_and_swap_limit_in_bytes: -2 +memory_soft_limit_in_bytes: -1 +memory_usage_in_bytes: 2608320512 +memory_max_usage_in_bytes: 4470431744 + + +CPU:total 4 (initial active 4) (2 cores per cpu, 2 threads per core) family 6 model 142 stepping 9, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, avx, avx2, aes, clmul, erms, 3dnowpref, lzcnt, ht, tsc, tscinvbit, bmi1, bmi2, adx + +/proc/cpuinfo: +processor : 0 +vendor_id : GenuineIntel +cpu family : 6 +model : 142 +model name : Intel(R) Core(TM) i3-7020U CPU @ 2.30GHz +stepping : 9 +microcode : 0xca +cpu MHz : 2300.016 +cache size : 3072 KB +physical id : 0 +siblings : 4 +core id : 0 +cpu cores : 2 +apicid : 0 +initial apicid : 0 +fpu : yes +fpu_exception : yes +cpuid level : 22 +wp : yes +flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_clear flush_l1d +bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit +bogomips : 4599.93 +clflush size : 64 +cache_alignment : 64 +address sizes : 39 bits physical, 48 bits virtual +power management: + +processor : 1 +vendor_id : GenuineIntel +cpu family : 6 +model : 142 +model name : Intel(R) Core(TM) i3-7020U CPU @ 2.30GHz +stepping : 9 +microcode : 0xca +cpu MHz : 2300.001 +cache size : 3072 KB +physical id : 0 +siblings : 4 +core id : 1 +cpu cores : 2 +apicid : 2 +initial apicid : 2 +fpu : yes +fpu_exception : yes +cpuid level : 22 +wp : yes +flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm arat pln pts hwp hwp_notify hwp_act_window hwp_epp flush_l1d +bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit +bogomips : 4599.93 +clflush size : 64 +cache_alignment : 64 +address sizes : 39 bits physical, 48 bits virtual +power management: + +processor : 2 +vendor_id : GenuineIntel +cpu family : 6 +model : 142 +model name : Intel(R) Core(TM) i3-7020U CPU @ 2.30GHz +stepping : 9 +microcode : 0xca +cpu MHz : 2300.008 +cache size : 3072 KB +physical id : 0 +siblings : 4 +core id : 0 +cpu cores : 2 +apicid : 1 +initial apicid : 1 +fpu : yes +fpu_exception : yes +cpuid level : 22 +wp : yes +flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_clear flush_l1d +bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit +bogomips : 4599.93 +clflush size : 64 +cache_alignment : 64 +address sizes : 39 bits physical, 48 bits virtual +power management: + +processor : 3 +vendor_id : GenuineIntel +cpu family : 6 +model : 142 +model name : Intel(R) Core(TM) i3-7020U CPU @ 2.30GHz +stepping : 9 +microcode : 0xca +cpu MHz : 2300.005 +cache size : 3072 KB +physical id : 0 +siblings : 4 +core id : 1 +cpu cores : 2 +apicid : 3 +initial apicid : 3 +fpu : yes +fpu_exception : yes +cpuid level : 22 +wp : yes +flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_clear flush_l1d +bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit +bogomips : 4599.93 +clflush size : 64 +cache_alignment : 64 +address sizes : 39 bits physical, 48 bits virtual +power management: + + + +Memory: 4k page, physical 12202288k(2279016k free), swap 6836220k(6834872k free) + +vm_info: Java HotSpot(TM) 64-Bit Server VM (25.201-b09) for linux-amd64 JRE (1.8.0_201-b09), built on Dec 15 2018 11:35:59 by "java_re" with gcc 7.3.0 + +time: Tue Sep 13 22:30:38 2022 +timezone: CDT +elapsed time: 0 seconds (0d 0h 0m 0s) + diff --git a/HelloSerial4j/analysis of native error logs/example2/README.md b/HelloSerial4j/analysis of native error logs/example2/README.md new file mode 100644 index 00000000..e69de29b diff --git a/HelloSerial4j/analysis of native error logs/example2/hs_err_pid73680.log b/HelloSerial4j/analysis of native error logs/example2/hs_err_pid73680.log new file mode 100644 index 00000000..c418232b --- /dev/null +++ b/HelloSerial4j/analysis of native error logs/example2/hs_err_pid73680.log @@ -0,0 +1,629 @@ +# +# A fatal error has been detected by the Java Runtime Environment: +# +# SIGSEGV (0xb) at pc=0x00007fef2800bc16, pid=73680, tid=0x00007feeff229700 +# +# JRE version: Java(TM) SE Runtime Environment (8.0_201-b09) (build 1.8.0_201-b09) +# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.201-b09 mixed mode linux-amd64 compressed oops) +# Problematic frame: +# C [libserial4j.so+0x4c16] +# +# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again +# +# If you would like to submit a bug report, please visit: +# http://bugreport.java.com/bugreport/crash.jsp +# The crash happened outside the Java Virtual Machine in native code. +# See problematic frame for where to report the bug. +# + +--------------- T H R E A D --------------- + +Current thread (0x00007fef24200800): JavaThread "Thread-0" [_thread_in_native, id=73695, stack(0x00007feeff129000,0x00007feeff22a000)] + +siginfo: si_signo: 11 (SIGSEGV), si_code: 1 (SEGV_MAPERR), si_addr: 0x0000000000000000 + +Registers: +RAX=0x00007feecc02ae90, RBX=0x0000000000000000, RCX=0x0000000000000520, RDX=0x0000000000000018 +RSP=0x00007feeff2287c0, RBP=0x00007feeff228800, RSI=0x00007feecc0008d0, RDI=0x00007feecc02ae80 +R8 =0x00007feecc02ae90, R9 =0x00007feecc02b3c0, R10=0x0000000000000000, R11=0x00007feecc000080 +R12=0x0000000000000000, R13=0x00007fef0d41cd18, R14=0x00007feeff228908, R15=0x00007fef24200800 +RIP=0x00007fef2800bc16, EFLAGS=0x0000000000010202, CSGSFS=0x002b000000000033, ERR=0x0000000000000006 + TRAPNO=0x000000000000000e + +Top of Stack: (sp=0x00007feeff2287c0) +0x00007feeff2287c0: 000000770000007c 00007fef2800f2bc +0x00007feeff2287d0: 00007fef2800f2b8 0000000000000000 +0x00007feeff2287e0: 00007feecc02adb0 0000000100000000 +0x00007feeff2287f0: 00007fef2800f2bc 00007fef2800f2bc +0x00007feeff228800: 00007feeff228830 00007fef2800bd35 +0x00007feeff228810: 000000000d41cd18 00007fef2800f2b8 +0x00007feeff228820: 00007fef0d41cd18 00007fef0d41cd18 +0x00007feeff228830: 00007feeff228870 00007fef2800a74e +0x00007feeff228840: 00007fef0d41cd18 00007fef2800f260 +0x00007feeff228850: 00007fef0d41cd18 00007feecc02adb0 +0x00007feeff228860: 0000000000000000 00007feecc02bad0 +0x00007feeff228870: 00007feeff228890 00007fef2800b472 +0x00007feeff228880: 00007feeff228908 00007fef242009f8 +0x00007feeff228890: 00007feeff2288e8 00007fef14bcd6c7 +0x00007feeff2288a0: 00007fef14bcd3e2 00007feeff2288a8 +0x00007feeff2288b0: 00007fef0d41cd18 00007feeff228908 +0x00007feeff2288c0: 00007fef0d41d538 0000000000000000 +0x00007feeff2288d0: 00007fef0d41cd18 0000000000000000 +0x00007feeff2288e0: 00007feeff228908 00007feeff228950 +0x00007feeff2288f0: 00007fef14bbcd00 0000000000000000 +0x00007feeff228900: 00007fef14bc6d16 0000000781fe8140 +0x00007feeff228910: 00007feeff228910 00007fef0d416866 +0x00007feeff228920: 00007feeff228968 00007fef0d416d08 +0x00007feeff228930: 0000000000000000 00007fef0d416890 +0x00007feeff228940: 00007feeff228908 00007feeff228968 +0x00007feeff228950: 00007feeff2289b0 00007fef14bbd2bd +0x00007feeff228960: 0000000000000000 0000000781fe8118 +0x00007feeff228970: 00007feeff228970 00007fef0d416051 +0x00007feeff228980: 00007feeff2289c0 00007fef0d416d08 +0x00007feeff228990: 0000000000000000 00007fef0d416078 +0x00007feeff2289a0: 00007feeff228968 00007feeff2289c0 +0x00007feeff2289b0: 00007feeff228a10 00007fef14bbd040 + +Instructions: (pc=0x00007fef2800bc16) +0x00007fef2800bbf6: 98 48 8d 14 c5 00 00 00 00 48 8b 45 d8 48 8d 1c +0x00007fef2800bc06: 02 be 08 00 00 00 bf 01 00 00 00 e8 1a e6 ff ff +0x00007fef2800bc16: 48 89 03 8b 45 ec 48 98 48 8d 14 c5 00 00 00 00 +0x00007fef2800bc26: 48 8b 45 e0 48 01 d0 8b 55 e8 48 63 d2 48 8d 0c + +Register to memory mapping: + +RAX=0x00007feecc02ae90 is an unknown value +RBX=0x0000000000000000 is an unknown value +RCX=0x0000000000000520 is an unknown value +RDX=0x0000000000000018 is an unknown value +RSP=0x00007feeff2287c0 is pointing into the stack for thread: 0x00007fef24200800 +RBP=0x00007feeff228800 is pointing into the stack for thread: 0x00007fef24200800 +RSI=0x00007feecc0008d0 is an unknown value +RDI=0x00007feecc02ae80 is an unknown value +R8 =0x00007feecc02ae90 is an unknown value +R9 =0x00007feecc02b3c0 is an unknown value +R10=0x0000000000000000 is an unknown value +R11=0x00007feecc000080 is an unknown value +R12=0x0000000000000000 is an unknown value +R13={method} {0x00007fef0d41cd18} 'fetchSerialPorts0' '()I' in 'com/serial4j/core/serial/NativeTerminalDevice' +R14=0x00007feeff228908 is pointing into the stack for thread: 0x00007fef24200800 +R15=0x00007fef24200800 is a thread + + +Stack: [0x00007feeff129000,0x00007feeff22a000], sp=0x00007feeff2287c0, free space=1021k +Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) +C [libserial4j.so+0x4c16] +C [libserial4j.so+0x4d35] DynamicBuffer::remove(int)+0x59 +C [libserial4j.so+0x374e] Terminal::TerminalDevice::fetchSerialPorts()+0x114 +C [libserial4j.so+0x4472] Java_com_serial4j_core_serial_NativeTerminalDevice_fetchSerialPorts0+0x1f +j com.serial4j.core.serial.NativeTerminalDevice.fetchSerialPorts0()I+0 +j com.serial4j.core.serial.TerminalDevice.fetchSerialPorts()V+22 +j com.serial4j.core.serial.TerminalDevice.getSerialPorts()[Ljava/lang/String;+1 +j com.serial4j.example.HelloNativeSerial4J.run()V+349 +v ~StubRoutines::call_stub +V [libjvm.so+0x68825b] JavaCalls::call_helper(JavaValue*, methodHandle*, JavaCallArguments*, Thread*)+0xddb +V [libjvm.so+0x685b23] JavaCalls::call_virtual(JavaValue*, KlassHandle, Symbol*, Symbol*, JavaCallArguments*, Thread*)+0x263 +V [libjvm.so+0x6860e7] JavaCalls::call_virtual(JavaValue*, Handle, KlassHandle, Symbol*, Symbol*, Thread*)+0x47 +V [libjvm.so+0x6f225c] thread_entry(JavaThread*, Thread*)+0x6c +V [libjvm.so+0xa7bb6b] JavaThread::thread_main_inner()+0xdb +V [libjvm.so+0xa7be71] JavaThread::run()+0x2d1 +V [libjvm.so+0x90d922] java_start(Thread*)+0x102 +C [libpthread.so.0+0x8f27] start_thread+0xd7 + +Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) +j com.serial4j.core.serial.NativeTerminalDevice.fetchSerialPorts0()I+0 +j com.serial4j.core.serial.TerminalDevice.fetchSerialPorts()V+22 +j com.serial4j.core.serial.TerminalDevice.getSerialPorts()[Ljava/lang/String;+1 +j com.serial4j.example.HelloNativeSerial4J.run()V+349 +v ~StubRoutines::call_stub + +--------------- P R O C E S S --------------- + +Java Threads: ( => current thread ) +=>0x00007fef24200800 JavaThread "Thread-0" [_thread_in_native, id=73695, stack(0x00007feeff129000,0x00007feeff22a000)] + 0x00007fef24195000 JavaThread "Service Thread" daemon [_thread_blocked, id=73693, stack(0x00007feeff32b000,0x00007feeff42c000)] + 0x00007fef2418a000 JavaThread "C1 CompilerThread2" daemon [_thread_blocked, id=73692, stack(0x00007feeff42d000,0x00007feeff52d000)] + 0x00007fef24188000 JavaThread "C2 CompilerThread1" daemon [_thread_blocked, id=73691, stack(0x00007feeff52e000,0x00007feeff62e000)] + 0x00007fef24185000 JavaThread "C2 CompilerThread0" daemon [_thread_blocked, id=73690, stack(0x00007feeff62f000,0x00007feeff72f000)] + 0x00007fef24184000 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=73689, stack(0x00007feeff72f000,0x00007feeff830000)] + 0x00007fef2414c800 JavaThread "Finalizer" daemon [_thread_blocked, id=73688, stack(0x00007feeffafb000,0x00007feeffbfc000)] + 0x00007fef2414a000 JavaThread "Reference Handler" daemon [_thread_blocked, id=73687, stack(0x00007feeffbfc000,0x00007feeffcfd000)] + 0x00007fef2400b000 JavaThread "main" [_thread_blocked, id=73681, stack(0x00007fef28377000,0x00007fef28477000)] + +Other Threads: + 0x00007fef24140000 VMThread [stack: 0x00007feeffcfe000,0x00007feeffdfe000] [id=73686] + 0x00007fef24197800 WatcherThread [stack: 0x00007feeff22b000,0x00007feeff32b000] [id=73694] + +VM state:not at safepoint (normal execution) + +VM Mutex/Monitor currently owned by a thread: None + +heap address: 0x0000000705c00000, size: 2980 MB, Compressed Oops mode: Zero based, Oop shift amount: 3 +Narrow klass base: 0x0000000000000000, Narrow klass shift: 3 +Compressed class space size: 1073741824 Address: 0x00000007c0000000 + +Heap: + PSYoungGen total 56320K, used 2918K [0x0000000781f00000, 0x0000000785d80000, 0x00000007c0000000) + eden space 48640K, 6% used [0x0000000781f00000,0x00000007821d99d0,0x0000000784e80000) + from space 7680K, 0% used [0x0000000785600000,0x0000000785600000,0x0000000785d80000) + to space 7680K, 0% used [0x0000000784e80000,0x0000000784e80000,0x0000000785600000) + ParOldGen total 128512K, used 0K [0x0000000705c00000, 0x000000070d980000, 0x0000000781f00000) + object space 128512K, 0% used [0x0000000705c00000,0x0000000705c00000,0x000000070d980000) + Metaspace used 3117K, capacity 4664K, committed 4864K, reserved 1056768K + class space used 350K, capacity 424K, committed 512K, reserved 1048576K + +Card table byte_map: [0x00007fef14222000,0x00007fef147f5000] byte_map_base: 0x00007fef109f4000 + +Marking Bits: (ParMarkBitMap*) 0x00007fef29587d80 + Begin Bits: [0x00007fef0de1d000, 0x00007fef10cad000) + End Bits: [0x00007fef10cad000, 0x00007fef13b3d000) + +Polling page: 0x00007fef299ee000 + +CodeCache: size=245760Kb used=1160Kb max_used=1160Kb free=244599Kb + bounds [0x00007fef14bb5000, 0x00007fef14e25000, 0x00007fef23bb5000] + total_blobs=284 nmethods=48 adapters=150 + compilation: enabled + +Compilation events (10 events): +Event: 0.145 Thread 0x00007fef2418a000 44 1 java.net.URL::getFile (5 bytes) +Event: 0.145 Thread 0x00007fef2418a000 nmethod 44 0x00007fef14cd0750 code [0x00007fef14cd08a0, 0x00007fef14cd09b0] +Event: 0.145 Thread 0x00007fef2418a000 45 1 java.net.URL::getRef (5 bytes) +Event: 0.145 Thread 0x00007fef2418a000 nmethod 45 0x00007fef14cd0490 code [0x00007fef14cd05e0, 0x00007fef14cd06f0] +Event: 0.150 Thread 0x00007fef2418a000 47 3 java.lang.String:: (10 bytes) +Event: 0.150 Thread 0x00007fef2418a000 nmethod 47 0x00007fef14ccfe90 code [0x00007fef14cd0000, 0x00007fef14cd01d0] +Event: 0.150 Thread 0x00007fef2418a000 46 s 1 java.util.Vector::size (5 bytes) +Event: 0.150 Thread 0x00007fef2418a000 nmethod 46 0x00007fef14ccfa50 code [0x00007fef14ccfba0, 0x00007fef14ccfe10] +Event: 0.150 Thread 0x00007fef2418a000 48 1 java.util.zip.ZipFile::access$000 (5 bytes) +Event: 0.150 Thread 0x00007fef2418a000 nmethod 48 0x00007fef14ccf6d0 code [0x00007fef14ccf820, 0x00007fef14ccf910] + +GC Heap History (0 events): +No events + +Deoptimization events (0 events): +No events + +Classes redefined (0 events): +No events + +Internal exceptions (6 events): +Event: 0.048 Thread 0x00007fef2400b000 Exception (0x0000000781f07cb0) thrown at [/HUDSON/workspace/8-2-build-linux-amd64/jdk8u201/12317/hotspot/src/sh +Event: 0.049 Thread 0x00007fef2400b000 Exception (0x0000000781f07f98) thrown at [/HUDSON/workspace/8-2-build-linux-amd64/jdk8u201/12317/hotspot/src/share/vm/prims/jni.c +Event: 0.129 Thread 0x00007fef2400b000 Exception (0x0000000781fc0720) thrown at [/HUDSON/workspace/8-2-build-linux-amd64/jdk8u201/12317/hotspot/src/share/vm/prims/jvm.cpp, line 1502] +Event: 0.129 Thread 0x00007fef2400b000 Exception (0x0000000781fc0930) thrown at [/HUDSON/workspace/8-2-build-linux-amd64/jdk8u201/12317/hotspot/src/share/vm/prims/jvm.cpp, line 1502] +Event: 0.132 Thread 0x00007fef2400b000 Exception (0x0000000781fc2d98) thrown at [/HUDSON/workspace/8-2-build-linux-amd64/jdk8u201/12317/hotspot/src/share/vm/prims/jvm.cpp, line 1502] +Event: 0.132 Thread 0x00007fef2400b000 Exception (0x0000000781fc2fa8) thrown at [/HUDSON/workspace/8-2-build-linux-amd64/jdk8u201/12317/hotspot/src/share/vm/prims/jvm.cpp, line 1502] + +Events (10 events): +Event: 0.144 loading class com/serial4j/core/serial/control/TerminalLocalFlag +Event: 0.144 loading class com/serial4j/core/serial/control/TerminalLocalFlag done +Event: 0.144 loading class com/serial4j/core/serial/control/TerminalOutputFlag +Event: 0.144 loading class com/serial4j/core/serial/control/TerminalOutputFlag done +Event: 0.145 loading class com/serial4j/core/serial/control/TerminalInputFlag +Event: 0.145 loading class com/serial4j/core/serial/control/TerminalInputFlag done +Event: 0.147 loading class com/serial4j/core/serial/BaudRate +Event: 0.147 loading class com/serial4j/core/serial/BaudRate done +Event: 0.148 loading class com/serial4j/core/serial/ReadConfiguration +Event: 0.148 loading class com/serial4j/core/serial/ReadConfiguration done + + +Dynamic libraries: +00400000-00401000 r-xp 00000000 08:0b 8396377 /home/twisted/jdk1.8.0_201/bin/java +00600000-00601000 r--p 00000000 08:0b 8396377 /home/twisted/jdk1.8.0_201/bin/java +00601000-00602000 rw-p 00001000 08:0b 8396377 /home/twisted/jdk1.8.0_201/bin/java +00689000-006aa000 rw-p 00000000 00:00 0 [heap] +705c00000-70d980000 rw-p 00000000 00:00 0 +70d980000-781f00000 ---p 00000000 00:00 0 +781f00000-785d80000 rw-p 00000000 00:00 0 +785d80000-7c0000000 ---p 00000000 00:00 0 +7c0000000-7c0080000 rw-p 00000000 00:00 0 +7c0080000-800000000 ---p 00000000 00:00 0 +7feecc000000-7feecc048000 rw-p 00000000 00:00 0 +7feecc048000-7feed0000000 ---p 00000000 00:00 0 +7feed4000000-7feed4021000 rw-p 00000000 00:00 0 +7feed4021000-7feed8000000 ---p 00000000 00:00 0 +7feed8000000-7feed8021000 rw-p 00000000 00:00 0 +7feed8021000-7feedc000000 ---p 00000000 00:00 0 +7feedc000000-7feedc021000 rw-p 00000000 00:00 0 +7feedc021000-7feee0000000 ---p 00000000 00:00 0 +7feee0000000-7feee0079000 rw-p 00000000 00:00 0 +7feee0079000-7feee4000000 ---p 00000000 00:00 0 +7feee4000000-7feee4021000 rw-p 00000000 00:00 0 +7feee4021000-7feee8000000 ---p 00000000 00:00 0 +7feee8000000-7feee803e000 rw-p 00000000 00:00 0 +7feee803e000-7feeec000000 ---p 00000000 00:00 0 +7feeec000000-7feeec021000 rw-p 00000000 00:00 0 +7feeec021000-7feef0000000 ---p 00000000 00:00 0 +7feef0000000-7feef0021000 rw-p 00000000 00:00 0 +7feef0021000-7feef4000000 ---p 00000000 00:00 0 +7feef4000000-7feef4021000 rw-p 00000000 00:00 0 +7feef4021000-7feef8000000 ---p 00000000 00:00 0 +7feef8000000-7feef8021000 rw-p 00000000 00:00 0 +7feef8021000-7feefc000000 ---p 00000000 00:00 0 +7feefee94000-7feeff129000 rw-p 00000000 00:00 0 +7feeff129000-7feeff12c000 ---p 00000000 00:00 0 +7feeff12c000-7feeff22a000 rw-p 00000000 00:00 0 +7feeff22a000-7feeff22b000 ---p 00000000 00:00 0 +7feeff22b000-7feeff32b000 rw-p 00000000 00:00 0 +7feeff32b000-7feeff32e000 ---p 00000000 00:00 0 +7feeff32e000-7feeff42c000 rw-p 00000000 00:00 0 +7feeff42c000-7feeff42d000 ---p 00000000 00:00 0 +7feeff42d000-7feeff430000 ---p 00000000 00:00 0 +7feeff430000-7feeff52d000 rw-p 00000000 00:00 0 +7feeff52d000-7feeff52e000 ---p 00000000 00:00 0 +7feeff52e000-7feeff531000 ---p 00000000 00:00 0 +7feeff531000-7feeff62e000 rw-p 00000000 00:00 0 +7feeff62e000-7feeff62f000 ---p 00000000 00:00 0 +7feeff62f000-7feeff632000 ---p 00000000 00:00 0 +7feeff632000-7feeff72f000 rw-p 00000000 00:00 0 +7feeff72f000-7feeff732000 ---p 00000000 00:00 0 +7feeff732000-7feeff830000 rw-p 00000000 00:00 0 +7feeff830000-7feeff883000 r--p 00000000 08:0a 4328904 /usr/lib/locale/aa_DJ.utf8/LC_CTYPE +7feeff883000-7feeffafb000 r--p 00000000 08:0a 4328903 /usr/lib/locale/aa_DJ.utf8/LC_COLLATE +7feeffafb000-7feeffafe000 ---p 00000000 00:00 0 +7feeffafe000-7feeffbfc000 rw-p 00000000 00:00 0 +7feeffbfc000-7feeffbff000 ---p 00000000 00:00 0 +7feeffbff000-7feeffcfd000 rw-p 00000000 00:00 0 +7feeffcfd000-7feeffcfe000 ---p 00000000 00:00 0 +7feeffcfe000-7fef00000000 rw-p 00000000 00:00 0 +7fef00000000-7fef00021000 rw-p 00000000 00:00 0 +7fef00021000-7fef04000000 ---p 00000000 00:00 0 +7fef04000000-7fef04021000 rw-p 00000000 00:00 0 +7fef04021000-7fef08000000 ---p 00000000 00:00 0 +7fef08000000-7fef08021000 rw-p 00000000 00:00 0 +7fef08021000-7fef0c000000 ---p 00000000 00:00 0 +7fef0c009000-7fef0cd65000 rw-p 00000000 00:00 0 +7fef0cd65000-7fef0cf3f000 r--s 03d6f000 08:0b 8543644 /home/twisted/jdk1.8.0_201/jre/lib/rt.jar +7fef0cf3f000-7fef0d450000 rw-p 00000000 00:00 0 +7fef0d450000-7fef0d810000 ---p 00000000 00:00 0 +7fef0d810000-7fef13b3d000 rw-p 00000000 00:00 0 +7fef13b3d000-7fef13b3e000 ---p 00000000 00:00 0 +7fef13b3e000-7fef13c3e000 rw-p 00000000 00:00 0 +7fef13c3e000-7fef13c3f000 ---p 00000000 00:00 0 +7fef13c3f000-7fef13d3f000 rw-p 00000000 00:00 0 +7fef13d3f000-7fef13d40000 ---p 00000000 00:00 0 +7fef13d40000-7fef13e7f000 rw-p 00000000 00:00 0 +7fef13e7f000-7fef14222000 ---p 00000000 00:00 0 +7fef14222000-7fef14261000 rw-p 00000000 00:00 0 +7fef14261000-7fef14603000 ---p 00000000 00:00 0 +7fef14603000-7fef14623000 rw-p 00000000 00:00 0 +7fef14623000-7fef147f4000 ---p 00000000 00:00 0 +7fef147f4000-7fef147ff000 rw-p 00000000 00:00 0 +7fef147ff000-7fef14bb5000 ---p 00000000 00:00 0 +7fef14bb5000-7fef14e25000 rwxp 00000000 00:00 0 +7fef14e25000-7fef23bb5000 ---p 00000000 00:00 0 +7fef23bb5000-7fef23bd0000 r-xp 00000000 08:0b 8782383 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libzip.so +7fef23bd0000-7fef23dcf000 ---p 0001b000 08:0b 8782383 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libzip.so +7fef23dcf000-7fef23dd0000 r--p 0001a000 08:0b 8782383 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libzip.so +7fef23dd0000-7fef23dd1000 rw-p 0001b000 08:0b 8782383 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libzip.so +7fef23dd1000-7fef23dfd000 r-xp 00000000 08:0b 8782377 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libjava.so +7fef23dfd000-7fef23ffd000 ---p 0002c000 08:0b 8782377 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libjava.so +7fef23ffd000-7fef23ffe000 r--p 0002c000 08:0b 8782377 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libjava.so +7fef23ffe000-7fef24000000 rw-p 0002d000 08:0b 8782377 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libjava.so +7fef24000000-7fef24208000 rw-p 00000000 00:00 0 +7fef24208000-7fef28000000 ---p 00000000 00:00 0 +7fef28007000-7fef2800a000 r--p 00000000 08:0b 8530741 /home/twisted/GradleProjects/AVR-Sandbox/HelloSerial4j/output/serial4j/libserial4j.so +7fef2800a000-7fef2800c000 r-xp 00003000 08:0b 8530741 /home/twisted/GradleProjects/AVR-Sandbox/HelloSerial4j/output/serial4j/libserial4j.so +7fef2800c000-7fef2800e000 r--p 00005000 08:0b 8530741 /home/twisted/GradleProjects/AVR-Sandbox/HelloSerial4j/output/serial4j/libserial4j.so +7fef2800e000-7fef2800f000 r--p 00006000 08:0b 8530741 /home/twisted/GradleProjects/AVR-Sandbox/HelloSerial4j/output/serial4j/libserial4j.so +7fef2800f000-7fef28010000 rw-p 00007000 08:0b 8530741 /home/twisted/GradleProjects/AVR-Sandbox/HelloSerial4j/output/serial4j/libserial4j.so +7fef28010000-7fef28011000 ---p 00000000 00:00 0 +7fef28011000-7fef28111000 rw-p 00000000 00:00 0 +7fef28111000-7fef28114000 r--p 00000000 08:0a 4334780 /usr/lib/x86_64-linux-gnu/libnss_files-2.30.so +7fef28114000-7fef2811b000 r-xp 00003000 08:0a 4334780 /usr/lib/x86_64-linux-gnu/libnss_files-2.30.so +7fef2811b000-7fef2811d000 r--p 0000a000 08:0a 4334780 /usr/lib/x86_64-linux-gnu/libnss_files-2.30.so +7fef2811d000-7fef2811e000 r--p 0000b000 08:0a 4334780 /usr/lib/x86_64-linux-gnu/libnss_files-2.30.so +7fef2811e000-7fef2811f000 rw-p 0000c000 08:0a 4334780 /usr/lib/x86_64-linux-gnu/libnss_files-2.30.so +7fef2811f000-7fef28125000 rw-p 00000000 00:00 0 +7fef28125000-7fef2812a000 r--p 00000000 08:0a 4334771 /usr/lib/x86_64-linux-gnu/libnsl-2.30.so +7fef2812a000-7fef28137000 r-xp 00005000 08:0a 4334771 /usr/lib/x86_64-linux-gnu/libnsl-2.30.so +7fef28137000-7fef2813b000 r--p 00012000 08:0a 4334771 /usr/lib/x86_64-linux-gnu/libnsl-2.30.so +7fef2813b000-7fef2813c000 r--p 00015000 08:0a 4334771 /usr/lib/x86_64-linux-gnu/libnsl-2.30.so +7fef2813c000-7fef2813d000 rw-p 00016000 08:0a 4334771 /usr/lib/x86_64-linux-gnu/libnsl-2.30.so +7fef2813d000-7fef2813f000 rw-p 00000000 00:00 0 +7fef28144000-7fef28146000 r--s 0000a000 08:0b 8531742 /home/twisted/GradleProjects/AVR-Sandbox/HelloSerial4j/output/serial4j/serial4j.jar +7fef28146000-7fef28147000 r--p 00000000 08:0a 4328933 /usr/lib/locale/aa_ET/LC_NUMERIC +7fef28147000-7fef28148000 r--p 00000000 08:0a 4330095 /usr/lib/locale/en_US.utf8/LC_TIME +7fef28148000-7fef28149000 r--p 00000000 08:0a 4329578 /usr/lib/locale/chr_US/LC_MONETARY +7fef28149000-7fef2814a000 r--p 00000000 08:0a 4329874 /usr/lib/locale/en_AG/LC_MESSAGES/SYS_LC_MESSAGES +7fef2814a000-7fef2814b000 r--p 00000000 08:0a 4329579 /usr/lib/locale/chr_US/LC_PAPER +7fef2814b000-7fef2814c000 r--p 00000000 08:0a 4329410 /usr/lib/locale/bi_VU/LC_NAME +7fef2814c000-7fef2814d000 r--p 00000000 08:0a 4330092 /usr/lib/locale/en_US.utf8/LC_ADDRESS +7fef2814d000-7fef28154000 r--s 00000000 08:0a 4332592 /usr/lib/x86_64-linux-gnu/gconv/gconv-modules.cache +7fef28154000-7fef2815c000 rw-s 00000000 08:0a 2105334 /tmp/hsperfdata_pavl-machine/73680 +7fef2815c000-7fef28169000 r-xp 00000000 08:0b 8782382 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libverify.so +7fef28169000-7fef28368000 ---p 0000d000 08:0b 8782382 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libverify.so +7fef28368000-7fef2836a000 r--p 0000c000 08:0b 8782382 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libverify.so +7fef2836a000-7fef2836b000 rw-p 0000e000 08:0b 8782382 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libverify.so +7fef2836b000-7fef2836e000 r--p 00000000 08:0a 4335156 /usr/lib/x86_64-linux-gnu/librt-2.30.so +7fef2836e000-7fef28372000 r-xp 00003000 08:0a 4335156 /usr/lib/x86_64-linux-gnu/librt-2.30.so +7fef28372000-7fef28374000 r--p 00007000 08:0a 4335156 /usr/lib/x86_64-linux-gnu/librt-2.30.so +7fef28374000-7fef28375000 r--p 00008000 08:0a 4335156 /usr/lib/x86_64-linux-gnu/librt-2.30.so +7fef28375000-7fef28376000 rw-p 00009000 08:0a 4335156 /usr/lib/x86_64-linux-gnu/librt-2.30.so +7fef28376000-7fef28377000 ---p 00000000 00:00 0 +7fef28377000-7fef2837a000 ---p 00000000 00:00 0 +7fef2837a000-7fef28477000 rw-p 00000000 00:00 0 +7fef28477000-7fef28486000 r--p 00000000 08:0a 4334559 /usr/lib/x86_64-linux-gnu/libm-2.30.so +7fef28486000-7fef28521000 r-xp 0000f000 08:0a 4334559 /usr/lib/x86_64-linux-gnu/libm-2.30.so +7fef28521000-7fef285ba000 r--p 000aa000 08:0a 4334559 /usr/lib/x86_64-linux-gnu/libm-2.30.so +7fef285ba000-7fef285bb000 r--p 00142000 08:0a 4334559 /usr/lib/x86_64-linux-gnu/libm-2.30.so +7fef285bb000-7fef285bc000 rw-p 00143000 08:0a 4334559 /usr/lib/x86_64-linux-gnu/libm-2.30.so +7fef285bc000-7fef292a4000 r-xp 00000000 08:0b 8782359 /home/twisted/jdk1.8.0_201/jre/lib/amd64/server/libjvm.so +7fef292a4000-7fef294a3000 ---p 00ce8000 08:0b 8782359 /home/twisted/jdk1.8.0_201/jre/lib/amd64/server/libjvm.so +7fef294a3000-7fef29539000 r--p 00ce7000 08:0b 8782359 /home/twisted/jdk1.8.0_201/jre/lib/amd64/server/libjvm.so +7fef29539000-7fef2956a000 rw-p 00d7d000 08:0b 8782359 /home/twisted/jdk1.8.0_201/jre/lib/amd64/server/libjvm.so +7fef2956a000-7fef295a7000 rw-p 00000000 00:00 0 +7fef295a7000-7fef295cc000 r--p 00000000 08:0a 4333575 /usr/lib/x86_64-linux-gnu/libc-2.30.so +7fef295cc000-7fef29716000 r-xp 00025000 08:0a 4333575 /usr/lib/x86_64-linux-gnu/libc-2.30.so +7fef29716000-7fef29760000 r--p 0016f000 08:0a 4333575 /usr/lib/x86_64-linux-gnu/libc-2.30.so +7fef29760000-7fef29763000 r--p 001b8000 08:0a 4333575 /usr/lib/x86_64-linux-gnu/libc-2.30.so +7fef29763000-7fef29766000 rw-p 001bb000 08:0a 4333575 /usr/lib/x86_64-linux-gnu/libc-2.30.so +7fef29766000-7fef2976a000 rw-p 00000000 00:00 0 +7fef2976a000-7fef2976b000 r--p 00000000 08:0a 4333777 /usr/lib/x86_64-linux-gnu/libdl-2.30.so +7fef2976b000-7fef2976c000 r-xp 00001000 08:0a 4333777 /usr/lib/x86_64-linux-gnu/libdl-2.30.so +7fef2976c000-7fef2976d000 r--p 00002000 08:0a 4333777 /usr/lib/x86_64-linux-gnu/libdl-2.30.so +7fef2976d000-7fef2976e000 r--p 00002000 08:0a 4333777 /usr/lib/x86_64-linux-gnu/libdl-2.30.so +7fef2976e000-7fef2976f000 rw-p 00003000 08:0a 4333777 /usr/lib/x86_64-linux-gnu/libdl-2.30.so +7fef2976f000-7fef29786000 r-xp 00000000 08:0b 8543590 /home/twisted/jdk1.8.0_201/lib/amd64/jli/libjli.so +7fef29786000-7fef29985000 ---p 00017000 08:0b 8543590 /home/twisted/jdk1.8.0_201/lib/amd64/jli/libjli.so +7fef29985000-7fef29986000 r--p 00016000 08:0b 8543590 /home/twisted/jdk1.8.0_201/lib/amd64/jli/libjli.so +7fef29986000-7fef29987000 rw-p 00017000 08:0b 8543590 /home/twisted/jdk1.8.0_201/lib/amd64/jli/libjli.so +7fef29987000-7fef2998e000 r--p 00000000 08:0a 4335024 /usr/lib/x86_64-linux-gnu/libpthread-2.30.so +7fef2998e000-7fef2999d000 r-xp 00007000 08:0a 4335024 /usr/lib/x86_64-linux-gnu/libpthread-2.30.so +7fef2999d000-7fef299a2000 r--p 00016000 08:0a 4335024 /usr/lib/x86_64-linux-gnu/libpthread-2.30.so +7fef299a2000-7fef299a3000 r--p 0001a000 08:0a 4335024 /usr/lib/x86_64-linux-gnu/libpthread-2.30.so +7fef299a3000-7fef299a4000 rw-p 0001b000 08:0a 4335024 /usr/lib/x86_64-linux-gnu/libpthread-2.30.so +7fef299a4000-7fef299aa000 rw-p 00000000 00:00 0 +7fef299aa000-7fef299ab000 r--p 00000000 08:0a 4329580 /usr/lib/locale/chr_US/LC_TELEPHONE +7fef299ab000-7fef299ac000 r--p 00000000 08:0a 4329575 /usr/lib/locale/chr_US/LC_MEASUREMENT +7fef299ac000-7fef299ad000 r--p 00000000 08:0a 4330093 /usr/lib/locale/en_US.utf8/LC_IDENTIFICATION +7fef299ad000-7fef299b0000 r--p 00000000 08:0a 4334790 /usr/lib/x86_64-linux-gnu/libnss_nis-2.30.so +7fef299b0000-7fef299b7000 r-xp 00003000 08:0a 4334790 /usr/lib/x86_64-linux-gnu/libnss_nis-2.30.so +7fef299b7000-7fef299b9000 r--p 0000a000 08:0a 4334790 /usr/lib/x86_64-linux-gnu/libnss_nis-2.30.so +7fef299b9000-7fef299ba000 r--p 0000b000 08:0a 4334790 /usr/lib/x86_64-linux-gnu/libnss_nis-2.30.so +7fef299ba000-7fef299bb000 rw-p 0000c000 08:0a 4334790 /usr/lib/x86_64-linux-gnu/libnss_nis-2.30.so +7fef299bb000-7fef299bd000 r--p 00000000 08:0a 4334776 /usr/lib/x86_64-linux-gnu/libnss_compat-2.30.so +7fef299bd000-7fef299c2000 r-xp 00002000 08:0a 4334776 /usr/lib/x86_64-linux-gnu/libnss_compat-2.30.so +7fef299c2000-7fef299c3000 r--p 00007000 08:0a 4334776 /usr/lib/x86_64-linux-gnu/libnss_compat-2.30.so +7fef299c3000-7fef299c4000 ---p 00008000 08:0a 4334776 /usr/lib/x86_64-linux-gnu/libnss_compat-2.30.so +7fef299c4000-7fef299c5000 r--p 00008000 08:0a 4334776 /usr/lib/x86_64-linux-gnu/libnss_compat-2.30.so +7fef299c5000-7fef299c6000 rw-p 00009000 08:0a 4334776 /usr/lib/x86_64-linux-gnu/libnss_compat-2.30.so +7fef299c6000-7fef299c7000 rw-p 00000000 00:00 0 +7fef299c7000-7fef299c8000 r--p 00000000 08:0a 4333008 /usr/lib/x86_64-linux-gnu/ld-2.30.so +7fef299c8000-7fef299e6000 r-xp 00001000 08:0a 4333008 /usr/lib/x86_64-linux-gnu/ld-2.30.so +7fef299e6000-7fef299ee000 r--p 0001f000 08:0a 4333008 /usr/lib/x86_64-linux-gnu/ld-2.30.so +7fef299ee000-7fef299ef000 r--p 00000000 00:00 0 +7fef299ef000-7fef299f0000 r--p 00027000 08:0a 4333008 /usr/lib/x86_64-linux-gnu/ld-2.30.so +7fef299f0000-7fef299f1000 rw-p 00028000 08:0a 4333008 /usr/lib/x86_64-linux-gnu/ld-2.30.so +7fef299f1000-7fef299f2000 rw-p 00000000 00:00 0 +7fff656c3000-7fff656e4000 rw-p 00000000 00:00 0 [stack] +7fff657a0000-7fff657a3000 r--p 00000000 00:00 0 [vvar] +7fff657a3000-7fff657a4000 r-xp 00000000 00:00 0 [vdso] + +VM Arguments: +java_command: serial4j.jar +java_class_path (initial): serial4j.jar +Launcher Type: SUN_STANDARD + +Environment Variables: +JAVA_HOME=/home/twisted/jdk1.8.0_201 +PATH=/home/pavl-machine/.local/bin:/snap/bin:/usr/sandbox/:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/usr/share/games:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games +SHELL=/bin/bash +DISPLAY=:0 + +Signal Handlers: +SIGSEGV: [libjvm.so+0xad3e60], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO +SIGBUS: [libjvm.so+0xad3e60], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO +SIGFPE: [libjvm.so+0x90b880], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO +SIGPIPE: [libjvm.so+0x90b880], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO +SIGXFSZ: [libjvm.so+0x90b880], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO +SIGILL: [libjvm.so+0x90b880], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO +SIGUSR1: SIG_DFL, sa_mask[0]=00000000000000000000000000000000, sa_flags=none +SIGUSR2: [libjvm.so+0x90b750], sa_mask[0]=00000000000000000000000000000000, sa_flags=SA_RESTART|SA_SIGINFO +SIGHUP: [libjvm.so+0x90bd70], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO +SIGINT: [libjvm.so+0x90bd70], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO +SIGTERM: [libjvm.so+0x90bd70], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO +SIGQUIT: [libjvm.so+0x90bd70], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO + + +--------------- S Y S T E M --------------- + +OS:DISTRIB_ID=Parrot +DISTRIB_RELEASE=4.9 +DISTRIB_CODENAME=rolling +DISTRIB_DESCRIPTION="Parrot 4.9" + +uname:Linux 5.5.0-1parrot1-amd64 #1 SMP Parrot 5.5.17-1parrot1 (2020-04-25) x86_64 +libc:glibc 2.30 NPTL 2.30 +rlimit: STACK 8192k, CORE 0k, NPROC 47123, NOFILE 1048576, AS infinity +load average:1.40 1.72 1.68 + +/proc/meminfo: +MemTotal: 12202288 kB +MemFree: 2094520 kB +MemAvailable: 7491600 kB +Buffers: 1191532 kB +Cached: 4850832 kB +SwapCached: 240 kB +Active: 5970516 kB +Inactive: 3119780 kB +Active(anon): 2821420 kB +Inactive(anon): 960576 kB +Active(file): 3149096 kB +Inactive(file): 2159204 kB +Unevictable: 304656 kB +Mlocked: 176 kB +SwapTotal: 6836220 kB +SwapFree: 6834872 kB +Dirty: 8020 kB +Writeback: 0 kB +AnonPages: 3269208 kB +Mapped: 929668 kB +Shmem: 787212 kB +KReclaimable: 411708 kB +Slab: 553192 kB +SReclaimable: 411708 kB +SUnreclaim: 141484 kB +KernelStack: 14796 kB +PageTables: 48852 kB +NFS_Unstable: 0 kB +Bounce: 0 kB +WritebackTmp: 0 kB +CommitLimit: 12937364 kB +Committed_AS: 13305956 kB +VmallocTotal: 34359738367 kB +VmallocUsed: 46672 kB +VmallocChunk: 0 kB +Percpu: 3872 kB +HardwareCorrupted: 0 kB +AnonHugePages: 681984 kB +ShmemHugePages: 0 kB +ShmemPmdMapped: 0 kB +FileHugePages: 0 kB +FilePmdMapped: 0 kB +HugePages_Total: 0 +HugePages_Free: 0 +HugePages_Rsvd: 0 +HugePages_Surp: 0 +Hugepagesize: 2048 kB +Hugetlb: 0 kB +DirectMap4k: 469268 kB +DirectMap2M: 11976704 kB +DirectMap1G: 1048576 kB + +container (cgroup) information: +container_type: cgroupv1 +cpu_cpuset_cpus: 0-3 +cpu_memory_nodes: 0 +active_processor_count: 4 +cpu_quota: -1 +cpu_period: 100000 +cpu_shares: -1 +memory_limit_in_bytes: -1 +memory_and_swap_limit_in_bytes: -2 +memory_soft_limit_in_bytes: -1 +memory_usage_in_bytes: 2610622464 +memory_max_usage_in_bytes: 4470431744 + + +CPU:total 4 (initial active 4) (2 cores per cpu, 2 threads per core) family 6 model 142 stepping 9, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, avx, avx2, aes, clmul, erms, 3dnowpref, lzcnt, ht, tsc, tscinvbit, bmi1, bmi2, adx + +/proc/cpuinfo: +processor : 0 +vendor_id : GenuineIntel +cpu family : 6 +model : 142 +model name : Intel(R) Core(TM) i3-7020U CPU @ 2.30GHz +stepping : 9 +microcode : 0xca +cpu MHz : 1000.003 +cache size : 3072 KB +physical id : 0 +siblings : 4 +core id : 0 +cpu cores : 2 +apicid : 0 +initial apicid : 0 +fpu : yes +fpu_exception : yes +cpuid level : 22 +wp : yes +flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_clear flush_l1d +bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit +bogomips : 4599.93 +clflush size : 64 +cache_alignment : 64 +address sizes : 39 bits physical, 48 bits virtual +power management: + +processor : 1 +vendor_id : GenuineIntel +cpu family : 6 +model : 142 +model name : Intel(R) Core(TM) i3-7020U CPU @ 2.30GHz +stepping : 9 +microcode : 0xca +cpu MHz : 1000.001 +cache size : 3072 KB +physical id : 0 +siblings : 4 +core id : 1 +cpu cores : 2 +apicid : 2 +initial apicid : 2 +fpu : yes +fpu_exception : yes +cpuid level : 22 +wp : yes +flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm arat pln pts hwp hwp_notify hwp_act_window hwp_epp flush_l1d +bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit +bogomips : 4599.93 +clflush size : 64 +cache_alignment : 64 +address sizes : 39 bits physical, 48 bits virtual +power management: + +processor : 2 +vendor_id : GenuineIntel +cpu family : 6 +model : 142 +model name : Intel(R) Core(TM) i3-7020U CPU @ 2.30GHz +stepping : 9 +microcode : 0xca +cpu MHz : 1000.000 +cache size : 3072 KB +physical id : 0 +siblings : 4 +core id : 0 +cpu cores : 2 +apicid : 1 +initial apicid : 1 +fpu : yes +fpu_exception : yes +cpuid level : 22 +wp : yes +flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_clear flush_l1d +bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit +bogomips : 4599.93 +clflush size : 64 +cache_alignment : 64 +address sizes : 39 bits physical, 48 bits virtual +power management: + +processor : 3 +vendor_id : GenuineIntel +cpu family : 6 +model : 142 +model name : Intel(R) Core(TM) i3-7020U CPU @ 2.30GHz +stepping : 9 +microcode : 0xca +cpu MHz : 999.999 +cache size : 3072 KB +physical id : 0 +siblings : 4 +core id : 1 +cpu cores : 2 +apicid : 3 +initial apicid : 3 +fpu : yes +fpu_exception : yes +cpuid level : 22 +wp : yes +flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_clear flush_l1d +bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit +bogomips : 4599.93 +clflush size : 64 +cache_alignment : 64 +address sizes : 39 bits physical, 48 bits virtual +power management: + + + +Memory: 4k page, physical 12202288k(2094716k free), swap 6836220k(6834872k free) + +vm_info: Java HotSpot(TM) 64-Bit Server VM (25.201-b09) for linux-amd64 JRE (1.8.0_201-b09), built on Dec 15 2018 11:35:59 by "java_re" with gcc 7.3.0 + +time: Wed Sep 14 16:19:33 2022 +timezone: CDT +elapsed time: 0 seconds (0d 0h 0m 0s) + diff --git a/HelloSerial4j/analysis of native error logs/example3/README.md b/HelloSerial4j/analysis of native error logs/example3/README.md new file mode 100644 index 00000000..e69de29b diff --git a/HelloSerial4j/analysis of native error logs/example3/hs_err_pid100312.log b/HelloSerial4j/analysis of native error logs/example3/hs_err_pid100312.log new file mode 100644 index 00000000..d2047762 --- /dev/null +++ b/HelloSerial4j/analysis of native error logs/example3/hs_err_pid100312.log @@ -0,0 +1,626 @@ +# +# A fatal error has been detected by the Java Runtime Environment: +# +# SIGSEGV (0xb) at pc=0x00007ff40b70c700, pid=100312, tid=0x00007ff3ed84f700 +# +# JRE version: Java(TM) SE Runtime Environment (8.0_201-b09) (build 1.8.0_201-b09) +# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.201-b09 mixed mode linux-amd64 compressed oops) +# Problematic frame: +# V [libjvm.so+0xaa5700] UTF8::unicode_length(char const*)+0x0 +# +# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again +# +# If you would like to submit a bug report, please visit: +# http://bugreport.java.com/bugreport/crash.jsp +# + +--------------- T H R E A D --------------- + +Current thread (0x00007ff4041f8800): JavaThread "Thread-0" [_thread_in_vm, id=100327, stack(0x00007ff3ed74f000,0x00007ff3ed850000)] + +siginfo: si_signo: 11 (SIGSEGV), si_code: 1 (SEGV_MAPERR), si_addr: 0x0000000000000025 + +Registers: +RAX=0x0000000000000000, RBX=0x0000000000000025, RCX=0x00007ff40b32c680, RDX=0x00007ff40bc2ef98 +RSP=0x00007ff3ed84e7c8, RBP=0x00007ff3ed84e800, RSI=0x00007ff4041f8800, RDI=0x0000000000000025 +R8 =0x00007ff4041f8800, R9 =0x0000000000000008, R10=0x0000000000000000, R11=0x00007ff3b0000080 +R12=0x00007ff4041f8800, R13=0x0000000000000025, R14=0x0000000000000000, R15=0x00007ff4041f8800 +RIP=0x00007ff40b70c700, EFLAGS=0x0000000000010202, CSGSFS=0x002b000000000033, ERR=0x0000000000000004 + TRAPNO=0x000000000000000e + +Top of Stack: (sp=0x00007ff3ed84e7c8) +0x00007ff3ed84e7c8: 00007ff40b2f0e7d 0000000000000060 +0x00007ff3ed84e7d8: 00007ff4041f6138 0000003100000004 +0x00007ff3ed84e7e8: 00007ff4041f8800 00007ff4041f89f8 +0x00007ff3ed84e7f8: 0000000000000025 00007ff3ed84e850 +0x00007ff3ed84e808: 00007ff40b32c6ec 00007ff4041f8800 +0x00007ff3ed84e818: 0000000000000000 00007ff4087f7c80 +0x00007ff3ed84e828: 00007ff3ed84e968 00007ff3b0002d48 +0x00007ff3ed84e838: 0000000000000000 00007ff4087f7c80 +0x00007ff3ed84e848: 00007ff3ed84e968 00007ff3ed84e870 +0x00007ff3ed84e858: 00007ff408099786 0000000000000025 +0x00007ff3ed84e868: 00007ff4041f89f8 00007ff3ed84e8b0 +0x00007ff3ed84e878: 00007ff408098fcd 00000006087f7c80 +0x00007ff3ed84e888: 00007ff4041f59e0 00007ff3b0002d40 +0x00007ff3ed84e898: 00000001080999d6 00007ff4087f7c80 +0x00007ff3ed84e8a8: 00007ff4087f7c80 00007ff3ed84e8f0 +0x00007ff3ed84e8b8: 00007ff40809940e 00007ff3ed84e968 +0x00007ff3ed84e8c8: 00007ff4041f89f8 00007ff4087f7c80 +0x00007ff3ed84e8d8: 00007ff3ed84e968 00007ff3b0000ce0 +0x00007ff3ed84e8e8: 00000006f5018543 00007ff3ed84e948 +0x00007ff3ed84e8f8: 00007ff3f50186c7 00007ff3f50183e2 +0x00007ff3ed84e908: 00007ff3ed84e908 00007ff4087f7c80 +0x00007ff3ed84e918: 00007ff3ed84e968 00007ff4087f8538 +0x00007ff3ed84e928: 0000000000000000 00007ff4087f7c80 +0x00007ff3ed84e938: 0000000000000000 00007ff3ed84e968 +0x00007ff3ed84e948: 00007ff3ed84e9b0 00007ff3f5008040 +0x00007ff3ed84e958: 0000000000000000 00007ff3f5011d1b +0x00007ff3ed84e968: 0000000781fe8280 00007ff3ed84e970 +0x00007ff3ed84e978: 00007ff4087f1058 00007ff3ed84e9c0 +0x00007ff3ed84e988: 00007ff4087f1d08 0000000000000000 +0x00007ff3ed84e998: 00007ff4087f1078 00007ff3ed84e968 +0x00007ff3ed84e9a8: 00007ff3ed84e9c0 00007ff3ed84ea10 +0x00007ff3ed84e9b8: 00007ff3f5008040 0000000781fe8258 + +Instructions: (pc=0x00007ff40b70c700) +0x00007ff40b70c6e0: 44 fe ff ff ba 0d 00 00 00 e9 3a fe ff ff ba 0e +0x00007ff40b70c6f0: 00 00 00 e9 30 fe ff ff 0f 1f 84 00 00 00 00 00 +0x00007ff40b70c700: 0f b6 17 55 31 c0 48 89 e5 84 d2 74 1f 0f 1f 00 +0x00007ff40b70c710: 81 e2 c0 00 00 00 83 c2 80 0f 95 c2 48 83 c7 01 + +Register to memory mapping: + +RAX=0x0000000000000000 is an unknown value +RBX=0x0000000000000025 is an unknown value +RCX=0x00007ff40b32c680: in /home/twisted/jdk1.8.0_201/jre/lib/amd64/server/libjvm.so at 0x00007ff40ac67000 +RDX=0x00007ff40bc2ef98: in /home/twisted/jdk1.8.0_201/jre/lib/amd64/server/libjvm.so at 0x00007ff40ac67000 +RSP=0x00007ff3ed84e7c8 is pointing into the stack for thread: 0x00007ff4041f8800 +RBP=0x00007ff3ed84e800 is pointing into the stack for thread: 0x00007ff4041f8800 +RSI=0x00007ff4041f8800 is a thread +RDI=0x0000000000000025 is an unknown value +R8 =0x00007ff4041f8800 is a thread +R9 =0x0000000000000008 is an unknown value +R10=0x0000000000000000 is an unknown value +R11=0x00007ff3b0000080 is an unknown value +R12=0x00007ff4041f8800 is a thread +R13=0x0000000000000025 is an unknown value +R14=0x0000000000000000 is an unknown value +R15=0x00007ff4041f8800 is a thread + + +Stack: [0x00007ff3ed74f000,0x00007ff3ed850000], sp=0x00007ff3ed84e7c8, free space=1021k +Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) +V [libjvm.so+0xaa5700] UTF8::unicode_length(char const*)+0x0 +V [libjvm.so+0x6c56ec] jni_NewStringUTF+0x6c +C [libserial4j.so+0x4786] JNIEnv_::NewStringUTF(char const*)+0x2e +C [libserial4j.so+0x3fcd] +C [libserial4j.so+0x440e] Java_com_serial4j_core_serial_NativeTerminalDevice_getSerialPorts0+0x60 +j com.serial4j.core.serial.NativeTerminalDevice.getSerialPorts0()[Ljava/lang/String;+0 +j com.serial4j.core.serial.TerminalDevice.getSerialPorts()[Ljava/lang/String;+8 +j com.serial4j.example.HelloNativeSerial4J.run()V+349 +v ~StubRoutines::call_stub +V [libjvm.so+0x68825b] JavaCalls::call_helper(JavaValue*, methodHandle*, JavaCallArguments*, Thread*)+0xddb +V [libjvm.so+0x685b23] JavaCalls::call_virtual(JavaValue*, KlassHandle, Symbol*, Symbol*, JavaCallArguments*, Thread*)+0x263 +V [libjvm.so+0x6860e7] JavaCalls::call_virtual(JavaValue*, Handle, KlassHandle, Symbol*, Symbol*, Thread*)+0x47 +V [libjvm.so+0x6f225c] thread_entry(JavaThread*, Thread*)+0x6c +V [libjvm.so+0xa7bb6b] JavaThread::thread_main_inner()+0xdb +V [libjvm.so+0xa7be71] JavaThread::run()+0x2d1 +V [libjvm.so+0x90d922] java_start(Thread*)+0x102 +C [libpthread.so.0+0x8f27] start_thread+0xd7 + +Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) +j com.serial4j.core.serial.NativeTerminalDevice.getSerialPorts0()[Ljava/lang/String;+0 +j com.serial4j.core.serial.TerminalDevice.getSerialPorts()[Ljava/lang/String;+8 +j com.serial4j.example.HelloNativeSerial4J.run()V+349 +v ~StubRoutines::call_stub + +--------------- P R O C E S S --------------- + +Java Threads: ( => current thread ) +=>0x00007ff4041f8800 JavaThread "Thread-0" [_thread_in_vm, id=100327, stack(0x00007ff3ed74f000,0x00007ff3ed850000)] + 0x00007ff40418d000 JavaThread "Service Thread" daemon [_thread_blocked, id=100325, stack(0x00007ff3ed951000,0x00007ff3eda52000)] + 0x00007ff40418a000 JavaThread "C1 CompilerThread2" daemon [_thread_blocked, id=100324, stack(0x00007ff3eda53000,0x00007ff3edb53000)] + 0x00007ff404188000 JavaThread "C2 CompilerThread1" daemon [_thread_blocked, id=100323, stack(0x00007ff3edb54000,0x00007ff3edc54000)] + 0x00007ff404185000 JavaThread "C2 CompilerThread0" daemon [_thread_blocked, id=100322, stack(0x00007ff3edc55000,0x00007ff3edd55000)] + 0x00007ff404184000 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=100321, stack(0x00007ff3edd55000,0x00007ff3ede56000)] + 0x00007ff40414c800 JavaThread "Finalizer" daemon [_thread_blocked, id=100320, stack(0x00007ff3ee0ce000,0x00007ff3ee1cf000)] + 0x00007ff40414a000 JavaThread "Reference Handler" daemon [_thread_blocked, id=100319, stack(0x00007ff3ee1cf000,0x00007ff3ee2d0000)] + 0x00007ff40400b000 JavaThread "main" [_thread_blocked, id=100313, stack(0x00007ff40aa22000,0x00007ff40ab22000)] + +Other Threads: + 0x00007ff404140000 VMThread [stack: 0x00007ff3ee2d1000,0x00007ff3ee3d1000] [id=100318] + 0x00007ff40418f800 WatcherThread [stack: 0x00007ff3ed851000,0x00007ff3ed951000] [id=100326] + +VM state:not at safepoint (normal execution) + +VM Mutex/Monitor currently owned by a thread: None + +heap address: 0x0000000705c00000, size: 2980 MB, Compressed Oops mode: Zero based, Oop shift amount: 3 +Narrow klass base: 0x0000000000000000, Narrow klass shift: 3 +Compressed class space size: 1073741824 Address: 0x00000007c0000000 + +Heap: + PSYoungGen total 56320K, used 2918K [0x0000000781f00000, 0x0000000785d80000, 0x00000007c0000000) + eden space 48640K, 6% used [0x0000000781f00000,0x00000007821d99d0,0x0000000784e80000) + from space 7680K, 0% used [0x0000000785600000,0x0000000785600000,0x0000000785d80000) + to space 7680K, 0% used [0x0000000784e80000,0x0000000784e80000,0x0000000785600000) + ParOldGen total 128512K, used 0K [0x0000000705c00000, 0x000000070d980000, 0x0000000781f00000) + object space 128512K, 0% used [0x0000000705c00000,0x0000000705c00000,0x000000070d980000) + Metaspace used 3113K, capacity 4664K, committed 4864K, reserved 1056768K + class space used 350K, capacity 424K, committed 512K, reserved 1048576K + +Card table byte_map: [0x00007ff4099de000,0x00007ff409fb1000] byte_map_base: 0x00007ff4061b0000 + +Marking Bits: (ParMarkBitMap*) 0x00007ff40bc32d80 + Begin Bits: [0x00007ff3ef2e0000, 0x00007ff3f2170000) + End Bits: [0x00007ff3f2170000, 0x00007ff3f5000000) + +Polling page: 0x00007ff40c099000 + +CodeCache: size=245760Kb used=1157Kb max_used=1157Kb free=244602Kb + bounds [0x00007ff3f5000000, 0x00007ff3f5270000, 0x00007ff404000000] + total_blobs=293 nmethods=57 adapters=150 + compilation: enabled + +Compilation events (10 events): +Event: 0.131 Thread 0x00007ff40418a000 53 3 java.lang.StringBuilder::toString (17 bytes) +Event: 0.131 Thread 0x00007ff40418a000 nmethod 53 0x00007ff3f5120090 code [0x00007ff3f5120200, 0x00007ff3f5120408] +Event: 0.131 Thread 0x00007ff40418a000 54 3 java.lang.String::lastIndexOf (13 bytes) +Event: 0.131 Thread 0x00007ff40418a000 nmethod 54 0x00007ff3f51204d0 code [0x00007ff3f5120640, 0x00007ff3f5120868] +Event: 0.131 Thread 0x00007ff40418a000 55 s 1 java.util.Vector::size (5 bytes) +Event: 0.132 Thread 0x00007ff40418a000 nmethod 55 0x00007ff3f5120910 code [0x00007ff3f5120a60, 0x00007ff3f5120cd0] +Event: 0.133 Thread 0x00007ff40418a000 56 3 java.util.Arrays::copyOf (19 bytes) +Event: 0.134 Thread 0x00007ff40418a000 nmethod 56 0x00007ff3f5120d50 code [0x00007ff3f5120ee0, 0x00007ff3f5121208] +Event: 0.134 Thread 0x00007ff40418a000 57 1 java.util.zip.ZipFile::access$000 (5 bytes) +Event: 0.134 Thread 0x00007ff40418a000 nmethod 57 0x00007ff3f5121510 code [0x00007ff3f5121660, 0x00007ff3f5121750] + +GC Heap History (0 events): +No events + +Deoptimization events (0 events): +No events + +Classes redefined (0 events): +No events + +Internal exceptions (6 events): +Event: 0.044 Thread 0x00007ff40400b000 Exception (0x0000000781f07cb0) thrown at [/HUDSON/workspace/8-2-build-linux-amd64/jdk8u201/12317/hotspot/src/sh +Event: 0.044 Thread 0x00007ff40400b000 Exception (0x0000000781f07f98) thrown at [/HUDSON/workspace/8-2-build-linux-amd64/jdk8u201/12317/hotspot/src/share/vm/prims/jni.c +Event: 0.119 Thread 0x00007ff40400b000 Exception (0x0000000781fc06e0) thrown at [/HUDSON/workspace/8-2-build-linux-amd64/jdk8u201/12317/hotspot/src/share/vm/prims/jvm.cpp, line 1502] +Event: 0.119 Thread 0x00007ff40400b000 Exception (0x0000000781fc08f0) thrown at [/HUDSON/workspace/8-2-build-linux-amd64/jdk8u201/12317/hotspot/src/share/vm/prims/jvm.cpp, line 1502] +Event: 0.120 Thread 0x00007ff40400b000 Exception (0x0000000781fc2d58) thrown at [/HUDSON/workspace/8-2-build-linux-amd64/jdk8u201/12317/hotspot/src/share/vm/prims/jvm.cpp, line 1502] +Event: 0.120 Thread 0x00007ff40400b000 Exception (0x0000000781fc2f68) thrown at [/HUDSON/workspace/8-2-build-linux-amd64/jdk8u201/12317/hotspot/src/share/vm/prims/jvm.cpp, line 1502] + +Events (10 events): +Event: 0.130 loading class com/serial4j/core/serial/control/TerminalLocalFlag +Event: 0.130 loading class com/serial4j/core/serial/control/TerminalLocalFlag done +Event: 0.130 loading class com/serial4j/core/serial/control/TerminalOutputFlag +Event: 0.130 loading class com/serial4j/core/serial/control/TerminalOutputFlag done +Event: 0.131 loading class com/serial4j/core/serial/control/TerminalInputFlag +Event: 0.131 loading class com/serial4j/core/serial/control/TerminalInputFlag done +Event: 0.132 loading class com/serial4j/core/serial/BaudRate +Event: 0.132 loading class com/serial4j/core/serial/BaudRate done +Event: 0.133 loading class com/serial4j/core/serial/ReadConfiguration +Event: 0.133 loading class com/serial4j/core/serial/ReadConfiguration done + + +Dynamic libraries: +00400000-00401000 r-xp 00000000 08:0b 8396377 /home/twisted/jdk1.8.0_201/bin/java +00600000-00601000 r--p 00000000 08:0b 8396377 /home/twisted/jdk1.8.0_201/bin/java +00601000-00602000 rw-p 00001000 08:0b 8396377 /home/twisted/jdk1.8.0_201/bin/java +01643000-01664000 rw-p 00000000 00:00 0 [heap] +705c00000-70d980000 rw-p 00000000 00:00 0 +70d980000-781f00000 ---p 00000000 00:00 0 +781f00000-785d80000 rw-p 00000000 00:00 0 +785d80000-7c0000000 ---p 00000000 00:00 0 +7c0000000-7c0080000 rw-p 00000000 00:00 0 +7c0080000-800000000 ---p 00000000 00:00 0 +7ff3b0000000-7ff3b0021000 rw-p 00000000 00:00 0 +7ff3b0021000-7ff3b4000000 ---p 00000000 00:00 0 +7ff3b8000000-7ff3b8021000 rw-p 00000000 00:00 0 +7ff3b8021000-7ff3bc000000 ---p 00000000 00:00 0 +7ff3bc000000-7ff3bc021000 rw-p 00000000 00:00 0 +7ff3bc021000-7ff3c0000000 ---p 00000000 00:00 0 +7ff3c0000000-7ff3c0066000 rw-p 00000000 00:00 0 +7ff3c0066000-7ff3c4000000 ---p 00000000 00:00 0 +7ff3c4000000-7ff3c4029000 rw-p 00000000 00:00 0 +7ff3c4029000-7ff3c8000000 ---p 00000000 00:00 0 +7ff3c8000000-7ff3c8021000 rw-p 00000000 00:00 0 +7ff3c8021000-7ff3cc000000 ---p 00000000 00:00 0 +7ff3cc000000-7ff3cc021000 rw-p 00000000 00:00 0 +7ff3cc021000-7ff3d0000000 ---p 00000000 00:00 0 +7ff3d0000000-7ff3d0021000 rw-p 00000000 00:00 0 +7ff3d0021000-7ff3d4000000 ---p 00000000 00:00 0 +7ff3d4000000-7ff3d4021000 rw-p 00000000 00:00 0 +7ff3d4021000-7ff3d8000000 ---p 00000000 00:00 0 +7ff3d8000000-7ff3d8021000 rw-p 00000000 00:00 0 +7ff3d8021000-7ff3dc000000 ---p 00000000 00:00 0 +7ff3dc000000-7ff3dc021000 rw-p 00000000 00:00 0 +7ff3dc021000-7ff3e0000000 ---p 00000000 00:00 0 +7ff3e0000000-7ff3e0021000 rw-p 00000000 00:00 0 +7ff3e0021000-7ff3e4000000 ---p 00000000 00:00 0 +7ff3e4000000-7ff3e4021000 rw-p 00000000 00:00 0 +7ff3e4021000-7ff3e8000000 ---p 00000000 00:00 0 +7ff3e8000000-7ff3e8021000 rw-p 00000000 00:00 0 +7ff3e8021000-7ff3ec000000 ---p 00000000 00:00 0 +7ff3ed4ba000-7ff3ed74f000 rw-p 00000000 00:00 0 +7ff3ed74f000-7ff3ed752000 ---p 00000000 00:00 0 +7ff3ed752000-7ff3ed850000 rw-p 00000000 00:00 0 +7ff3ed850000-7ff3ed851000 ---p 00000000 00:00 0 +7ff3ed851000-7ff3ed951000 rw-p 00000000 00:00 0 +7ff3ed951000-7ff3ed954000 ---p 00000000 00:00 0 +7ff3ed954000-7ff3eda52000 rw-p 00000000 00:00 0 +7ff3eda52000-7ff3eda53000 ---p 00000000 00:00 0 +7ff3eda53000-7ff3eda56000 ---p 00000000 00:00 0 +7ff3eda56000-7ff3edb53000 rw-p 00000000 00:00 0 +7ff3edb53000-7ff3edb54000 ---p 00000000 00:00 0 +7ff3edb54000-7ff3edb57000 ---p 00000000 00:00 0 +7ff3edb57000-7ff3edc54000 rw-p 00000000 00:00 0 +7ff3edc54000-7ff3edc55000 ---p 00000000 00:00 0 +7ff3edc55000-7ff3edc58000 ---p 00000000 00:00 0 +7ff3edc58000-7ff3edd55000 rw-p 00000000 00:00 0 +7ff3edd55000-7ff3edd58000 ---p 00000000 00:00 0 +7ff3edd58000-7ff3ede56000 rw-p 00000000 00:00 0 +7ff3ede56000-7ff3ee0ce000 r--p 00000000 08:0a 4328903 /usr/lib/locale/aa_DJ.utf8/LC_COLLATE +7ff3ee0ce000-7ff3ee0d1000 ---p 00000000 00:00 0 +7ff3ee0d1000-7ff3ee1cf000 rw-p 00000000 00:00 0 +7ff3ee1cf000-7ff3ee1d2000 ---p 00000000 00:00 0 +7ff3ee1d2000-7ff3ee2d0000 rw-p 00000000 00:00 0 +7ff3ee2d0000-7ff3ee2d1000 ---p 00000000 00:00 0 +7ff3ee2d1000-7ff3f5000000 rw-p 00000000 00:00 0 +7ff3f5000000-7ff3f5270000 rwxp 00000000 00:00 0 +7ff3f5270000-7ff404000000 ---p 00000000 00:00 0 +7ff404000000-7ff404200000 rw-p 00000000 00:00 0 +7ff404200000-7ff408000000 ---p 00000000 00:00 0 +7ff408095000-7ff408098000 r--p 00000000 08:0b 8520060 /home/twisted/GradleProjects/AVR-Sandbox/HelloSerial4j/output/serial4j/libserial4j.so +7ff408098000-7ff40809a000 r-xp 00003000 08:0b 8520060 /home/twisted/GradleProjects/AVR-Sandbox/HelloSerial4j/output/serial4j/libserial4j.so +7ff40809a000-7ff40809c000 r--p 00005000 08:0b 8520060 /home/twisted/GradleProjects/AVR-Sandbox/HelloSerial4j/output/serial4j/libserial4j.so +7ff40809c000-7ff40809d000 r--p 00006000 08:0b 8520060 /home/twisted/GradleProjects/AVR-Sandbox/HelloSerial4j/output/serial4j/libserial4j.so +7ff40809d000-7ff40809e000 rw-p 00007000 08:0b 8520060 /home/twisted/GradleProjects/AVR-Sandbox/HelloSerial4j/output/serial4j/libserial4j.so +7ff40809e000-7ff4080f1000 r--p 00000000 08:0a 4328904 /usr/lib/locale/aa_DJ.utf8/LC_CTYPE +7ff4080f1000-7ff408140000 rw-p 00000000 00:00 0 +7ff408140000-7ff40831a000 r--s 03d6f000 08:0b 8543644 /home/twisted/jdk1.8.0_201/jre/lib/rt.jar +7ff40831a000-7ff40882b000 rw-p 00000000 00:00 0 +7ff40882b000-7ff408beb000 ---p 00000000 00:00 0 +7ff408beb000-7ff4091f8000 rw-p 00000000 00:00 0 +7ff4091f8000-7ff4091f9000 ---p 00000000 00:00 0 +7ff4091f9000-7ff4092f9000 rw-p 00000000 00:00 0 +7ff4092f9000-7ff4092fa000 ---p 00000000 00:00 0 +7ff4092fa000-7ff4093fa000 rw-p 00000000 00:00 0 +7ff4093fa000-7ff4093fb000 ---p 00000000 00:00 0 +7ff4093fb000-7ff4094fb000 rw-p 00000000 00:00 0 +7ff4094fb000-7ff4094fc000 ---p 00000000 00:00 0 +7ff4094fc000-7ff40963b000 rw-p 00000000 00:00 0 +7ff40963b000-7ff4099de000 ---p 00000000 00:00 0 +7ff4099de000-7ff409a1d000 rw-p 00000000 00:00 0 +7ff409a1d000-7ff409dbf000 ---p 00000000 00:00 0 +7ff409dbf000-7ff409ddf000 rw-p 00000000 00:00 0 +7ff409ddf000-7ff409fb0000 ---p 00000000 00:00 0 +7ff409fb0000-7ff409fbb000 rw-p 00000000 00:00 0 +7ff409fbb000-7ff40a371000 ---p 00000000 00:00 0 +7ff40a371000-7ff40a38c000 r-xp 00000000 08:0b 8782383 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libzip.so +7ff40a38c000-7ff40a58b000 ---p 0001b000 08:0b 8782383 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libzip.so +7ff40a58b000-7ff40a58c000 r--p 0001a000 08:0b 8782383 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libzip.so +7ff40a58c000-7ff40a58d000 rw-p 0001b000 08:0b 8782383 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libzip.so +7ff40a58d000-7ff40a590000 r--p 00000000 08:0a 4334780 /usr/lib/x86_64-linux-gnu/libnss_files-2.30.so +7ff40a590000-7ff40a597000 r-xp 00003000 08:0a 4334780 /usr/lib/x86_64-linux-gnu/libnss_files-2.30.so +7ff40a597000-7ff40a599000 r--p 0000a000 08:0a 4334780 /usr/lib/x86_64-linux-gnu/libnss_files-2.30.so +7ff40a599000-7ff40a59a000 r--p 0000b000 08:0a 4334780 /usr/lib/x86_64-linux-gnu/libnss_files-2.30.so +7ff40a59a000-7ff40a59b000 rw-p 0000c000 08:0a 4334780 /usr/lib/x86_64-linux-gnu/libnss_files-2.30.so +7ff40a59b000-7ff40a5a1000 rw-p 00000000 00:00 0 +7ff40a5a1000-7ff40a5a6000 r--p 00000000 08:0a 4334771 /usr/lib/x86_64-linux-gnu/libnsl-2.30.so +7ff40a5a6000-7ff40a5b3000 r-xp 00005000 08:0a 4334771 /usr/lib/x86_64-linux-gnu/libnsl-2.30.so +7ff40a5b3000-7ff40a5b7000 r--p 00012000 08:0a 4334771 /usr/lib/x86_64-linux-gnu/libnsl-2.30.so +7ff40a5b7000-7ff40a5b8000 r--p 00015000 08:0a 4334771 /usr/lib/x86_64-linux-gnu/libnsl-2.30.so +7ff40a5b8000-7ff40a5b9000 rw-p 00016000 08:0a 4334771 /usr/lib/x86_64-linux-gnu/libnsl-2.30.so +7ff40a5b9000-7ff40a5bb000 rw-p 00000000 00:00 0 +7ff40a5c0000-7ff40a5c2000 r--s 0000a000 08:0b 8520874 /home/twisted/GradleProjects/AVR-Sandbox/HelloSerial4j/output/serial4j/serial4j.jar +7ff40a5c2000-7ff40a5c3000 r--p 00000000 08:0a 4328933 /usr/lib/locale/aa_ET/LC_NUMERIC +7ff40a5c3000-7ff40a5c4000 r--p 00000000 08:0a 4330095 /usr/lib/locale/en_US.utf8/LC_TIME +7ff40a5c4000-7ff40a5c5000 r--p 00000000 08:0a 4329578 /usr/lib/locale/chr_US/LC_MONETARY +7ff40a5c5000-7ff40a5c6000 r--p 00000000 08:0a 4329874 /usr/lib/locale/en_AG/LC_MESSAGES/SYS_LC_MESSAGES +7ff40a5c6000-7ff40a5c7000 r--p 00000000 08:0a 4329579 /usr/lib/locale/chr_US/LC_PAPER +7ff40a5c7000-7ff40a5c8000 r--p 00000000 08:0a 4329410 /usr/lib/locale/bi_VU/LC_NAME +7ff40a5c8000-7ff40a5c9000 r--p 00000000 08:0a 4330092 /usr/lib/locale/en_US.utf8/LC_ADDRESS +7ff40a5c9000-7ff40a5d0000 r--s 00000000 08:0a 4332592 /usr/lib/x86_64-linux-gnu/gconv/gconv-modules.cache +7ff40a5d0000-7ff40a5d8000 rw-s 00000000 08:0a 2105330 /tmp/hsperfdata_pavl-machine/100312 +7ff40a5d8000-7ff40a604000 r-xp 00000000 08:0b 8782377 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libjava.so +7ff40a604000-7ff40a804000 ---p 0002c000 08:0b 8782377 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libjava.so +7ff40a804000-7ff40a805000 r--p 0002c000 08:0b 8782377 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libjava.so +7ff40a805000-7ff40a807000 rw-p 0002d000 08:0b 8782377 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libjava.so +7ff40a807000-7ff40a814000 r-xp 00000000 08:0b 8782382 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libverify.so +7ff40a814000-7ff40aa13000 ---p 0000d000 08:0b 8782382 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libverify.so +7ff40aa13000-7ff40aa15000 r--p 0000c000 08:0b 8782382 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libverify.so +7ff40aa15000-7ff40aa16000 rw-p 0000e000 08:0b 8782382 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libverify.so +7ff40aa16000-7ff40aa19000 r--p 00000000 08:0a 4335156 /usr/lib/x86_64-linux-gnu/librt-2.30.so +7ff40aa19000-7ff40aa1d000 r-xp 00003000 08:0a 4335156 /usr/lib/x86_64-linux-gnu/librt-2.30.so +7ff40aa1d000-7ff40aa1f000 r--p 00007000 08:0a 4335156 /usr/lib/x86_64-linux-gnu/librt-2.30.so +7ff40aa1f000-7ff40aa20000 r--p 00008000 08:0a 4335156 /usr/lib/x86_64-linux-gnu/librt-2.30.so +7ff40aa20000-7ff40aa21000 rw-p 00009000 08:0a 4335156 /usr/lib/x86_64-linux-gnu/librt-2.30.so +7ff40aa21000-7ff40aa22000 ---p 00000000 00:00 0 +7ff40aa22000-7ff40aa25000 ---p 00000000 00:00 0 +7ff40aa25000-7ff40ab22000 rw-p 00000000 00:00 0 +7ff40ab22000-7ff40ab31000 r--p 00000000 08:0a 4334559 /usr/lib/x86_64-linux-gnu/libm-2.30.so +7ff40ab31000-7ff40abcc000 r-xp 0000f000 08:0a 4334559 /usr/lib/x86_64-linux-gnu/libm-2.30.so +7ff40abcc000-7ff40ac65000 r--p 000aa000 08:0a 4334559 /usr/lib/x86_64-linux-gnu/libm-2.30.so +7ff40ac65000-7ff40ac66000 r--p 00142000 08:0a 4334559 /usr/lib/x86_64-linux-gnu/libm-2.30.so +7ff40ac66000-7ff40ac67000 rw-p 00143000 08:0a 4334559 /usr/lib/x86_64-linux-gnu/libm-2.30.so +7ff40ac67000-7ff40b94f000 r-xp 00000000 08:0b 8782359 /home/twisted/jdk1.8.0_201/jre/lib/amd64/server/libjvm.so +7ff40b94f000-7ff40bb4e000 ---p 00ce8000 08:0b 8782359 /home/twisted/jdk1.8.0_201/jre/lib/amd64/server/libjvm.so +7ff40bb4e000-7ff40bbe4000 r--p 00ce7000 08:0b 8782359 /home/twisted/jdk1.8.0_201/jre/lib/amd64/server/libjvm.so +7ff40bbe4000-7ff40bc15000 rw-p 00d7d000 08:0b 8782359 /home/twisted/jdk1.8.0_201/jre/lib/amd64/server/libjvm.so +7ff40bc15000-7ff40bc52000 rw-p 00000000 00:00 0 +7ff40bc52000-7ff40bc77000 r--p 00000000 08:0a 4333575 /usr/lib/x86_64-linux-gnu/libc-2.30.so +7ff40bc77000-7ff40bdc1000 r-xp 00025000 08:0a 4333575 /usr/lib/x86_64-linux-gnu/libc-2.30.so +7ff40bdc1000-7ff40be0b000 r--p 0016f000 08:0a 4333575 /usr/lib/x86_64-linux-gnu/libc-2.30.so +7ff40be0b000-7ff40be0e000 r--p 001b8000 08:0a 4333575 /usr/lib/x86_64-linux-gnu/libc-2.30.so +7ff40be0e000-7ff40be11000 rw-p 001bb000 08:0a 4333575 /usr/lib/x86_64-linux-gnu/libc-2.30.so +7ff40be11000-7ff40be15000 rw-p 00000000 00:00 0 +7ff40be15000-7ff40be16000 r--p 00000000 08:0a 4333777 /usr/lib/x86_64-linux-gnu/libdl-2.30.so +7ff40be16000-7ff40be17000 r-xp 00001000 08:0a 4333777 /usr/lib/x86_64-linux-gnu/libdl-2.30.so +7ff40be17000-7ff40be18000 r--p 00002000 08:0a 4333777 /usr/lib/x86_64-linux-gnu/libdl-2.30.so +7ff40be18000-7ff40be19000 r--p 00002000 08:0a 4333777 /usr/lib/x86_64-linux-gnu/libdl-2.30.so +7ff40be19000-7ff40be1a000 rw-p 00003000 08:0a 4333777 /usr/lib/x86_64-linux-gnu/libdl-2.30.so +7ff40be1a000-7ff40be31000 r-xp 00000000 08:0b 8543590 /home/twisted/jdk1.8.0_201/lib/amd64/jli/libjli.so +7ff40be31000-7ff40c030000 ---p 00017000 08:0b 8543590 /home/twisted/jdk1.8.0_201/lib/amd64/jli/libjli.so +7ff40c030000-7ff40c031000 r--p 00016000 08:0b 8543590 /home/twisted/jdk1.8.0_201/lib/amd64/jli/libjli.so +7ff40c031000-7ff40c032000 rw-p 00017000 08:0b 8543590 /home/twisted/jdk1.8.0_201/lib/amd64/jli/libjli.so +7ff40c032000-7ff40c039000 r--p 00000000 08:0a 4335024 /usr/lib/x86_64-linux-gnu/libpthread-2.30.so +7ff40c039000-7ff40c048000 r-xp 00007000 08:0a 4335024 /usr/lib/x86_64-linux-gnu/libpthread-2.30.so +7ff40c048000-7ff40c04d000 r--p 00016000 08:0a 4335024 /usr/lib/x86_64-linux-gnu/libpthread-2.30.so +7ff40c04d000-7ff40c04e000 r--p 0001a000 08:0a 4335024 /usr/lib/x86_64-linux-gnu/libpthread-2.30.so +7ff40c04e000-7ff40c04f000 rw-p 0001b000 08:0a 4335024 /usr/lib/x86_64-linux-gnu/libpthread-2.30.so +7ff40c04f000-7ff40c055000 rw-p 00000000 00:00 0 +7ff40c055000-7ff40c056000 r--p 00000000 08:0a 4329580 /usr/lib/locale/chr_US/LC_TELEPHONE +7ff40c056000-7ff40c057000 r--p 00000000 08:0a 4329575 /usr/lib/locale/chr_US/LC_MEASUREMENT +7ff40c057000-7ff40c058000 r--p 00000000 08:0a 4330093 /usr/lib/locale/en_US.utf8/LC_IDENTIFICATION +7ff40c058000-7ff40c05b000 r--p 00000000 08:0a 4334790 /usr/lib/x86_64-linux-gnu/libnss_nis-2.30.so +7ff40c05b000-7ff40c062000 r-xp 00003000 08:0a 4334790 /usr/lib/x86_64-linux-gnu/libnss_nis-2.30.so +7ff40c062000-7ff40c064000 r--p 0000a000 08:0a 4334790 /usr/lib/x86_64-linux-gnu/libnss_nis-2.30.so +7ff40c064000-7ff40c065000 r--p 0000b000 08:0a 4334790 /usr/lib/x86_64-linux-gnu/libnss_nis-2.30.so +7ff40c065000-7ff40c066000 rw-p 0000c000 08:0a 4334790 /usr/lib/x86_64-linux-gnu/libnss_nis-2.30.so +7ff40c066000-7ff40c068000 r--p 00000000 08:0a 4334776 /usr/lib/x86_64-linux-gnu/libnss_compat-2.30.so +7ff40c068000-7ff40c06d000 r-xp 00002000 08:0a 4334776 /usr/lib/x86_64-linux-gnu/libnss_compat-2.30.so +7ff40c06d000-7ff40c06e000 r--p 00007000 08:0a 4334776 /usr/lib/x86_64-linux-gnu/libnss_compat-2.30.so +7ff40c06e000-7ff40c06f000 ---p 00008000 08:0a 4334776 /usr/lib/x86_64-linux-gnu/libnss_compat-2.30.so +7ff40c06f000-7ff40c070000 r--p 00008000 08:0a 4334776 /usr/lib/x86_64-linux-gnu/libnss_compat-2.30.so +7ff40c070000-7ff40c071000 rw-p 00009000 08:0a 4334776 /usr/lib/x86_64-linux-gnu/libnss_compat-2.30.so +7ff40c071000-7ff40c072000 rw-p 00000000 00:00 0 +7ff40c072000-7ff40c073000 r--p 00000000 08:0a 4333008 /usr/lib/x86_64-linux-gnu/ld-2.30.so +7ff40c073000-7ff40c091000 r-xp 00001000 08:0a 4333008 /usr/lib/x86_64-linux-gnu/ld-2.30.so +7ff40c091000-7ff40c099000 r--p 0001f000 08:0a 4333008 /usr/lib/x86_64-linux-gnu/ld-2.30.so +7ff40c099000-7ff40c09a000 r--p 00000000 00:00 0 +7ff40c09a000-7ff40c09b000 r--p 00027000 08:0a 4333008 /usr/lib/x86_64-linux-gnu/ld-2.30.so +7ff40c09b000-7ff40c09c000 rw-p 00028000 08:0a 4333008 /usr/lib/x86_64-linux-gnu/ld-2.30.so +7ff40c09c000-7ff40c09d000 rw-p 00000000 00:00 0 +7fff37897000-7fff378b8000 rw-p 00000000 00:00 0 [stack] +7fff379d8000-7fff379db000 r--p 00000000 00:00 0 [vvar] +7fff379db000-7fff379dc000 r-xp 00000000 00:00 0 [vdso] + +VM Arguments: +java_command: serial4j.jar +java_class_path (initial): serial4j.jar +Launcher Type: SUN_STANDARD + +Environment Variables: +JAVA_HOME=/home/twisted/jdk1.8.0_201 +PATH=/home/pavl-machine/.local/bin:/snap/bin:/usr/sandbox/:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/usr/share/games:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games +SHELL=/bin/bash +DISPLAY=:0 + +Signal Handlers: +SIGSEGV: [libjvm.so+0xad3e60], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO +SIGBUS: [libjvm.so+0xad3e60], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO +SIGFPE: [libjvm.so+0x90b880], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO +SIGPIPE: [libjvm.so+0x90b880], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO +SIGXFSZ: [libjvm.so+0x90b880], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO +SIGILL: [libjvm.so+0x90b880], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO +SIGUSR1: SIG_DFL, sa_mask[0]=00000000000000000000000000000000, sa_flags=none +SIGUSR2: [libjvm.so+0x90b750], sa_mask[0]=00000000000000000000000000000000, sa_flags=SA_RESTART|SA_SIGINFO +SIGHUP: [libjvm.so+0x90bd70], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO +SIGINT: [libjvm.so+0x90bd70], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO +SIGTERM: [libjvm.so+0x90bd70], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO +SIGQUIT: [libjvm.so+0x90bd70], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO + + +--------------- S Y S T E M --------------- + +OS:DISTRIB_ID=Parrot +DISTRIB_RELEASE=4.9 +DISTRIB_CODENAME=rolling +DISTRIB_DESCRIPTION="Parrot 4.9" + +uname:Linux 5.5.0-1parrot1-amd64 #1 SMP Parrot 5.5.17-1parrot1 (2020-04-25) x86_64 +libc:glibc 2.30 NPTL 2.30 +rlimit: STACK 8192k, CORE 0k, NPROC 47123, NOFILE 1048576, AS infinity +load average:1.01 1.06 1.12 + +/proc/meminfo: +MemTotal: 12202288 kB +MemFree: 1483276 kB +MemAvailable: 7093952 kB +Buffers: 1231292 kB +Cached: 5097728 kB +SwapCached: 240 kB +Active: 6394532 kB +Inactive: 3230656 kB +Active(anon): 3148832 kB +Inactive(anon): 954340 kB +Active(file): 3245700 kB +Inactive(file): 2276316 kB +Unevictable: 371536 kB +Mlocked: 176 kB +SwapTotal: 6836220 kB +SwapFree: 6834872 kB +Dirty: 1872 kB +Writeback: 0 kB +AnonPages: 3590144 kB +Mapped: 945156 kB +Shmem: 872240 kB +KReclaimable: 411588 kB +Slab: 556324 kB +SReclaimable: 411588 kB +SUnreclaim: 144736 kB +KernelStack: 15136 kB +PageTables: 51504 kB +NFS_Unstable: 0 kB +Bounce: 0 kB +WritebackTmp: 0 kB +CommitLimit: 12937364 kB +Committed_AS: 13818640 kB +VmallocTotal: 34359738367 kB +VmallocUsed: 47008 kB +VmallocChunk: 0 kB +Percpu: 3872 kB +HardwareCorrupted: 0 kB +AnonHugePages: 688128 kB +ShmemHugePages: 0 kB +ShmemPmdMapped: 0 kB +FileHugePages: 0 kB +FilePmdMapped: 0 kB +HugePages_Total: 0 +HugePages_Free: 0 +HugePages_Rsvd: 0 +HugePages_Surp: 0 +Hugepagesize: 2048 kB +Hugetlb: 0 kB +DirectMap4k: 487700 kB +DirectMap2M: 11958272 kB +DirectMap1G: 1048576 kB + +container (cgroup) information: +container_type: cgroupv1 +cpu_cpuset_cpus: 0-3 +cpu_memory_nodes: 0 +active_processor_count: 4 +cpu_quota: -1 +cpu_period: 100000 +cpu_shares: -1 +memory_limit_in_bytes: -1 +memory_and_swap_limit_in_bytes: -2 +memory_soft_limit_in_bytes: -1 +memory_usage_in_bytes: 2833879040 +memory_max_usage_in_bytes: 4470431744 + + +CPU:total 4 (initial active 4) (2 cores per cpu, 2 threads per core) family 6 model 142 stepping 9, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, avx, avx2, aes, clmul, erms, 3dnowpref, lzcnt, ht, tsc, tscinvbit, bmi1, bmi2, adx + +/proc/cpuinfo: +processor : 0 +vendor_id : GenuineIntel +cpu family : 6 +model : 142 +model name : Intel(R) Core(TM) i3-7020U CPU @ 2.30GHz +stepping : 9 +microcode : 0xca +cpu MHz : 1100.004 +cache size : 3072 KB +physical id : 0 +siblings : 4 +core id : 0 +cpu cores : 2 +apicid : 0 +initial apicid : 0 +fpu : yes +fpu_exception : yes +cpuid level : 22 +wp : yes +flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_clear flush_l1d +bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit +bogomips : 4599.93 +clflush size : 64 +cache_alignment : 64 +address sizes : 39 bits physical, 48 bits virtual +power management: + +processor : 1 +vendor_id : GenuineIntel +cpu family : 6 +model : 142 +model name : Intel(R) Core(TM) i3-7020U CPU @ 2.30GHz +stepping : 9 +microcode : 0xca +cpu MHz : 1100.000 +cache size : 3072 KB +physical id : 0 +siblings : 4 +core id : 1 +cpu cores : 2 +apicid : 2 +initial apicid : 2 +fpu : yes +fpu_exception : yes +cpuid level : 22 +wp : yes +flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm arat pln pts hwp hwp_notify hwp_act_window hwp_epp flush_l1d +bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit +bogomips : 4599.93 +clflush size : 64 +cache_alignment : 64 +address sizes : 39 bits physical, 48 bits virtual +power management: + +processor : 2 +vendor_id : GenuineIntel +cpu family : 6 +model : 142 +model name : Intel(R) Core(TM) i3-7020U CPU @ 2.30GHz +stepping : 9 +microcode : 0xca +cpu MHz : 1100.001 +cache size : 3072 KB +physical id : 0 +siblings : 4 +core id : 0 +cpu cores : 2 +apicid : 1 +initial apicid : 1 +fpu : yes +fpu_exception : yes +cpuid level : 22 +wp : yes +flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_clear flush_l1d +bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit +bogomips : 4599.93 +clflush size : 64 +cache_alignment : 64 +address sizes : 39 bits physical, 48 bits virtual +power management: + +processor : 3 +vendor_id : GenuineIntel +cpu family : 6 +model : 142 +model name : Intel(R) Core(TM) i3-7020U CPU @ 2.30GHz +stepping : 9 +microcode : 0xca +cpu MHz : 1100.000 +cache size : 3072 KB +physical id : 0 +siblings : 4 +core id : 1 +cpu cores : 2 +apicid : 3 +initial apicid : 3 +fpu : yes +fpu_exception : yes +cpuid level : 22 +wp : yes +flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_clear flush_l1d +bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit +bogomips : 4599.93 +clflush size : 64 +cache_alignment : 64 +address sizes : 39 bits physical, 48 bits virtual +power management: + + + +Memory: 4k page, physical 12202288k(1483276k free), swap 6836220k(6834872k free) + +vm_info: Java HotSpot(TM) 64-Bit Server VM (25.201-b09) for linux-amd64 JRE (1.8.0_201-b09), built on Dec 15 2018 11:35:59 by "java_re" with gcc 7.3.0 + +time: Wed Sep 14 19:43:18 2022 +timezone: CDT +elapsed time: 0 seconds (0d 0h 0m 0s) + diff --git a/HelloSerial4j/analysis of native error logs/example4/README.md b/HelloSerial4j/analysis of native error logs/example4/README.md new file mode 100644 index 00000000..e69de29b diff --git a/HelloSerial4j/analysis of native error logs/example4/hs_err_pid100598.log b/HelloSerial4j/analysis of native error logs/example4/hs_err_pid100598.log new file mode 100644 index 00000000..88013fc9 --- /dev/null +++ b/HelloSerial4j/analysis of native error logs/example4/hs_err_pid100598.log @@ -0,0 +1,629 @@ +# +# A fatal error has been detected by the Java Runtime Environment: +# +# SIGSEGV (0xb) at pc=0x00007f7cc800ed2b, pid=100598, tid=0x00007f7caf9f9700 +# +# JRE version: Java(TM) SE Runtime Environment (8.0_201-b09) (build 1.8.0_201-b09) +# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.201-b09 mixed mode linux-amd64 compressed oops) +# Problematic frame: +# C [libserial4j.so+0x4d2b] DynamicBuffer::add(void*)+0x47 +# +# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again +# +# If you would like to submit a bug report, please visit: +# http://bugreport.java.com/bugreport/crash.jsp +# The crash happened outside the Java Virtual Machine in native code. +# See problematic frame for where to report the bug. +# + +--------------- T H R E A D --------------- + +Current thread (0x00007f7cc41f8800): JavaThread "Thread-0" [_thread_in_native, id=100613, stack(0x00007f7caf8f9000,0x00007f7caf9fa000)] + +siginfo: si_signo: 11 (SIGSEGV), si_code: 1 (SEGV_MAPERR), si_addr: 0x0000000000000008 + +Registers: +RAX=0x00007f7c6c002c20, RBX=0x0000000000000008, RCX=0x0000000000000720, RDX=0x0000000000000018 +RSP=0x00007f7caf9f8810, RBP=0x00007f7caf9f8830, RSI=0x00007f7c6c0008d0, RDI=0x00007f7c6c002c10 +R8 =0x00007f7c6c002c20, R9 =0x00007f7c6c003350, R10=0x0000000000000000, R11=0x00007f7c6c000080 +R12=0x0000000000000000, R13=0x00007f7cc8c1ed18, R14=0x00007f7caf9f8908, R15=0x00007f7cc41f8800 +RIP=0x00007f7cc800ed2b, EFLAGS=0x0000000000010206, CSGSFS=0x002b000000000033, ERR=0x0000000000000006 + TRAPNO=0x000000000000000e + +Top of Stack: (sp=0x00007f7caf9f8810) +0x00007f7caf9f8810: 00007f7c6c002c00 00007f7cc80122b8 +0x00007f7caf9f8820: 00007f7c6c0046bb 00007f7cc8c1ed18 +0x00007f7caf9f8830: 00007f7caf9f8870 00007f7cc800d756 +0x00007f7caf9f8840: 00007f7cc8c1ed18 00007f7cc8012260 +0x00007f7caf9f8850: 00007f7cc8c1ed18 00007f7c6c002c00 +0x00007f7caf9f8860: 00007f7c6c0046a8 00007f7c6c003b90 +0x00007f7caf9f8870: 00007f7caf9f8890 00007f7cc800e44c +0x00007f7caf9f8880: 00007f7caf9f8908 00007f7cc41f89f8 +0x00007f7caf9f8890: 00007f7caf9f88e8 00007f7cb50186c7 +0x00007f7caf9f88a0: 00007f7cb50183e2 00007f7caf9f88a8 +0x00007f7caf9f88b0: 00007f7cc8c1ed18 00007f7caf9f8908 +0x00007f7caf9f88c0: 00007f7cc8c1f538 0000000000000000 +0x00007f7caf9f88d0: 00007f7cc8c1ed18 0000000000000000 +0x00007f7caf9f88e0: 00007f7caf9f8908 00007f7caf9f8950 +0x00007f7caf9f88f0: 00007f7cb5007d00 0000000000000000 +0x00007f7caf9f8900: 00007f7cb5011d16 0000000781fe8280 +0x00007f7caf9f8910: 00007f7caf9f8910 00007f7cc8c18866 +0x00007f7caf9f8920: 00007f7caf9f8968 00007f7cc8c18d08 +0x00007f7caf9f8930: 0000000000000000 00007f7cc8c18890 +0x00007f7caf9f8940: 00007f7caf9f8908 00007f7caf9f8968 +0x00007f7caf9f8950: 00007f7caf9f89b0 00007f7cb50082bd +0x00007f7caf9f8960: 0000000000000000 0000000781fe8258 +0x00007f7caf9f8970: 00007f7caf9f8970 00007f7cc8c18051 +0x00007f7caf9f8980: 00007f7caf9f89c0 00007f7cc8c18d08 +0x00007f7caf9f8990: 0000000000000000 00007f7cc8c18078 +0x00007f7caf9f89a0: 00007f7caf9f8968 00007f7caf9f89c0 +0x00007f7caf9f89b0: 00007f7caf9f8a10 00007f7cb5008040 +0x00007f7caf9f89c0: 0000000781fe8258 0000000781f1d970 +0x00007f7caf9f89d0: 00007f7caf9f89d0 00007f7cc8c131b5 +0x00007f7caf9f89e0: 00007f7caf9f8a48 00007f7cc8c15028 +0x00007f7caf9f89f0: 0000000000000000 00007f7cc8c13240 +0x00007f7caf9f8a00: 00007f7caf9f89c0 00007f7caf9f8a48 + +Instructions: (pc=0x00007f7cc800ed2b) +0x00007f7cc800ed0b: c2 48 8b 45 e8 48 89 50 08 48 8b 45 e8 48 8b 58 +0x00007f7cc800ed1b: 08 be 08 00 00 00 bf 01 00 00 00 e8 f5 e4 ff ff +0x00007f7cc800ed2b: 48 89 03 48 8b 45 e8 48 8b 40 08 48 8b 55 e0 48 +0x00007f7cc800ed3b: 89 10 48 8b 45 e8 48 c7 40 08 00 00 00 00 48 8b + +Register to memory mapping: + +RAX=0x00007f7c6c002c20 is an unknown value +RBX=0x0000000000000008 is an unknown value +RCX=0x0000000000000720 is an unknown value +RDX=0x0000000000000018 is an unknown value +RSP=0x00007f7caf9f8810 is pointing into the stack for thread: 0x00007f7cc41f8800 +RBP=0x00007f7caf9f8830 is pointing into the stack for thread: 0x00007f7cc41f8800 +RSI=0x00007f7c6c0008d0 is an unknown value +RDI=0x00007f7c6c002c10 is an unknown value +R8 =0x00007f7c6c002c20 is an unknown value +R9 =0x00007f7c6c003350 is an unknown value +R10=0x0000000000000000 is an unknown value +R11=0x00007f7c6c000080 is an unknown value +R12=0x0000000000000000 is an unknown value +R13={method} {0x00007f7cc8c1ed18} 'fetchSerialPorts0' '()I' in 'com/serial4j/core/serial/NativeTerminalDevice' +R14=0x00007f7caf9f8908 is pointing into the stack for thread: 0x00007f7cc41f8800 +R15=0x00007f7cc41f8800 is a thread + + +Stack: [0x00007f7caf8f9000,0x00007f7caf9fa000], sp=0x00007f7caf9f8810, free space=1022k +Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) +C [libserial4j.so+0x4d2b] DynamicBuffer::add(void*)+0x47 +C [libserial4j.so+0x3756] Terminal::TerminalDevice::fetchSerialPorts()+0xfa +C [libserial4j.so+0x444c] Java_com_serial4j_core_serial_NativeTerminalDevice_fetchSerialPorts0+0x1f +j com.serial4j.core.serial.NativeTerminalDevice.fetchSerialPorts0()I+0 +j com.serial4j.core.serial.TerminalDevice.fetchSerialPorts()V+22 +j com.serial4j.core.serial.TerminalDevice.getSerialPorts()[Ljava/lang/String;+1 +j com.serial4j.example.HelloNativeSerial4J.run()V+349 +v ~StubRoutines::call_stub +V [libjvm.so+0x68825b] JavaCalls::call_helper(JavaValue*, methodHandle*, JavaCallArguments*, Thread*)+0xddb +V [libjvm.so+0x685b23] JavaCalls::call_virtual(JavaValue*, KlassHandle, Symbol*, Symbol*, JavaCallArguments*, Thread*)+0x263 +V [libjvm.so+0x6860e7] JavaCalls::call_virtual(JavaValue*, Handle, KlassHandle, Symbol*, Symbol*, Thread*)+0x47 +V [libjvm.so+0x6f225c] thread_entry(JavaThread*, Thread*)+0x6c +V [libjvm.so+0xa7bb6b] JavaThread::thread_main_inner()+0xdb +V [libjvm.so+0xa7be71] JavaThread::run()+0x2d1 +V [libjvm.so+0x90d922] java_start(Thread*)+0x102 +C [libpthread.so.0+0x8f27] start_thread+0xd7 + +Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) +j com.serial4j.core.serial.NativeTerminalDevice.fetchSerialPorts0()I+0 +j com.serial4j.core.serial.TerminalDevice.fetchSerialPorts()V+22 +j com.serial4j.core.serial.TerminalDevice.getSerialPorts()[Ljava/lang/String;+1 +j com.serial4j.example.HelloNativeSerial4J.run()V+349 +v ~StubRoutines::call_stub + +--------------- P R O C E S S --------------- + +Java Threads: ( => current thread ) +=>0x00007f7cc41f8800 JavaThread "Thread-0" [_thread_in_native, id=100613, stack(0x00007f7caf8f9000,0x00007f7caf9fa000)] + 0x00007f7cc418d000 JavaThread "Service Thread" daemon [_thread_blocked, id=100611, stack(0x00007f7cafafb000,0x00007f7cafbfc000)] + 0x00007f7cc418a000 JavaThread "C1 CompilerThread2" daemon [_thread_blocked, id=100610, stack(0x00007f7cafbfd000,0x00007f7cafcfd000)] + 0x00007f7cc4188000 JavaThread "C2 CompilerThread1" daemon [_thread_blocked, id=100609, stack(0x00007f7cafcfe000,0x00007f7cafdfe000)] + 0x00007f7cc4185000 JavaThread "C2 CompilerThread0" daemon [_thread_blocked, id=100608, stack(0x00007f7cafdff000,0x00007f7cafeff000)] + 0x00007f7cc4184000 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=100607, stack(0x00007f7cafeff000,0x00007f7cb0000000)] + 0x00007f7cc414c800 JavaThread "Finalizer" daemon [_thread_blocked, id=100606, stack(0x00007f7cb42f3000,0x00007f7cb43f4000)] + 0x00007f7cc414a000 JavaThread "Reference Handler" daemon [_thread_blocked, id=100605, stack(0x00007f7cb43f4000,0x00007f7cb44f5000)] + 0x00007f7cc400b000 JavaThread "main" [_thread_blocked, id=100599, stack(0x00007f7ccae49000,0x00007f7ccaf49000)] + +Other Threads: + 0x00007f7cc4140000 VMThread [stack: 0x00007f7cb44f6000,0x00007f7cb45f6000] [id=100604] + 0x00007f7cc418f800 WatcherThread [stack: 0x00007f7caf9fb000,0x00007f7cafafb000] [id=100612] + +VM state:not at safepoint (normal execution) + +VM Mutex/Monitor currently owned by a thread: None + +heap address: 0x0000000705c00000, size: 2980 MB, Compressed Oops mode: Zero based, Oop shift amount: 3 +Narrow klass base: 0x0000000000000000, Narrow klass shift: 3 +Compressed class space size: 1073741824 Address: 0x00000007c0000000 + +Heap: + PSYoungGen total 56320K, used 2918K [0x0000000781f00000, 0x0000000785d80000, 0x00000007c0000000) + eden space 48640K, 6% used [0x0000000781f00000,0x00000007821d99d0,0x0000000784e80000) + from space 7680K, 0% used [0x0000000785600000,0x0000000785600000,0x0000000785d80000) + to space 7680K, 0% used [0x0000000784e80000,0x0000000784e80000,0x0000000785600000) + ParOldGen total 128512K, used 0K [0x0000000705c00000, 0x000000070d980000, 0x0000000781f00000) + object space 128512K, 0% used [0x0000000705c00000,0x0000000705c00000,0x000000070d980000) + Metaspace used 3106K, capacity 4664K, committed 4864K, reserved 1056768K + class space used 350K, capacity 424K, committed 512K, reserved 1048576K + +Card table byte_map: [0x00007f7cc9e05000,0x00007f7cca3d8000] byte_map_base: 0x00007f7cc65d7000 + +Marking Bits: (ParMarkBitMap*) 0x00007f7ccc059d80 + Begin Bits: [0x00007f7c9a2e0000, 0x00007f7c9d170000) + End Bits: [0x00007f7c9d170000, 0x00007f7ca0000000) + +Polling page: 0x00007f7ccc4c0000 + +CodeCache: size=245760Kb used=1147Kb max_used=1147Kb free=244612Kb + bounds [0x00007f7cb5000000, 0x00007f7cb5270000, 0x00007f7cc4000000] + total_blobs=289 nmethods=53 adapters=150 + compilation: enabled + +Compilation events (10 events): +Event: 0.114 Thread 0x00007f7cc418a000 49 3 java.lang.StringBuilder:: (7 bytes) +Event: 0.115 Thread 0x00007f7cc418a000 nmethod 49 0x00007f7cb511d9d0 code [0x00007f7cb511db40, 0x00007f7cb511ddf0] +Event: 0.115 Thread 0x00007f7cc418a000 50 3 java.lang.StringBuilder::toString (17 bytes) +Event: 0.115 Thread 0x00007f7cc418a000 nmethod 50 0x00007f7cb511df10 code [0x00007f7cb511e080, 0x00007f7cb511e288] +Event: 0.115 Thread 0x00007f7cc418a000 51 s 1 java.util.Vector::size (5 bytes) +Event: 0.115 Thread 0x00007f7cc418a000 nmethod 51 0x00007f7cb511e350 code [0x00007f7cb511e4a0, 0x00007f7cb511e710] +Event: 0.115 Thread 0x00007f7cc418a000 52 3 java.lang.String:: (10 bytes) +Event: 0.116 Thread 0x00007f7cc418a000 nmethod 52 0x00007f7cb511e790 code [0x00007f7cb511e900, 0x00007f7cb511ead0] +Event: 0.116 Thread 0x00007f7cc418a000 53 1 java.util.zip.ZipFile::access$000 (5 bytes) +Event: 0.117 Thread 0x00007f7cc418a000 nmethod 53 0x00007f7cb511eb90 code [0x00007f7cb511ece0, 0x00007f7cb511edd0] + +GC Heap History (0 events): +No events + +Deoptimization events (0 events): +No events + +Classes redefined (0 events): +No events + +Internal exceptions (6 events): +Event: 0.032 Thread 0x00007f7cc400b000 Exception (0x0000000781f07cb0) thrown at [/HUDSON/workspace/8-2-build-linux-amd64/jdk8u201/12317/hotspot/src/sh +Event: 0.032 Thread 0x00007f7cc400b000 Exception (0x0000000781f07f98) thrown at [/HUDSON/workspace/8-2-build-linux-amd64/jdk8u201/12317/hotspot/src/share/vm/prims/jni.c +Event: 0.102 Thread 0x00007f7cc400b000 Exception (0x0000000781fc06e0) thrown at [/HUDSON/workspace/8-2-build-linux-amd64/jdk8u201/12317/hotspot/src/share/vm/prims/jvm.cpp, line 1502] +Event: 0.102 Thread 0x00007f7cc400b000 Exception (0x0000000781fc08f0) thrown at [/HUDSON/workspace/8-2-build-linux-amd64/jdk8u201/12317/hotspot/src/share/vm/prims/jvm.cpp, line 1502] +Event: 0.103 Thread 0x00007f7cc400b000 Exception (0x0000000781fc2d58) thrown at [/HUDSON/workspace/8-2-build-linux-amd64/jdk8u201/12317/hotspot/src/share/vm/prims/jvm.cpp, line 1502] +Event: 0.103 Thread 0x00007f7cc400b000 Exception (0x0000000781fc2f68) thrown at [/HUDSON/workspace/8-2-build-linux-amd64/jdk8u201/12317/hotspot/src/share/vm/prims/jvm.cpp, line 1502] + +Events (10 events): +Event: 0.113 loading class com/serial4j/core/serial/control/TerminalLocalFlag +Event: 0.113 loading class com/serial4j/core/serial/control/TerminalLocalFlag done +Event: 0.114 loading class com/serial4j/core/serial/control/TerminalOutputFlag +Event: 0.114 loading class com/serial4j/core/serial/control/TerminalOutputFlag done +Event: 0.114 loading class com/serial4j/core/serial/control/TerminalInputFlag +Event: 0.114 loading class com/serial4j/core/serial/control/TerminalInputFlag done +Event: 0.115 loading class com/serial4j/core/serial/BaudRate +Event: 0.115 loading class com/serial4j/core/serial/BaudRate done +Event: 0.116 loading class com/serial4j/core/serial/ReadConfiguration +Event: 0.116 loading class com/serial4j/core/serial/ReadConfiguration done + + +Dynamic libraries: +00400000-00401000 r-xp 00000000 08:0b 8396377 /home/twisted/jdk1.8.0_201/bin/java +00600000-00601000 r--p 00000000 08:0b 8396377 /home/twisted/jdk1.8.0_201/bin/java +00601000-00602000 rw-p 00001000 08:0b 8396377 /home/twisted/jdk1.8.0_201/bin/java +0099b000-009bc000 rw-p 00000000 00:00 0 [heap] +705c00000-70d980000 rw-p 00000000 00:00 0 +70d980000-781f00000 ---p 00000000 00:00 0 +781f00000-785d80000 rw-p 00000000 00:00 0 +785d80000-7c0000000 ---p 00000000 00:00 0 +7c0000000-7c0080000 rw-p 00000000 00:00 0 +7c0080000-800000000 ---p 00000000 00:00 0 +7f7c6c000000-7f7c6c021000 rw-p 00000000 00:00 0 +7f7c6c021000-7f7c70000000 ---p 00000000 00:00 0 +7f7c74000000-7f7c74021000 rw-p 00000000 00:00 0 +7f7c74021000-7f7c78000000 ---p 00000000 00:00 0 +7f7c78000000-7f7c78021000 rw-p 00000000 00:00 0 +7f7c78021000-7f7c7c000000 ---p 00000000 00:00 0 +7f7c7c000000-7f7c7c021000 rw-p 00000000 00:00 0 +7f7c7c021000-7f7c80000000 ---p 00000000 00:00 0 +7f7c80000000-7f7c80038000 rw-p 00000000 00:00 0 +7f7c80038000-7f7c84000000 ---p 00000000 00:00 0 +7f7c84000000-7f7c84021000 rw-p 00000000 00:00 0 +7f7c84021000-7f7c88000000 ---p 00000000 00:00 0 +7f7c88000000-7f7c8805e000 rw-p 00000000 00:00 0 +7f7c8805e000-7f7c8c000000 ---p 00000000 00:00 0 +7f7c8c000000-7f7c8c021000 rw-p 00000000 00:00 0 +7f7c8c021000-7f7c90000000 ---p 00000000 00:00 0 +7f7c90000000-7f7c90021000 rw-p 00000000 00:00 0 +7f7c90021000-7f7c94000000 ---p 00000000 00:00 0 +7f7c94000000-7f7c94021000 rw-p 00000000 00:00 0 +7f7c94021000-7f7c98000000 ---p 00000000 00:00 0 +7f7c9a2e0000-7f7ca0000000 rw-p 00000000 00:00 0 +7f7ca0000000-7f7ca0021000 rw-p 00000000 00:00 0 +7f7ca0021000-7f7ca4000000 ---p 00000000 00:00 0 +7f7ca4000000-7f7ca4021000 rw-p 00000000 00:00 0 +7f7ca4021000-7f7ca8000000 ---p 00000000 00:00 0 +7f7ca8000000-7f7ca8021000 rw-p 00000000 00:00 0 +7f7ca8021000-7f7cac000000 ---p 00000000 00:00 0 +7f7caf664000-7f7caf8f9000 rw-p 00000000 00:00 0 +7f7caf8f9000-7f7caf8fc000 ---p 00000000 00:00 0 +7f7caf8fc000-7f7caf9fa000 rw-p 00000000 00:00 0 +7f7caf9fa000-7f7caf9fb000 ---p 00000000 00:00 0 +7f7caf9fb000-7f7cafafb000 rw-p 00000000 00:00 0 +7f7cafafb000-7f7cafafe000 ---p 00000000 00:00 0 +7f7cafafe000-7f7cafbfc000 rw-p 00000000 00:00 0 +7f7cafbfc000-7f7cafbfd000 ---p 00000000 00:00 0 +7f7cafbfd000-7f7cafc00000 ---p 00000000 00:00 0 +7f7cafc00000-7f7cafcfd000 rw-p 00000000 00:00 0 +7f7cafcfd000-7f7cafcfe000 ---p 00000000 00:00 0 +7f7cafcfe000-7f7cafd01000 ---p 00000000 00:00 0 +7f7cafd01000-7f7cafdfe000 rw-p 00000000 00:00 0 +7f7cafdfe000-7f7cafdff000 ---p 00000000 00:00 0 +7f7cafdff000-7f7cafe02000 ---p 00000000 00:00 0 +7f7cafe02000-7f7cafeff000 rw-p 00000000 00:00 0 +7f7cafeff000-7f7caff02000 ---p 00000000 00:00 0 +7f7caff02000-7f7cb0000000 rw-p 00000000 00:00 0 +7f7cb0000000-7f7cb0021000 rw-p 00000000 00:00 0 +7f7cb0021000-7f7cb4000000 ---p 00000000 00:00 0 +7f7cb4028000-7f7cb407b000 r--p 00000000 08:0a 4328904 /usr/lib/locale/aa_DJ.utf8/LC_CTYPE +7f7cb407b000-7f7cb42f3000 r--p 00000000 08:0a 4328903 /usr/lib/locale/aa_DJ.utf8/LC_COLLATE +7f7cb42f3000-7f7cb42f6000 ---p 00000000 00:00 0 +7f7cb42f6000-7f7cb43f4000 rw-p 00000000 00:00 0 +7f7cb43f4000-7f7cb43f7000 ---p 00000000 00:00 0 +7f7cb43f7000-7f7cb44f5000 rw-p 00000000 00:00 0 +7f7cb44f5000-7f7cb44f6000 ---p 00000000 00:00 0 +7f7cb44f6000-7f7cb5000000 rw-p 00000000 00:00 0 +7f7cb5000000-7f7cb5270000 rwxp 00000000 00:00 0 +7f7cb5270000-7f7cc4000000 ---p 00000000 00:00 0 +7f7cc4000000-7f7cc4200000 rw-p 00000000 00:00 0 +7f7cc4200000-7f7cc8000000 ---p 00000000 00:00 0 +7f7cc800a000-7f7cc800d000 r--p 00000000 08:0b 8520060 /home/twisted/GradleProjects/AVR-Sandbox/HelloSerial4j/output/serial4j/libserial4j.so +7f7cc800d000-7f7cc800f000 r-xp 00003000 08:0b 8520060 /home/twisted/GradleProjects/AVR-Sandbox/HelloSerial4j/output/serial4j/libserial4j.so +7f7cc800f000-7f7cc8011000 r--p 00005000 08:0b 8520060 /home/twisted/GradleProjects/AVR-Sandbox/HelloSerial4j/output/serial4j/libserial4j.so +7f7cc8011000-7f7cc8012000 r--p 00006000 08:0b 8520060 /home/twisted/GradleProjects/AVR-Sandbox/HelloSerial4j/output/serial4j/libserial4j.so +7f7cc8012000-7f7cc8013000 rw-p 00007000 08:0b 8520060 /home/twisted/GradleProjects/AVR-Sandbox/HelloSerial4j/output/serial4j/libserial4j.so +7f7cc8013000-7f7cc8567000 rw-p 00000000 00:00 0 +7f7cc8567000-7f7cc8741000 r--s 03d6f000 08:0b 8543644 /home/twisted/jdk1.8.0_201/jre/lib/rt.jar +7f7cc8741000-7f7cc8c52000 rw-p 00000000 00:00 0 +7f7cc8c52000-7f7cc9012000 ---p 00000000 00:00 0 +7f7cc9012000-7f7cc961f000 rw-p 00000000 00:00 0 +7f7cc961f000-7f7cc9620000 ---p 00000000 00:00 0 +7f7cc9620000-7f7cc9720000 rw-p 00000000 00:00 0 +7f7cc9720000-7f7cc9721000 ---p 00000000 00:00 0 +7f7cc9721000-7f7cc9821000 rw-p 00000000 00:00 0 +7f7cc9821000-7f7cc9822000 ---p 00000000 00:00 0 +7f7cc9822000-7f7cc9922000 rw-p 00000000 00:00 0 +7f7cc9922000-7f7cc9923000 ---p 00000000 00:00 0 +7f7cc9923000-7f7cc9a62000 rw-p 00000000 00:00 0 +7f7cc9a62000-7f7cc9e05000 ---p 00000000 00:00 0 +7f7cc9e05000-7f7cc9e44000 rw-p 00000000 00:00 0 +7f7cc9e44000-7f7cca1e6000 ---p 00000000 00:00 0 +7f7cca1e6000-7f7cca206000 rw-p 00000000 00:00 0 +7f7cca206000-7f7cca3d7000 ---p 00000000 00:00 0 +7f7cca3d7000-7f7cca3e2000 rw-p 00000000 00:00 0 +7f7cca3e2000-7f7cca798000 ---p 00000000 00:00 0 +7f7cca798000-7f7cca7b3000 r-xp 00000000 08:0b 8782383 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libzip.so +7f7cca7b3000-7f7cca9b2000 ---p 0001b000 08:0b 8782383 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libzip.so +7f7cca9b2000-7f7cca9b3000 r--p 0001a000 08:0b 8782383 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libzip.so +7f7cca9b3000-7f7cca9b4000 rw-p 0001b000 08:0b 8782383 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libzip.so +7f7cca9b4000-7f7cca9b7000 r--p 00000000 08:0a 4334780 /usr/lib/x86_64-linux-gnu/libnss_files-2.30.so +7f7cca9b7000-7f7cca9be000 r-xp 00003000 08:0a 4334780 /usr/lib/x86_64-linux-gnu/libnss_files-2.30.so +7f7cca9be000-7f7cca9c0000 r--p 0000a000 08:0a 4334780 /usr/lib/x86_64-linux-gnu/libnss_files-2.30.so +7f7cca9c0000-7f7cca9c1000 r--p 0000b000 08:0a 4334780 /usr/lib/x86_64-linux-gnu/libnss_files-2.30.so +7f7cca9c1000-7f7cca9c2000 rw-p 0000c000 08:0a 4334780 /usr/lib/x86_64-linux-gnu/libnss_files-2.30.so +7f7cca9c2000-7f7cca9c8000 rw-p 00000000 00:00 0 +7f7cca9c8000-7f7cca9cd000 r--p 00000000 08:0a 4334771 /usr/lib/x86_64-linux-gnu/libnsl-2.30.so +7f7cca9cd000-7f7cca9da000 r-xp 00005000 08:0a 4334771 /usr/lib/x86_64-linux-gnu/libnsl-2.30.so +7f7cca9da000-7f7cca9de000 r--p 00012000 08:0a 4334771 /usr/lib/x86_64-linux-gnu/libnsl-2.30.so +7f7cca9de000-7f7cca9df000 r--p 00015000 08:0a 4334771 /usr/lib/x86_64-linux-gnu/libnsl-2.30.so +7f7cca9df000-7f7cca9e0000 rw-p 00016000 08:0a 4334771 /usr/lib/x86_64-linux-gnu/libnsl-2.30.so +7f7cca9e0000-7f7cca9e2000 rw-p 00000000 00:00 0 +7f7cca9e7000-7f7cca9e9000 r--s 0000a000 08:0b 8520889 /home/twisted/GradleProjects/AVR-Sandbox/HelloSerial4j/output/serial4j/serial4j.jar +7f7cca9e9000-7f7cca9ea000 r--p 00000000 08:0a 4328933 /usr/lib/locale/aa_ET/LC_NUMERIC +7f7cca9ea000-7f7cca9eb000 r--p 00000000 08:0a 4330095 /usr/lib/locale/en_US.utf8/LC_TIME +7f7cca9eb000-7f7cca9ec000 r--p 00000000 08:0a 4329578 /usr/lib/locale/chr_US/LC_MONETARY +7f7cca9ec000-7f7cca9ed000 r--p 00000000 08:0a 4329874 /usr/lib/locale/en_AG/LC_MESSAGES/SYS_LC_MESSAGES +7f7cca9ed000-7f7cca9ee000 r--p 00000000 08:0a 4329579 /usr/lib/locale/chr_US/LC_PAPER +7f7cca9ee000-7f7cca9ef000 r--p 00000000 08:0a 4329410 /usr/lib/locale/bi_VU/LC_NAME +7f7cca9ef000-7f7cca9f0000 r--p 00000000 08:0a 4330092 /usr/lib/locale/en_US.utf8/LC_ADDRESS +7f7cca9f0000-7f7cca9f7000 r--s 00000000 08:0a 4332592 /usr/lib/x86_64-linux-gnu/gconv/gconv-modules.cache +7f7cca9f7000-7f7cca9ff000 rw-s 00000000 08:0a 2105311 /tmp/hsperfdata_pavl-machine/100598 +7f7cca9ff000-7f7ccaa2b000 r-xp 00000000 08:0b 8782377 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libjava.so +7f7ccaa2b000-7f7ccac2b000 ---p 0002c000 08:0b 8782377 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libjava.so +7f7ccac2b000-7f7ccac2c000 r--p 0002c000 08:0b 8782377 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libjava.so +7f7ccac2c000-7f7ccac2e000 rw-p 0002d000 08:0b 8782377 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libjava.so +7f7ccac2e000-7f7ccac3b000 r-xp 00000000 08:0b 8782382 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libverify.so +7f7ccac3b000-7f7ccae3a000 ---p 0000d000 08:0b 8782382 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libverify.so +7f7ccae3a000-7f7ccae3c000 r--p 0000c000 08:0b 8782382 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libverify.so +7f7ccae3c000-7f7ccae3d000 rw-p 0000e000 08:0b 8782382 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libverify.so +7f7ccae3d000-7f7ccae40000 r--p 00000000 08:0a 4335156 /usr/lib/x86_64-linux-gnu/librt-2.30.so +7f7ccae40000-7f7ccae44000 r-xp 00003000 08:0a 4335156 /usr/lib/x86_64-linux-gnu/librt-2.30.so +7f7ccae44000-7f7ccae46000 r--p 00007000 08:0a 4335156 /usr/lib/x86_64-linux-gnu/librt-2.30.so +7f7ccae46000-7f7ccae47000 r--p 00008000 08:0a 4335156 /usr/lib/x86_64-linux-gnu/librt-2.30.so +7f7ccae47000-7f7ccae48000 rw-p 00009000 08:0a 4335156 /usr/lib/x86_64-linux-gnu/librt-2.30.so +7f7ccae48000-7f7ccae49000 ---p 00000000 00:00 0 +7f7ccae49000-7f7ccae4c000 ---p 00000000 00:00 0 +7f7ccae4c000-7f7ccaf49000 rw-p 00000000 00:00 0 +7f7ccaf49000-7f7ccaf58000 r--p 00000000 08:0a 4334559 /usr/lib/x86_64-linux-gnu/libm-2.30.so +7f7ccaf58000-7f7ccaff3000 r-xp 0000f000 08:0a 4334559 /usr/lib/x86_64-linux-gnu/libm-2.30.so +7f7ccaff3000-7f7ccb08c000 r--p 000aa000 08:0a 4334559 /usr/lib/x86_64-linux-gnu/libm-2.30.so +7f7ccb08c000-7f7ccb08d000 r--p 00142000 08:0a 4334559 /usr/lib/x86_64-linux-gnu/libm-2.30.so +7f7ccb08d000-7f7ccb08e000 rw-p 00143000 08:0a 4334559 /usr/lib/x86_64-linux-gnu/libm-2.30.so +7f7ccb08e000-7f7ccbd76000 r-xp 00000000 08:0b 8782359 /home/twisted/jdk1.8.0_201/jre/lib/amd64/server/libjvm.so +7f7ccbd76000-7f7ccbf75000 ---p 00ce8000 08:0b 8782359 /home/twisted/jdk1.8.0_201/jre/lib/amd64/server/libjvm.so +7f7ccbf75000-7f7ccc00b000 r--p 00ce7000 08:0b 8782359 /home/twisted/jdk1.8.0_201/jre/lib/amd64/server/libjvm.so +7f7ccc00b000-7f7ccc03c000 rw-p 00d7d000 08:0b 8782359 /home/twisted/jdk1.8.0_201/jre/lib/amd64/server/libjvm.so +7f7ccc03c000-7f7ccc079000 rw-p 00000000 00:00 0 +7f7ccc079000-7f7ccc09e000 r--p 00000000 08:0a 4333575 /usr/lib/x86_64-linux-gnu/libc-2.30.so +7f7ccc09e000-7f7ccc1e8000 r-xp 00025000 08:0a 4333575 /usr/lib/x86_64-linux-gnu/libc-2.30.so +7f7ccc1e8000-7f7ccc232000 r--p 0016f000 08:0a 4333575 /usr/lib/x86_64-linux-gnu/libc-2.30.so +7f7ccc232000-7f7ccc235000 r--p 001b8000 08:0a 4333575 /usr/lib/x86_64-linux-gnu/libc-2.30.so +7f7ccc235000-7f7ccc238000 rw-p 001bb000 08:0a 4333575 /usr/lib/x86_64-linux-gnu/libc-2.30.so +7f7ccc238000-7f7ccc23c000 rw-p 00000000 00:00 0 +7f7ccc23c000-7f7ccc23d000 r--p 00000000 08:0a 4333777 /usr/lib/x86_64-linux-gnu/libdl-2.30.so +7f7ccc23d000-7f7ccc23e000 r-xp 00001000 08:0a 4333777 /usr/lib/x86_64-linux-gnu/libdl-2.30.so +7f7ccc23e000-7f7ccc23f000 r--p 00002000 08:0a 4333777 /usr/lib/x86_64-linux-gnu/libdl-2.30.so +7f7ccc23f000-7f7ccc240000 r--p 00002000 08:0a 4333777 /usr/lib/x86_64-linux-gnu/libdl-2.30.so +7f7ccc240000-7f7ccc241000 rw-p 00003000 08:0a 4333777 /usr/lib/x86_64-linux-gnu/libdl-2.30.so +7f7ccc241000-7f7ccc258000 r-xp 00000000 08:0b 8543590 /home/twisted/jdk1.8.0_201/lib/amd64/jli/libjli.so +7f7ccc258000-7f7ccc457000 ---p 00017000 08:0b 8543590 /home/twisted/jdk1.8.0_201/lib/amd64/jli/libjli.so +7f7ccc457000-7f7ccc458000 r--p 00016000 08:0b 8543590 /home/twisted/jdk1.8.0_201/lib/amd64/jli/libjli.so +7f7ccc458000-7f7ccc459000 rw-p 00017000 08:0b 8543590 /home/twisted/jdk1.8.0_201/lib/amd64/jli/libjli.so +7f7ccc459000-7f7ccc460000 r--p 00000000 08:0a 4335024 /usr/lib/x86_64-linux-gnu/libpthread-2.30.so +7f7ccc460000-7f7ccc46f000 r-xp 00007000 08:0a 4335024 /usr/lib/x86_64-linux-gnu/libpthread-2.30.so +7f7ccc46f000-7f7ccc474000 r--p 00016000 08:0a 4335024 /usr/lib/x86_64-linux-gnu/libpthread-2.30.so +7f7ccc474000-7f7ccc475000 r--p 0001a000 08:0a 4335024 /usr/lib/x86_64-linux-gnu/libpthread-2.30.so +7f7ccc475000-7f7ccc476000 rw-p 0001b000 08:0a 4335024 /usr/lib/x86_64-linux-gnu/libpthread-2.30.so +7f7ccc476000-7f7ccc47c000 rw-p 00000000 00:00 0 +7f7ccc47c000-7f7ccc47d000 r--p 00000000 08:0a 4329580 /usr/lib/locale/chr_US/LC_TELEPHONE +7f7ccc47d000-7f7ccc47e000 r--p 00000000 08:0a 4329575 /usr/lib/locale/chr_US/LC_MEASUREMENT +7f7ccc47e000-7f7ccc47f000 r--p 00000000 08:0a 4330093 /usr/lib/locale/en_US.utf8/LC_IDENTIFICATION +7f7ccc47f000-7f7ccc482000 r--p 00000000 08:0a 4334790 /usr/lib/x86_64-linux-gnu/libnss_nis-2.30.so +7f7ccc482000-7f7ccc489000 r-xp 00003000 08:0a 4334790 /usr/lib/x86_64-linux-gnu/libnss_nis-2.30.so +7f7ccc489000-7f7ccc48b000 r--p 0000a000 08:0a 4334790 /usr/lib/x86_64-linux-gnu/libnss_nis-2.30.so +7f7ccc48b000-7f7ccc48c000 r--p 0000b000 08:0a 4334790 /usr/lib/x86_64-linux-gnu/libnss_nis-2.30.so +7f7ccc48c000-7f7ccc48d000 rw-p 0000c000 08:0a 4334790 /usr/lib/x86_64-linux-gnu/libnss_nis-2.30.so +7f7ccc48d000-7f7ccc48f000 r--p 00000000 08:0a 4334776 /usr/lib/x86_64-linux-gnu/libnss_compat-2.30.so +7f7ccc48f000-7f7ccc494000 r-xp 00002000 08:0a 4334776 /usr/lib/x86_64-linux-gnu/libnss_compat-2.30.so +7f7ccc494000-7f7ccc495000 r--p 00007000 08:0a 4334776 /usr/lib/x86_64-linux-gnu/libnss_compat-2.30.so +7f7ccc495000-7f7ccc496000 ---p 00008000 08:0a 4334776 /usr/lib/x86_64-linux-gnu/libnss_compat-2.30.so +7f7ccc496000-7f7ccc497000 r--p 00008000 08:0a 4334776 /usr/lib/x86_64-linux-gnu/libnss_compat-2.30.so +7f7ccc497000-7f7ccc498000 rw-p 00009000 08:0a 4334776 /usr/lib/x86_64-linux-gnu/libnss_compat-2.30.so +7f7ccc498000-7f7ccc499000 rw-p 00000000 00:00 0 +7f7ccc499000-7f7ccc49a000 r--p 00000000 08:0a 4333008 /usr/lib/x86_64-linux-gnu/ld-2.30.so +7f7ccc49a000-7f7ccc4b8000 r-xp 00001000 08:0a 4333008 /usr/lib/x86_64-linux-gnu/ld-2.30.so +7f7ccc4b8000-7f7ccc4c0000 r--p 0001f000 08:0a 4333008 /usr/lib/x86_64-linux-gnu/ld-2.30.so +7f7ccc4c0000-7f7ccc4c1000 r--p 00000000 00:00 0 +7f7ccc4c1000-7f7ccc4c2000 r--p 00027000 08:0a 4333008 /usr/lib/x86_64-linux-gnu/ld-2.30.so +7f7ccc4c2000-7f7ccc4c3000 rw-p 00028000 08:0a 4333008 /usr/lib/x86_64-linux-gnu/ld-2.30.so +7f7ccc4c3000-7f7ccc4c4000 rw-p 00000000 00:00 0 +7ffd5f21d000-7ffd5f23e000 rw-p 00000000 00:00 0 [stack] +7ffd5f2e8000-7ffd5f2eb000 r--p 00000000 00:00 0 [vvar] +7ffd5f2eb000-7ffd5f2ec000 r-xp 00000000 00:00 0 [vdso] + +VM Arguments: +java_command: serial4j.jar +java_class_path (initial): serial4j.jar +Launcher Type: SUN_STANDARD + +Environment Variables: +JAVA_HOME=/home/twisted/jdk1.8.0_201 +PATH=/home/pavl-machine/.local/bin:/snap/bin:/usr/sandbox/:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/usr/share/games:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games +SHELL=/bin/bash +DISPLAY=:0 + +Signal Handlers: +SIGSEGV: [libjvm.so+0xad3e60], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO +SIGBUS: [libjvm.so+0xad3e60], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO +SIGFPE: [libjvm.so+0x90b880], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO +SIGPIPE: [libjvm.so+0x90b880], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO +SIGXFSZ: [libjvm.so+0x90b880], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO +SIGILL: [libjvm.so+0x90b880], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO +SIGUSR1: SIG_DFL, sa_mask[0]=00000000000000000000000000000000, sa_flags=none +SIGUSR2: [libjvm.so+0x90b750], sa_mask[0]=00000000000000000000000000000000, sa_flags=SA_RESTART|SA_SIGINFO +SIGHUP: [libjvm.so+0x90bd70], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO +SIGINT: [libjvm.so+0x90bd70], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO +SIGTERM: [libjvm.so+0x90bd70], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO +SIGQUIT: [libjvm.so+0x90bd70], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO + + +--------------- S Y S T E M --------------- + +OS:DISTRIB_ID=Parrot +DISTRIB_RELEASE=4.9 +DISTRIB_CODENAME=rolling +DISTRIB_DESCRIPTION="Parrot 4.9" + +uname:Linux 5.5.0-1parrot1-amd64 #1 SMP Parrot 5.5.17-1parrot1 (2020-04-25) x86_64 +libc:glibc 2.30 NPTL 2.30 +rlimit: STACK 8192k, CORE 0k, NPROC 47123, NOFILE 1048576, AS infinity +load average:1.54 1.21 1.16 + +/proc/meminfo: +MemTotal: 12202288 kB +MemFree: 1510792 kB +MemAvailable: 7120664 kB +Buffers: 1231660 kB +Cached: 5089848 kB +SwapCached: 240 kB +Active: 6375236 kB +Inactive: 3226708 kB +Active(anon): 3129232 kB +Inactive(anon): 951492 kB +Active(file): 3246004 kB +Inactive(file): 2275216 kB +Unevictable: 369468 kB +Mlocked: 176 kB +SwapTotal: 6836220 kB +SwapFree: 6834872 kB +Dirty: 2148 kB +Writeback: 0 kB +AnonPages: 3568048 kB +Mapped: 949472 kB +Shmem: 867324 kB +KReclaimable: 411580 kB +Slab: 556352 kB +SReclaimable: 411580 kB +SUnreclaim: 144772 kB +KernelStack: 14880 kB +PageTables: 51308 kB +NFS_Unstable: 0 kB +Bounce: 0 kB +WritebackTmp: 0 kB +CommitLimit: 12937364 kB +Committed_AS: 13731440 kB +VmallocTotal: 34359738367 kB +VmallocUsed: 46768 kB +VmallocChunk: 0 kB +Percpu: 3872 kB +HardwareCorrupted: 0 kB +AnonHugePages: 679936 kB +ShmemHugePages: 0 kB +ShmemPmdMapped: 0 kB +FileHugePages: 0 kB +FilePmdMapped: 0 kB +HugePages_Total: 0 +HugePages_Free: 0 +HugePages_Rsvd: 0 +HugePages_Surp: 0 +Hugepagesize: 2048 kB +Hugetlb: 0 kB +DirectMap4k: 487700 kB +DirectMap2M: 11958272 kB +DirectMap1G: 1048576 kB + +container (cgroup) information: +container_type: cgroupv1 +cpu_cpuset_cpus: 0-3 +cpu_memory_nodes: 0 +active_processor_count: 4 +cpu_quota: -1 +cpu_period: 100000 +cpu_shares: -1 +memory_limit_in_bytes: -1 +memory_and_swap_limit_in_bytes: -2 +memory_soft_limit_in_bytes: -1 +memory_usage_in_bytes: 2836340736 +memory_max_usage_in_bytes: 4470431744 + + +CPU:total 4 (initial active 4) (2 cores per cpu, 2 threads per core) family 6 model 142 stepping 9, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, avx, avx2, aes, clmul, erms, 3dnowpref, lzcnt, ht, tsc, tscinvbit, bmi1, bmi2, adx + +/proc/cpuinfo: +processor : 0 +vendor_id : GenuineIntel +cpu family : 6 +model : 142 +model name : Intel(R) Core(TM) i3-7020U CPU @ 2.30GHz +stepping : 9 +microcode : 0xca +cpu MHz : 900.001 +cache size : 3072 KB +physical id : 0 +siblings : 4 +core id : 0 +cpu cores : 2 +apicid : 0 +initial apicid : 0 +fpu : yes +fpu_exception : yes +cpuid level : 22 +wp : yes +flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_clear flush_l1d +bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit +bogomips : 4599.93 +clflush size : 64 +cache_alignment : 64 +address sizes : 39 bits physical, 48 bits virtual +power management: + +processor : 1 +vendor_id : GenuineIntel +cpu family : 6 +model : 142 +model name : Intel(R) Core(TM) i3-7020U CPU @ 2.30GHz +stepping : 9 +microcode : 0xca +cpu MHz : 900.001 +cache size : 3072 KB +physical id : 0 +siblings : 4 +core id : 1 +cpu cores : 2 +apicid : 2 +initial apicid : 2 +fpu : yes +fpu_exception : yes +cpuid level : 22 +wp : yes +flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm arat pln pts hwp hwp_notify hwp_act_window hwp_epp flush_l1d +bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit +bogomips : 4599.93 +clflush size : 64 +cache_alignment : 64 +address sizes : 39 bits physical, 48 bits virtual +power management: + +processor : 2 +vendor_id : GenuineIntel +cpu family : 6 +model : 142 +model name : Intel(R) Core(TM) i3-7020U CPU @ 2.30GHz +stepping : 9 +microcode : 0xca +cpu MHz : 900.000 +cache size : 3072 KB +physical id : 0 +siblings : 4 +core id : 0 +cpu cores : 2 +apicid : 1 +initial apicid : 1 +fpu : yes +fpu_exception : yes +cpuid level : 22 +wp : yes +flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_clear flush_l1d +bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit +bogomips : 4599.93 +clflush size : 64 +cache_alignment : 64 +address sizes : 39 bits physical, 48 bits virtual +power management: + +processor : 3 +vendor_id : GenuineIntel +cpu family : 6 +model : 142 +model name : Intel(R) Core(TM) i3-7020U CPU @ 2.30GHz +stepping : 9 +microcode : 0xca +cpu MHz : 900.001 +cache size : 3072 KB +physical id : 0 +siblings : 4 +core id : 1 +cpu cores : 2 +apicid : 3 +initial apicid : 3 +fpu : yes +fpu_exception : yes +cpuid level : 22 +wp : yes +flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_clear flush_l1d +bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit +bogomips : 4599.93 +clflush size : 64 +cache_alignment : 64 +address sizes : 39 bits physical, 48 bits virtual +power management: + + + +Memory: 4k page, physical 12202288k(1510436k free), swap 6836220k(6834872k free) + +vm_info: Java HotSpot(TM) 64-Bit Server VM (25.201-b09) for linux-amd64 JRE (1.8.0_201-b09), built on Dec 15 2018 11:35:59 by "java_re" with gcc 7.3.0 + +time: Wed Sep 14 19:44:52 2022 +timezone: CDT +elapsed time: 0 seconds (0d 0h 0m 0s) + diff --git a/HelloSerial4j/analysis of native error logs/example5/README.md b/HelloSerial4j/analysis of native error logs/example5/README.md new file mode 100644 index 00000000..e69de29b diff --git a/HelloSerial4j/analysis of native error logs/example5/hs_err_pid102578.log b/HelloSerial4j/analysis of native error logs/example5/hs_err_pid102578.log new file mode 100644 index 00000000..d803d914 --- /dev/null +++ b/HelloSerial4j/analysis of native error logs/example5/hs_err_pid102578.log @@ -0,0 +1,626 @@ +# +# A fatal error has been detected by the Java Runtime Environment: +# +# SIGSEGV (0xb) at pc=0x00007f84b009c016, pid=102578, tid=0x00007f84aae78700 +# +# JRE version: Java(TM) SE Runtime Environment (8.0_201-b09) (build 1.8.0_201-b09) +# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.201-b09 mixed mode linux-amd64 compressed oops) +# Problematic frame: +# C [libserial4j.so+0x16] +# +# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again +# +# If you would like to submit a bug report, please visit: +# http://bugreport.java.com/bugreport/crash.jsp +# The crash happened outside the Java Virtual Machine in native code. +# See problematic frame for where to report the bug. +# + +--------------- T H R E A D --------------- + +Current thread (0x00007f84c0251000): JavaThread "Thread-0" [_thread_in_native, id=102593, stack(0x00007f84aad78000,0x00007f84aae79000)] + +siginfo: si_signo: 11 (SIGSEGV), si_code: 2 (SEGV_ACCERR), si_addr: 0x00007f84b009c016 + +Registers: +RAX=0x00007f84b00a5260, RBX=0x00007f84b0c0cee0, RCX=0x0000000000000028, RDX=0x00007f84c7548f98 +RSP=0x00007f84aae77868, RBP=0x00007f84aae77880, RSI=0x00007f84aae778f8, RDI=0x00007f84b00a5260 +R8 =0x0000000000000006, R9 =0x0000000000000007, R10=0x00007f84b101869b, R11=0x00007f84c6f40db0 +R12=0x0000000000000000, R13=0x00007f84b0c0cee0, R14=0x00007f84aae778f8, R15=0x00007f84c0251000 +RIP=0x00007f84b009c016, EFLAGS=0x0000000000010202, CSGSFS=0x002b000000000033, ERR=0x0000000000000015 + TRAPNO=0x000000000000000e + +Top of Stack: (sp=0x00007f84aae77868) +0x00007f84aae77868: 00007f84b00a06c2 00007f84aae778f8 +0x00007f84aae77878: 00007f84c02511f8 00007f84aae778d8 +0x00007f84aae77888: 00007f84b10186c7 00007f84b10183e2 +0x00007f84aae77898: 00007f84aae77898 00007f84b0c0cee0 +0x00007f84aae778a8: 00007f84aae778f8 00007f84b0c0d538 +0x00007f84aae778b8: 0000000000000000 00007f84b0c0cee0 +0x00007f84aae778c8: 0000000000000000 00007f84aae778f8 +0x00007f84aae778d8: 00007f84aae77940 00007f84b1007d00 +0x00007f84aae778e8: 0000000000000000 00007f84b1011d16 +0x00007f84aae778f8: 0000000781fea280 00007f84aae77900 +0x00007f84aae77908: 00007f84b0c0677c 00007f84aae77958 +0x00007f84aae77918: 00007f84b0c06d08 0000000000000000 +0x00007f84aae77928: 00007f84b0c067c8 00007f84aae778f8 +0x00007f84aae77938: 00007f84aae77958 00007f84aae779a8 +0x00007f84aae77948: 00007f84b1007d00 0000000000000000 +0x00007f84aae77958: 0000000781fea258 00000007820f8f98 +0x00007f84aae77968: 00007f84aae77968 00007f84b0c0506c +0x00007f84aae77978: 00007f84aae779c8 00007f84b0c06d08 +0x00007f84aae77988: 0000000000000000 00007f84b0c05090 +0x00007f84aae77998: 00007f84aae77958 00007f84aae779c0 +0x00007f84aae779a8: 00007f84aae77a10 00007f84b10082bd +0x00007f84aae779b8: 0000000000000005 00000007820f8f98 +0x00007f84aae779c8: 0000000781fea258 00007f84aae779d0 +0x00007f84aae779d8: 00007f84b0c0111b 00007f84aae77a48 +0x00007f84aae779e8: 00007f84b0c03028 0000000000000000 +0x00007f84aae779f8: 00007f84b0c01240 00007f84aae779c0 +0x00007f84aae77a08: 00007f84aae77a48 00007f84aae77ab0 +0x00007f84aae77a18: 00007f84b10007a7 00000007820f8e48 +0x00007f84aae77a28: 00000007820f5f70 00000007820f2cf0 +0x00007f84aae77a38: 00000007820ef840 00000007820e97c0 +0x00007f84aae77a48: 0000000781f7f130 0000000000001fa0 +0x00007f84aae77a58: 00007f84b0c01240 00007f84aae77c90 + +Instructions: (pc=0x00007f84b009c016) +0x00007f84b009bff6: +[error occurred during error reporting (printing registers, top of stack, instructions near pc), id 0xb] + +Register to memory mapping: + +RAX=0x00007f84b00a5260: terminalDevice+0 in /home/twisted/GradleProjects/AVR-Sandbox/HelloSerial4j/output/serial4j/libserial4j.so at 0x00007f84b009c000 +RBX={method} {0x00007f84b0c0cee0} 'getFileDescriptor0' '()I' in 'com/serial4j/core/serial/NativeTerminalDevice' +RCX=0x0000000000000028 is an unknown value +RDX=0x00007f84c7548f98: in /home/twisted/jdk1.8.0_201/jre/lib/amd64/server/libjvm.so at 0x00007f84c6581000 +RSP=0x00007f84aae77868 is pointing into the stack for thread: 0x00007f84c0251000 +RBP=0x00007f84aae77880 is pointing into the stack for thread: 0x00007f84c0251000 +RSI=0x00007f84aae778f8 is pointing into the stack for thread: 0x00007f84c0251000 +RDI=0x00007f84b00a5260: terminalDevice+0 in /home/twisted/GradleProjects/AVR-Sandbox/HelloSerial4j/output/serial4j/libserial4j.so at 0x00007f84b009c000 +R8 =0x0000000000000006 is an unknown value +R9 =0x0000000000000007 is an unknown value +R10=0x00007f84b101869b is at code_begin+859 in an Interpreter codelet +method entry point (kind = native) [0x00007f84b1018340, 0x00007f84b1018cc0] 2432 bytes +R11=0x00007f84c6f40db0: in /home/twisted/jdk1.8.0_201/jre/lib/amd64/server/libjvm.so at 0x00007f84c6581000 +R12=0x0000000000000000 is an unknown value +R13={method} {0x00007f84b0c0cee0} 'getFileDescriptor0' '()I' in 'com/serial4j/core/serial/NativeTerminalDevice' +R14=0x00007f84aae778f8 is pointing into the stack for thread: 0x00007f84c0251000 +R15=0x00007f84c0251000 is a thread + + +Stack: [0x00007f84aad78000,0x00007f84aae79000], sp=0x00007f84aae77868, free space=1022k +Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) +C [libserial4j.so+0x16] +j com.serial4j.core.serial.NativeTerminalDevice.getFileDescriptor0()I+0 +j com.serial4j.core.serial.TerminalDevice.getPortDescriptor()I+4 +j com.serial4j.core.serial.TerminalDevice.openPort(Lcom/serial4j/core/serial/SerialPort;)V+68 +j com.serial4j.example.HelloNativeSerial4J.run()V+195 +v ~StubRoutines::call_stub +V [libjvm.so+0x68825b] JavaCalls::call_helper(JavaValue*, methodHandle*, JavaCallArguments*, Thread*)+0xddb +V [libjvm.so+0x685b23] JavaCalls::call_virtual(JavaValue*, KlassHandle, Symbol*, Symbol*, JavaCallArguments*, Thread*)+0x263 +V [libjvm.so+0x6860e7] JavaCalls::call_virtual(JavaValue*, Handle, KlassHandle, Symbol*, Symbol*, Thread*)+0x47 +V [libjvm.so+0x6f225c] thread_entry(JavaThread*, Thread*)+0x6c +V [libjvm.so+0xa7bb6b] JavaThread::thread_main_inner()+0xdb +V [libjvm.so+0xa7be71] JavaThread::run()+0x2d1 +V [libjvm.so+0x90d922] java_start(Thread*)+0x102 +C [libpthread.so.0+0x8f27] start_thread+0xd7 + +Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) +j com.serial4j.core.serial.NativeTerminalDevice.getFileDescriptor0()I+0 +j com.serial4j.core.serial.TerminalDevice.getPortDescriptor()I+4 +j com.serial4j.core.serial.TerminalDevice.openPort(Lcom/serial4j/core/serial/SerialPort;)V+68 +j com.serial4j.example.HelloNativeSerial4J.run()V+195 +v ~StubRoutines::call_stub + +--------------- P R O C E S S --------------- + +Java Threads: ( => current thread ) +=>0x00007f84c0251000 JavaThread "Thread-0" [_thread_in_native, id=102593, stack(0x00007f84aad78000,0x00007f84aae79000)] + 0x00007f84c0195000 JavaThread "Service Thread" daemon [_thread_blocked, id=102591, stack(0x00007f84aaf7a000,0x00007f84ab07b000)] + 0x00007f84c018a000 JavaThread "C1 CompilerThread2" daemon [_thread_blocked, id=102590, stack(0x00007f84ab07c000,0x00007f84ab17c000)] + 0x00007f84c0188000 JavaThread "C2 CompilerThread1" daemon [_thread_blocked, id=102589, stack(0x00007f84ab17d000,0x00007f84ab27d000)] + 0x00007f84c0185000 JavaThread "C2 CompilerThread0" daemon [_thread_blocked, id=102588, stack(0x00007f84ab27e000,0x00007f84ab37e000)] + 0x00007f84c0184000 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=102587, stack(0x00007f84ab37e000,0x00007f84ab47f000)] + 0x00007f84c014c800 JavaThread "Finalizer" daemon [_thread_blocked, id=102586, stack(0x00007f84ab6f7000,0x00007f84ab7f8000)] + 0x00007f84c014a000 JavaThread "Reference Handler" daemon [_thread_blocked, id=102585, stack(0x00007f84ab7f8000,0x00007f84ab8f9000)] + 0x00007f84c000b000 JavaThread "main" [_thread_blocked, id=102579, stack(0x00007f84c633c000,0x00007f84c643c000)] + +Other Threads: + 0x00007f84c0140000 VMThread [stack: 0x00007f84ab8fa000,0x00007f84ab9fa000] [id=102584] + 0x00007f84c0197800 WatcherThread [stack: 0x00007f84aae7a000,0x00007f84aaf7a000] [id=102592] + +VM state:not at safepoint (normal execution) + +VM Mutex/Monitor currently owned by a thread: None + +heap address: 0x0000000705c00000, size: 2980 MB, Compressed Oops mode: Zero based, Oop shift amount: 3 +Narrow klass base: 0x0000000000000000, Narrow klass shift: 3 +Compressed class space size: 1073741824 Address: 0x00000007c0000000 + +Heap: + PSYoungGen total 56320K, used 2918K [0x0000000781f00000, 0x0000000785d80000, 0x00000007c0000000) + eden space 48640K, 6% used [0x0000000781f00000,0x00000007821d99d0,0x0000000784e80000) + from space 7680K, 0% used [0x0000000785600000,0x0000000785600000,0x0000000785d80000) + to space 7680K, 0% used [0x0000000784e80000,0x0000000784e80000,0x0000000785600000) + ParOldGen total 128512K, used 0K [0x0000000705c00000, 0x000000070d980000, 0x0000000781f00000) + object space 128512K, 0% used [0x0000000705c00000,0x0000000705c00000,0x000000070d980000) + Metaspace used 3100K, capacity 4600K, committed 4864K, reserved 1056768K + class space used 348K, capacity 424K, committed 512K, reserved 1048576K + +Card table byte_map: [0x00007f84c52f8000,0x00007f84c58cb000] byte_map_base: 0x00007f84c1aca000 + +Marking Bits: (ParMarkBitMap*) 0x00007f84c754cd80 + Begin Bits: [0x00007f84962e0000, 0x00007f8499170000) + End Bits: [0x00007f8499170000, 0x00007f849c000000) + +Polling page: 0x00007f84c79b3000 + +CodeCache: size=245760Kb used=1167Kb max_used=1167Kb free=244592Kb + bounds [0x00007f84b1000000, 0x00007f84b1270000, 0x00007f84c0000000] + total_blobs=282 nmethods=47 adapters=149 + compilation: enabled + +Compilation events (10 events): +Event: 0.090 Thread 0x00007f84c018a000 42 1 java.net.URL::getRef (5 bytes) +Event: 0.090 Thread 0x00007f84c018a000 nmethod 42 0x00007f84b1121e50 code [0x00007f84b1121fa0, 0x00007f84b11220b0] +Event: 0.090 Thread 0x00007f84c018a000 43 3 java.util.concurrent.ConcurrentHashMap::setTabAt (19 bytes) +Event: 0.090 Thread 0x00007f84c018a000 nmethod 43 0x00007f84b1122490 code [0x00007f84b11225e0, 0x00007f84b1122750] +Event: 0.090 Thread 0x00007f84c018a000 45 3 java.lang.String::replace (127 bytes) +Event: 0.090 Thread 0x00007f84c018a000 nmethod 45 0x00007f84b11227d0 code [0x00007f84b1122980, 0x00007f84b1123030] +Event: 0.091 Thread 0x00007f84c018a000 47 3 java.util.HashMap::get (23 bytes) +Event: 0.091 Thread 0x00007f84c018a000 nmethod 47 0x00007f84b11233d0 code [0x00007f84b1123560, 0x00007f84b1123978] +Event: 0.091 Thread 0x00007f84c018a000 46 3 java.lang.String::lastIndexOf (13 bytes) +Event: 0.091 Thread 0x00007f84c018a000 nmethod 46 0x00007f84b1123ad0 code [0x00007f84b1123c40, 0x00007f84b1123e68] + +GC Heap History (0 events): +No events + +Deoptimization events (0 events): +No events + +Classes redefined (0 events): +No events + +Internal exceptions (6 events): +Event: 0.028 Thread 0x00007f84c000b000 Exception (0x0000000781f07cb0) thrown at [/HUDSON/workspace/8-2-build-linux-amd64/jdk8u201/12317/hotspot/src/sh +Event: 0.029 Thread 0x00007f84c000b000 Exception (0x0000000781f07f98) thrown at [/HUDSON/workspace/8-2-build-linux-amd64/jdk8u201/12317/hotspot/src/share/vm/prims/jni.c +Event: 0.083 Thread 0x00007f84c000b000 Exception (0x0000000781fc06e0) thrown at [/HUDSON/workspace/8-2-build-linux-amd64/jdk8u201/12317/hotspot/src/share/vm/prims/jvm.cpp, line 1502] +Event: 0.083 Thread 0x00007f84c000b000 Exception (0x0000000781fc08f0) thrown at [/HUDSON/workspace/8-2-build-linux-amd64/jdk8u201/12317/hotspot/src/share/vm/prims/jvm.cpp, line 1502] +Event: 0.084 Thread 0x00007f84c000b000 Exception (0x0000000781fc2d58) thrown at [/HUDSON/workspace/8-2-build-linux-amd64/jdk8u201/12317/hotspot/src/share/vm/prims/jvm.cpp, line 1502] +Event: 0.084 Thread 0x00007f84c000b000 Exception (0x0000000781fc2f68) thrown at [/HUDSON/workspace/8-2-build-linux-amd64/jdk8u201/12317/hotspot/src/share/vm/prims/jvm.cpp, line 1502] + +Events (10 events): +Event: 0.089 loading class com/serial4j/core/serial/control/TerminalControlFlag +Event: 0.089 loading class com/serial4j/core/serial/control/TerminalControlFlag done +Event: 0.089 loading class com/serial4j/core/serial/control/TerminalFlag +Event: 0.089 loading class com/serial4j/core/serial/control/TerminalFlag done +Event: 0.090 loading class com/serial4j/core/serial/control/TerminalLocalFlag +Event: 0.090 loading class com/serial4j/core/serial/control/TerminalLocalFlag done +Event: 0.090 loading class com/serial4j/core/serial/control/TerminalOutputFlag +Event: 0.090 loading class com/serial4j/core/serial/control/TerminalOutputFlag done +Event: 0.091 loading class com/serial4j/core/serial/control/TerminalInputFlag +Event: 0.091 loading class com/serial4j/core/serial/control/TerminalInputFlag done + + +Dynamic libraries: +00400000-00401000 r-xp 00000000 08:0b 8396377 /home/twisted/jdk1.8.0_201/bin/java +00600000-00601000 r--p 00000000 08:0b 8396377 /home/twisted/jdk1.8.0_201/bin/java +00601000-00602000 rw-p 00001000 08:0b 8396377 /home/twisted/jdk1.8.0_201/bin/java +01f43000-01f64000 rw-p 00000000 00:00 0 [heap] +705c00000-70d980000 rw-p 00000000 00:00 0 +70d980000-781f00000 ---p 00000000 00:00 0 +781f00000-785d80000 rw-p 00000000 00:00 0 +785d80000-7c0000000 ---p 00000000 00:00 0 +7c0000000-7c0080000 rw-p 00000000 00:00 0 +7c0080000-800000000 ---p 00000000 00:00 0 +7f8468000000-7f8468021000 rw-p 00000000 00:00 0 +7f8468021000-7f846c000000 ---p 00000000 00:00 0 +7f846c000000-7f846c021000 rw-p 00000000 00:00 0 +7f846c021000-7f8470000000 ---p 00000000 00:00 0 +7f8470000000-7f847015a000 rw-p 00000000 00:00 0 +7f847015a000-7f8474000000 ---p 00000000 00:00 0 +7f8474000000-7f8474021000 rw-p 00000000 00:00 0 +7f8474021000-7f8478000000 ---p 00000000 00:00 0 +7f8478000000-7f847805e000 rw-p 00000000 00:00 0 +7f847805e000-7f847c000000 ---p 00000000 00:00 0 +7f847c000000-7f847c021000 rw-p 00000000 00:00 0 +7f847c021000-7f8480000000 ---p 00000000 00:00 0 +7f8480000000-7f8480021000 rw-p 00000000 00:00 0 +7f8480021000-7f8484000000 ---p 00000000 00:00 0 +7f8484000000-7f8484021000 rw-p 00000000 00:00 0 +7f8484021000-7f8488000000 ---p 00000000 00:00 0 +7f8488000000-7f8488021000 rw-p 00000000 00:00 0 +7f8488021000-7f848c000000 ---p 00000000 00:00 0 +7f848c000000-7f848c021000 rw-p 00000000 00:00 0 +7f848c021000-7f8490000000 ---p 00000000 00:00 0 +7f8490000000-7f8490021000 rw-p 00000000 00:00 0 +7f8490021000-7f8494000000 ---p 00000000 00:00 0 +7f84962e0000-7f849c000000 rw-p 00000000 00:00 0 +7f849c000000-7f849c021000 rw-p 00000000 00:00 0 +7f849c021000-7f84a0000000 ---p 00000000 00:00 0 +7f84a4000000-7f84a4021000 rw-p 00000000 00:00 0 +7f84a4021000-7f84a8000000 ---p 00000000 00:00 0 +7f84aaae3000-7f84aad78000 rw-p 00000000 00:00 0 +7f84aad78000-7f84aad7b000 ---p 00000000 00:00 0 +7f84aad7b000-7f84aae79000 rw-p 00000000 00:00 0 +7f84aae79000-7f84aae7a000 ---p 00000000 00:00 0 +7f84aae7a000-7f84aaf7a000 rw-p 00000000 00:00 0 +7f84aaf7a000-7f84aaf7d000 ---p 00000000 00:00 0 +7f84aaf7d000-7f84ab07b000 rw-p 00000000 00:00 0 +7f84ab07b000-7f84ab07c000 ---p 00000000 00:00 0 +7f84ab07c000-7f84ab07f000 ---p 00000000 00:00 0 +7f84ab07f000-7f84ab17c000 rw-p 00000000 00:00 0 +7f84ab17c000-7f84ab17d000 ---p 00000000 00:00 0 +7f84ab17d000-7f84ab180000 ---p 00000000 00:00 0 +7f84ab180000-7f84ab27d000 rw-p 00000000 00:00 0 +7f84ab27d000-7f84ab27e000 ---p 00000000 00:00 0 +7f84ab27e000-7f84ab281000 ---p 00000000 00:00 0 +7f84ab281000-7f84ab37e000 rw-p 00000000 00:00 0 +7f84ab37e000-7f84ab381000 ---p 00000000 00:00 0 +7f84ab381000-7f84ab47f000 rw-p 00000000 00:00 0 +7f84ab47f000-7f84ab6f7000 r--p 00000000 08:0a 4328903 /usr/lib/locale/aa_DJ.utf8/LC_COLLATE +7f84ab6f7000-7f84ab6fa000 ---p 00000000 00:00 0 +7f84ab6fa000-7f84ab7f8000 rw-p 00000000 00:00 0 +7f84ab7f8000-7f84ab7fb000 ---p 00000000 00:00 0 +7f84ab7fb000-7f84ab8f9000 rw-p 00000000 00:00 0 +7f84ab8f9000-7f84ab8fa000 ---p 00000000 00:00 0 +7f84ab8fa000-7f84ac000000 rw-p 00000000 00:00 0 +7f84ac000000-7f84ac021000 rw-p 00000000 00:00 0 +7f84ac021000-7f84b0000000 ---p 00000000 00:00 0 +7f84b009c000-7f84b009f000 r--p 00000000 08:0b 8520060 /home/twisted/GradleProjects/AVR-Sandbox/HelloSerial4j/output/serial4j/libserial4j.so +7f84b009f000-7f84b00a2000 r-xp 00003000 08:0b 8520060 /home/twisted/GradleProjects/AVR-Sandbox/HelloSerial4j/output/serial4j/libserial4j.so +7f84b00a2000-7f84b00a4000 r--p 00006000 08:0b 8520060 /home/twisted/GradleProjects/AVR-Sandbox/HelloSerial4j/output/serial4j/libserial4j.so +7f84b00a4000-7f84b00a5000 r--p 00007000 08:0b 8520060 /home/twisted/GradleProjects/AVR-Sandbox/HelloSerial4j/output/serial4j/libserial4j.so +7f84b00a5000-7f84b00a6000 rw-p 00008000 08:0b 8520060 /home/twisted/GradleProjects/AVR-Sandbox/HelloSerial4j/output/serial4j/libserial4j.so +7f84b00a6000-7f84b00f9000 r--p 00000000 08:0a 4328904 /usr/lib/locale/aa_DJ.utf8/LC_CTYPE +7f84b00f9000-7f84b0c40000 rw-p 00000000 00:00 0 +7f84b0c40000-7f84b1000000 ---p 00000000 00:00 0 +7f84b1000000-7f84b1270000 rwxp 00000000 00:00 0 +7f84b1270000-7f84c0000000 ---p 00000000 00:00 0 +7f84c0000000-7f84c0252000 rw-p 00000000 00:00 0 +7f84c0252000-7f84c4000000 ---p 00000000 00:00 0 +7f84c4009000-7f84c425a000 rw-p 00000000 00:00 0 +7f84c425a000-7f84c4434000 r--s 03d6f000 08:0b 8543644 /home/twisted/jdk1.8.0_201/jre/lib/rt.jar +7f84c4434000-7f84c4b12000 rw-p 00000000 00:00 0 +7f84c4b12000-7f84c4b13000 ---p 00000000 00:00 0 +7f84c4b13000-7f84c4c13000 rw-p 00000000 00:00 0 +7f84c4c13000-7f84c4c14000 ---p 00000000 00:00 0 +7f84c4c14000-7f84c4d14000 rw-p 00000000 00:00 0 +7f84c4d14000-7f84c4d15000 ---p 00000000 00:00 0 +7f84c4d15000-7f84c4e15000 rw-p 00000000 00:00 0 +7f84c4e15000-7f84c4e16000 ---p 00000000 00:00 0 +7f84c4e16000-7f84c4f55000 rw-p 00000000 00:00 0 +7f84c4f55000-7f84c52f8000 ---p 00000000 00:00 0 +7f84c52f8000-7f84c5337000 rw-p 00000000 00:00 0 +7f84c5337000-7f84c56d9000 ---p 00000000 00:00 0 +7f84c56d9000-7f84c56f9000 rw-p 00000000 00:00 0 +7f84c56f9000-7f84c58ca000 ---p 00000000 00:00 0 +7f84c58ca000-7f84c58d5000 rw-p 00000000 00:00 0 +7f84c58d5000-7f84c5c8b000 ---p 00000000 00:00 0 +7f84c5c8b000-7f84c5ca6000 r-xp 00000000 08:0b 8782383 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libzip.so +7f84c5ca6000-7f84c5ea5000 ---p 0001b000 08:0b 8782383 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libzip.so +7f84c5ea5000-7f84c5ea6000 r--p 0001a000 08:0b 8782383 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libzip.so +7f84c5ea6000-7f84c5ea7000 rw-p 0001b000 08:0b 8782383 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libzip.so +7f84c5ea7000-7f84c5eaa000 r--p 00000000 08:0a 4334780 /usr/lib/x86_64-linux-gnu/libnss_files-2.30.so +7f84c5eaa000-7f84c5eb1000 r-xp 00003000 08:0a 4334780 /usr/lib/x86_64-linux-gnu/libnss_files-2.30.so +7f84c5eb1000-7f84c5eb3000 r--p 0000a000 08:0a 4334780 /usr/lib/x86_64-linux-gnu/libnss_files-2.30.so +7f84c5eb3000-7f84c5eb4000 r--p 0000b000 08:0a 4334780 /usr/lib/x86_64-linux-gnu/libnss_files-2.30.so +7f84c5eb4000-7f84c5eb5000 rw-p 0000c000 08:0a 4334780 /usr/lib/x86_64-linux-gnu/libnss_files-2.30.so +7f84c5eb5000-7f84c5ebb000 rw-p 00000000 00:00 0 +7f84c5ebb000-7f84c5ec0000 r--p 00000000 08:0a 4334771 /usr/lib/x86_64-linux-gnu/libnsl-2.30.so +7f84c5ec0000-7f84c5ecd000 r-xp 00005000 08:0a 4334771 /usr/lib/x86_64-linux-gnu/libnsl-2.30.so +7f84c5ecd000-7f84c5ed1000 r--p 00012000 08:0a 4334771 /usr/lib/x86_64-linux-gnu/libnsl-2.30.so +7f84c5ed1000-7f84c5ed2000 r--p 00015000 08:0a 4334771 /usr/lib/x86_64-linux-gnu/libnsl-2.30.so +7f84c5ed2000-7f84c5ed3000 rw-p 00016000 08:0a 4334771 /usr/lib/x86_64-linux-gnu/libnsl-2.30.so +7f84c5ed3000-7f84c5ed5000 rw-p 00000000 00:00 0 +7f84c5eda000-7f84c5edc000 r--s 0000a000 08:0b 8521603 /home/twisted/GradleProjects/AVR-Sandbox/HelloSerial4j/output/serial4j/serial4j.jar +7f84c5edc000-7f84c5edd000 r--p 00000000 08:0a 4328933 /usr/lib/locale/aa_ET/LC_NUMERIC +7f84c5edd000-7f84c5ede000 r--p 00000000 08:0a 4330095 /usr/lib/locale/en_US.utf8/LC_TIME +7f84c5ede000-7f84c5edf000 r--p 00000000 08:0a 4329578 /usr/lib/locale/chr_US/LC_MONETARY +7f84c5edf000-7f84c5ee0000 r--p 00000000 08:0a 4329874 /usr/lib/locale/en_AG/LC_MESSAGES/SYS_LC_MESSAGES +7f84c5ee0000-7f84c5ee1000 r--p 00000000 08:0a 4329579 /usr/lib/locale/chr_US/LC_PAPER +7f84c5ee1000-7f84c5ee2000 r--p 00000000 08:0a 4329410 /usr/lib/locale/bi_VU/LC_NAME +7f84c5ee2000-7f84c5ee3000 r--p 00000000 08:0a 4330092 /usr/lib/locale/en_US.utf8/LC_ADDRESS +7f84c5ee3000-7f84c5eea000 r--s 00000000 08:0a 4332592 /usr/lib/x86_64-linux-gnu/gconv/gconv-modules.cache +7f84c5eea000-7f84c5ef2000 rw-s 00000000 08:0a 2105330 /tmp/hsperfdata_pavl-machine/102578 +7f84c5ef2000-7f84c5f1e000 r-xp 00000000 08:0b 8782377 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libjava.so +7f84c5f1e000-7f84c611e000 ---p 0002c000 08:0b 8782377 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libjava.so +7f84c611e000-7f84c611f000 r--p 0002c000 08:0b 8782377 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libjava.so +7f84c611f000-7f84c6121000 rw-p 0002d000 08:0b 8782377 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libjava.so +7f84c6121000-7f84c612e000 r-xp 00000000 08:0b 8782382 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libverify.so +7f84c612e000-7f84c632d000 ---p 0000d000 08:0b 8782382 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libverify.so +7f84c632d000-7f84c632f000 r--p 0000c000 08:0b 8782382 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libverify.so +7f84c632f000-7f84c6330000 rw-p 0000e000 08:0b 8782382 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libverify.so +7f84c6330000-7f84c6333000 r--p 00000000 08:0a 4335156 /usr/lib/x86_64-linux-gnu/librt-2.30.so +7f84c6333000-7f84c6337000 r-xp 00003000 08:0a 4335156 /usr/lib/x86_64-linux-gnu/librt-2.30.so +7f84c6337000-7f84c6339000 r--p 00007000 08:0a 4335156 /usr/lib/x86_64-linux-gnu/librt-2.30.so +7f84c6339000-7f84c633a000 r--p 00008000 08:0a 4335156 /usr/lib/x86_64-linux-gnu/librt-2.30.so +7f84c633a000-7f84c633b000 rw-p 00009000 08:0a 4335156 /usr/lib/x86_64-linux-gnu/librt-2.30.so +7f84c633b000-7f84c633c000 ---p 00000000 00:00 0 +7f84c633c000-7f84c633f000 ---p 00000000 00:00 0 +7f84c633f000-7f84c643c000 rw-p 00000000 00:00 0 +7f84c643c000-7f84c644b000 r--p 00000000 08:0a 4334559 /usr/lib/x86_64-linux-gnu/libm-2.30.so +7f84c644b000-7f84c64e6000 r-xp 0000f000 08:0a 4334559 /usr/lib/x86_64-linux-gnu/libm-2.30.so +7f84c64e6000-7f84c657f000 r--p 000aa000 08:0a 4334559 /usr/lib/x86_64-linux-gnu/libm-2.30.so +7f84c657f000-7f84c6580000 r--p 00142000 08:0a 4334559 /usr/lib/x86_64-linux-gnu/libm-2.30.so +7f84c6580000-7f84c6581000 rw-p 00143000 08:0a 4334559 /usr/lib/x86_64-linux-gnu/libm-2.30.so +7f84c6581000-7f84c7269000 r-xp 00000000 08:0b 8782359 /home/twisted/jdk1.8.0_201/jre/lib/amd64/server/libjvm.so +7f84c7269000-7f84c7468000 ---p 00ce8000 08:0b 8782359 /home/twisted/jdk1.8.0_201/jre/lib/amd64/server/libjvm.so +7f84c7468000-7f84c74fe000 r--p 00ce7000 08:0b 8782359 /home/twisted/jdk1.8.0_201/jre/lib/amd64/server/libjvm.so +7f84c74fe000-7f84c752f000 rw-p 00d7d000 08:0b 8782359 /home/twisted/jdk1.8.0_201/jre/lib/amd64/server/libjvm.so +7f84c752f000-7f84c756c000 rw-p 00000000 00:00 0 +7f84c756c000-7f84c7591000 r--p 00000000 08:0a 4333575 /usr/lib/x86_64-linux-gnu/libc-2.30.so +7f84c7591000-7f84c76db000 r-xp 00025000 08:0a 4333575 /usr/lib/x86_64-linux-gnu/libc-2.30.so +7f84c76db000-7f84c7725000 r--p 0016f000 08:0a 4333575 /usr/lib/x86_64-linux-gnu/libc-2.30.so +7f84c7725000-7f84c7728000 r--p 001b8000 08:0a 4333575 /usr/lib/x86_64-linux-gnu/libc-2.30.so +7f84c7728000-7f84c772b000 rw-p 001bb000 08:0a 4333575 /usr/lib/x86_64-linux-gnu/libc-2.30.so +7f84c772b000-7f84c772f000 rw-p 00000000 00:00 0 +7f84c772f000-7f84c7730000 r--p 00000000 08:0a 4333777 /usr/lib/x86_64-linux-gnu/libdl-2.30.so +7f84c7730000-7f84c7731000 r-xp 00001000 08:0a 4333777 /usr/lib/x86_64-linux-gnu/libdl-2.30.so +7f84c7731000-7f84c7732000 r--p 00002000 08:0a 4333777 /usr/lib/x86_64-linux-gnu/libdl-2.30.so +7f84c7732000-7f84c7733000 r--p 00002000 08:0a 4333777 /usr/lib/x86_64-linux-gnu/libdl-2.30.so +7f84c7733000-7f84c7734000 rw-p 00003000 08:0a 4333777 /usr/lib/x86_64-linux-gnu/libdl-2.30.so +7f84c7734000-7f84c774b000 r-xp 00000000 08:0b 8543590 /home/twisted/jdk1.8.0_201/lib/amd64/jli/libjli.so +7f84c774b000-7f84c794a000 ---p 00017000 08:0b 8543590 /home/twisted/jdk1.8.0_201/lib/amd64/jli/libjli.so +7f84c794a000-7f84c794b000 r--p 00016000 08:0b 8543590 /home/twisted/jdk1.8.0_201/lib/amd64/jli/libjli.so +7f84c794b000-7f84c794c000 rw-p 00017000 08:0b 8543590 /home/twisted/jdk1.8.0_201/lib/amd64/jli/libjli.so +7f84c794c000-7f84c7953000 r--p 00000000 08:0a 4335024 /usr/lib/x86_64-linux-gnu/libpthread-2.30.so +7f84c7953000-7f84c7962000 r-xp 00007000 08:0a 4335024 /usr/lib/x86_64-linux-gnu/libpthread-2.30.so +7f84c7962000-7f84c7967000 r--p 00016000 08:0a 4335024 /usr/lib/x86_64-linux-gnu/libpthread-2.30.so +7f84c7967000-7f84c7968000 r--p 0001a000 08:0a 4335024 /usr/lib/x86_64-linux-gnu/libpthread-2.30.so +7f84c7968000-7f84c7969000 rw-p 0001b000 08:0a 4335024 /usr/lib/x86_64-linux-gnu/libpthread-2.30.so +7f84c7969000-7f84c796f000 rw-p 00000000 00:00 0 +7f84c796f000-7f84c7970000 r--p 00000000 08:0a 4329580 /usr/lib/locale/chr_US/LC_TELEPHONE +7f84c7970000-7f84c7971000 r--p 00000000 08:0a 4329575 /usr/lib/locale/chr_US/LC_MEASUREMENT +7f84c7971000-7f84c7972000 r--p 00000000 08:0a 4330093 /usr/lib/locale/en_US.utf8/LC_IDENTIFICATION +7f84c7972000-7f84c7975000 r--p 00000000 08:0a 4334790 /usr/lib/x86_64-linux-gnu/libnss_nis-2.30.so +7f84c7975000-7f84c797c000 r-xp 00003000 08:0a 4334790 /usr/lib/x86_64-linux-gnu/libnss_nis-2.30.so +7f84c797c000-7f84c797e000 r--p 0000a000 08:0a 4334790 /usr/lib/x86_64-linux-gnu/libnss_nis-2.30.so +7f84c797e000-7f84c797f000 r--p 0000b000 08:0a 4334790 /usr/lib/x86_64-linux-gnu/libnss_nis-2.30.so +7f84c797f000-7f84c7980000 rw-p 0000c000 08:0a 4334790 /usr/lib/x86_64-linux-gnu/libnss_nis-2.30.so +7f84c7980000-7f84c7982000 r--p 00000000 08:0a 4334776 /usr/lib/x86_64-linux-gnu/libnss_compat-2.30.so +7f84c7982000-7f84c7987000 r-xp 00002000 08:0a 4334776 /usr/lib/x86_64-linux-gnu/libnss_compat-2.30.so +7f84c7987000-7f84c7988000 r--p 00007000 08:0a 4334776 /usr/lib/x86_64-linux-gnu/libnss_compat-2.30.so +7f84c7988000-7f84c7989000 ---p 00008000 08:0a 4334776 /usr/lib/x86_64-linux-gnu/libnss_compat-2.30.so +7f84c7989000-7f84c798a000 r--p 00008000 08:0a 4334776 /usr/lib/x86_64-linux-gnu/libnss_compat-2.30.so +7f84c798a000-7f84c798b000 rw-p 00009000 08:0a 4334776 /usr/lib/x86_64-linux-gnu/libnss_compat-2.30.so +7f84c798b000-7f84c798c000 rw-p 00000000 00:00 0 +7f84c798c000-7f84c798d000 r--p 00000000 08:0a 4333008 /usr/lib/x86_64-linux-gnu/ld-2.30.so +7f84c798d000-7f84c79ab000 r-xp 00001000 08:0a 4333008 /usr/lib/x86_64-linux-gnu/ld-2.30.so +7f84c79ab000-7f84c79b3000 r--p 0001f000 08:0a 4333008 /usr/lib/x86_64-linux-gnu/ld-2.30.so +7f84c79b3000-7f84c79b4000 r--p 00000000 00:00 0 +7f84c79b4000-7f84c79b5000 r--p 00027000 08:0a 4333008 /usr/lib/x86_64-linux-gnu/ld-2.30.so +7f84c79b5000-7f84c79b6000 rw-p 00028000 08:0a 4333008 /usr/lib/x86_64-linux-gnu/ld-2.30.so +7f84c79b6000-7f84c79b7000 rw-p 00000000 00:00 0 +7ffe7cc1e000-7ffe7cc3f000 rw-p 00000000 00:00 0 [stack] +7ffe7cc55000-7ffe7cc58000 r--p 00000000 00:00 0 [vvar] +7ffe7cc58000-7ffe7cc59000 r-xp 00000000 00:00 0 [vdso] + +VM Arguments: +java_command: serial4j.jar +java_class_path (initial): serial4j.jar +Launcher Type: SUN_STANDARD + +Environment Variables: +JAVA_HOME=/home/twisted/jdk1.8.0_201 +PATH=/home/pavl-machine/.local/bin:/snap/bin:/usr/sandbox/:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/usr/share/games:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games +SHELL=/bin/bash +DISPLAY=:0 + +Signal Handlers: +SIGSEGV: [libjvm.so+0xad3e60], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO +SIGBUS: [libjvm.so+0xad3e60], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO +SIGFPE: [libjvm.so+0x90b880], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO +SIGPIPE: [libjvm.so+0x90b880], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO +SIGXFSZ: [libjvm.so+0x90b880], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO +SIGILL: [libjvm.so+0x90b880], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO +SIGUSR1: SIG_DFL, sa_mask[0]=00000000000000000000000000000000, sa_flags=none +SIGUSR2: [libjvm.so+0x90b750], sa_mask[0]=00000000000000000000000000000000, sa_flags=SA_RESTART|SA_SIGINFO +SIGHUP: [libjvm.so+0x90bd70], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO +SIGINT: [libjvm.so+0x90bd70], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO +SIGTERM: [libjvm.so+0x90bd70], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO +SIGQUIT: [libjvm.so+0x90bd70], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO + + +--------------- S Y S T E M --------------- + +OS:DISTRIB_ID=Parrot +DISTRIB_RELEASE=4.9 +DISTRIB_CODENAME=rolling +DISTRIB_DESCRIPTION="Parrot 4.9" + +uname:Linux 5.5.0-1parrot1-amd64 #1 SMP Parrot 5.5.17-1parrot1 (2020-04-25) x86_64 +libc:glibc 2.30 NPTL 2.30 +rlimit: STACK 8192k, CORE 0k, NPROC 47123, NOFILE 1048576, AS infinity +load average:1.60 1.36 1.22 + +/proc/meminfo: +MemTotal: 12202288 kB +MemFree: 1489388 kB +MemAvailable: 7103384 kB +Buffers: 1233320 kB +Cached: 5099452 kB +SwapCached: 240 kB +Active: 6386248 kB +Inactive: 3238332 kB +Active(anon): 3140472 kB +Inactive(anon): 958828 kB +Active(file): 3245776 kB +Inactive(file): 2279504 kB +Unevictable: 368296 kB +Mlocked: 176 kB +SwapTotal: 6836220 kB +SwapFree: 6834872 kB +Dirty: 4312 kB +Writeback: 0 kB +AnonPages: 3580400 kB +Mapped: 945744 kB +Shmem: 873524 kB +KReclaimable: 411644 kB +Slab: 556260 kB +SReclaimable: 411644 kB +SUnreclaim: 144616 kB +KernelStack: 15028 kB +PageTables: 51604 kB +NFS_Unstable: 0 kB +Bounce: 0 kB +WritebackTmp: 0 kB +CommitLimit: 12937364 kB +Committed_AS: 13817724 kB +VmallocTotal: 34359738367 kB +VmallocUsed: 46992 kB +VmallocChunk: 0 kB +Percpu: 3872 kB +HardwareCorrupted: 0 kB +AnonHugePages: 675840 kB +ShmemHugePages: 0 kB +ShmemPmdMapped: 0 kB +FileHugePages: 0 kB +FilePmdMapped: 0 kB +HugePages_Total: 0 +HugePages_Free: 0 +HugePages_Rsvd: 0 +HugePages_Surp: 0 +Hugepagesize: 2048 kB +Hugetlb: 0 kB +DirectMap4k: 487700 kB +DirectMap2M: 11958272 kB +DirectMap1G: 1048576 kB + +container (cgroup) information: +container_type: cgroupv1 +cpu_cpuset_cpus: 0-3 +cpu_memory_nodes: 0 +active_processor_count: 4 +cpu_quota: -1 +cpu_period: 100000 +cpu_shares: -1 +memory_limit_in_bytes: -1 +memory_and_swap_limit_in_bytes: -2 +memory_soft_limit_in_bytes: -1 +memory_usage_in_bytes: 2837405696 +memory_max_usage_in_bytes: 4470431744 + + +CPU:total 4 (initial active 4) (2 cores per cpu, 2 threads per core) family 6 model 142 stepping 9, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, avx, avx2, aes, clmul, erms, 3dnowpref, lzcnt, ht, tsc, tscinvbit, bmi1, bmi2, adx + +/proc/cpuinfo: +processor : 0 +vendor_id : GenuineIntel +cpu family : 6 +model : 142 +model name : Intel(R) Core(TM) i3-7020U CPU @ 2.30GHz +stepping : 9 +microcode : 0xca +cpu MHz : 2300.016 +cache size : 3072 KB +physical id : 0 +siblings : 4 +core id : 0 +cpu cores : 2 +apicid : 0 +initial apicid : 0 +fpu : yes +fpu_exception : yes +cpuid level : 22 +wp : yes +flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_clear flush_l1d +bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit +bogomips : 4599.93 +clflush size : 64 +cache_alignment : 64 +address sizes : 39 bits physical, 48 bits virtual +power management: + +processor : 1 +vendor_id : GenuineIntel +cpu family : 6 +model : 142 +model name : Intel(R) Core(TM) i3-7020U CPU @ 2.30GHz +stepping : 9 +microcode : 0xca +cpu MHz : 2299.999 +cache size : 3072 KB +physical id : 0 +siblings : 4 +core id : 1 +cpu cores : 2 +apicid : 2 +initial apicid : 2 +fpu : yes +fpu_exception : yes +cpuid level : 22 +wp : yes +flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm arat pln pts hwp hwp_notify hwp_act_window hwp_epp flush_l1d +bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit +bogomips : 4599.93 +clflush size : 64 +cache_alignment : 64 +address sizes : 39 bits physical, 48 bits virtual +power management: + +processor : 2 +vendor_id : GenuineIntel +cpu family : 6 +model : 142 +model name : Intel(R) Core(TM) i3-7020U CPU @ 2.30GHz +stepping : 9 +microcode : 0xca +cpu MHz : 2300.042 +cache size : 3072 KB +physical id : 0 +siblings : 4 +core id : 0 +cpu cores : 2 +apicid : 1 +initial apicid : 1 +fpu : yes +fpu_exception : yes +cpuid level : 22 +wp : yes +flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_clear flush_l1d +bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit +bogomips : 4599.93 +clflush size : 64 +cache_alignment : 64 +address sizes : 39 bits physical, 48 bits virtual +power management: + +processor : 3 +vendor_id : GenuineIntel +cpu family : 6 +model : 142 +model name : Intel(R) Core(TM) i3-7020U CPU @ 2.30GHz +stepping : 9 +microcode : 0xca +cpu MHz : 2299.969 +cache size : 3072 KB +physical id : 0 +siblings : 4 +core id : 1 +cpu cores : 2 +apicid : 3 +initial apicid : 3 +fpu : yes +fpu_exception : yes +cpuid level : 22 +wp : yes +flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_clear flush_l1d +bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit +bogomips : 4599.93 +clflush size : 64 +cache_alignment : 64 +address sizes : 39 bits physical, 48 bits virtual +power management: + + + +Memory: 4k page, physical 12202288k(1489388k free), swap 6836220k(6834872k free) + +vm_info: Java HotSpot(TM) 64-Bit Server VM (25.201-b09) for linux-amd64 JRE (1.8.0_201-b09), built on Dec 15 2018 11:35:59 by "java_re" with gcc 7.3.0 + +time: Wed Sep 14 19:51:34 2022 +timezone: CDT +elapsed time: 0 seconds (0d 0h 0m 0s) + diff --git a/HelloSerial4j/analysis of native error logs/example6/README.md b/HelloSerial4j/analysis of native error logs/example6/README.md new file mode 100644 index 00000000..e69de29b diff --git a/HelloSerial4j/analysis of native error logs/example6/hs_err_pid106777.log b/HelloSerial4j/analysis of native error logs/example6/hs_err_pid106777.log new file mode 100644 index 00000000..f73e54c5 --- /dev/null +++ b/HelloSerial4j/analysis of native error logs/example6/hs_err_pid106777.log @@ -0,0 +1,624 @@ +# +# A fatal error has been detected by the Java Runtime Environment: +# +# SIGSEGV (0xb) at pc=0x00007fe8ac00f000, pid=106777, tid=0x00007fe891b95700 +# +# JRE version: Java(TM) SE Runtime Environment (8.0_201-b09) (build 1.8.0_201-b09) +# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.201-b09 mixed mode linux-amd64 compressed oops) +# Problematic frame: +# C [libserial4j.so+0x0] +# +# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again +# +# If you would like to submit a bug report, please visit: +# http://bugreport.java.com/bugreport/crash.jsp +# The crash happened outside the Java Virtual Machine in native code. +# See problematic frame for where to report the bug. +# + +--------------- T H R E A D --------------- + +Current thread (0x00007fe8a8239000): JavaThread "Thread-0" [_thread_in_native, id=106792, stack(0x00007fe891a95000,0x00007fe891b96000)] + +siginfo: si_signo: 11 (SIGSEGV), si_code: 2 (SEGV_ACCERR), si_addr: 0x00007fe8ac00f000 + +Registers: +RAX=0x00007fe8ac018260, RBX=0x00007fe893c0cb50, RCX=0x0000000000000028, RDX=0x00007fe8ae20ff98 +RSP=0x00007fe891b948d8, RBP=0x00007fe891b948f0, RSI=0x00007fe891b94970, RDI=0x00007fe8ac018260 +R8 =0x0000000000000006, R9 =0x0000000000000007, R10=0x00007fe89901869b, R11=0x00007fe8adc07db0 +R12=0x0000000000000000, R13=0x00007fe893c0cb50, R14=0x00007fe891b94970, R15=0x00007fe8a8239000 +RIP=0x00007fe8ac00f000, EFLAGS=0x0000000000010202, CSGSFS=0x002b000000000033, ERR=0x0000000000000015 + TRAPNO=0x000000000000000e + +Top of Stack: (sp=0x00007fe891b948d8) +0x00007fe891b948d8: 00007fe8ac0131a9 00007fe891b94970 +0x00007fe891b948e8: 00007fe8a82391f8 00007fe891b94950 +0x00007fe891b948f8: 00007fe8990186c7 fffffffe00000000 +0x00007fe891b94908: 00007fe8990183e2 00007fe891b94910 +0x00007fe891b94918: 00007fe893c0cb50 00007fe891b94970 +0x00007fe891b94928: 00007fe893c0d538 0000000000000000 +0x00007fe891b94938: 00007fe893c0cb50 0000000000000000 +0x00007fe891b94948: 00007fe891b94970 00007fe891b949b8 +0x00007fe891b94958: 00007fe8990082bd 0000000000000000 +0x00007fe891b94968: 00007fe899011d18 0000000781fea310 +0x00007fe891b94978: 00007fe891b94978 00007fe893c06484 +0x00007fe891b94988: 00007fe891b949c8 00007fe893c06d08 +0x00007fe891b94998: 0000000000000000 00007fe893c06490 +0x00007fe891b949a8: 00007fe891b94970 00007fe891b949c8 +0x00007fe891b949b8: 00007fe891b94a10 00007fe8990082bd +0x00007fe891b949c8: 0000000781fea2e8 00007fe891b949d0 +0x00007fe891b949d8: 00007fe893c01064 00007fe891b94a48 +0x00007fe891b949e8: 00007fe893c03028 0000000000000000 +0x00007fe891b949f8: 00007fe893c01240 00007fe891b949c8 +0x00007fe891b94a08: 00007fe891b94a48 00007fe891b94ab0 +0x00007fe891b94a18: 00007fe8990007a7 0000000000000000 +0x00007fe891b94a28: 0000000000000000 0000000000000000 +0x00007fe891b94a38: 0000000000000000 0000000000000000 +0x00007fe891b94a48: 0000000781f7f130 0000000000001fa0 +0x00007fe891b94a58: 00007fe893c01240 00007fe891b94c90 +0x00007fe891b94a68: 00007fe891b94b50 00007fe8a8239000 +0x00007fe891b94a78: 00007fe8a8239000 00007fe891b94b50 +0x00007fe891b94a88: 00007fe891b94d38 00007fe80000000a +0x00007fe891b94a98: 00007fe893c01240 00007fe899013600 +0x00007fe891b94aa8: 00007fe891b94c98 00007fe891b94bc0 +0x00007fe891b94ab8: 00007fe8ad8d025b 0000000000000001 +0x00007fe891b94ac8: 00007fe8a8239000 0000000000000000 + +Instructions: (pc=0x00007fe8ac00f000) +0x00007fe8ac00efe0: +[error occurred during error reporting (printing registers, top of stack, instructions near pc), id 0xb] + +Register to memory mapping: + +RAX=0x00007fe8ac018260: terminalDevice+0 in /home/twisted/GradleProjects/AVR-Sandbox/HelloSerial4j/output/serial4j/libserial4j.so at 0x00007fe8ac00f000 +RBX={method} {0x00007fe893c0cb50} 'setLoggingEnabled0' '()V' in 'com/serial4j/core/serial/NativeTerminalDevice' +RCX=0x0000000000000028 is an unknown value +RDX=0x00007fe8ae20ff98: in /home/twisted/jdk1.8.0_201/jre/lib/amd64/server/libjvm.so at 0x00007fe8ad248000 +RSP=0x00007fe891b948d8 is pointing into the stack for thread: 0x00007fe8a8239000 +RBP=0x00007fe891b948f0 is pointing into the stack for thread: 0x00007fe8a8239000 +RSI=0x00007fe891b94970 is pointing into the stack for thread: 0x00007fe8a8239000 +RDI=0x00007fe8ac018260: terminalDevice+0 in /home/twisted/GradleProjects/AVR-Sandbox/HelloSerial4j/output/serial4j/libserial4j.so at 0x00007fe8ac00f000 +R8 =0x0000000000000006 is an unknown value +R9 =0x0000000000000007 is an unknown value +R10=0x00007fe89901869b is at code_begin+859 in an Interpreter codelet +method entry point (kind = native) [0x00007fe899018340, 0x00007fe899018cc0] 2432 bytes +R11=0x00007fe8adc07db0: in /home/twisted/jdk1.8.0_201/jre/lib/amd64/server/libjvm.so at 0x00007fe8ad248000 +R12=0x0000000000000000 is an unknown value +R13={method} {0x00007fe893c0cb50} 'setLoggingEnabled0' '()V' in 'com/serial4j/core/serial/NativeTerminalDevice' +R14=0x00007fe891b94970 is pointing into the stack for thread: 0x00007fe8a8239000 +R15=0x00007fe8a8239000 is a thread + + +Stack: [0x00007fe891a95000,0x00007fe891b96000], sp=0x00007fe891b948d8, free space=1022k +Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) +C [libserial4j.so+0x0] +j com.serial4j.core.serial.NativeTerminalDevice.setLoggingEnabled0()V+0 +j com.serial4j.core.serial.TerminalDevice.setNativeLoggingEnabled()V+4 +j com.serial4j.example.HelloNativeSerial4J.run()V+12 +v ~StubRoutines::call_stub +V [libjvm.so+0x68825b] JavaCalls::call_helper(JavaValue*, methodHandle*, JavaCallArguments*, Thread*)+0xddb +V [libjvm.so+0x685b23] JavaCalls::call_virtual(JavaValue*, KlassHandle, Symbol*, Symbol*, JavaCallArguments*, Thread*)+0x263 +V [libjvm.so+0x6860e7] JavaCalls::call_virtual(JavaValue*, Handle, KlassHandle, Symbol*, Symbol*, Thread*)+0x47 +V [libjvm.so+0x6f225c] thread_entry(JavaThread*, Thread*)+0x6c +V [libjvm.so+0xa7bb6b] JavaThread::thread_main_inner()+0xdb +V [libjvm.so+0xa7be71] JavaThread::run()+0x2d1 +V [libjvm.so+0x90d922] java_start(Thread*)+0x102 +C [libpthread.so.0+0x8f27] start_thread+0xd7 + +Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) +j com.serial4j.core.serial.NativeTerminalDevice.setLoggingEnabled0()V+0 +j com.serial4j.core.serial.TerminalDevice.setNativeLoggingEnabled()V+4 +j com.serial4j.example.HelloNativeSerial4J.run()V+12 +v ~StubRoutines::call_stub + +--------------- P R O C E S S --------------- + +Java Threads: ( => current thread ) +=>0x00007fe8a8239000 JavaThread "Thread-0" [_thread_in_native, id=106792, stack(0x00007fe891a95000,0x00007fe891b96000)] + 0x00007fe8a8195000 JavaThread "Service Thread" daemon [_thread_blocked, id=106790, stack(0x00007fe891c97000,0x00007fe891d98000)] + 0x00007fe8a818a000 JavaThread "C1 CompilerThread2" daemon [_thread_blocked, id=106789, stack(0x00007fe891d99000,0x00007fe891e99000)] + 0x00007fe8a8188000 JavaThread "C2 CompilerThread1" daemon [_thread_blocked, id=106788, stack(0x00007fe891e9a000,0x00007fe891f9a000)] + 0x00007fe8a8185000 JavaThread "C2 CompilerThread0" daemon [_thread_blocked, id=106787, stack(0x00007fe891f9b000,0x00007fe89209b000)] + 0x00007fe8a8184000 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=106786, stack(0x00007fe89209b000,0x00007fe89219c000)] + 0x00007fe8a814c800 JavaThread "Finalizer" daemon [_thread_blocked, id=106785, stack(0x00007fe892414000,0x00007fe892515000)] + 0x00007fe8a814a000 JavaThread "Reference Handler" daemon [_thread_blocked, id=106784, stack(0x00007fe892515000,0x00007fe892616000)] + 0x00007fe8a800b000 JavaThread "main" [_thread_blocked, id=106778, stack(0x00007fe8ad003000,0x00007fe8ad103000)] + +Other Threads: + 0x00007fe8a8140000 VMThread [stack: 0x00007fe892617000,0x00007fe892717000] [id=106783] + 0x00007fe8a8197800 WatcherThread [stack: 0x00007fe891b97000,0x00007fe891c97000] [id=106791] + +VM state:not at safepoint (normal execution) + +VM Mutex/Monitor currently owned by a thread: None + +heap address: 0x0000000705c00000, size: 2980 MB, Compressed Oops mode: Zero based, Oop shift amount: 3 +Narrow klass base: 0x0000000000000000, Narrow klass shift: 3 +Compressed class space size: 1073741824 Address: 0x00000007c0000000 + +Heap: + PSYoungGen total 56320K, used 2918K [0x0000000781f00000, 0x0000000785d80000, 0x00000007c0000000) + eden space 48640K, 6% used [0x0000000781f00000,0x00000007821d99d0,0x0000000784e80000) + from space 7680K, 0% used [0x0000000785600000,0x0000000785600000,0x0000000785d80000) + to space 7680K, 0% used [0x0000000784e80000,0x0000000784e80000,0x0000000785600000) + ParOldGen total 128512K, used 0K [0x0000000705c00000, 0x000000070d980000, 0x0000000781f00000) + object space 128512K, 0% used [0x0000000705c00000,0x0000000705c00000,0x000000070d980000) + Metaspace used 3079K, capacity 4600K, committed 4864K, reserved 1056768K + class space used 344K, capacity 424K, committed 512K, reserved 1048576K + +Card table byte_map: [0x00007fe898a2d000,0x00007fe899000000] byte_map_base: 0x00007fe8951ff000 + +Marking Bits: (ParMarkBitMap*) 0x00007fe8ae213d80 + Begin Bits: [0x00007fe87e2e0000, 0x00007fe881170000) + End Bits: [0x00007fe881170000, 0x00007fe884000000) + +Polling page: 0x00007fe8ae67a000 + +CodeCache: size=245760Kb used=1161Kb max_used=1161Kb free=244598Kb + bounds [0x00007fe899000000, 0x00007fe899270000, 0x00007fe8a8000000] + total_blobs=277 nmethods=42 adapters=149 + compilation: enabled + +Compilation events (10 events): +Event: 0.079 Thread 0x00007fe8a818a000 nmethod 31 0x00007fe899115710 code [0x00007fe899115880, 0x00007fe899115a08] +Event: 0.080 Thread 0x00007fe8a818a000 32 1 java.net.URL::getHost (5 bytes) +Event: 0.080 Thread 0x00007fe8a818a000 nmethod 32 0x00007fe899115a90 code [0x00007fe899115be0, 0x00007fe899115cf0] +Event: 0.080 Thread 0x00007fe8a818a000 33 3 sun.nio.cs.UTF_8$Decoder::decode (779 bytes) +Event: 0.086 Thread 0x00007fe8a8185000 41 4 java.lang.String::charAt (29 bytes) +Event: 0.087 Thread 0x00007fe8a8185000 nmethod 41 0x00007fe899118a10 code [0x00007fe899118b60, 0x00007fe899118c38] +Event: 0.087 Thread 0x00007fe8a818a000 nmethod 33 0x00007fe899118d10 code [0x00007fe899119340, 0x00007fe89911dcd8] +Event: 0.087 Thread 0x00007fe8a818a000 37 1 java.lang.String::length (6 bytes) +Event: 0.087 Thread 0x00007fe8a818a000 nmethod 37 0x00007fe899118710 code [0x00007fe899118860, 0x00007fe899118970] +Event: 0.087 Thread 0x00007fe8a818a000 36 ! 3 java.io.BufferedReader::readLine (304 bytes) + +GC Heap History (0 events): +No events + +Deoptimization events (0 events): +No events + +Classes redefined (0 events): +No events + +Internal exceptions (6 events): +Event: 0.026 Thread 0x00007fe8a800b000 Exception (0x0000000781f07cb0) thrown at [/HUDSON/workspace/8-2-build-linux-amd64/jdk8u201/12317/hotspot/src/sh +Event: 0.026 Thread 0x00007fe8a800b000 Exception (0x0000000781f07f98) thrown at [/HUDSON/workspace/8-2-build-linux-amd64/jdk8u201/12317/hotspot/src/share/vm/prims/jni.c +Event: 0.082 Thread 0x00007fe8a800b000 Exception (0x0000000781fc06e0) thrown at [/HUDSON/workspace/8-2-build-linux-amd64/jdk8u201/12317/hotspot/src/share/vm/prims/jvm.cpp, line 1502] +Event: 0.082 Thread 0x00007fe8a800b000 Exception (0x0000000781fc08f0) thrown at [/HUDSON/workspace/8-2-build-linux-amd64/jdk8u201/12317/hotspot/src/share/vm/prims/jvm.cpp, line 1502] +Event: 0.083 Thread 0x00007fe8a800b000 Exception (0x0000000781fc2d58) thrown at [/HUDSON/workspace/8-2-build-linux-amd64/jdk8u201/12317/hotspot/src/share/vm/prims/jvm.cpp, line 1502] +Event: 0.083 Thread 0x00007fe8a800b000 Exception (0x0000000781fc2f68) thrown at [/HUDSON/workspace/8-2-build-linux-amd64/jdk8u201/12317/hotspot/src/share/vm/prims/jvm.cpp, line 1502] + +Events (10 events): +Event: 0.085 loading class java/io/FileOutputStream$1 done +Event: 0.086 loading class com/serial4j/core/serial/NativeTerminalDevice +Event: 0.086 loading class com/serial4j/core/serial/NativeTerminalDevice done +Event: 0.087 loading class com/serial4j/core/errno/ErrnoToException +Event: 0.087 loading class com/serial4j/core/errno/ErrnoToException done +Event: 0.087 loading class com/serial4j/core/errno/Errno +Event: 0.087 loading class com/serial4j/core/errno/Errno done +Event: 0.088 loading class com/serial4j/core/serial/SerialPort +Event: 0.088 loading class com/serial4j/core/serial/SerialPort done +Event: 0.088 Thread 0x00007fe8a8239000 Thread added: 0x00007fe8a8239000 + + +Dynamic libraries: +00400000-00401000 r-xp 00000000 08:0b 8396377 /home/twisted/jdk1.8.0_201/bin/java +00600000-00601000 r--p 00000000 08:0b 8396377 /home/twisted/jdk1.8.0_201/bin/java +00601000-00602000 rw-p 00001000 08:0b 8396377 /home/twisted/jdk1.8.0_201/bin/java +012e9000-0130a000 rw-p 00000000 00:00 0 [heap] +705c00000-70d980000 rw-p 00000000 00:00 0 +70d980000-781f00000 ---p 00000000 00:00 0 +781f00000-785d80000 rw-p 00000000 00:00 0 +785d80000-7c0000000 ---p 00000000 00:00 0 +7c0000000-7c0080000 rw-p 00000000 00:00 0 +7c0080000-800000000 ---p 00000000 00:00 0 +7fe850000000-7fe850021000 rw-p 00000000 00:00 0 +7fe850021000-7fe854000000 ---p 00000000 00:00 0 +7fe854000000-7fe854021000 rw-p 00000000 00:00 0 +7fe854021000-7fe858000000 ---p 00000000 00:00 0 +7fe858000000-7fe858151000 rw-p 00000000 00:00 0 +7fe858151000-7fe85c000000 ---p 00000000 00:00 0 +7fe85c000000-7fe85c021000 rw-p 00000000 00:00 0 +7fe85c021000-7fe860000000 ---p 00000000 00:00 0 +7fe860000000-7fe86007e000 rw-p 00000000 00:00 0 +7fe86007e000-7fe864000000 ---p 00000000 00:00 0 +7fe864000000-7fe864021000 rw-p 00000000 00:00 0 +7fe864021000-7fe868000000 ---p 00000000 00:00 0 +7fe868000000-7fe868021000 rw-p 00000000 00:00 0 +7fe868021000-7fe86c000000 ---p 00000000 00:00 0 +7fe86c000000-7fe86c021000 rw-p 00000000 00:00 0 +7fe86c021000-7fe870000000 ---p 00000000 00:00 0 +7fe870000000-7fe870021000 rw-p 00000000 00:00 0 +7fe870021000-7fe874000000 ---p 00000000 00:00 0 +7fe874000000-7fe874021000 rw-p 00000000 00:00 0 +7fe874021000-7fe878000000 ---p 00000000 00:00 0 +7fe878000000-7fe878021000 rw-p 00000000 00:00 0 +7fe878021000-7fe87c000000 ---p 00000000 00:00 0 +7fe87e2e0000-7fe884000000 rw-p 00000000 00:00 0 +7fe884000000-7fe884021000 rw-p 00000000 00:00 0 +7fe884021000-7fe888000000 ---p 00000000 00:00 0 +7fe88c000000-7fe88c021000 rw-p 00000000 00:00 0 +7fe88c021000-7fe890000000 ---p 00000000 00:00 0 +7fe891800000-7fe891a95000 rw-p 00000000 00:00 0 +7fe891a95000-7fe891a98000 ---p 00000000 00:00 0 +7fe891a98000-7fe891b96000 rw-p 00000000 00:00 0 +7fe891b96000-7fe891b97000 ---p 00000000 00:00 0 +7fe891b97000-7fe891c97000 rw-p 00000000 00:00 0 +7fe891c97000-7fe891c9a000 ---p 00000000 00:00 0 +7fe891c9a000-7fe891d98000 rw-p 00000000 00:00 0 +7fe891d98000-7fe891d99000 ---p 00000000 00:00 0 +7fe891d99000-7fe891d9c000 ---p 00000000 00:00 0 +7fe891d9c000-7fe891e99000 rw-p 00000000 00:00 0 +7fe891e99000-7fe891e9a000 ---p 00000000 00:00 0 +7fe891e9a000-7fe891e9d000 ---p 00000000 00:00 0 +7fe891e9d000-7fe891f9a000 rw-p 00000000 00:00 0 +7fe891f9a000-7fe891f9b000 ---p 00000000 00:00 0 +7fe891f9b000-7fe891f9e000 ---p 00000000 00:00 0 +7fe891f9e000-7fe89209b000 rw-p 00000000 00:00 0 +7fe89209b000-7fe89209e000 ---p 00000000 00:00 0 +7fe89209e000-7fe89219c000 rw-p 00000000 00:00 0 +7fe89219c000-7fe892414000 r--p 00000000 08:0a 4328903 /usr/lib/locale/aa_DJ.utf8/LC_COLLATE +7fe892414000-7fe892417000 ---p 00000000 00:00 0 +7fe892417000-7fe892515000 rw-p 00000000 00:00 0 +7fe892515000-7fe892518000 ---p 00000000 00:00 0 +7fe892518000-7fe892616000 rw-p 00000000 00:00 0 +7fe892616000-7fe892617000 ---p 00000000 00:00 0 +7fe892617000-7fe893626000 rw-p 00000000 00:00 0 +7fe893626000-7fe893800000 r--s 03d6f000 08:0b 8543644 /home/twisted/jdk1.8.0_201/jre/lib/rt.jar +7fe893800000-7fe893c40000 rw-p 00000000 00:00 0 +7fe893c40000-7fe894000000 ---p 00000000 00:00 0 +7fe894000000-7fe894021000 rw-p 00000000 00:00 0 +7fe894021000-7fe898000000 ---p 00000000 00:00 0 +7fe898040000-7fe898093000 r--p 00000000 08:0a 4328904 /usr/lib/locale/aa_DJ.utf8/LC_CTYPE +7fe898093000-7fe89872a000 rw-p 00000000 00:00 0 +7fe89872a000-7fe89872b000 ---p 00000000 00:00 0 +7fe89872b000-7fe89882b000 rw-p 00000000 00:00 0 +7fe89882b000-7fe89882c000 ---p 00000000 00:00 0 +7fe89882c000-7fe89892c000 rw-p 00000000 00:00 0 +7fe89892c000-7fe89892d000 ---p 00000000 00:00 0 +7fe89892d000-7fe898a6c000 rw-p 00000000 00:00 0 +7fe898a6c000-7fe898e0e000 ---p 00000000 00:00 0 +7fe898e0e000-7fe898e2e000 rw-p 00000000 00:00 0 +7fe898e2e000-7fe898fff000 ---p 00000000 00:00 0 +7fe898fff000-7fe899000000 rw-p 00000000 00:00 0 +7fe899000000-7fe899270000 rwxp 00000000 00:00 0 +7fe899270000-7fe8a8000000 ---p 00000000 00:00 0 +7fe8a8000000-7fe8a823b000 rw-p 00000000 00:00 0 +7fe8a823b000-7fe8ac000000 ---p 00000000 00:00 0 +7fe8ac00f000-7fe8ac012000 r--p 00000000 08:0b 8520060 /home/twisted/GradleProjects/AVR-Sandbox/HelloSerial4j/output/serial4j/libserial4j.so +7fe8ac012000-7fe8ac015000 r-xp 00003000 08:0b 8520060 /home/twisted/GradleProjects/AVR-Sandbox/HelloSerial4j/output/serial4j/libserial4j.so +7fe8ac015000-7fe8ac017000 r--p 00006000 08:0b 8520060 /home/twisted/GradleProjects/AVR-Sandbox/HelloSerial4j/output/serial4j/libserial4j.so +7fe8ac017000-7fe8ac018000 r--p 00007000 08:0b 8520060 /home/twisted/GradleProjects/AVR-Sandbox/HelloSerial4j/output/serial4j/libserial4j.so +7fe8ac018000-7fe8ac019000 rw-p 00008000 08:0b 8520060 /home/twisted/GradleProjects/AVR-Sandbox/HelloSerial4j/output/serial4j/libserial4j.so +7fe8ac019000-7fe8ac0af000 rw-p 00000000 00:00 0 +7fe8ac0af000-7fe8ac0b0000 ---p 00000000 00:00 0 +7fe8ac0b0000-7fe8ac1ef000 rw-p 00000000 00:00 0 +7fe8ac1ef000-7fe8ac592000 ---p 00000000 00:00 0 +7fe8ac592000-7fe8ac59c000 rw-p 00000000 00:00 0 +7fe8ac59c000-7fe8ac952000 ---p 00000000 00:00 0 +7fe8ac952000-7fe8ac96d000 r-xp 00000000 08:0b 8782383 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libzip.so +7fe8ac96d000-7fe8acb6c000 ---p 0001b000 08:0b 8782383 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libzip.so +7fe8acb6c000-7fe8acb6d000 r--p 0001a000 08:0b 8782383 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libzip.so +7fe8acb6d000-7fe8acb6e000 rw-p 0001b000 08:0b 8782383 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libzip.so +7fe8acb6e000-7fe8acb71000 r--p 00000000 08:0a 4334780 /usr/lib/x86_64-linux-gnu/libnss_files-2.30.so +7fe8acb71000-7fe8acb78000 r-xp 00003000 08:0a 4334780 /usr/lib/x86_64-linux-gnu/libnss_files-2.30.so +7fe8acb78000-7fe8acb7a000 r--p 0000a000 08:0a 4334780 /usr/lib/x86_64-linux-gnu/libnss_files-2.30.so +7fe8acb7a000-7fe8acb7b000 r--p 0000b000 08:0a 4334780 /usr/lib/x86_64-linux-gnu/libnss_files-2.30.so +7fe8acb7b000-7fe8acb7c000 rw-p 0000c000 08:0a 4334780 /usr/lib/x86_64-linux-gnu/libnss_files-2.30.so +7fe8acb7c000-7fe8acb82000 rw-p 00000000 00:00 0 +7fe8acb82000-7fe8acb87000 r--p 00000000 08:0a 4334771 /usr/lib/x86_64-linux-gnu/libnsl-2.30.so +7fe8acb87000-7fe8acb94000 r-xp 00005000 08:0a 4334771 /usr/lib/x86_64-linux-gnu/libnsl-2.30.so +7fe8acb94000-7fe8acb98000 r--p 00012000 08:0a 4334771 /usr/lib/x86_64-linux-gnu/libnsl-2.30.so +7fe8acb98000-7fe8acb99000 r--p 00015000 08:0a 4334771 /usr/lib/x86_64-linux-gnu/libnsl-2.30.so +7fe8acb99000-7fe8acb9a000 rw-p 00016000 08:0a 4334771 /usr/lib/x86_64-linux-gnu/libnsl-2.30.so +7fe8acb9a000-7fe8acb9c000 rw-p 00000000 00:00 0 +7fe8acba1000-7fe8acba3000 r--s 0000a000 08:0b 8521603 /home/twisted/GradleProjects/AVR-Sandbox/HelloSerial4j/output/serial4j/serial4j.jar +7fe8acba3000-7fe8acba4000 r--p 00000000 08:0a 4328933 /usr/lib/locale/aa_ET/LC_NUMERIC +7fe8acba4000-7fe8acba5000 r--p 00000000 08:0a 4330095 /usr/lib/locale/en_US.utf8/LC_TIME +7fe8acba5000-7fe8acba6000 r--p 00000000 08:0a 4329578 /usr/lib/locale/chr_US/LC_MONETARY +7fe8acba6000-7fe8acba7000 r--p 00000000 08:0a 4329874 /usr/lib/locale/en_AG/LC_MESSAGES/SYS_LC_MESSAGES +7fe8acba7000-7fe8acba8000 r--p 00000000 08:0a 4329579 /usr/lib/locale/chr_US/LC_PAPER +7fe8acba8000-7fe8acba9000 r--p 00000000 08:0a 4329410 /usr/lib/locale/bi_VU/LC_NAME +7fe8acba9000-7fe8acbaa000 r--p 00000000 08:0a 4330092 /usr/lib/locale/en_US.utf8/LC_ADDRESS +7fe8acbaa000-7fe8acbb1000 r--s 00000000 08:0a 4332592 /usr/lib/x86_64-linux-gnu/gconv/gconv-modules.cache +7fe8acbb1000-7fe8acbb9000 rw-s 00000000 08:0a 2105324 /tmp/hsperfdata_pavl-machine/106777 +7fe8acbb9000-7fe8acbe5000 r-xp 00000000 08:0b 8782377 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libjava.so +7fe8acbe5000-7fe8acde5000 ---p 0002c000 08:0b 8782377 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libjava.so +7fe8acde5000-7fe8acde6000 r--p 0002c000 08:0b 8782377 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libjava.so +7fe8acde6000-7fe8acde8000 rw-p 0002d000 08:0b 8782377 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libjava.so +7fe8acde8000-7fe8acdf5000 r-xp 00000000 08:0b 8782382 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libverify.so +7fe8acdf5000-7fe8acff4000 ---p 0000d000 08:0b 8782382 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libverify.so +7fe8acff4000-7fe8acff6000 r--p 0000c000 08:0b 8782382 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libverify.so +7fe8acff6000-7fe8acff7000 rw-p 0000e000 08:0b 8782382 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libverify.so +7fe8acff7000-7fe8acffa000 r--p 00000000 08:0a 4335156 /usr/lib/x86_64-linux-gnu/librt-2.30.so +7fe8acffa000-7fe8acffe000 r-xp 00003000 08:0a 4335156 /usr/lib/x86_64-linux-gnu/librt-2.30.so +7fe8acffe000-7fe8ad000000 r--p 00007000 08:0a 4335156 /usr/lib/x86_64-linux-gnu/librt-2.30.so +7fe8ad000000-7fe8ad001000 r--p 00008000 08:0a 4335156 /usr/lib/x86_64-linux-gnu/librt-2.30.so +7fe8ad001000-7fe8ad002000 rw-p 00009000 08:0a 4335156 /usr/lib/x86_64-linux-gnu/librt-2.30.so +7fe8ad002000-7fe8ad003000 ---p 00000000 00:00 0 +7fe8ad003000-7fe8ad006000 ---p 00000000 00:00 0 +7fe8ad006000-7fe8ad103000 rw-p 00000000 00:00 0 +7fe8ad103000-7fe8ad112000 r--p 00000000 08:0a 4334559 /usr/lib/x86_64-linux-gnu/libm-2.30.so +7fe8ad112000-7fe8ad1ad000 r-xp 0000f000 08:0a 4334559 /usr/lib/x86_64-linux-gnu/libm-2.30.so +7fe8ad1ad000-7fe8ad246000 r--p 000aa000 08:0a 4334559 /usr/lib/x86_64-linux-gnu/libm-2.30.so +7fe8ad246000-7fe8ad247000 r--p 00142000 08:0a 4334559 /usr/lib/x86_64-linux-gnu/libm-2.30.so +7fe8ad247000-7fe8ad248000 rw-p 00143000 08:0a 4334559 /usr/lib/x86_64-linux-gnu/libm-2.30.so +7fe8ad248000-7fe8adf30000 r-xp 00000000 08:0b 8782359 /home/twisted/jdk1.8.0_201/jre/lib/amd64/server/libjvm.so +7fe8adf30000-7fe8ae12f000 ---p 00ce8000 08:0b 8782359 /home/twisted/jdk1.8.0_201/jre/lib/amd64/server/libjvm.so +7fe8ae12f000-7fe8ae1c5000 r--p 00ce7000 08:0b 8782359 /home/twisted/jdk1.8.0_201/jre/lib/amd64/server/libjvm.so +7fe8ae1c5000-7fe8ae1f6000 rw-p 00d7d000 08:0b 8782359 /home/twisted/jdk1.8.0_201/jre/lib/amd64/server/libjvm.so +7fe8ae1f6000-7fe8ae233000 rw-p 00000000 00:00 0 +7fe8ae233000-7fe8ae258000 r--p 00000000 08:0a 4333575 /usr/lib/x86_64-linux-gnu/libc-2.30.so +7fe8ae258000-7fe8ae3a2000 r-xp 00025000 08:0a 4333575 /usr/lib/x86_64-linux-gnu/libc-2.30.so +7fe8ae3a2000-7fe8ae3ec000 r--p 0016f000 08:0a 4333575 /usr/lib/x86_64-linux-gnu/libc-2.30.so +7fe8ae3ec000-7fe8ae3ef000 r--p 001b8000 08:0a 4333575 /usr/lib/x86_64-linux-gnu/libc-2.30.so +7fe8ae3ef000-7fe8ae3f2000 rw-p 001bb000 08:0a 4333575 /usr/lib/x86_64-linux-gnu/libc-2.30.so +7fe8ae3f2000-7fe8ae3f6000 rw-p 00000000 00:00 0 +7fe8ae3f6000-7fe8ae3f7000 r--p 00000000 08:0a 4333777 /usr/lib/x86_64-linux-gnu/libdl-2.30.so +7fe8ae3f7000-7fe8ae3f8000 r-xp 00001000 08:0a 4333777 /usr/lib/x86_64-linux-gnu/libdl-2.30.so +7fe8ae3f8000-7fe8ae3f9000 r--p 00002000 08:0a 4333777 /usr/lib/x86_64-linux-gnu/libdl-2.30.so +7fe8ae3f9000-7fe8ae3fa000 r--p 00002000 08:0a 4333777 /usr/lib/x86_64-linux-gnu/libdl-2.30.so +7fe8ae3fa000-7fe8ae3fb000 rw-p 00003000 08:0a 4333777 /usr/lib/x86_64-linux-gnu/libdl-2.30.so +7fe8ae3fb000-7fe8ae412000 r-xp 00000000 08:0b 8543590 /home/twisted/jdk1.8.0_201/lib/amd64/jli/libjli.so +7fe8ae412000-7fe8ae611000 ---p 00017000 08:0b 8543590 /home/twisted/jdk1.8.0_201/lib/amd64/jli/libjli.so +7fe8ae611000-7fe8ae612000 r--p 00016000 08:0b 8543590 /home/twisted/jdk1.8.0_201/lib/amd64/jli/libjli.so +7fe8ae612000-7fe8ae613000 rw-p 00017000 08:0b 8543590 /home/twisted/jdk1.8.0_201/lib/amd64/jli/libjli.so +7fe8ae613000-7fe8ae61a000 r--p 00000000 08:0a 4335024 /usr/lib/x86_64-linux-gnu/libpthread-2.30.so +7fe8ae61a000-7fe8ae629000 r-xp 00007000 08:0a 4335024 /usr/lib/x86_64-linux-gnu/libpthread-2.30.so +7fe8ae629000-7fe8ae62e000 r--p 00016000 08:0a 4335024 /usr/lib/x86_64-linux-gnu/libpthread-2.30.so +7fe8ae62e000-7fe8ae62f000 r--p 0001a000 08:0a 4335024 /usr/lib/x86_64-linux-gnu/libpthread-2.30.so +7fe8ae62f000-7fe8ae630000 rw-p 0001b000 08:0a 4335024 /usr/lib/x86_64-linux-gnu/libpthread-2.30.so +7fe8ae630000-7fe8ae636000 rw-p 00000000 00:00 0 +7fe8ae636000-7fe8ae637000 r--p 00000000 08:0a 4329580 /usr/lib/locale/chr_US/LC_TELEPHONE +7fe8ae637000-7fe8ae638000 r--p 00000000 08:0a 4329575 /usr/lib/locale/chr_US/LC_MEASUREMENT +7fe8ae638000-7fe8ae639000 r--p 00000000 08:0a 4330093 /usr/lib/locale/en_US.utf8/LC_IDENTIFICATION +7fe8ae639000-7fe8ae63c000 r--p 00000000 08:0a 4334790 /usr/lib/x86_64-linux-gnu/libnss_nis-2.30.so +7fe8ae63c000-7fe8ae643000 r-xp 00003000 08:0a 4334790 /usr/lib/x86_64-linux-gnu/libnss_nis-2.30.so +7fe8ae643000-7fe8ae645000 r--p 0000a000 08:0a 4334790 /usr/lib/x86_64-linux-gnu/libnss_nis-2.30.so +7fe8ae645000-7fe8ae646000 r--p 0000b000 08:0a 4334790 /usr/lib/x86_64-linux-gnu/libnss_nis-2.30.so +7fe8ae646000-7fe8ae647000 rw-p 0000c000 08:0a 4334790 /usr/lib/x86_64-linux-gnu/libnss_nis-2.30.so +7fe8ae647000-7fe8ae649000 r--p 00000000 08:0a 4334776 /usr/lib/x86_64-linux-gnu/libnss_compat-2.30.so +7fe8ae649000-7fe8ae64e000 r-xp 00002000 08:0a 4334776 /usr/lib/x86_64-linux-gnu/libnss_compat-2.30.so +7fe8ae64e000-7fe8ae64f000 r--p 00007000 08:0a 4334776 /usr/lib/x86_64-linux-gnu/libnss_compat-2.30.so +7fe8ae64f000-7fe8ae650000 ---p 00008000 08:0a 4334776 /usr/lib/x86_64-linux-gnu/libnss_compat-2.30.so +7fe8ae650000-7fe8ae651000 r--p 00008000 08:0a 4334776 /usr/lib/x86_64-linux-gnu/libnss_compat-2.30.so +7fe8ae651000-7fe8ae652000 rw-p 00009000 08:0a 4334776 /usr/lib/x86_64-linux-gnu/libnss_compat-2.30.so +7fe8ae652000-7fe8ae653000 rw-p 00000000 00:00 0 +7fe8ae653000-7fe8ae654000 r--p 00000000 08:0a 4333008 /usr/lib/x86_64-linux-gnu/ld-2.30.so +7fe8ae654000-7fe8ae672000 r-xp 00001000 08:0a 4333008 /usr/lib/x86_64-linux-gnu/ld-2.30.so +7fe8ae672000-7fe8ae67a000 r--p 0001f000 08:0a 4333008 /usr/lib/x86_64-linux-gnu/ld-2.30.so +7fe8ae67a000-7fe8ae67b000 r--p 00000000 00:00 0 +7fe8ae67b000-7fe8ae67c000 r--p 00027000 08:0a 4333008 /usr/lib/x86_64-linux-gnu/ld-2.30.so +7fe8ae67c000-7fe8ae67d000 rw-p 00028000 08:0a 4333008 /usr/lib/x86_64-linux-gnu/ld-2.30.so +7fe8ae67d000-7fe8ae67e000 rw-p 00000000 00:00 0 +7ffdc1e47000-7ffdc1e68000 rw-p 00000000 00:00 0 [stack] +7ffdc1ea1000-7ffdc1ea4000 r--p 00000000 00:00 0 [vvar] +7ffdc1ea4000-7ffdc1ea5000 r-xp 00000000 00:00 0 [vdso] + +VM Arguments: +java_command: serial4j.jar +java_class_path (initial): serial4j.jar +Launcher Type: SUN_STANDARD + +Environment Variables: +JAVA_HOME=/home/twisted/jdk1.8.0_201 +PATH=/home/pavl-machine/.local/bin:/snap/bin:/usr/sandbox/:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/usr/share/games:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games +SHELL=/bin/bash +DISPLAY=:0 + +Signal Handlers: +SIGSEGV: [libjvm.so+0xad3e60], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO +SIGBUS: [libjvm.so+0xad3e60], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO +SIGFPE: [libjvm.so+0x90b880], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO +SIGPIPE: [libjvm.so+0x90b880], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO +SIGXFSZ: [libjvm.so+0x90b880], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO +SIGILL: [libjvm.so+0x90b880], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO +SIGUSR1: SIG_DFL, sa_mask[0]=00000000000000000000000000000000, sa_flags=none +SIGUSR2: [libjvm.so+0x90b750], sa_mask[0]=00000000000000000000000000000000, sa_flags=SA_RESTART|SA_SIGINFO +SIGHUP: [libjvm.so+0x90bd70], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO +SIGINT: [libjvm.so+0x90bd70], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO +SIGTERM: [libjvm.so+0x90bd70], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO +SIGQUIT: [libjvm.so+0x90bd70], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO + + +--------------- S Y S T E M --------------- + +OS:DISTRIB_ID=Parrot +DISTRIB_RELEASE=4.9 +DISTRIB_CODENAME=rolling +DISTRIB_DESCRIPTION="Parrot 4.9" + +uname:Linux 5.5.0-1parrot1-amd64 #1 SMP Parrot 5.5.17-1parrot1 (2020-04-25) x86_64 +libc:glibc 2.30 NPTL 2.30 +rlimit: STACK 8192k, CORE 0k, NPROC 47123, NOFILE 1048576, AS infinity +load average:1.32 1.69 1.60 + +/proc/meminfo: +MemTotal: 12202288 kB +MemFree: 1483972 kB +MemAvailable: 7104440 kB +Buffers: 1240360 kB +Cached: 5136992 kB +SwapCached: 240 kB +Active: 6362020 kB +Inactive: 3240564 kB +Active(anon): 3103372 kB +Inactive(anon): 968064 kB +Active(file): 3258648 kB +Inactive(file): 2272500 kB +Unevictable: 394252 kB +Mlocked: 176 kB +SwapTotal: 6836220 kB +SwapFree: 6834872 kB +Dirty: 1832 kB +Writeback: 0 kB +AnonPages: 3541148 kB +Mapped: 948204 kB +Shmem: 908680 kB +KReclaimable: 412248 kB +Slab: 557192 kB +SReclaimable: 412248 kB +SUnreclaim: 144944 kB +KernelStack: 15024 kB +PageTables: 51036 kB +NFS_Unstable: 0 kB +Bounce: 0 kB +WritebackTmp: 0 kB +CommitLimit: 12937364 kB +Committed_AS: 13809444 kB +VmallocTotal: 34359738367 kB +VmallocUsed: 46964 kB +VmallocChunk: 0 kB +Percpu: 3872 kB +HardwareCorrupted: 0 kB +AnonHugePages: 679936 kB +ShmemHugePages: 0 kB +ShmemPmdMapped: 0 kB +FileHugePages: 0 kB +FilePmdMapped: 0 kB +HugePages_Total: 0 +HugePages_Free: 0 +HugePages_Rsvd: 0 +HugePages_Surp: 0 +Hugepagesize: 2048 kB +Hugetlb: 0 kB +DirectMap4k: 487700 kB +DirectMap2M: 11958272 kB +DirectMap1G: 1048576 kB + +container (cgroup) information: +container_type: cgroupv1 +cpu_cpuset_cpus: 0-3 +cpu_memory_nodes: 0 +active_processor_count: 4 +cpu_quota: -1 +cpu_period: 100000 +cpu_shares: -1 +memory_limit_in_bytes: -1 +memory_and_swap_limit_in_bytes: -2 +memory_soft_limit_in_bytes: -1 +memory_usage_in_bytes: 2835509248 +memory_max_usage_in_bytes: 4470431744 + + +CPU:total 4 (initial active 4) (2 cores per cpu, 2 threads per core) family 6 model 142 stepping 9, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, avx, avx2, aes, clmul, erms, 3dnowpref, lzcnt, ht, tsc, tscinvbit, bmi1, bmi2, adx + +/proc/cpuinfo: +processor : 0 +vendor_id : GenuineIntel +cpu family : 6 +model : 142 +model name : Intel(R) Core(TM) i3-7020U CPU @ 2.30GHz +stepping : 9 +microcode : 0xca +cpu MHz : 2300.005 +cache size : 3072 KB +physical id : 0 +siblings : 4 +core id : 0 +cpu cores : 2 +apicid : 0 +initial apicid : 0 +fpu : yes +fpu_exception : yes +cpuid level : 22 +wp : yes +flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_clear flush_l1d +bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit +bogomips : 4599.93 +clflush size : 64 +cache_alignment : 64 +address sizes : 39 bits physical, 48 bits virtual +power management: + +processor : 1 +vendor_id : GenuineIntel +cpu family : 6 +model : 142 +model name : Intel(R) Core(TM) i3-7020U CPU @ 2.30GHz +stepping : 9 +microcode : 0xca +cpu MHz : 2300.049 +cache size : 3072 KB +physical id : 0 +siblings : 4 +core id : 1 +cpu cores : 2 +apicid : 2 +initial apicid : 2 +fpu : yes +fpu_exception : yes +cpuid level : 22 +wp : yes +flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm arat pln pts hwp hwp_notify hwp_act_window hwp_epp flush_l1d +bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit +bogomips : 4599.93 +clflush size : 64 +cache_alignment : 64 +address sizes : 39 bits physical, 48 bits virtual +power management: + +processor : 2 +vendor_id : GenuineIntel +cpu family : 6 +model : 142 +model name : Intel(R) Core(TM) i3-7020U CPU @ 2.30GHz +stepping : 9 +microcode : 0xca +cpu MHz : 2300.000 +cache size : 3072 KB +physical id : 0 +siblings : 4 +core id : 0 +cpu cores : 2 +apicid : 1 +initial apicid : 1 +fpu : yes +fpu_exception : yes +cpuid level : 22 +wp : yes +flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_clear flush_l1d +bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit +bogomips : 4599.93 +clflush size : 64 +cache_alignment : 64 +address sizes : 39 bits physical, 48 bits virtual +power management: + +processor : 3 +vendor_id : GenuineIntel +cpu family : 6 +model : 142 +model name : Intel(R) Core(TM) i3-7020U CPU @ 2.30GHz +stepping : 9 +microcode : 0xca +cpu MHz : 2300.023 +cache size : 3072 KB +physical id : 0 +siblings : 4 +core id : 1 +cpu cores : 2 +apicid : 3 +initial apicid : 3 +fpu : yes +fpu_exception : yes +cpuid level : 22 +wp : yes +flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_clear flush_l1d +bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit +bogomips : 4599.93 +clflush size : 64 +cache_alignment : 64 +address sizes : 39 bits physical, 48 bits virtual +power management: + + + +Memory: 4k page, physical 12202288k(1483972k free), swap 6836220k(6834872k free) + +vm_info: Java HotSpot(TM) 64-Bit Server VM (25.201-b09) for linux-amd64 JRE (1.8.0_201-b09), built on Dec 15 2018 11:35:59 by "java_re" with gcc 7.3.0 + +time: Wed Sep 14 20:12:55 2022 +timezone: CDT +elapsed time: 0 seconds (0d 0h 0m 0s) + diff --git a/HelloSerial4j/analysis of native error logs/example7/README.md b/HelloSerial4j/analysis of native error logs/example7/README.md new file mode 100644 index 00000000..e69de29b diff --git a/HelloSerial4j/analysis of native error logs/example7/hs_err_pid153798.log b/HelloSerial4j/analysis of native error logs/example7/hs_err_pid153798.log new file mode 100644 index 00000000..f499cc05 --- /dev/null +++ b/HelloSerial4j/analysis of native error logs/example7/hs_err_pid153798.log @@ -0,0 +1,625 @@ +# +# A fatal error has been detected by the Java Runtime Environment: +# +# SIGSEGV (0xb) at pc=0x00007f8728033a12, pid=153798, tid=0x00007f870d453700 +# +# JRE version: Java(TM) SE Runtime Environment (8.0_201-b09) (build 1.8.0_201-b09) +# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.201-b09 mixed mode linux-amd64 compressed oops) +# Problematic frame: +# C [libserial4j.so+0x4a12] Logger::setLoggingEnabled()+0xc +# +# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again +# +# If you would like to submit a bug report, please visit: +# http://bugreport.java.com/bugreport/crash.jsp +# The crash happened outside the Java Virtual Machine in native code. +# See problematic frame for where to report the bug. +# + +--------------- T H R E A D --------------- + +Current thread (0x00007f8724241000): JavaThread "Thread-0" [_thread_in_native, id=153813, stack(0x00007f870d353000,0x00007f870d454000)] + +siginfo: si_signo: 11 (SIGSEGV), si_code: 1 (SEGV_MAPERR), si_addr: 0x0000000000000000 + +Registers: +RAX=0x0000000000000000, RBX=0x00007f870eeecb50, RCX=0x0000000000000028, RDX=0x00007f872b7ccf98 +RSP=0x00007f870d4528d0, RBP=0x00007f870d4528d0, RSI=0x00007f870d452970, RDI=0x0000000000000000 +R8 =0x0000000000000006, R9 =0x0000000000000007, R10=0x00007f87280305d8, R11=0x00007f8728033a06 +R12=0x0000000000000000, R13=0x00007f870eeecb50, R14=0x00007f870d452970, R15=0x00007f8724241000 +RIP=0x00007f8728033a12, EFLAGS=0x0000000000010206, CSGSFS=0x002b000000000033, ERR=0x0000000000000006 + TRAPNO=0x000000000000000e + +Top of Stack: (sp=0x00007f870d4528d0) +0x00007f870d4528d0: 00007f870d4528f0 00007f8728033193 +0x00007f870d4528e0: 00007f870d452970 00007f87242411f8 +0x00007f870d4528f0: 00007f870d452950 00007f87150186c7 +0x00007f870d452900: fffffffe00000000 00007f87150183e2 +0x00007f870d452910: 00007f870d452910 00007f870eeecb50 +0x00007f870d452920: 00007f870d452970 00007f870eeed538 +0x00007f870d452930: 0000000000000000 00007f870eeecb50 +0x00007f870d452940: 0000000000000000 00007f870d452970 +0x00007f870d452950: 00007f870d4529b8 00007f87150082bd +0x00007f870d452960: 0000000000000000 00007f8715011d18 +0x00007f870d452970: 0000000781fe8190 00007f870d452978 +0x00007f870d452980: 00007f870eee6484 00007f870d4529c8 +0x00007f870d452990: 00007f870eee6d08 0000000000000000 +0x00007f870d4529a0: 00007f870eee6490 00007f870d452970 +0x00007f870d4529b0: 00007f870d4529c8 00007f870d452a10 +0x00007f870d4529c0: 00007f87150082bd 0000000781fe8168 +0x00007f870d4529d0: 00007f870d4529d0 00007f870eee1064 +0x00007f870d4529e0: 00007f870d452a48 00007f870eee3028 +0x00007f870d4529f0: 0000000000000000 00007f870eee1240 +0x00007f870d452a00: 00007f870d4529c8 00007f870d452a48 +0x00007f870d452a10: 00007f870d452ab0 00007f87150007a7 +0x00007f870d452a20: 0000000000000000 0000000000000000 +0x00007f870d452a30: 0000000000000000 0000000000000000 +0x00007f870d452a40: 0000000000000000 0000000781f7f130 +0x00007f870d452a50: 0000000000001fa0 00007f870eee1240 +0x00007f870d452a60: 00007f870d452c90 00007f870d452b50 +0x00007f870d452a70: 00007f8724241000 00007f8724241000 +0x00007f870d452a80: 00007f870d452b50 00007f870d452d38 +0x00007f870d452a90: 00007f870000000a 00007f870eee1240 +0x00007f870d452aa0: 00007f8715013600 00007f870d452c98 +0x00007f870d452ab0: 00007f870d452bc0 00007f872ae8d25b +0x00007f870d452ac0: 0000000000000001 00007f8724241000 + +Instructions: (pc=0x00007f8728033a12) +0x00007f87280339f2: c9 c3 55 48 89 e5 48 89 7d f8 48 8b 45 f8 48 8b +0x00007f8728033a02: 40 08 5d c3 55 48 89 e5 48 89 7d f8 48 8b 45 f8 +0x00007f8728033a12: c7 00 01 00 00 00 90 5d c3 90 55 48 89 e5 48 89 +0x00007f8728033a22: 7d f8 48 8b 45 f8 c7 00 00 00 00 00 90 5d c3 55 + +Register to memory mapping: + +RAX=0x0000000000000000 is an unknown value +RBX={method} {0x00007f870eeecb50} 'setLoggingEnabled0' '()V' in 'com/serial4j/core/serial/NativeTerminalDevice' +RCX=0x0000000000000028 is an unknown value +RDX=0x00007f872b7ccf98: in /home/twisted/jdk1.8.0_201/jre/lib/amd64/server/libjvm.so at 0x00007f872a805000 +RSP=0x00007f870d4528d0 is pointing into the stack for thread: 0x00007f8724241000 +RBP=0x00007f870d4528d0 is pointing into the stack for thread: 0x00007f8724241000 +RSI=0x00007f870d452970 is pointing into the stack for thread: 0x00007f8724241000 +RDI=0x0000000000000000 is an unknown value +R8 =0x0000000000000006 is an unknown value +R9 =0x0000000000000007 is an unknown value +R10=0x00007f87280305d8: in /home/twisted/GradleProjects/AVR-Sandbox/HelloSerial4j/output/serial4j/libserial4j.so at 0x00007f872802f000 +R11=0x00007f8728033a06: _ZN6Logger17setLoggingEnabledEv+0 in /home/twisted/GradleProjects/AVR-Sandbox/HelloSerial4j/output/serial4j/libserial4j.so at 0x00007f872802f000 +R12=0x0000000000000000 is an unknown value +R13={method} {0x00007f870eeecb50} 'setLoggingEnabled0' '()V' in 'com/serial4j/core/serial/NativeTerminalDevice' +R14=0x00007f870d452970 is pointing into the stack for thread: 0x00007f8724241000 +R15=0x00007f8724241000 is a thread + + +Stack: [0x00007f870d353000,0x00007f870d454000], sp=0x00007f870d4528d0, free space=1022k +Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) +C [libserial4j.so+0x4a12] Logger::setLoggingEnabled()+0xc +C [libserial4j.so+0x4193] Java_com_serial4j_core_serial_NativeTerminalDevice_setLoggingEnabled0+0x22 +j com.serial4j.core.serial.NativeTerminalDevice.setLoggingEnabled0()V+0 +j com.serial4j.core.serial.TerminalDevice.setNativeLoggingEnabled()V+4 +j com.serial4j.example.HelloNativeSerial4J.run()V+12 +v ~StubRoutines::call_stub +V [libjvm.so+0x68825b] JavaCalls::call_helper(JavaValue*, methodHandle*, JavaCallArguments*, Thread*)+0xddb +V [libjvm.so+0x685b23] JavaCalls::call_virtual(JavaValue*, KlassHandle, Symbol*, Symbol*, JavaCallArguments*, Thread*)+0x263 +V [libjvm.so+0x6860e7] JavaCalls::call_virtual(JavaValue*, Handle, KlassHandle, Symbol*, Symbol*, Thread*)+0x47 +V [libjvm.so+0x6f225c] thread_entry(JavaThread*, Thread*)+0x6c +V [libjvm.so+0xa7bb6b] JavaThread::thread_main_inner()+0xdb +V [libjvm.so+0xa7be71] JavaThread::run()+0x2d1 +V [libjvm.so+0x90d922] java_start(Thread*)+0x102 +C [libpthread.so.0+0x8f27] start_thread+0xd7 + +Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) +j com.serial4j.core.serial.NativeTerminalDevice.setLoggingEnabled0()V+0 +j com.serial4j.core.serial.TerminalDevice.setNativeLoggingEnabled()V+4 +j com.serial4j.example.HelloNativeSerial4J.run()V+12 +v ~StubRoutines::call_stub + +--------------- P R O C E S S --------------- + +Java Threads: ( => current thread ) +=>0x00007f8724241000 JavaThread "Thread-0" [_thread_in_native, id=153813, stack(0x00007f870d353000,0x00007f870d454000)] + 0x00007f8724195000 JavaThread "Service Thread" daemon [_thread_blocked, id=153811, stack(0x00007f870d555000,0x00007f870d656000)] + 0x00007f872418a000 JavaThread "C1 CompilerThread2" daemon [_thread_blocked, id=153810, stack(0x00007f870d657000,0x00007f870d757000)] + 0x00007f8724188000 JavaThread "C2 CompilerThread1" daemon [_thread_blocked, id=153809, stack(0x00007f870d758000,0x00007f870d858000)] + 0x00007f8724185000 JavaThread "C2 CompilerThread0" daemon [_thread_blocked, id=153808, stack(0x00007f870d859000,0x00007f870d959000)] + 0x00007f8724184000 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=153807, stack(0x00007f870d959000,0x00007f870da5a000)] + 0x00007f872414c800 JavaThread "Finalizer" daemon [_thread_blocked, id=153806, stack(0x00007f870dcd2000,0x00007f870ddd3000)] + 0x00007f872414a000 JavaThread "Reference Handler" daemon [_thread_blocked, id=153805, stack(0x00007f870ddd3000,0x00007f870ded4000)] + 0x00007f872400b000 JavaThread "main" [_thread_blocked, id=153799, stack(0x00007f872a5c0000,0x00007f872a6c0000)] + +Other Threads: + 0x00007f8724140000 VMThread [stack: 0x00007f870ded5000,0x00007f870dfd5000] [id=153804] + 0x00007f8724197800 WatcherThread [stack: 0x00007f870d455000,0x00007f870d555000] [id=153812] + +VM state:not at safepoint (normal execution) + +VM Mutex/Monitor currently owned by a thread: None + +heap address: 0x0000000705c00000, size: 2980 MB, Compressed Oops mode: Zero based, Oop shift amount: 3 +Narrow klass base: 0x0000000000000000, Narrow klass shift: 3 +Compressed class space size: 1073741824 Address: 0x00000007c0000000 + +Heap: + PSYoungGen total 56320K, used 2918K [0x0000000781f00000, 0x0000000785d80000, 0x00000007c0000000) + eden space 48640K, 6% used [0x0000000781f00000,0x00000007821d99d0,0x0000000784e80000) + from space 7680K, 0% used [0x0000000785600000,0x0000000785600000,0x0000000785d80000) + to space 7680K, 0% used [0x0000000784e80000,0x0000000784e80000,0x0000000785600000) + ParOldGen total 128512K, used 0K [0x0000000705c00000, 0x000000070d980000, 0x0000000781f00000) + object space 128512K, 0% used [0x0000000705c00000,0x0000000705c00000,0x000000070d980000) + Metaspace used 3078K, capacity 4600K, committed 4864K, reserved 1056768K + class space used 344K, capacity 424K, committed 512K, reserved 1048576K + +Card table byte_map: [0x00007f872957c000,0x00007f8729b4f000] byte_map_base: 0x00007f8725d4e000 + +Marking Bits: (ParMarkBitMap*) 0x00007f872b7d0d80 + Begin Bits: [0x00007f870f2e0000, 0x00007f8712170000) + End Bits: [0x00007f8712170000, 0x00007f8715000000) + +Polling page: 0x00007f872bc37000 + +CodeCache: size=245760Kb used=1159Kb max_used=1159Kb free=244600Kb + bounds [0x00007f8715000000, 0x00007f8715270000, 0x00007f8724000000] + total_blobs=276 nmethods=41 adapters=149 + compilation: enabled + +Compilation events (10 events): +Event: 0.113 Thread 0x00007f872418a000 34 1 java.net.URL::getProtocol (5 bytes) +Event: 0.113 Thread 0x00007f872418a000 nmethod 34 0x00007f8715121050 code [0x00007f87151211a0, 0x00007f87151212b0] +Event: 0.113 Thread 0x00007f872418a000 37 1 java.net.URL::getPath (5 bytes) +Event: 0.113 Thread 0x00007f872418a000 nmethod 37 0x00007f8715121310 code [0x00007f8715121460, 0x00007f8715121570] +Event: 0.113 Thread 0x00007f872418a000 38 1 java.net.URL::getAuthority (5 bytes) +Event: 0.113 Thread 0x00007f872418a000 nmethod 38 0x00007f87151215d0 code [0x00007f8715121720, 0x00007f8715121830] +Event: 0.113 Thread 0x00007f872418a000 39 1 java.io.File::getPath (5 bytes) +Event: 0.113 Thread 0x00007f872418a000 nmethod 39 0x00007f8715121890 code [0x00007f87151219e0, 0x00007f8715121af0] +Event: 0.113 Thread 0x00007f872418a000 41 1 java.net.URL::getFile (5 bytes) +Event: 0.113 Thread 0x00007f872418a000 nmethod 41 0x00007f8715121b50 code [0x00007f8715121ca0, 0x00007f8715121db0] + +GC Heap History (0 events): +No events + +Deoptimization events (0 events): +No events + +Classes redefined (0 events): +No events + +Internal exceptions (6 events): +Event: 0.048 Thread 0x00007f872400b000 Exception (0x0000000781f07cb0) thrown at [/HUDSON/workspace/8-2-build-linux-amd64/jdk8u201/12317/hotspot/src/sh +Event: 0.048 Thread 0x00007f872400b000 Exception (0x0000000781f07f98) thrown at [/HUDSON/workspace/8-2-build-linux-amd64/jdk8u201/12317/hotspot/src/share/vm/prims/jni.c +Event: 0.105 Thread 0x00007f872400b000 Exception (0x0000000781fc06e0) thrown at [/HUDSON/workspace/8-2-build-linux-amd64/jdk8u201/12317/hotspot/src/share/vm/prims/jvm.cpp, line 1502] +Event: 0.105 Thread 0x00007f872400b000 Exception (0x0000000781fc08f0) thrown at [/HUDSON/workspace/8-2-build-linux-amd64/jdk8u201/12317/hotspot/src/share/vm/prims/jvm.cpp, line 1502] +Event: 0.105 Thread 0x00007f872400b000 Exception (0x0000000781fc2d58) thrown at [/HUDSON/workspace/8-2-build-linux-amd64/jdk8u201/12317/hotspot/src/share/vm/prims/jvm.cpp, line 1502] +Event: 0.105 Thread 0x00007f872400b000 Exception (0x0000000781fc2f68) thrown at [/HUDSON/workspace/8-2-build-linux-amd64/jdk8u201/12317/hotspot/src/share/vm/prims/jvm.cpp, line 1502] + +Events (10 events): +Event: 0.107 loading class java/io/FileOutputStream$1 done +Event: 0.108 loading class com/serial4j/core/serial/NativeTerminalDevice +Event: 0.108 loading class com/serial4j/core/serial/NativeTerminalDevice done +Event: 0.109 loading class com/serial4j/core/errno/ErrnoToException +Event: 0.109 loading class com/serial4j/core/errno/ErrnoToException done +Event: 0.109 loading class com/serial4j/core/errno/Errno +Event: 0.109 loading class com/serial4j/core/errno/Errno done +Event: 0.110 loading class com/serial4j/core/serial/SerialPort +Event: 0.110 loading class com/serial4j/core/serial/SerialPort done +Event: 0.113 Thread 0x00007f8724241000 Thread added: 0x00007f8724241000 + + +Dynamic libraries: +00400000-00401000 r-xp 00000000 08:0b 8396377 /home/twisted/jdk1.8.0_201/bin/java +00600000-00601000 r--p 00000000 08:0b 8396377 /home/twisted/jdk1.8.0_201/bin/java +00601000-00602000 rw-p 00001000 08:0b 8396377 /home/twisted/jdk1.8.0_201/bin/java +01d67000-01d88000 rw-p 00000000 00:00 0 [heap] +705c00000-70d980000 rw-p 00000000 00:00 0 +70d980000-781f00000 ---p 00000000 00:00 0 +781f00000-785d80000 rw-p 00000000 00:00 0 +785d80000-7c0000000 ---p 00000000 00:00 0 +7c0000000-7c0080000 rw-p 00000000 00:00 0 +7c0080000-800000000 ---p 00000000 00:00 0 +7f86d0000000-7f86d0021000 rw-p 00000000 00:00 0 +7f86d0021000-7f86d4000000 ---p 00000000 00:00 0 +7f86d8000000-7f86d8021000 rw-p 00000000 00:00 0 +7f86d8021000-7f86dc000000 ---p 00000000 00:00 0 +7f86dc000000-7f86dc021000 rw-p 00000000 00:00 0 +7f86dc021000-7f86e0000000 ---p 00000000 00:00 0 +7f86e0000000-7f86e0021000 rw-p 00000000 00:00 0 +7f86e0021000-7f86e4000000 ---p 00000000 00:00 0 +7f86e4000000-7f86e4139000 rw-p 00000000 00:00 0 +7f86e4139000-7f86e8000000 ---p 00000000 00:00 0 +7f86e8000000-7f86e8021000 rw-p 00000000 00:00 0 +7f86e8021000-7f86ec000000 ---p 00000000 00:00 0 +7f86ec000000-7f86ec06e000 rw-p 00000000 00:00 0 +7f86ec06e000-7f86f0000000 ---p 00000000 00:00 0 +7f86f0000000-7f86f0021000 rw-p 00000000 00:00 0 +7f86f0021000-7f86f4000000 ---p 00000000 00:00 0 +7f86f4000000-7f86f4021000 rw-p 00000000 00:00 0 +7f86f4021000-7f86f8000000 ---p 00000000 00:00 0 +7f86f8000000-7f86f8021000 rw-p 00000000 00:00 0 +7f86f8021000-7f86fc000000 ---p 00000000 00:00 0 +7f86fc000000-7f86fc021000 rw-p 00000000 00:00 0 +7f86fc021000-7f8700000000 ---p 00000000 00:00 0 +7f8700000000-7f8700021000 rw-p 00000000 00:00 0 +7f8700021000-7f8704000000 ---p 00000000 00:00 0 +7f8704000000-7f8704021000 rw-p 00000000 00:00 0 +7f8704021000-7f8708000000 ---p 00000000 00:00 0 +7f8708000000-7f8708021000 rw-p 00000000 00:00 0 +7f8708021000-7f870c000000 ---p 00000000 00:00 0 +7f870d0be000-7f870d353000 rw-p 00000000 00:00 0 +7f870d353000-7f870d356000 ---p 00000000 00:00 0 +7f870d356000-7f870d454000 rw-p 00000000 00:00 0 +7f870d454000-7f870d455000 ---p 00000000 00:00 0 +7f870d455000-7f870d555000 rw-p 00000000 00:00 0 +7f870d555000-7f870d558000 ---p 00000000 00:00 0 +7f870d558000-7f870d656000 rw-p 00000000 00:00 0 +7f870d656000-7f870d657000 ---p 00000000 00:00 0 +7f870d657000-7f870d65a000 ---p 00000000 00:00 0 +7f870d65a000-7f870d757000 rw-p 00000000 00:00 0 +7f870d757000-7f870d758000 ---p 00000000 00:00 0 +7f870d758000-7f870d75b000 ---p 00000000 00:00 0 +7f870d75b000-7f870d858000 rw-p 00000000 00:00 0 +7f870d858000-7f870d859000 ---p 00000000 00:00 0 +7f870d859000-7f870d85c000 ---p 00000000 00:00 0 +7f870d85c000-7f870d959000 rw-p 00000000 00:00 0 +7f870d959000-7f870d95c000 ---p 00000000 00:00 0 +7f870d95c000-7f870da5a000 rw-p 00000000 00:00 0 +7f870da5a000-7f870dcd2000 r--p 00000000 08:0a 4328903 /usr/lib/locale/aa_DJ.utf8/LC_COLLATE +7f870dcd2000-7f870dcd5000 ---p 00000000 00:00 0 +7f870dcd5000-7f870ddd3000 rw-p 00000000 00:00 0 +7f870ddd3000-7f870ddd6000 ---p 00000000 00:00 0 +7f870ddd6000-7f870ded4000 rw-p 00000000 00:00 0 +7f870ded4000-7f870ded5000 ---p 00000000 00:00 0 +7f870ded5000-7f870ef20000 rw-p 00000000 00:00 0 +7f870ef20000-7f870f2e0000 ---p 00000000 00:00 0 +7f870f2e0000-7f8715000000 rw-p 00000000 00:00 0 +7f8715000000-7f8715270000 rwxp 00000000 00:00 0 +7f8715270000-7f8724000000 ---p 00000000 00:00 0 +7f8724000000-7f8724242000 rw-p 00000000 00:00 0 +7f8724242000-7f8728000000 ---p 00000000 00:00 0 +7f872802f000-7f8728032000 r--p 00000000 08:0b 8520060 /home/twisted/GradleProjects/AVR-Sandbox/HelloSerial4j/output/serial4j/libserial4j.so +7f8728032000-7f8728034000 r-xp 00003000 08:0b 8520060 /home/twisted/GradleProjects/AVR-Sandbox/HelloSerial4j/output/serial4j/libserial4j.so +7f8728034000-7f8728036000 r--p 00005000 08:0b 8520060 /home/twisted/GradleProjects/AVR-Sandbox/HelloSerial4j/output/serial4j/libserial4j.so +7f8728036000-7f8728037000 r--p 00006000 08:0b 8520060 /home/twisted/GradleProjects/AVR-Sandbox/HelloSerial4j/output/serial4j/libserial4j.so +7f8728037000-7f8728038000 rw-p 00007000 08:0b 8520060 /home/twisted/GradleProjects/AVR-Sandbox/HelloSerial4j/output/serial4j/libserial4j.so +7f8728038000-7f872808b000 r--p 00000000 08:0a 4328904 /usr/lib/locale/aa_DJ.utf8/LC_CTYPE +7f872808b000-7f87284de000 rw-p 00000000 00:00 0 +7f87284de000-7f87286b8000 r--s 03d6f000 08:0b 8543644 /home/twisted/jdk1.8.0_201/jre/lib/rt.jar +7f87286b8000-7f8728d96000 rw-p 00000000 00:00 0 +7f8728d96000-7f8728d97000 ---p 00000000 00:00 0 +7f8728d97000-7f8728e97000 rw-p 00000000 00:00 0 +7f8728e97000-7f8728e98000 ---p 00000000 00:00 0 +7f8728e98000-7f8728f98000 rw-p 00000000 00:00 0 +7f8728f98000-7f8728f99000 ---p 00000000 00:00 0 +7f8728f99000-7f8729099000 rw-p 00000000 00:00 0 +7f8729099000-7f872909a000 ---p 00000000 00:00 0 +7f872909a000-7f87291d9000 rw-p 00000000 00:00 0 +7f87291d9000-7f872957c000 ---p 00000000 00:00 0 +7f872957c000-7f87295bb000 rw-p 00000000 00:00 0 +7f87295bb000-7f872995d000 ---p 00000000 00:00 0 +7f872995d000-7f872997d000 rw-p 00000000 00:00 0 +7f872997d000-7f8729b4e000 ---p 00000000 00:00 0 +7f8729b4e000-7f8729b59000 rw-p 00000000 00:00 0 +7f8729b59000-7f8729f0f000 ---p 00000000 00:00 0 +7f8729f0f000-7f8729f2a000 r-xp 00000000 08:0b 8782383 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libzip.so +7f8729f2a000-7f872a129000 ---p 0001b000 08:0b 8782383 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libzip.so +7f872a129000-7f872a12a000 r--p 0001a000 08:0b 8782383 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libzip.so +7f872a12a000-7f872a12b000 rw-p 0001b000 08:0b 8782383 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libzip.so +7f872a12b000-7f872a12e000 r--p 00000000 08:0a 4334780 /usr/lib/x86_64-linux-gnu/libnss_files-2.30.so +7f872a12e000-7f872a135000 r-xp 00003000 08:0a 4334780 /usr/lib/x86_64-linux-gnu/libnss_files-2.30.so +7f872a135000-7f872a137000 r--p 0000a000 08:0a 4334780 /usr/lib/x86_64-linux-gnu/libnss_files-2.30.so +7f872a137000-7f872a138000 r--p 0000b000 08:0a 4334780 /usr/lib/x86_64-linux-gnu/libnss_files-2.30.so +7f872a138000-7f872a139000 rw-p 0000c000 08:0a 4334780 /usr/lib/x86_64-linux-gnu/libnss_files-2.30.so +7f872a139000-7f872a13f000 rw-p 00000000 00:00 0 +7f872a13f000-7f872a144000 r--p 00000000 08:0a 4334771 /usr/lib/x86_64-linux-gnu/libnsl-2.30.so +7f872a144000-7f872a151000 r-xp 00005000 08:0a 4334771 /usr/lib/x86_64-linux-gnu/libnsl-2.30.so +7f872a151000-7f872a155000 r--p 00012000 08:0a 4334771 /usr/lib/x86_64-linux-gnu/libnsl-2.30.so +7f872a155000-7f872a156000 r--p 00015000 08:0a 4334771 /usr/lib/x86_64-linux-gnu/libnsl-2.30.so +7f872a156000-7f872a157000 rw-p 00016000 08:0a 4334771 /usr/lib/x86_64-linux-gnu/libnsl-2.30.so +7f872a157000-7f872a159000 rw-p 00000000 00:00 0 +7f872a15e000-7f872a160000 r--s 0000a000 08:0b 8524522 /home/twisted/GradleProjects/AVR-Sandbox/HelloSerial4j/output/serial4j/serial4j.jar +7f872a160000-7f872a161000 r--p 00000000 08:0a 4328933 /usr/lib/locale/aa_ET/LC_NUMERIC +7f872a161000-7f872a162000 r--p 00000000 08:0a 4330095 /usr/lib/locale/en_US.utf8/LC_TIME +7f872a162000-7f872a163000 r--p 00000000 08:0a 4329578 /usr/lib/locale/chr_US/LC_MONETARY +7f872a163000-7f872a164000 r--p 00000000 08:0a 4329874 /usr/lib/locale/en_AG/LC_MESSAGES/SYS_LC_MESSAGES +7f872a164000-7f872a165000 r--p 00000000 08:0a 4329579 /usr/lib/locale/chr_US/LC_PAPER +7f872a165000-7f872a166000 r--p 00000000 08:0a 4329410 /usr/lib/locale/bi_VU/LC_NAME +7f872a166000-7f872a167000 r--p 00000000 08:0a 4330092 /usr/lib/locale/en_US.utf8/LC_ADDRESS +7f872a167000-7f872a16e000 r--s 00000000 08:0a 4332592 /usr/lib/x86_64-linux-gnu/gconv/gconv-modules.cache +7f872a16e000-7f872a176000 rw-s 00000000 08:0a 2105351 /tmp/hsperfdata_pavl-machine/153798 +7f872a176000-7f872a1a2000 r-xp 00000000 08:0b 8782377 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libjava.so +7f872a1a2000-7f872a3a2000 ---p 0002c000 08:0b 8782377 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libjava.so +7f872a3a2000-7f872a3a3000 r--p 0002c000 08:0b 8782377 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libjava.so +7f872a3a3000-7f872a3a5000 rw-p 0002d000 08:0b 8782377 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libjava.so +7f872a3a5000-7f872a3b2000 r-xp 00000000 08:0b 8782382 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libverify.so +7f872a3b2000-7f872a5b1000 ---p 0000d000 08:0b 8782382 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libverify.so +7f872a5b1000-7f872a5b3000 r--p 0000c000 08:0b 8782382 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libverify.so +7f872a5b3000-7f872a5b4000 rw-p 0000e000 08:0b 8782382 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libverify.so +7f872a5b4000-7f872a5b7000 r--p 00000000 08:0a 4335156 /usr/lib/x86_64-linux-gnu/librt-2.30.so +7f872a5b7000-7f872a5bb000 r-xp 00003000 08:0a 4335156 /usr/lib/x86_64-linux-gnu/librt-2.30.so +7f872a5bb000-7f872a5bd000 r--p 00007000 08:0a 4335156 /usr/lib/x86_64-linux-gnu/librt-2.30.so +7f872a5bd000-7f872a5be000 r--p 00008000 08:0a 4335156 /usr/lib/x86_64-linux-gnu/librt-2.30.so +7f872a5be000-7f872a5bf000 rw-p 00009000 08:0a 4335156 /usr/lib/x86_64-linux-gnu/librt-2.30.so +7f872a5bf000-7f872a5c0000 ---p 00000000 00:00 0 +7f872a5c0000-7f872a5c3000 ---p 00000000 00:00 0 +7f872a5c3000-7f872a6c0000 rw-p 00000000 00:00 0 +7f872a6c0000-7f872a6cf000 r--p 00000000 08:0a 4334559 /usr/lib/x86_64-linux-gnu/libm-2.30.so +7f872a6cf000-7f872a76a000 r-xp 0000f000 08:0a 4334559 /usr/lib/x86_64-linux-gnu/libm-2.30.so +7f872a76a000-7f872a803000 r--p 000aa000 08:0a 4334559 /usr/lib/x86_64-linux-gnu/libm-2.30.so +7f872a803000-7f872a804000 r--p 00142000 08:0a 4334559 /usr/lib/x86_64-linux-gnu/libm-2.30.so +7f872a804000-7f872a805000 rw-p 00143000 08:0a 4334559 /usr/lib/x86_64-linux-gnu/libm-2.30.so +7f872a805000-7f872b4ed000 r-xp 00000000 08:0b 8782359 /home/twisted/jdk1.8.0_201/jre/lib/amd64/server/libjvm.so +7f872b4ed000-7f872b6ec000 ---p 00ce8000 08:0b 8782359 /home/twisted/jdk1.8.0_201/jre/lib/amd64/server/libjvm.so +7f872b6ec000-7f872b782000 r--p 00ce7000 08:0b 8782359 /home/twisted/jdk1.8.0_201/jre/lib/amd64/server/libjvm.so +7f872b782000-7f872b7b3000 rw-p 00d7d000 08:0b 8782359 /home/twisted/jdk1.8.0_201/jre/lib/amd64/server/libjvm.so +7f872b7b3000-7f872b7f0000 rw-p 00000000 00:00 0 +7f872b7f0000-7f872b815000 r--p 00000000 08:0a 4333575 /usr/lib/x86_64-linux-gnu/libc-2.30.so +7f872b815000-7f872b95f000 r-xp 00025000 08:0a 4333575 /usr/lib/x86_64-linux-gnu/libc-2.30.so +7f872b95f000-7f872b9a9000 r--p 0016f000 08:0a 4333575 /usr/lib/x86_64-linux-gnu/libc-2.30.so +7f872b9a9000-7f872b9ac000 r--p 001b8000 08:0a 4333575 /usr/lib/x86_64-linux-gnu/libc-2.30.so +7f872b9ac000-7f872b9af000 rw-p 001bb000 08:0a 4333575 /usr/lib/x86_64-linux-gnu/libc-2.30.so +7f872b9af000-7f872b9b3000 rw-p 00000000 00:00 0 +7f872b9b3000-7f872b9b4000 r--p 00000000 08:0a 4333777 /usr/lib/x86_64-linux-gnu/libdl-2.30.so +7f872b9b4000-7f872b9b5000 r-xp 00001000 08:0a 4333777 /usr/lib/x86_64-linux-gnu/libdl-2.30.so +7f872b9b5000-7f872b9b6000 r--p 00002000 08:0a 4333777 /usr/lib/x86_64-linux-gnu/libdl-2.30.so +7f872b9b6000-7f872b9b7000 r--p 00002000 08:0a 4333777 /usr/lib/x86_64-linux-gnu/libdl-2.30.so +7f872b9b7000-7f872b9b8000 rw-p 00003000 08:0a 4333777 /usr/lib/x86_64-linux-gnu/libdl-2.30.so +7f872b9b8000-7f872b9cf000 r-xp 00000000 08:0b 8543590 /home/twisted/jdk1.8.0_201/lib/amd64/jli/libjli.so +7f872b9cf000-7f872bbce000 ---p 00017000 08:0b 8543590 /home/twisted/jdk1.8.0_201/lib/amd64/jli/libjli.so +7f872bbce000-7f872bbcf000 r--p 00016000 08:0b 8543590 /home/twisted/jdk1.8.0_201/lib/amd64/jli/libjli.so +7f872bbcf000-7f872bbd0000 rw-p 00017000 08:0b 8543590 /home/twisted/jdk1.8.0_201/lib/amd64/jli/libjli.so +7f872bbd0000-7f872bbd7000 r--p 00000000 08:0a 4335024 /usr/lib/x86_64-linux-gnu/libpthread-2.30.so +7f872bbd7000-7f872bbe6000 r-xp 00007000 08:0a 4335024 /usr/lib/x86_64-linux-gnu/libpthread-2.30.so +7f872bbe6000-7f872bbeb000 r--p 00016000 08:0a 4335024 /usr/lib/x86_64-linux-gnu/libpthread-2.30.so +7f872bbeb000-7f872bbec000 r--p 0001a000 08:0a 4335024 /usr/lib/x86_64-linux-gnu/libpthread-2.30.so +7f872bbec000-7f872bbed000 rw-p 0001b000 08:0a 4335024 /usr/lib/x86_64-linux-gnu/libpthread-2.30.so +7f872bbed000-7f872bbf3000 rw-p 00000000 00:00 0 +7f872bbf3000-7f872bbf4000 r--p 00000000 08:0a 4329580 /usr/lib/locale/chr_US/LC_TELEPHONE +7f872bbf4000-7f872bbf5000 r--p 00000000 08:0a 4329575 /usr/lib/locale/chr_US/LC_MEASUREMENT +7f872bbf5000-7f872bbf6000 r--p 00000000 08:0a 4330093 /usr/lib/locale/en_US.utf8/LC_IDENTIFICATION +7f872bbf6000-7f872bbf9000 r--p 00000000 08:0a 4334790 /usr/lib/x86_64-linux-gnu/libnss_nis-2.30.so +7f872bbf9000-7f872bc00000 r-xp 00003000 08:0a 4334790 /usr/lib/x86_64-linux-gnu/libnss_nis-2.30.so +7f872bc00000-7f872bc02000 r--p 0000a000 08:0a 4334790 /usr/lib/x86_64-linux-gnu/libnss_nis-2.30.so +7f872bc02000-7f872bc03000 r--p 0000b000 08:0a 4334790 /usr/lib/x86_64-linux-gnu/libnss_nis-2.30.so +7f872bc03000-7f872bc04000 rw-p 0000c000 08:0a 4334790 /usr/lib/x86_64-linux-gnu/libnss_nis-2.30.so +7f872bc04000-7f872bc06000 r--p 00000000 08:0a 4334776 /usr/lib/x86_64-linux-gnu/libnss_compat-2.30.so +7f872bc06000-7f872bc0b000 r-xp 00002000 08:0a 4334776 /usr/lib/x86_64-linux-gnu/libnss_compat-2.30.so +7f872bc0b000-7f872bc0c000 r--p 00007000 08:0a 4334776 /usr/lib/x86_64-linux-gnu/libnss_compat-2.30.so +7f872bc0c000-7f872bc0d000 ---p 00008000 08:0a 4334776 /usr/lib/x86_64-linux-gnu/libnss_compat-2.30.so +7f872bc0d000-7f872bc0e000 r--p 00008000 08:0a 4334776 /usr/lib/x86_64-linux-gnu/libnss_compat-2.30.so +7f872bc0e000-7f872bc0f000 rw-p 00009000 08:0a 4334776 /usr/lib/x86_64-linux-gnu/libnss_compat-2.30.so +7f872bc0f000-7f872bc10000 rw-p 00000000 00:00 0 +7f872bc10000-7f872bc11000 r--p 00000000 08:0a 4333008 /usr/lib/x86_64-linux-gnu/ld-2.30.so +7f872bc11000-7f872bc2f000 r-xp 00001000 08:0a 4333008 /usr/lib/x86_64-linux-gnu/ld-2.30.so +7f872bc2f000-7f872bc37000 r--p 0001f000 08:0a 4333008 /usr/lib/x86_64-linux-gnu/ld-2.30.so +7f872bc37000-7f872bc38000 r--p 00000000 00:00 0 +7f872bc38000-7f872bc39000 r--p 00027000 08:0a 4333008 /usr/lib/x86_64-linux-gnu/ld-2.30.so +7f872bc39000-7f872bc3a000 rw-p 00028000 08:0a 4333008 /usr/lib/x86_64-linux-gnu/ld-2.30.so +7f872bc3a000-7f872bc3b000 rw-p 00000000 00:00 0 +7ffe0560d000-7ffe0562e000 rw-p 00000000 00:00 0 [stack] +7ffe056e0000-7ffe056e3000 r--p 00000000 00:00 0 [vvar] +7ffe056e3000-7ffe056e4000 r-xp 00000000 00:00 0 [vdso] + +VM Arguments: +java_command: serial4j.jar +java_class_path (initial): serial4j.jar +Launcher Type: SUN_STANDARD + +Environment Variables: +JAVA_HOME=/home/twisted/jdk1.8.0_201 +PATH=/home/pavl-machine/.local/bin:/snap/bin:/usr/sandbox/:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/usr/share/games:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games +SHELL=/bin/bash +DISPLAY=:0 + +Signal Handlers: +SIGSEGV: [libjvm.so+0xad3e60], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO +SIGBUS: [libjvm.so+0xad3e60], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO +SIGFPE: [libjvm.so+0x90b880], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO +SIGPIPE: [libjvm.so+0x90b880], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO +SIGXFSZ: [libjvm.so+0x90b880], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO +SIGILL: [libjvm.so+0x90b880], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO +SIGUSR1: SIG_DFL, sa_mask[0]=00000000000000000000000000000000, sa_flags=none +SIGUSR2: [libjvm.so+0x90b750], sa_mask[0]=00000000000000000000000000000000, sa_flags=SA_RESTART|SA_SIGINFO +SIGHUP: [libjvm.so+0x90bd70], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO +SIGINT: [libjvm.so+0x90bd70], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO +SIGTERM: [libjvm.so+0x90bd70], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO +SIGQUIT: [libjvm.so+0x90bd70], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO + + +--------------- S Y S T E M --------------- + +OS:DISTRIB_ID=Parrot +DISTRIB_RELEASE=4.9 +DISTRIB_CODENAME=rolling +DISTRIB_DESCRIPTION="Parrot 4.9" + +uname:Linux 5.5.0-1parrot1-amd64 #1 SMP Parrot 5.5.17-1parrot1 (2020-04-25) x86_64 +libc:glibc 2.30 NPTL 2.30 +rlimit: STACK 8192k, CORE 0k, NPROC 47123, NOFILE 1048576, AS infinity +load average:0.76 0.90 1.11 + +/proc/meminfo: +MemTotal: 12202288 kB +MemFree: 453208 kB +MemAvailable: 6268248 kB +Buffers: 1327108 kB +Cached: 5239600 kB +SwapCached: 240 kB +Active: 7342992 kB +Inactive: 3322920 kB +Active(anon): 3923744 kB +Inactive(anon): 1023148 kB +Active(file): 3419248 kB +Inactive(file): 2299772 kB +Unevictable: 337520 kB +Mlocked: 240 kB +SwapTotal: 6836220 kB +SwapFree: 6834876 kB +Dirty: 20 kB +Writeback: 0 kB +AnonPages: 4349276 kB +Mapped: 1024332 kB +Shmem: 906920 kB +KReclaimable: 418948 kB +Slab: 570180 kB +SReclaimable: 418948 kB +SUnreclaim: 151232 kB +KernelStack: 17184 kB +PageTables: 59880 kB +NFS_Unstable: 0 kB +Bounce: 0 kB +WritebackTmp: 0 kB +CommitLimit: 12937364 kB +Committed_AS: 15905316 kB +VmallocTotal: 34359738367 kB +VmallocUsed: 49116 kB +VmallocChunk: 0 kB +Percpu: 3872 kB +HardwareCorrupted: 0 kB +AnonHugePages: 743424 kB +ShmemHugePages: 0 kB +ShmemPmdMapped: 0 kB +FileHugePages: 0 kB +FilePmdMapped: 0 kB +HugePages_Total: 0 +HugePages_Free: 0 +HugePages_Rsvd: 0 +HugePages_Surp: 0 +Hugepagesize: 2048 kB +Hugetlb: 0 kB +DirectMap4k: 512276 kB +DirectMap2M: 11933696 kB +DirectMap1G: 1048576 kB + +container (cgroup) information: +container_type: cgroupv1 +cpu_cpuset_cpus: 0-3 +cpu_memory_nodes: 0 +active_processor_count: 4 +cpu_quota: -1 +cpu_period: 100000 +cpu_shares: -1 +memory_limit_in_bytes: -1 +memory_and_swap_limit_in_bytes: -2 +memory_soft_limit_in_bytes: -1 +memory_usage_in_bytes: 3128057856 +memory_max_usage_in_bytes: 4470431744 + + +CPU:total 4 (initial active 4) (2 cores per cpu, 2 threads per core) family 6 model 142 stepping 9, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, avx, avx2, aes, clmul, erms, 3dnowpref, lzcnt, ht, tsc, tscinvbit, bmi1, bmi2, adx + +/proc/cpuinfo: +processor : 0 +vendor_id : GenuineIntel +cpu family : 6 +model : 142 +model name : Intel(R) Core(TM) i3-7020U CPU @ 2.30GHz +stepping : 9 +microcode : 0xca +cpu MHz : 2300.000 +cache size : 3072 KB +physical id : 0 +siblings : 4 +core id : 0 +cpu cores : 2 +apicid : 0 +initial apicid : 0 +fpu : yes +fpu_exception : yes +cpuid level : 22 +wp : yes +flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_clear flush_l1d +bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit +bogomips : 4599.93 +clflush size : 64 +cache_alignment : 64 +address sizes : 39 bits physical, 48 bits virtual +power management: + +processor : 1 +vendor_id : GenuineIntel +cpu family : 6 +model : 142 +model name : Intel(R) Core(TM) i3-7020U CPU @ 2.30GHz +stepping : 9 +microcode : 0xca +cpu MHz : 2300.022 +cache size : 3072 KB +physical id : 0 +siblings : 4 +core id : 1 +cpu cores : 2 +apicid : 2 +initial apicid : 2 +fpu : yes +fpu_exception : yes +cpuid level : 22 +wp : yes +flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm arat pln pts hwp hwp_notify hwp_act_window hwp_epp flush_l1d +bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit +bogomips : 4599.93 +clflush size : 64 +cache_alignment : 64 +address sizes : 39 bits physical, 48 bits virtual +power management: + +processor : 2 +vendor_id : GenuineIntel +cpu family : 6 +model : 142 +model name : Intel(R) Core(TM) i3-7020U CPU @ 2.30GHz +stepping : 9 +microcode : 0xca +cpu MHz : 2299.999 +cache size : 3072 KB +physical id : 0 +siblings : 4 +core id : 0 +cpu cores : 2 +apicid : 1 +initial apicid : 1 +fpu : yes +fpu_exception : yes +cpuid level : 22 +wp : yes +flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_clear flush_l1d +bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit +bogomips : 4599.93 +clflush size : 64 +cache_alignment : 64 +address sizes : 39 bits physical, 48 bits virtual +power management: + +processor : 3 +vendor_id : GenuineIntel +cpu family : 6 +model : 142 +model name : Intel(R) Core(TM) i3-7020U CPU @ 2.30GHz +stepping : 9 +microcode : 0xca +cpu MHz : 2300.103 +cache size : 3072 KB +physical id : 0 +siblings : 4 +core id : 1 +cpu cores : 2 +apicid : 3 +initial apicid : 3 +fpu : yes +fpu_exception : yes +cpuid level : 22 +wp : yes +flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_clear flush_l1d +bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit +bogomips : 4599.93 +clflush size : 64 +cache_alignment : 64 +address sizes : 39 bits physical, 48 bits virtual +power management: + + + +Memory: 4k page, physical 12202288k(453200k free), swap 6836220k(6834876k free) + +vm_info: Java HotSpot(TM) 64-Bit Server VM (25.201-b09) for linux-amd64 JRE (1.8.0_201-b09), built on Dec 15 2018 11:35:59 by "java_re" with gcc 7.3.0 + +time: Thu Sep 15 12:07:39 2022 +timezone: CDT +elapsed time: 0 seconds (0d 0h 0m 0s) + diff --git a/HelloSerial4j/analysis of native error logs/example8/README.md b/HelloSerial4j/analysis of native error logs/example8/README.md new file mode 100644 index 00000000..e69de29b diff --git a/HelloSerial4j/analysis of native error logs/example8/hs_err_pid9756.log b/HelloSerial4j/analysis of native error logs/example8/hs_err_pid9756.log new file mode 100644 index 00000000..01f4e434 --- /dev/null +++ b/HelloSerial4j/analysis of native error logs/example8/hs_err_pid9756.log @@ -0,0 +1,625 @@ +# +# A fatal error has been detected by the Java Runtime Environment: +# +# SIGSEGV (0xb) at pc=0x00007f6444d91415, pid=9756, tid=0x00007f6444585700 +# +# JRE version: Java(TM) SE Runtime Environment (8.0_201-b09) (build 1.8.0_201-b09) +# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.201-b09 mixed mode linux-amd64 compressed oops) +# Problematic frame: +# V [libjvm.so+0x6c6415] jni_GetObjectClass+0x65 +# +# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again +# +# If you would like to submit a bug report, please visit: +# http://bugreport.java.com/bugreport/crash.jsp +# + +--------------- T H R E A D --------------- + +Current thread (0x00007f644000b000): JavaThread "main" [_thread_in_vm, id=9757, stack(0x00007f6444486000,0x00007f6444586000)] + +siginfo: si_signo: 11 (SIGSEGV), si_code: 1 (SEGV_MAPERR), si_addr: 0x0000000000000000 + +Registers: +RAX=0x0000000000000000, RBX=0x00007f644000b000, RCX=0x00007f6444d913b0, RDX=0x00007f64456883e9 +RSP=0x00007f6444584650, RBP=0x00007f6444584690, RSI=0x0000000000000000, RDI=0x00007f644000b000 +R8 =0x00007f644000b000, R9 =0x0000000000000004, R10=0x00007f642d0641c0, R11=0x00007f642d0679e6 +R12=0x00007f644000b1f8, R13=0x0000000000000000, R14=0x00007f6444584830, R15=0x00007f644000b000 +RIP=0x00007f6444d91415, EFLAGS=0x0000000000010246, CSGSFS=0x002b000000000033, ERR=0x0000000000000004 + TRAPNO=0x000000000000000e + +Top of Stack: (sp=0x00007f6444584650) +0x00007f6444584650: 00007f644000b000 0000000000000000 +0x00007f6444584660: 00007f642f259da0 00007f6444584830 +0x00007f6444584670: 00007f644000b1f8 0000000000000000 +0x00007f6444584680: 00007f642f259da0 00007f6444584830 +0x00007f6444584690: 00007f64445846b0 00007f642d0679a6 +0x00007f64445846a0: 0000000000000000 00007f644000b1f8 +0x00007f64445846b0: 00007f64445846d0 00007f642d066e8c +0x00007f64445846c0: 00007f64445846d0 00007f6444584780 +0x00007f64445846d0: 00007f6444584710 00007f642d066eb7 +0x00007f64445846e0: 00007f6444584830 00007f642d069049 +0x00007f64445846f0: 00007f642d069089 00007f6444584780 +0x00007f6444584700: 0000000000000902 00007f642f259da0 +0x00007f6444584710: 00007f6444584750 00007f642d066ff8 +0x00007f6444584720: 000000012f259da0 00007f642d069049 +0x00007f6444584730: 00007f642d069089 00007f6444584780 +0x00007f6444584740: 000009022f259da0 00007f6444584770 +0x00007f6444584750: 00007f6444584790 00007f642d06789f +0x00007f6444584760: 000009022f259da0 00007f6444584828 +0x00007f6444584770: 00007f6444584830 00007f644000b1f8 +0x00007f6444584780: 0000000000000000 0000000730de8543 +0x00007f6444584790: 00007f6444584800 00007f6430de86c7 +0x00007f64445847a0: 00007f6444584800 00007f6430de8419 +0x00007f64445847b0: fffffffe00000000 00007f6430de83e2 +0x00007f64445847c0: 00007f64445847c0 00007f642f259da0 +0x00007f64445847d0: 00007f6444584830 00007f642f259f38 +0x00007f64445847e0: 0000000000000000 00007f642f259da0 +0x00007f64445847f0: 0000000000000000 00007f6444584820 +0x00007f6444584800: 00007f6444584878 00007f6430dd7d00 +0x00007f6444584810: 0000000000000000 00007f6430de1d16 +0x00007f6444584820: 0000000000000902 0000000781f77df0 +0x00007f6444584830: 00000007820ec2e0 00007f6444584838 +0x00007f6444584840: 00007f642f25086d 00007f6444584898 + +Instructions: (pc=0x00007f6444d91415) +0x00007f6444d913f5: 08 00 48 89 5d c0 48 c7 45 c8 00 00 00 00 74 09 +0x00007f6444d91405: 48 8d 7d c0 e8 d2 7b 2a 00 48 8d 15 d4 6f 8f 00 +0x00007f6444d91415: 49 8b 45 00 80 3a 00 0f 84 96 00 00 00 48 8d 15 +0x00007f6444d91425: 77 29 8d 00 8b 40 08 8b 4a 08 48 d3 e0 48 03 02 + +Register to memory mapping: + +RAX=0x0000000000000000 is an unknown value +RBX=0x00007f644000b000 is a thread +RCX=0x00007f6444d913b0: in /home/twisted/jdk1.8.0_201/jre/lib/amd64/server/libjvm.so at 0x00007f64446cb000 +RDX=0x00007f64456883e9: in /home/twisted/jdk1.8.0_201/jre/lib/amd64/server/libjvm.so at 0x00007f64446cb000 +RSP=0x00007f6444584650 is pointing into the stack for thread: 0x00007f644000b000 +RBP=0x00007f6444584690 is pointing into the stack for thread: 0x00007f644000b000 +RSI=0x0000000000000000 is an unknown value +RDI=0x00007f644000b000 is a thread +R8 =0x00007f644000b000 is a thread +R9 =0x0000000000000004 is an unknown value +R10=0x00007f642d0641c0: in /home/twisted/GradleProjects/AVR-Sandbox/HelloSerial4j/output/serial4j/libserial4j.so at 0x00007f642d063000 +R11=0x00007f642d0679e6: _ZN7JNIEnv_14GetObjectFieldEP8_jobjectP9_jfieldID+0 in /home/twisted/GradleProjects/AVR-Sandbox/HelloSerial4j/output/serial4j/libserial4j.so at 0x00007f642d063000 +R12=0x00007f644000b1f8 is an unknown value +R13=0x0000000000000000 is an unknown value +R14=0x00007f6444584830 is pointing into the stack for thread: 0x00007f644000b000 +R15=0x00007f644000b000 is a thread + + +Stack: [0x00007f6444486000,0x00007f6444586000], sp=0x00007f6444584650, free space=1017k +Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) +V [libjvm.so+0x6c6415] jni_GetObjectClass+0x65 +C [libserial4j.so+0x49a6] JNIEnv_::GetObjectClass(_jobject*)+0x2e +C [libserial4j.so+0x3e8c] +C [libserial4j.so+0x3eb7] +C [libserial4j.so+0x3ff8] +C [libserial4j.so+0x489f] Java_com_serial4j_core_serial_NativeTerminalDevice_openPort0+0x75 +j com.serial4j.core.serial.NativeTerminalDevice.openPort0(Ljava/lang/String;I)I+0 +j com.serial4j.core.serial.TerminalDevice.openPort(Lcom/serial4j/core/serial/SerialPort;)V+53 +j com.serial4j.core.serial.monitor.SerialMonitor.startDataMonitoring(Ljava/lang/String;Lcom/serial4j/core/serial/BaudRate;Lcom/serial4j/core/serial/Permissions;)V+49 +j com.serial4j.example.monitor.HelloSerialMonitor.run()V+25 +j com.serial4j.example.Launcher.main([Ljava/lang/String;)V+9 +v ~StubRoutines::call_stub +V [libjvm.so+0x68825b] JavaCalls::call_helper(JavaValue*, methodHandle*, JavaCallArguments*, Thread*)+0xddb +V [libjvm.so+0x6d3211] jni_invoke_static(JNIEnv_*, JavaValue*, _jobject*, JNICallType, _jmethodID*, JNI_ArgumentPusher*, Thread*) [clone .isra.96] [clone .constprop.117]+0x1e1 +V [libjvm.so+0x6d54db] jni_CallStaticVoidMethod+0x15b +C [libjli.so+0x889c] JavaMain+0xa3c +C [libpthread.so.0+0x8f27] start_thread+0xd7 + +Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) +j com.serial4j.core.serial.NativeTerminalDevice.openPort0(Ljava/lang/String;I)I+0 +j com.serial4j.core.serial.TerminalDevice.openPort(Lcom/serial4j/core/serial/SerialPort;)V+53 +j com.serial4j.core.serial.monitor.SerialMonitor.startDataMonitoring(Ljava/lang/String;Lcom/serial4j/core/serial/BaudRate;Lcom/serial4j/core/serial/Permissions;)V+49 +j com.serial4j.example.monitor.HelloSerialMonitor.run()V+25 +j com.serial4j.example.Launcher.main([Ljava/lang/String;)V+9 +v ~StubRoutines::call_stub + +--------------- P R O C E S S --------------- + +Java Threads: ( => current thread ) + 0x00007f6440195000 JavaThread "Service Thread" daemon [_thread_blocked, id=9769, stack(0x00007f642d16e000,0x00007f642d26f000)] + 0x00007f644018a000 JavaThread "C1 CompilerThread2" daemon [_thread_blocked, id=9768, stack(0x00007f642d270000,0x00007f642d370000)] + 0x00007f6440188000 JavaThread "C2 CompilerThread1" daemon [_thread_blocked, id=9767, stack(0x00007f642d371000,0x00007f642d471000)] + 0x00007f6440185000 JavaThread "C2 CompilerThread0" daemon [_thread_blocked, id=9766, stack(0x00007f642d472000,0x00007f642d572000)] + 0x00007f6440184000 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=9765, stack(0x00007f642d572000,0x00007f642d673000)] + 0x00007f644014c800 JavaThread "Finalizer" daemon [_thread_blocked, id=9764, stack(0x00007f642d93e000,0x00007f642da3f000)] + 0x00007f644014a000 JavaThread "Reference Handler" daemon [_thread_blocked, id=9763, stack(0x00007f642da3f000,0x00007f642db40000)] +=>0x00007f644000b000 JavaThread "main" [_thread_in_vm, id=9757, stack(0x00007f6444486000,0x00007f6444586000)] + +Other Threads: + 0x00007f6440140000 VMThread [stack: 0x00007f642db41000,0x00007f642dc41000] [id=9762] + 0x00007f6440197800 WatcherThread [stack: 0x00007f642d06e000,0x00007f642d16e000] [id=9770] + +VM state:not at safepoint (normal execution) + +VM Mutex/Monitor currently owned by a thread: None + +heap address: 0x0000000705c00000, size: 2980 MB, Compressed Oops mode: Zero based, Oop shift amount: 3 +Narrow klass base: 0x0000000000000000, Narrow klass shift: 3 +Compressed class space size: 1073741824 Address: 0x00000007c0000000 + +Heap: + PSYoungGen total 56320K, used 2918K [0x0000000781f00000, 0x0000000785d80000, 0x00000007c0000000) + eden space 48640K, 6% used [0x0000000781f00000,0x00000007821d99b8,0x0000000784e80000) + from space 7680K, 0% used [0x0000000785600000,0x0000000785600000,0x0000000785d80000) + to space 7680K, 0% used [0x0000000784e80000,0x0000000784e80000,0x0000000785600000) + ParOldGen total 128512K, used 0K [0x0000000705c00000, 0x000000070d980000, 0x0000000781f00000) + object space 128512K, 0% used [0x0000000705c00000,0x0000000705c00000,0x000000070d980000) + Metaspace used 3907K, capacity 4672K, committed 4864K, reserved 1056768K + class space used 443K, capacity 496K, committed 512K, reserved 1048576K + +Card table byte_map: [0x00007f643043d000,0x00007f6430a10000] byte_map_base: 0x00007f642cc0f000 + +Marking Bits: (ParMarkBitMap*) 0x00007f6445696d80 + Begin Bits: [0x00007f641a2e0000, 0x00007f641d170000) + End Bits: [0x00007f641d170000, 0x00007f6420000000) + +Polling page: 0x00007f6445afd000 + +CodeCache: size=245760Kb used=1263Kb max_used=1263Kb free=244496Kb + bounds [0x00007f6430dd0000, 0x00007f6431040000, 0x00007f643fdd0000] + total_blobs=343 nmethods=89 adapters=168 + compilation: enabled + +Compilation events (10 events): +Event: 0.134 Thread 0x00007f644018a000 nmethod 77 0x00007f6430f07ed0 code [0x00007f6430f08040, 0x00007f6430f08230] +Event: 0.134 Thread 0x00007f644018a000 83 3 sun.util.locale.LocaleUtils::isUpper (18 bytes) +Event: 0.134 Thread 0x00007f644018a000 nmethod 83 0x00007f6430f08290 code [0x00007f6430f08400, 0x00007f6430f085d0] +Event: 0.135 Thread 0x00007f6440185000 84 4 java.lang.String::hashCode (55 bytes) +Event: 0.136 Thread 0x00007f644018a000 86 3 java.util.concurrent.ConcurrentHashMap::spread (10 bytes) +Event: 0.136 Thread 0x00007f644018a000 nmethod 86 0x00007f6430f08a10 code [0x00007f6430f08b60, 0x00007f6430f08cb0] +Event: 0.137 Thread 0x00007f644018a000 87 3 java.util.concurrent.ConcurrentHashMap::casTabAt (20 bytes) +Event: 0.137 Thread 0x00007f6440185000 nmethod 84 0x00007f6430f0ba90 code [0x00007f6430f0bbe0, 0x00007f6430f0bd58] +Event: 0.137 Thread 0x00007f644018a000 nmethod 87 0x00007f6430f0b710 code [0x00007f6430f0b860, 0x00007f6430f0b9f0] +Event: 0.137 Thread 0x00007f644018a000 89 ! 3 java.util.concurrent.ConcurrentHashMap::putVal (362 bytes) + +GC Heap History (0 events): +No events + +Deoptimization events (0 events): +No events + +Classes redefined (0 events): +No events + +Internal exceptions (6 events): +Event: 0.051 Thread 0x00007f644000b000 Exception (0x0000000781f07cb0) thrown at [/HUDSON/workspace/8-2-build-linux-amd64/jdk8u201/12317/hotspot/src/sh +Event: 0.051 Thread 0x00007f644000b000 Exception (0x0000000781f07f98) thrown at [/HUDSON/workspace/8-2-build-linux-amd64/jdk8u201/12317/hotspot/src/share/vm/prims/jni.c +Event: 0.109 Thread 0x00007f644000b000 Exception (0x0000000781fcf2d8) thrown at [/HUDSON/workspace/8-2-build-linux-amd64/jdk8u201/12317/hotspot/src/share/vm/prims/jvm.cpp, line 1502] +Event: 0.109 Thread 0x00007f644000b000 Exception (0x0000000781fcf4e8) thrown at [/HUDSON/workspace/8-2-build-linux-amd64/jdk8u201/12317/hotspot/src/share/vm/prims/jvm.cpp, line 1502] +Event: 0.109 Thread 0x00007f644000b000 Exception (0x0000000781fd1950) thrown at [/HUDSON/workspace/8-2-build-linux-amd64/jdk8u201/12317/hotspot/src/share/vm/prims/jvm.cpp, line 1502] +Event: 0.109 Thread 0x00007f644000b000 Exception (0x0000000781fd1b60) thrown at [/HUDSON/workspace/8-2-build-linux-amd64/jdk8u201/12317/hotspot/src/share/vm/prims/jvm.cpp, line 1502] + +Events (10 events): +Event: 0.136 loading class java/util/concurrent/atomic/AtomicMarkableReference$Pair +Event: 0.136 loading class java/util/concurrent/atomic/AtomicMarkableReference$Pair done +Event: 0.136 loading class sun/text/resources/en/FormatData_en +Event: 0.136 loading class sun/text/resources/en/FormatData_en done +Event: 0.136 loading class sun/text/resources/en/FormatData_en_US +Event: 0.136 loading class sun/text/resources/en/FormatData_en_US done +Event: 0.136 loading class sun/util/resources/ParallelListResourceBundle$KeySet +Event: 0.136 loading class sun/util/resources/ParallelListResourceBundle$KeySet done +Event: 0.137 loading class java/util/Formattable +Event: 0.137 loading class java/util/Formattable done + + +Dynamic libraries: +00400000-00401000 r-xp 00000000 08:0b 8396377 /home/twisted/jdk1.8.0_201/bin/java +00600000-00601000 r--p 00000000 08:0b 8396377 /home/twisted/jdk1.8.0_201/bin/java +00601000-00602000 rw-p 00001000 08:0b 8396377 /home/twisted/jdk1.8.0_201/bin/java +02494000-024b5000 rw-p 00000000 00:00 0 [heap] +705c00000-70d980000 rw-p 00000000 00:00 0 +70d980000-781f00000 ---p 00000000 00:00 0 +781f00000-785d80000 rw-p 00000000 00:00 0 +785d80000-7c0000000 ---p 00000000 00:00 0 +7c0000000-7c0080000 rw-p 00000000 00:00 0 +7c0080000-800000000 ---p 00000000 00:00 0 +7f63ec000000-7f63ec021000 rw-p 00000000 00:00 0 +7f63ec021000-7f63f0000000 ---p 00000000 00:00 0 +7f63f4000000-7f63f4076000 rw-p 00000000 00:00 0 +7f63f4076000-7f63f8000000 ---p 00000000 00:00 0 +7f63f8000000-7f63f8021000 rw-p 00000000 00:00 0 +7f63f8021000-7f63fc000000 ---p 00000000 00:00 0 +7f63fc000000-7f63fc046000 rw-p 00000000 00:00 0 +7f63fc046000-7f6400000000 ---p 00000000 00:00 0 +7f6400000000-7f6400021000 rw-p 00000000 00:00 0 +7f6400021000-7f6404000000 ---p 00000000 00:00 0 +7f6404000000-7f6404021000 rw-p 00000000 00:00 0 +7f6404021000-7f6408000000 ---p 00000000 00:00 0 +7f6408000000-7f6408021000 rw-p 00000000 00:00 0 +7f6408021000-7f640c000000 ---p 00000000 00:00 0 +7f640c000000-7f640c021000 rw-p 00000000 00:00 0 +7f640c021000-7f6410000000 ---p 00000000 00:00 0 +7f6410000000-7f6410021000 rw-p 00000000 00:00 0 +7f6410021000-7f6414000000 ---p 00000000 00:00 0 +7f6414000000-7f6414021000 rw-p 00000000 00:00 0 +7f6414021000-7f6418000000 ---p 00000000 00:00 0 +7f641a2e0000-7f6420000000 rw-p 00000000 00:00 0 +7f6420000000-7f6420021000 rw-p 00000000 00:00 0 +7f6420021000-7f6424000000 ---p 00000000 00:00 0 +7f6424000000-7f6424021000 rw-p 00000000 00:00 0 +7f6424021000-7f6428000000 ---p 00000000 00:00 0 +7f6428000000-7f6428021000 rw-p 00000000 00:00 0 +7f6428021000-7f642c000000 ---p 00000000 00:00 0 +7f642cda8000-7f642d03d000 rw-p 00000000 00:00 0 +7f642d03d000-7f642d047000 r--s 00116000 08:0b 8782276 /home/twisted/jdk1.8.0_201/jre/lib/ext/localedata.jar +7f642d047000-7f642d063000 r--s 00393000 08:0b 8782269 /home/twisted/jdk1.8.0_201/jre/lib/ext/cldrdata.jar +7f642d063000-7f642d066000 r--p 00000000 08:0b 8520060 /home/twisted/GradleProjects/AVR-Sandbox/HelloSerial4j/output/serial4j/libserial4j.so +7f642d066000-7f642d069000 r-xp 00003000 08:0b 8520060 /home/twisted/GradleProjects/AVR-Sandbox/HelloSerial4j/output/serial4j/libserial4j.so +7f642d069000-7f642d06b000 r--p 00006000 08:0b 8520060 /home/twisted/GradleProjects/AVR-Sandbox/HelloSerial4j/output/serial4j/libserial4j.so +7f642d06b000-7f642d06c000 r--p 00007000 08:0b 8520060 /home/twisted/GradleProjects/AVR-Sandbox/HelloSerial4j/output/serial4j/libserial4j.so +7f642d06c000-7f642d06d000 rw-p 00008000 08:0b 8520060 /home/twisted/GradleProjects/AVR-Sandbox/HelloSerial4j/output/serial4j/libserial4j.so +7f642d06d000-7f642d06e000 ---p 00000000 00:00 0 +7f642d06e000-7f642d16e000 rw-p 00000000 00:00 0 +7f642d16e000-7f642d171000 ---p 00000000 00:00 0 +7f642d171000-7f642d26f000 rw-p 00000000 00:00 0 +7f642d26f000-7f642d270000 ---p 00000000 00:00 0 +7f642d270000-7f642d273000 ---p 00000000 00:00 0 +7f642d273000-7f642d370000 rw-p 00000000 00:00 0 +7f642d370000-7f642d371000 ---p 00000000 00:00 0 +7f642d371000-7f642d374000 ---p 00000000 00:00 0 +7f642d374000-7f642d471000 rw-p 00000000 00:00 0 +7f642d471000-7f642d472000 ---p 00000000 00:00 0 +7f642d472000-7f642d475000 ---p 00000000 00:00 0 +7f642d475000-7f642d572000 rw-p 00000000 00:00 0 +7f642d572000-7f642d575000 ---p 00000000 00:00 0 +7f642d575000-7f642d673000 rw-p 00000000 00:00 0 +7f642d673000-7f642d6c6000 r--p 00000000 08:0a 4328904 /usr/lib/locale/aa_DJ.utf8/LC_CTYPE +7f642d6c6000-7f642d93e000 r--p 00000000 08:0a 4328903 /usr/lib/locale/aa_DJ.utf8/LC_COLLATE +7f642d93e000-7f642d941000 ---p 00000000 00:00 0 +7f642d941000-7f642da3f000 rw-p 00000000 00:00 0 +7f642da3f000-7f642da42000 ---p 00000000 00:00 0 +7f642da42000-7f642db40000 rw-p 00000000 00:00 0 +7f642db40000-7f642db41000 ---p 00000000 00:00 0 +7f642db41000-7f642eb9f000 rw-p 00000000 00:00 0 +7f642eb9f000-7f642ed79000 r--s 03d6f000 08:0b 8543644 /home/twisted/jdk1.8.0_201/jre/lib/rt.jar +7f642ed79000-7f642f28a000 rw-p 00000000 00:00 0 +7f642f28a000-7f642f64a000 ---p 00000000 00:00 0 +7f642f64a000-7f642fc57000 rw-p 00000000 00:00 0 +7f642fc57000-7f642fc58000 ---p 00000000 00:00 0 +7f642fc58000-7f642fd58000 rw-p 00000000 00:00 0 +7f642fd58000-7f642fd59000 ---p 00000000 00:00 0 +7f642fd59000-7f642fe59000 rw-p 00000000 00:00 0 +7f642fe59000-7f642fe5a000 ---p 00000000 00:00 0 +7f642fe5a000-7f642ff5a000 rw-p 00000000 00:00 0 +7f642ff5a000-7f642ff5b000 ---p 00000000 00:00 0 +7f642ff5b000-7f643009a000 rw-p 00000000 00:00 0 +7f643009a000-7f643043d000 ---p 00000000 00:00 0 +7f643043d000-7f643047c000 rw-p 00000000 00:00 0 +7f643047c000-7f643081e000 ---p 00000000 00:00 0 +7f643081e000-7f643083e000 rw-p 00000000 00:00 0 +7f643083e000-7f6430a0f000 ---p 00000000 00:00 0 +7f6430a0f000-7f6430a1a000 rw-p 00000000 00:00 0 +7f6430a1a000-7f6430dd0000 ---p 00000000 00:00 0 +7f6430dd0000-7f6431040000 rwxp 00000000 00:00 0 +7f6431040000-7f643fdd0000 ---p 00000000 00:00 0 +7f643fdd0000-7f643fdeb000 r-xp 00000000 08:0b 8782383 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libzip.so +7f643fdeb000-7f643ffea000 ---p 0001b000 08:0b 8782383 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libzip.so +7f643ffea000-7f643ffeb000 r--p 0001a000 08:0b 8782383 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libzip.so +7f643ffeb000-7f643ffec000 rw-p 0001b000 08:0b 8782383 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libzip.so +7f643ffec000-7f643ffef000 r--p 00000000 08:0a 4334780 /usr/lib/x86_64-linux-gnu/libnss_files-2.30.so +7f643ffef000-7f643fff6000 r-xp 00003000 08:0a 4334780 /usr/lib/x86_64-linux-gnu/libnss_files-2.30.so +7f643fff6000-7f643fff8000 r--p 0000a000 08:0a 4334780 /usr/lib/x86_64-linux-gnu/libnss_files-2.30.so +7f643fff8000-7f643fff9000 r--p 0000b000 08:0a 4334780 /usr/lib/x86_64-linux-gnu/libnss_files-2.30.so +7f643fff9000-7f643fffa000 rw-p 0000c000 08:0a 4334780 /usr/lib/x86_64-linux-gnu/libnss_files-2.30.so +7f643fffa000-7f6440000000 rw-p 00000000 00:00 0 +7f6440000000-7f644026c000 rw-p 00000000 00:00 0 +7f644026c000-7f6444000000 ---p 00000000 00:00 0 +7f6444005000-7f644400a000 r--p 00000000 08:0a 4334771 /usr/lib/x86_64-linux-gnu/libnsl-2.30.so +7f644400a000-7f6444017000 r-xp 00005000 08:0a 4334771 /usr/lib/x86_64-linux-gnu/libnsl-2.30.so +7f6444017000-7f644401b000 r--p 00012000 08:0a 4334771 /usr/lib/x86_64-linux-gnu/libnsl-2.30.so +7f644401b000-7f644401c000 r--p 00015000 08:0a 4334771 /usr/lib/x86_64-linux-gnu/libnsl-2.30.so +7f644401c000-7f644401d000 rw-p 00016000 08:0a 4334771 /usr/lib/x86_64-linux-gnu/libnsl-2.30.so +7f644401d000-7f644401f000 rw-p 00000000 00:00 0 +7f6444024000-7f6444026000 r--s 0000e000 08:0b 8524537 /home/twisted/GradleProjects/AVR-Sandbox/HelloSerial4j/output/serial4j/serial4j.jar +7f6444026000-7f6444027000 r--p 00000000 08:0a 4328933 /usr/lib/locale/aa_ET/LC_NUMERIC +7f6444027000-7f6444028000 r--p 00000000 08:0a 4330095 /usr/lib/locale/en_US.utf8/LC_TIME +7f6444028000-7f6444029000 r--p 00000000 08:0a 4329578 /usr/lib/locale/chr_US/LC_MONETARY +7f6444029000-7f644402a000 r--p 00000000 08:0a 4329874 /usr/lib/locale/en_AG/LC_MESSAGES/SYS_LC_MESSAGES +7f644402a000-7f644402b000 r--p 00000000 08:0a 4329579 /usr/lib/locale/chr_US/LC_PAPER +7f644402b000-7f644402c000 r--p 00000000 08:0a 4329410 /usr/lib/locale/bi_VU/LC_NAME +7f644402c000-7f644402d000 r--p 00000000 08:0a 4330092 /usr/lib/locale/en_US.utf8/LC_ADDRESS +7f644402d000-7f6444034000 r--s 00000000 08:0a 4332592 /usr/lib/x86_64-linux-gnu/gconv/gconv-modules.cache +7f6444034000-7f644403c000 rw-s 00000000 08:0a 2105276 /tmp/hsperfdata_pavl-machine/9756 +7f644403c000-7f6444068000 r-xp 00000000 08:0b 8782377 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libjava.so +7f6444068000-7f6444268000 ---p 0002c000 08:0b 8782377 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libjava.so +7f6444268000-7f6444269000 r--p 0002c000 08:0b 8782377 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libjava.so +7f6444269000-7f644426b000 rw-p 0002d000 08:0b 8782377 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libjava.so +7f644426b000-7f6444278000 r-xp 00000000 08:0b 8782382 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libverify.so +7f6444278000-7f6444477000 ---p 0000d000 08:0b 8782382 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libverify.so +7f6444477000-7f6444479000 r--p 0000c000 08:0b 8782382 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libverify.so +7f6444479000-7f644447a000 rw-p 0000e000 08:0b 8782382 /home/twisted/jdk1.8.0_201/jre/lib/amd64/libverify.so +7f644447a000-7f644447d000 r--p 00000000 08:0a 4335156 /usr/lib/x86_64-linux-gnu/librt-2.30.so +7f644447d000-7f6444481000 r-xp 00003000 08:0a 4335156 /usr/lib/x86_64-linux-gnu/librt-2.30.so +7f6444481000-7f6444483000 r--p 00007000 08:0a 4335156 /usr/lib/x86_64-linux-gnu/librt-2.30.so +7f6444483000-7f6444484000 r--p 00008000 08:0a 4335156 /usr/lib/x86_64-linux-gnu/librt-2.30.so +7f6444484000-7f6444485000 rw-p 00009000 08:0a 4335156 /usr/lib/x86_64-linux-gnu/librt-2.30.so +7f6444485000-7f6444486000 ---p 00000000 00:00 0 +7f6444486000-7f6444489000 ---p 00000000 00:00 0 +7f6444489000-7f6444586000 rw-p 00000000 00:00 0 +7f6444586000-7f6444595000 r--p 00000000 08:0a 4334559 /usr/lib/x86_64-linux-gnu/libm-2.30.so +7f6444595000-7f6444630000 r-xp 0000f000 08:0a 4334559 /usr/lib/x86_64-linux-gnu/libm-2.30.so +7f6444630000-7f64446c9000 r--p 000aa000 08:0a 4334559 /usr/lib/x86_64-linux-gnu/libm-2.30.so +7f64446c9000-7f64446ca000 r--p 00142000 08:0a 4334559 /usr/lib/x86_64-linux-gnu/libm-2.30.so +7f64446ca000-7f64446cb000 rw-p 00143000 08:0a 4334559 /usr/lib/x86_64-linux-gnu/libm-2.30.so +7f64446cb000-7f64453b3000 r-xp 00000000 08:0b 8782359 /home/twisted/jdk1.8.0_201/jre/lib/amd64/server/libjvm.so +7f64453b3000-7f64455b2000 ---p 00ce8000 08:0b 8782359 /home/twisted/jdk1.8.0_201/jre/lib/amd64/server/libjvm.so +7f64455b2000-7f6445648000 r--p 00ce7000 08:0b 8782359 /home/twisted/jdk1.8.0_201/jre/lib/amd64/server/libjvm.so +7f6445648000-7f6445679000 rw-p 00d7d000 08:0b 8782359 /home/twisted/jdk1.8.0_201/jre/lib/amd64/server/libjvm.so +7f6445679000-7f64456b6000 rw-p 00000000 00:00 0 +7f64456b6000-7f64456db000 r--p 00000000 08:0a 4333575 /usr/lib/x86_64-linux-gnu/libc-2.30.so +7f64456db000-7f6445825000 r-xp 00025000 08:0a 4333575 /usr/lib/x86_64-linux-gnu/libc-2.30.so +7f6445825000-7f644586f000 r--p 0016f000 08:0a 4333575 /usr/lib/x86_64-linux-gnu/libc-2.30.so +7f644586f000-7f6445872000 r--p 001b8000 08:0a 4333575 /usr/lib/x86_64-linux-gnu/libc-2.30.so +7f6445872000-7f6445875000 rw-p 001bb000 08:0a 4333575 /usr/lib/x86_64-linux-gnu/libc-2.30.so +7f6445875000-7f6445879000 rw-p 00000000 00:00 0 +7f6445879000-7f644587a000 r--p 00000000 08:0a 4333777 /usr/lib/x86_64-linux-gnu/libdl-2.30.so +7f644587a000-7f644587b000 r-xp 00001000 08:0a 4333777 /usr/lib/x86_64-linux-gnu/libdl-2.30.so +7f644587b000-7f644587c000 r--p 00002000 08:0a 4333777 /usr/lib/x86_64-linux-gnu/libdl-2.30.so +7f644587c000-7f644587d000 r--p 00002000 08:0a 4333777 /usr/lib/x86_64-linux-gnu/libdl-2.30.so +7f644587d000-7f644587e000 rw-p 00003000 08:0a 4333777 /usr/lib/x86_64-linux-gnu/libdl-2.30.so +7f644587e000-7f6445895000 r-xp 00000000 08:0b 8543590 /home/twisted/jdk1.8.0_201/lib/amd64/jli/libjli.so +7f6445895000-7f6445a94000 ---p 00017000 08:0b 8543590 /home/twisted/jdk1.8.0_201/lib/amd64/jli/libjli.so +7f6445a94000-7f6445a95000 r--p 00016000 08:0b 8543590 /home/twisted/jdk1.8.0_201/lib/amd64/jli/libjli.so +7f6445a95000-7f6445a96000 rw-p 00017000 08:0b 8543590 /home/twisted/jdk1.8.0_201/lib/amd64/jli/libjli.so +7f6445a96000-7f6445a9d000 r--p 00000000 08:0a 4335024 /usr/lib/x86_64-linux-gnu/libpthread-2.30.so +7f6445a9d000-7f6445aac000 r-xp 00007000 08:0a 4335024 /usr/lib/x86_64-linux-gnu/libpthread-2.30.so +7f6445aac000-7f6445ab1000 r--p 00016000 08:0a 4335024 /usr/lib/x86_64-linux-gnu/libpthread-2.30.so +7f6445ab1000-7f6445ab2000 r--p 0001a000 08:0a 4335024 /usr/lib/x86_64-linux-gnu/libpthread-2.30.so +7f6445ab2000-7f6445ab3000 rw-p 0001b000 08:0a 4335024 /usr/lib/x86_64-linux-gnu/libpthread-2.30.so +7f6445ab3000-7f6445ab9000 rw-p 00000000 00:00 0 +7f6445ab9000-7f6445aba000 r--p 00000000 08:0a 4329580 /usr/lib/locale/chr_US/LC_TELEPHONE +7f6445aba000-7f6445abb000 r--p 00000000 08:0a 4329575 /usr/lib/locale/chr_US/LC_MEASUREMENT +7f6445abb000-7f6445abc000 r--p 00000000 08:0a 4330093 /usr/lib/locale/en_US.utf8/LC_IDENTIFICATION +7f6445abc000-7f6445abf000 r--p 00000000 08:0a 4334790 /usr/lib/x86_64-linux-gnu/libnss_nis-2.30.so +7f6445abf000-7f6445ac6000 r-xp 00003000 08:0a 4334790 /usr/lib/x86_64-linux-gnu/libnss_nis-2.30.so +7f6445ac6000-7f6445ac8000 r--p 0000a000 08:0a 4334790 /usr/lib/x86_64-linux-gnu/libnss_nis-2.30.so +7f6445ac8000-7f6445ac9000 r--p 0000b000 08:0a 4334790 /usr/lib/x86_64-linux-gnu/libnss_nis-2.30.so +7f6445ac9000-7f6445aca000 rw-p 0000c000 08:0a 4334790 /usr/lib/x86_64-linux-gnu/libnss_nis-2.30.so +7f6445aca000-7f6445acc000 r--p 00000000 08:0a 4334776 /usr/lib/x86_64-linux-gnu/libnss_compat-2.30.so +7f6445acc000-7f6445ad1000 r-xp 00002000 08:0a 4334776 /usr/lib/x86_64-linux-gnu/libnss_compat-2.30.so +7f6445ad1000-7f6445ad2000 r--p 00007000 08:0a 4334776 /usr/lib/x86_64-linux-gnu/libnss_compat-2.30.so +7f6445ad2000-7f6445ad3000 ---p 00008000 08:0a 4334776 /usr/lib/x86_64-linux-gnu/libnss_compat-2.30.so +7f6445ad3000-7f6445ad4000 r--p 00008000 08:0a 4334776 /usr/lib/x86_64-linux-gnu/libnss_compat-2.30.so +7f6445ad4000-7f6445ad5000 rw-p 00009000 08:0a 4334776 /usr/lib/x86_64-linux-gnu/libnss_compat-2.30.so +7f6445ad5000-7f6445ad6000 rw-p 00000000 00:00 0 +7f6445ad6000-7f6445ad7000 r--p 00000000 08:0a 4333008 /usr/lib/x86_64-linux-gnu/ld-2.30.so +7f6445ad7000-7f6445af5000 r-xp 00001000 08:0a 4333008 /usr/lib/x86_64-linux-gnu/ld-2.30.so +7f6445af5000-7f6445afd000 r--p 0001f000 08:0a 4333008 /usr/lib/x86_64-linux-gnu/ld-2.30.so +7f6445afd000-7f6445afe000 r--p 00000000 00:00 0 +7f6445afe000-7f6445aff000 r--p 00027000 08:0a 4333008 /usr/lib/x86_64-linux-gnu/ld-2.30.so +7f6445aff000-7f6445b00000 rw-p 00028000 08:0a 4333008 /usr/lib/x86_64-linux-gnu/ld-2.30.so +7f6445b00000-7f6445b01000 rw-p 00000000 00:00 0 +7ffc3486c000-7ffc3488d000 rw-p 00000000 00:00 0 [stack] +7ffc348e7000-7ffc348ea000 r--p 00000000 00:00 0 [vvar] +7ffc348ea000-7ffc348eb000 r-xp 00000000 00:00 0 [vdso] + +VM Arguments: +java_command: serial4j.jar +java_class_path (initial): serial4j.jar +Launcher Type: SUN_STANDARD + +Environment Variables: +JAVA_HOME=/home/twisted/jdk1.8.0_201 +PATH=/home/pavl-machine/.local/bin:/snap/bin:/usr/sandbox/:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/usr/share/games:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games +SHELL=/bin/bash +DISPLAY=:0 + +Signal Handlers: +SIGSEGV: [libjvm.so+0xad3e60], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO +SIGBUS: [libjvm.so+0xad3e60], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO +SIGFPE: [libjvm.so+0x90b880], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO +SIGPIPE: [libjvm.so+0x90b880], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO +SIGXFSZ: [libjvm.so+0x90b880], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO +SIGILL: [libjvm.so+0x90b880], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO +SIGUSR1: SIG_DFL, sa_mask[0]=00000000000000000000000000000000, sa_flags=none +SIGUSR2: [libjvm.so+0x90b750], sa_mask[0]=00000000000000000000000000000000, sa_flags=SA_RESTART|SA_SIGINFO +SIGHUP: [libjvm.so+0x90bd70], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO +SIGINT: [libjvm.so+0x90bd70], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO +SIGTERM: [libjvm.so+0x90bd70], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO +SIGQUIT: [libjvm.so+0x90bd70], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO + + +--------------- S Y S T E M --------------- + +OS:DISTRIB_ID=Parrot +DISTRIB_RELEASE=4.9 +DISTRIB_CODENAME=rolling +DISTRIB_DESCRIPTION="Parrot 4.9" + +uname:Linux 5.5.0-1parrot1-amd64 #1 SMP Parrot 5.5.17-1parrot1 (2020-04-25) x86_64 +libc:glibc 2.30 NPTL 2.30 +rlimit: STACK 8192k, CORE 0k, NPROC 47123, NOFILE 1048576, AS infinity +load average:1.75 1.26 1.16 + +/proc/meminfo: +MemTotal: 12202280 kB +MemFree: 9242812 kB +MemAvailable: 10111312 kB +Buffers: 119324 kB +Cached: 1184352 kB +SwapCached: 0 kB +Active: 1745600 kB +Inactive: 722128 kB +Active(anon): 1297588 kB +Inactive(anon): 105984 kB +Active(file): 448012 kB +Inactive(file): 616144 kB +Unevictable: 189144 kB +Mlocked: 48 kB +SwapTotal: 6836220 kB +SwapFree: 6836220 kB +Dirty: 4512 kB +Writeback: 0 kB +AnonPages: 1291572 kB +Mapped: 412164 kB +Shmem: 310080 kB +KReclaimable: 85848 kB +Slab: 188192 kB +SReclaimable: 85848 kB +SUnreclaim: 102344 kB +KernelStack: 7952 kB +PageTables: 18964 kB +NFS_Unstable: 0 kB +Bounce: 0 kB +WritebackTmp: 0 kB +CommitLimit: 12937360 kB +Committed_AS: 5247060 kB +VmallocTotal: 34359738367 kB +VmallocUsed: 39544 kB +VmallocChunk: 0 kB +Percpu: 2960 kB +HardwareCorrupted: 0 kB +AnonHugePages: 366592 kB +ShmemHugePages: 0 kB +ShmemPmdMapped: 0 kB +FileHugePages: 0 kB +FilePmdMapped: 0 kB +HugePages_Total: 0 +HugePages_Free: 0 +HugePages_Rsvd: 0 +HugePages_Surp: 0 +Hugepagesize: 2048 kB +Hugetlb: 0 kB +DirectMap4k: 190740 kB +DirectMap2M: 4915200 kB +DirectMap1G: 8388608 kB + +container (cgroup) information: +container_type: cgroupv1 +cpu_cpuset_cpus: 0-3 +cpu_memory_nodes: 0 +active_processor_count: 4 +cpu_quota: -1 +cpu_period: 100000 +cpu_shares: -1 +memory_limit_in_bytes: -1 +memory_and_swap_limit_in_bytes: -2 +memory_soft_limit_in_bytes: -1 +memory_usage_in_bytes: 377368576 +memory_max_usage_in_bytes: 380936192 + + +CPU:total 4 (initial active 4) (2 cores per cpu, 2 threads per core) family 6 model 142 stepping 9, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, avx, avx2, aes, clmul, erms, 3dnowpref, lzcnt, ht, tsc, tscinvbit, bmi1, bmi2, adx + +/proc/cpuinfo: +processor : 0 +vendor_id : GenuineIntel +cpu family : 6 +model : 142 +model name : Intel(R) Core(TM) i3-7020U CPU @ 2.30GHz +stepping : 9 +microcode : 0xca +cpu MHz : 2300.000 +cache size : 3072 KB +physical id : 0 +siblings : 4 +core id : 0 +cpu cores : 2 +apicid : 0 +initial apicid : 0 +fpu : yes +fpu_exception : yes +cpuid level : 22 +wp : yes +flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_clear flush_l1d +bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit +bogomips : 4599.93 +clflush size : 64 +cache_alignment : 64 +address sizes : 39 bits physical, 48 bits virtual +power management: + +processor : 1 +vendor_id : GenuineIntel +cpu family : 6 +model : 142 +model name : Intel(R) Core(TM) i3-7020U CPU @ 2.30GHz +stepping : 9 +microcode : 0xca +cpu MHz : 2300.013 +cache size : 3072 KB +physical id : 0 +siblings : 4 +core id : 1 +cpu cores : 2 +apicid : 2 +initial apicid : 2 +fpu : yes +fpu_exception : yes +cpuid level : 22 +wp : yes +flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm arat pln pts hwp hwp_notify hwp_act_window hwp_epp flush_l1d +bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit +bogomips : 4599.93 +clflush size : 64 +cache_alignment : 64 +address sizes : 39 bits physical, 48 bits virtual +power management: + +processor : 2 +vendor_id : GenuineIntel +cpu family : 6 +model : 142 +model name : Intel(R) Core(TM) i3-7020U CPU @ 2.30GHz +stepping : 9 +microcode : 0xca +cpu MHz : 2299.999 +cache size : 3072 KB +physical id : 0 +siblings : 4 +core id : 0 +cpu cores : 2 +apicid : 1 +initial apicid : 1 +fpu : yes +fpu_exception : yes +cpuid level : 22 +wp : yes +flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_clear flush_l1d +bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit +bogomips : 4599.93 +clflush size : 64 +cache_alignment : 64 +address sizes : 39 bits physical, 48 bits virtual +power management: + +processor : 3 +vendor_id : GenuineIntel +cpu family : 6 +model : 142 +model name : Intel(R) Core(TM) i3-7020U CPU @ 2.30GHz +stepping : 9 +microcode : 0xca +cpu MHz : 2300.019 +cache size : 3072 KB +physical id : 0 +siblings : 4 +core id : 1 +cpu cores : 2 +apicid : 3 +initial apicid : 3 +fpu : yes +fpu_exception : yes +cpuid level : 22 +wp : yes +flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_clear flush_l1d +bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit +bogomips : 4599.93 +clflush size : 64 +cache_alignment : 64 +address sizes : 39 bits physical, 48 bits virtual +power management: + + + +Memory: 4k page, physical 12202280k(9243336k free), swap 6836220k(6836220k free) + +vm_info: Java HotSpot(TM) 64-Bit Server VM (25.201-b09) for linux-amd64 JRE (1.8.0_201-b09), built on Dec 15 2018 11:35:59 by "java_re" with gcc 7.3.0 + +time: Fri Sep 16 13:42:35 2022 +timezone: CDT +elapsed time: 0 seconds (0d 0h 0m 0s) + diff --git a/HelloSerial4j/build/.buildJava/com/serial4j/core/errno/Errno.class b/HelloSerial4j/build/.buildJava/com/serial4j/core/errno/Errno.class new file mode 100644 index 00000000..0e425be0 Binary files /dev/null and b/HelloSerial4j/build/.buildJava/com/serial4j/core/errno/Errno.class differ diff --git a/HelloSerial4j/build/.buildJava/com/serial4j/core/errno/ErrnoToException.class b/HelloSerial4j/build/.buildJava/com/serial4j/core/errno/ErrnoToException.class new file mode 100644 index 00000000..cd3d98dd Binary files /dev/null and b/HelloSerial4j/build/.buildJava/com/serial4j/core/errno/ErrnoToException.class differ diff --git a/HelloSerial4j/build/.buildJava/com/serial4j/core/errno/NativeErrno.class b/HelloSerial4j/build/.buildJava/com/serial4j/core/errno/NativeErrno.class new file mode 100644 index 00000000..8ff7e6d7 Binary files /dev/null and b/HelloSerial4j/build/.buildJava/com/serial4j/core/errno/NativeErrno.class differ diff --git a/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/BaudRate.class b/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/BaudRate.class new file mode 100644 index 00000000..f7ea7634 Binary files /dev/null and b/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/BaudRate.class differ diff --git a/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/NativeTerminalDevice.class b/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/NativeTerminalDevice.class new file mode 100644 index 00000000..ffded6cc Binary files /dev/null and b/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/NativeTerminalDevice.class differ diff --git a/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/Permissions.class b/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/Permissions.class new file mode 100644 index 00000000..23bc8317 Binary files /dev/null and b/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/Permissions.class differ diff --git a/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/ReadConfiguration.class b/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/ReadConfiguration.class new file mode 100644 index 00000000..697c5581 Binary files /dev/null and b/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/ReadConfiguration.class differ diff --git a/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/SerialPort.class b/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/SerialPort.class new file mode 100644 index 00000000..a21fd1ff Binary files /dev/null and b/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/SerialPort.class differ diff --git a/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/TerminalDevice.class b/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/TerminalDevice.class new file mode 100644 index 00000000..fe0dfd69 Binary files /dev/null and b/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/TerminalDevice.class differ diff --git a/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/control/TerminalControlFlag.class b/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/control/TerminalControlFlag.class new file mode 100644 index 00000000..759136b3 Binary files /dev/null and b/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/control/TerminalControlFlag.class differ diff --git a/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/control/TerminalFlag.class b/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/control/TerminalFlag.class new file mode 100644 index 00000000..933cc2b2 Binary files /dev/null and b/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/control/TerminalFlag.class differ diff --git a/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/control/TerminalInputFlag.class b/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/control/TerminalInputFlag.class new file mode 100644 index 00000000..c03014a3 Binary files /dev/null and b/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/control/TerminalInputFlag.class differ diff --git a/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/control/TerminalLocalFlag.class b/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/control/TerminalLocalFlag.class new file mode 100644 index 00000000..e0a65c40 Binary files /dev/null and b/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/control/TerminalLocalFlag.class differ diff --git a/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/control/TerminalOutputFlag.class b/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/control/TerminalOutputFlag.class new file mode 100644 index 00000000..15c9031c Binary files /dev/null and b/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/control/TerminalOutputFlag.class differ diff --git a/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/entity/EntityStatus.class b/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/entity/EntityStatus.class new file mode 100644 index 00000000..d45e6d02 Binary files /dev/null and b/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/entity/EntityStatus.class differ diff --git a/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/entity/SerialMonitorEntity.class b/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/entity/SerialMonitorEntity.class new file mode 100644 index 00000000..9d9dbfeb Binary files /dev/null and b/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/entity/SerialMonitorEntity.class differ diff --git a/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/entity/impl/SerialReadEntity.class b/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/entity/impl/SerialReadEntity.class new file mode 100644 index 00000000..b2079c60 Binary files /dev/null and b/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/entity/impl/SerialReadEntity.class differ diff --git a/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/entity/impl/SerialWriteEntity.class b/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/entity/impl/SerialWriteEntity.class new file mode 100644 index 00000000..1f569bf6 Binary files /dev/null and b/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/entity/impl/SerialWriteEntity.class differ diff --git a/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/entity/impl/WritableCapsule.class b/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/entity/impl/WritableCapsule.class new file mode 100644 index 00000000..2a515833 Binary files /dev/null and b/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/entity/impl/WritableCapsule.class differ diff --git a/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/monitor/SerialDataListener.class b/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/monitor/SerialDataListener.class new file mode 100644 index 00000000..9c9a075e Binary files /dev/null and b/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/monitor/SerialDataListener.class differ diff --git a/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/monitor/SerialMonitor.class b/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/monitor/SerialMonitor.class new file mode 100644 index 00000000..82c3e555 Binary files /dev/null and b/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/monitor/SerialMonitor.class differ diff --git a/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/monitor/SerialMonitorException.class b/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/monitor/SerialMonitorException.class new file mode 100644 index 00000000..0ff02d96 Binary files /dev/null and b/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/monitor/SerialMonitorException.class differ diff --git a/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/throwable/BadFileDescriptorException.class b/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/throwable/BadFileDescriptorException.class new file mode 100644 index 00000000..4b23db68 Binary files /dev/null and b/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/throwable/BadFileDescriptorException.class differ diff --git a/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/throwable/BrokenPipeException.class b/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/throwable/BrokenPipeException.class new file mode 100644 index 00000000..380fc2eb Binary files /dev/null and b/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/throwable/BrokenPipeException.class differ diff --git a/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/throwable/ErrnoNotFoundError.class b/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/throwable/ErrnoNotFoundError.class new file mode 100644 index 00000000..8a184807 Binary files /dev/null and b/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/throwable/ErrnoNotFoundError.class differ diff --git a/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/throwable/FileAlreadyOpenedException.class b/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/throwable/FileAlreadyOpenedException.class new file mode 100644 index 00000000..cee56ddc Binary files /dev/null and b/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/throwable/FileAlreadyOpenedException.class differ diff --git a/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/throwable/FileIsDirectoryException.class b/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/throwable/FileIsDirectoryException.class new file mode 100644 index 00000000..fd240fc3 Binary files /dev/null and b/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/throwable/FileIsDirectoryException.class differ diff --git a/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/throwable/FileTableOverflowException.class b/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/throwable/FileTableOverflowException.class new file mode 100644 index 00000000..20c59f0b Binary files /dev/null and b/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/throwable/FileTableOverflowException.class differ diff --git a/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/throwable/FileTooLargeException.class b/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/throwable/FileTooLargeException.class new file mode 100644 index 00000000..5dd40bef Binary files /dev/null and b/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/throwable/FileTooLargeException.class differ diff --git a/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/throwable/InputOutputException.class b/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/throwable/InputOutputException.class new file mode 100644 index 00000000..d7fb27e8 Binary files /dev/null and b/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/throwable/InputOutputException.class differ diff --git a/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/throwable/InterruptedSystemCallException.class b/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/throwable/InterruptedSystemCallException.class new file mode 100644 index 00000000..a4f0db89 Binary files /dev/null and b/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/throwable/InterruptedSystemCallException.class differ diff --git a/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/throwable/InvalidArgumentException.class b/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/throwable/InvalidArgumentException.class new file mode 100644 index 00000000..cd9286b5 Binary files /dev/null and b/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/throwable/InvalidArgumentException.class differ diff --git a/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/throwable/InvalidPortException.class b/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/throwable/InvalidPortException.class new file mode 100644 index 00000000..a915891a Binary files /dev/null and b/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/throwable/InvalidPortException.class differ diff --git a/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/throwable/NoAvailableTtyDevicesException.class b/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/throwable/NoAvailableTtyDevicesException.class new file mode 100644 index 00000000..b77a7da8 Binary files /dev/null and b/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/throwable/NoAvailableTtyDevicesException.class differ diff --git a/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/throwable/NoSpaceLeftException.class b/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/throwable/NoSpaceLeftException.class new file mode 100644 index 00000000..fca96fad Binary files /dev/null and b/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/throwable/NoSpaceLeftException.class differ diff --git a/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/throwable/NoSuchDeviceException.class b/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/throwable/NoSuchDeviceException.class new file mode 100644 index 00000000..b2dcb0be Binary files /dev/null and b/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/throwable/NoSuchDeviceException.class differ diff --git a/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/throwable/NoSuchFileException.class b/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/throwable/NoSuchFileException.class new file mode 100644 index 00000000..92e65605 Binary files /dev/null and b/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/throwable/NoSuchFileException.class differ diff --git a/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/throwable/NotTtyDeviceException.class b/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/throwable/NotTtyDeviceException.class new file mode 100644 index 00000000..828c8d9e Binary files /dev/null and b/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/throwable/NotTtyDeviceException.class differ diff --git a/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/throwable/OperationFailedException.class b/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/throwable/OperationFailedException.class new file mode 100644 index 00000000..baed2954 Binary files /dev/null and b/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/throwable/OperationFailedException.class differ diff --git a/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/throwable/PermissionDeniedException.class b/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/throwable/PermissionDeniedException.class new file mode 100644 index 00000000..9247ac08 Binary files /dev/null and b/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/throwable/PermissionDeniedException.class differ diff --git a/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/throwable/ReadOnlyFileSystemException.class b/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/throwable/ReadOnlyFileSystemException.class new file mode 100644 index 00000000..7431a26e Binary files /dev/null and b/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/throwable/ReadOnlyFileSystemException.class differ diff --git a/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/throwable/SerialThrowable.class b/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/throwable/SerialThrowable.class new file mode 100644 index 00000000..43bb0936 Binary files /dev/null and b/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/throwable/SerialThrowable.class differ diff --git a/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/throwable/TooManyOpenedFilesException.class b/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/throwable/TooManyOpenedFilesException.class new file mode 100644 index 00000000..805d325e Binary files /dev/null and b/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/throwable/TooManyOpenedFilesException.class differ diff --git a/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/throwable/TryAgainException.class b/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/throwable/TryAgainException.class new file mode 100644 index 00000000..688f3064 Binary files /dev/null and b/HelloSerial4j/build/.buildJava/com/serial4j/core/serial/throwable/TryAgainException.class differ diff --git a/HelloSerial4j/build/.buildJava/com/serial4j/core/util/natives/NativeImageLoader$NativeImage.class b/HelloSerial4j/build/.buildJava/com/serial4j/core/util/natives/NativeImageLoader$NativeImage.class new file mode 100644 index 00000000..224559b9 Binary files /dev/null and b/HelloSerial4j/build/.buildJava/com/serial4j/core/util/natives/NativeImageLoader$NativeImage.class differ diff --git a/HelloSerial4j/build/.buildJava/com/serial4j/core/util/natives/NativeImageLoader$OS.class b/HelloSerial4j/build/.buildJava/com/serial4j/core/util/natives/NativeImageLoader$OS.class new file mode 100644 index 00000000..3cc96dc1 Binary files /dev/null and b/HelloSerial4j/build/.buildJava/com/serial4j/core/util/natives/NativeImageLoader$OS.class differ diff --git a/HelloSerial4j/build/.buildJava/com/serial4j/core/util/natives/NativeImageLoader$State.class b/HelloSerial4j/build/.buildJava/com/serial4j/core/util/natives/NativeImageLoader$State.class new file mode 100644 index 00000000..aefb2db5 Binary files /dev/null and b/HelloSerial4j/build/.buildJava/com/serial4j/core/util/natives/NativeImageLoader$State.class differ diff --git a/HelloSerial4j/build/.buildJava/com/serial4j/core/util/natives/NativeImageLoader.class b/HelloSerial4j/build/.buildJava/com/serial4j/core/util/natives/NativeImageLoader.class new file mode 100644 index 00000000..957c77bb Binary files /dev/null and b/HelloSerial4j/build/.buildJava/com/serial4j/core/util/natives/NativeImageLoader.class differ diff --git a/HelloSerial4j/build/.buildJava/com/serial4j/core/util/process/Semaphore$Mutex.class b/HelloSerial4j/build/.buildJava/com/serial4j/core/util/process/Semaphore$Mutex.class new file mode 100644 index 00000000..c053ba5f Binary files /dev/null and b/HelloSerial4j/build/.buildJava/com/serial4j/core/util/process/Semaphore$Mutex.class differ diff --git a/HelloSerial4j/build/.buildJava/com/serial4j/core/util/process/Semaphore.class b/HelloSerial4j/build/.buildJava/com/serial4j/core/util/process/Semaphore.class new file mode 100644 index 00000000..62710c41 Binary files /dev/null and b/HelloSerial4j/build/.buildJava/com/serial4j/core/util/process/Semaphore.class differ diff --git a/HelloSerial4j/build/.buildJava/com/serial4j/example/Launcher.class b/HelloSerial4j/build/.buildJava/com/serial4j/example/Launcher.class new file mode 100644 index 00000000..31ddd7f7 Binary files /dev/null and b/HelloSerial4j/build/.buildJava/com/serial4j/example/Launcher.class differ diff --git a/HelloSerial4j/build/.buildJava/com/serial4j/example/monitor/HelloSerialMonitor.class b/HelloSerial4j/build/.buildJava/com/serial4j/example/monitor/HelloSerialMonitor.class new file mode 100644 index 00000000..71201b2c Binary files /dev/null and b/HelloSerial4j/build/.buildJava/com/serial4j/example/monitor/HelloSerialMonitor.class differ diff --git a/HelloSerial4j/build/.buildJava/com/serial4j/example/serial4j/HelloNativeSerial4J$1.class b/HelloSerial4j/build/.buildJava/com/serial4j/example/serial4j/HelloNativeSerial4J$1.class new file mode 100644 index 00000000..d638c3b9 Binary files /dev/null and b/HelloSerial4j/build/.buildJava/com/serial4j/example/serial4j/HelloNativeSerial4J$1.class differ diff --git a/HelloSerial4j/build/.buildJava/com/serial4j/example/serial4j/HelloNativeSerial4J$2.class b/HelloSerial4j/build/.buildJava/com/serial4j/example/serial4j/HelloNativeSerial4J$2.class new file mode 100644 index 00000000..1cc44bb1 Binary files /dev/null and b/HelloSerial4j/build/.buildJava/com/serial4j/example/serial4j/HelloNativeSerial4J$2.class differ diff --git a/HelloSerial4j/build/.buildJava/com/serial4j/example/serial4j/HelloNativeSerial4J.class b/HelloSerial4j/build/.buildJava/com/serial4j/example/serial4j/HelloNativeSerial4J.class new file mode 100644 index 00000000..d19b69e9 Binary files /dev/null and b/HelloSerial4j/build/.buildJava/com/serial4j/example/serial4j/HelloNativeSerial4J.class differ diff --git a/HelloSerial4j/build/.buildJava/com/serial4j/example/serial4j/HelloSerial4jIO$1.class b/HelloSerial4j/build/.buildJava/com/serial4j/example/serial4j/HelloSerial4jIO$1.class new file mode 100644 index 00000000..6042d142 Binary files /dev/null and b/HelloSerial4j/build/.buildJava/com/serial4j/example/serial4j/HelloSerial4jIO$1.class differ diff --git a/HelloSerial4j/build/.buildJava/com/serial4j/example/serial4j/HelloSerial4jIO$2.class b/HelloSerial4j/build/.buildJava/com/serial4j/example/serial4j/HelloSerial4jIO$2.class new file mode 100644 index 00000000..75770879 Binary files /dev/null and b/HelloSerial4j/build/.buildJava/com/serial4j/example/serial4j/HelloSerial4jIO$2.class differ diff --git a/HelloSerial4j/build/.buildJava/com/serial4j/example/serial4j/HelloSerial4jIO.class b/HelloSerial4j/build/.buildJava/com/serial4j/example/serial4j/HelloSerial4jIO.class new file mode 100644 index 00000000..d3c4b342 Binary files /dev/null and b/HelloSerial4j/build/.buildJava/com/serial4j/example/serial4j/HelloSerial4jIO.class differ diff --git a/HelloSerial4j/build/.buildJava/sig.signature b/HelloSerial4j/build/.buildJava/sig.signature new file mode 100644 index 00000000..b8986722 --- /dev/null +++ b/HelloSerial4j/build/.buildJava/sig.signature @@ -0,0 +1,3843 @@ + Compiled + from + "NativeTerminalDevice.java" + public + final + class + com.serial4j.core.serial.NativeTerminalDevice + { + private + com.serial4j.core.serial.SerialPort + serialPort; + descriptor: + Lcom/serial4j/core/serial/SerialPort; + private + java.lang.String[] + serialPorts; + descriptor: + [Ljava/lang/String; + private + char[] + readData; + descriptor: + [C + private + java.lang.String + readBuffer; + descriptor: + Ljava/lang/String; + protected + com.serial4j.core.serial.NativeTerminalDevice(); + descriptor: + ()V + protected + void + setSerialPort(com.serial4j.core.serial.SerialPort); + descriptor: + (Lcom/serial4j/core/serial/SerialPort;)V + public + com.serial4j.core.serial.SerialPort + getSerialPort(); + descriptor: + ()Lcom/serial4j/core/serial/SerialPort; + public + java.lang.String[] + getSerialPorts(); + descriptor: + ()[Ljava/lang/String; + public + char[] + getReadData(); + descriptor: + ()[C + public + java.lang.String + getReadBuffer(); + descriptor: + ()Ljava/lang/String; + protected + static + native + int + setupJniEnvironment0(); + descriptor: + ()I + protected + native + int + setTerminalControlFlag(long); + descriptor: + (J)I + protected + native + int + setTerminalLocalFlag(long); + descriptor: + (J)I + protected + native + int + setTerminalInputFlag(long); + descriptor: + (J)I + protected + native + int + setTerminalOutputFlag(long); + descriptor: + (J)I + protected + native + long + getTerminalControlFlag(); + descriptor: + ()J + protected + native + long + getTerminalLocalFlag(); + descriptor: + ()J + protected + native + long + getTerminalInputFlag(); + descriptor: + ()J + protected + native + long + getTerminalOutputFlag(); + descriptor: + ()J + protected + native + int + setReadConfigurationMode0(int, + int); + descriptor: + (II)I + protected + native + int[] + getReadConfigurationMode0(); + descriptor: + ()[I + protected + native + int + getErrno0(); + descriptor: + ()I + protected + native + int + fetchSerialPorts0(); + descriptor: + ()I + protected + native + int + getBaudRate0(); + descriptor: + ()I + protected + native + long + writeData0(int); + descriptor: + (I)J + protected + native + long + readData0(); + descriptor: + ()J + protected + native + long + writeBuffer0(java.lang.String, + int); + descriptor: + (Ljava/lang/String;I)J + protected + native + long + readBuffer0(); + descriptor: + ()J + protected + native + int + openPort0(java.lang.String, + int); + descriptor: + (Ljava/lang/String;I)I + protected + native + int + initTermios0(); + descriptor: + ()I + protected + native + int + setBaudRate0(int); + descriptor: + (I)I + protected + native + int + closePort0(); + descriptor: + ()I + static + {}; + descriptor: + ()V + } + Compiled + from + "TerminalLocalFlag.java" + public + final + class + com.serial4j.core.serial.control.TerminalLocalFlag + extends + com.serial4j.core.serial.control.TerminalFlag + { + public + static + final + com.serial4j.core.serial.control.TerminalLocalFlag + EMPTY_INSTANCE; + descriptor: + Lcom/serial4j/core/serial/control/TerminalLocalFlag; + public + static + final + com.serial4j.core.serial.control.TerminalLocalFlag + ECHO; + descriptor: + Lcom/serial4j/core/serial/control/TerminalLocalFlag; + public + static + final + com.serial4j.core.serial.control.TerminalLocalFlag + ECHOCTL; + descriptor: + Lcom/serial4j/core/serial/control/TerminalLocalFlag; + public + static + final + com.serial4j.core.serial.control.TerminalLocalFlag + ECHOE; + descriptor: + Lcom/serial4j/core/serial/control/TerminalLocalFlag; + public + static + final + com.serial4j.core.serial.control.TerminalLocalFlag + ECHOK; + descriptor: + Lcom/serial4j/core/serial/control/TerminalLocalFlag; + public + static + final + com.serial4j.core.serial.control.TerminalLocalFlag + ECHOKE; + descriptor: + Lcom/serial4j/core/serial/control/TerminalLocalFlag; + public + static + final + com.serial4j.core.serial.control.TerminalLocalFlag + ECHONL; + descriptor: + Lcom/serial4j/core/serial/control/TerminalLocalFlag; + public + static + final + com.serial4j.core.serial.control.TerminalLocalFlag + ECHOPRT; + descriptor: + Lcom/serial4j/core/serial/control/TerminalLocalFlag; + public + static + final + com.serial4j.core.serial.control.TerminalLocalFlag + FLUSHO; + descriptor: + Lcom/serial4j/core/serial/control/TerminalLocalFlag; + public + static + final + com.serial4j.core.serial.control.TerminalLocalFlag + ICANON; + descriptor: + Lcom/serial4j/core/serial/control/TerminalLocalFlag; + public + static + final + com.serial4j.core.serial.control.TerminalLocalFlag + IEXTEN; + descriptor: + Lcom/serial4j/core/serial/control/TerminalLocalFlag; + public + static + final + com.serial4j.core.serial.control.TerminalLocalFlag + ISIG; + descriptor: + Lcom/serial4j/core/serial/control/TerminalLocalFlag; + public + static + final + com.serial4j.core.serial.control.TerminalLocalFlag + NOFLSH; + descriptor: + Lcom/serial4j/core/serial/control/TerminalLocalFlag; + public + static + final + com.serial4j.core.serial.control.TerminalLocalFlag + PENDIN; + descriptor: + Lcom/serial4j/core/serial/control/TerminalLocalFlag; + public + static + final + com.serial4j.core.serial.control.TerminalLocalFlag + TOSTOP; + descriptor: + Lcom/serial4j/core/serial/control/TerminalLocalFlag; + public + static + final + com.serial4j.core.serial.control.TerminalLocalFlag + XCASE; + descriptor: + Lcom/serial4j/core/serial/control/TerminalLocalFlag; + protected + com.serial4j.core.serial.control.TerminalLocalFlag(long); + descriptor: + (J)V + static + {}; + descriptor: + ()V + } + Compiled + from + "TerminalInputFlag.java" + public + final + class + com.serial4j.core.serial.control.TerminalInputFlag + extends + com.serial4j.core.serial.control.TerminalFlag + { + public + static + final + com.serial4j.core.serial.control.TerminalInputFlag + EMPTY_INSTANCE; + descriptor: + Lcom/serial4j/core/serial/control/TerminalInputFlag; + public + static + final + com.serial4j.core.serial.control.TerminalInputFlag + BRKINT; + descriptor: + Lcom/serial4j/core/serial/control/TerminalInputFlag; + public + static + final + com.serial4j.core.serial.control.TerminalInputFlag + ICRNL; + descriptor: + Lcom/serial4j/core/serial/control/TerminalInputFlag; + public + static + final + com.serial4j.core.serial.control.TerminalInputFlag + IGNBRK; + descriptor: + Lcom/serial4j/core/serial/control/TerminalInputFlag; + public + static + final + com.serial4j.core.serial.control.TerminalInputFlag + IGNCR; + descriptor: + Lcom/serial4j/core/serial/control/TerminalInputFlag; + public + static + final + com.serial4j.core.serial.control.TerminalInputFlag + IMAXBEL; + descriptor: + Lcom/serial4j/core/serial/control/TerminalInputFlag; + public + static + final + com.serial4j.core.serial.control.TerminalInputFlag + INLCR; + descriptor: + Lcom/serial4j/core/serial/control/TerminalInputFlag; + public + static + final + com.serial4j.core.serial.control.TerminalInputFlag + INPCK; + descriptor: + Lcom/serial4j/core/serial/control/TerminalInputFlag; + public + static + final + com.serial4j.core.serial.control.TerminalInputFlag + ISTRIP; + descriptor: + Lcom/serial4j/core/serial/control/TerminalInputFlag; + public + static + final + com.serial4j.core.serial.control.TerminalInputFlag + IUTF8; + descriptor: + Lcom/serial4j/core/serial/control/TerminalInputFlag; + public + static + final + com.serial4j.core.serial.control.TerminalInputFlag + IXANY; + descriptor: + Lcom/serial4j/core/serial/control/TerminalInputFlag; + public + static + final + com.serial4j.core.serial.control.TerminalInputFlag + IXOFF; + descriptor: + Lcom/serial4j/core/serial/control/TerminalInputFlag; + public + static + final + com.serial4j.core.serial.control.TerminalInputFlag + IXON; + descriptor: + Lcom/serial4j/core/serial/control/TerminalInputFlag; + public + static + final + com.serial4j.core.serial.control.TerminalInputFlag + PARMRK; + descriptor: + Lcom/serial4j/core/serial/control/TerminalInputFlag; + protected + com.serial4j.core.serial.control.TerminalInputFlag(long); + descriptor: + (J)V + static + {}; + descriptor: + ()V + } + Compiled + from + "TerminalOutputFlag.java" + public + final + class + com.serial4j.core.serial.control.TerminalOutputFlag + extends + com.serial4j.core.serial.control.TerminalFlag + { + public + static + final + com.serial4j.core.serial.control.TerminalOutputFlag + EMPTY_INSTANCE; + descriptor: + Lcom/serial4j/core/serial/control/TerminalOutputFlag; + public + static + final + com.serial4j.core.serial.control.TerminalOutputFlag + BS0; + descriptor: + Lcom/serial4j/core/serial/control/TerminalOutputFlag; + public + static + final + com.serial4j.core.serial.control.TerminalOutputFlag + BS1; + descriptor: + Lcom/serial4j/core/serial/control/TerminalOutputFlag; + public + static + final + com.serial4j.core.serial.control.TerminalOutputFlag + CR0; + descriptor: + Lcom/serial4j/core/serial/control/TerminalOutputFlag; + public + static + final + com.serial4j.core.serial.control.TerminalOutputFlag + CR1; + descriptor: + Lcom/serial4j/core/serial/control/TerminalOutputFlag; + public + static + final + com.serial4j.core.serial.control.TerminalOutputFlag + CR2; + descriptor: + Lcom/serial4j/core/serial/control/TerminalOutputFlag; + public + static + final + com.serial4j.core.serial.control.TerminalOutputFlag + CR3; + descriptor: + Lcom/serial4j/core/serial/control/TerminalOutputFlag; + public + static + final + com.serial4j.core.serial.control.TerminalOutputFlag + FF0; + descriptor: + Lcom/serial4j/core/serial/control/TerminalOutputFlag; + public + static + final + com.serial4j.core.serial.control.TerminalOutputFlag + FF1; + descriptor: + Lcom/serial4j/core/serial/control/TerminalOutputFlag; + public + static + final + com.serial4j.core.serial.control.TerminalOutputFlag + NL0; + descriptor: + Lcom/serial4j/core/serial/control/TerminalOutputFlag; + public + static + final + com.serial4j.core.serial.control.TerminalOutputFlag + NL1; + descriptor: + Lcom/serial4j/core/serial/control/TerminalOutputFlag; + public + static + final + com.serial4j.core.serial.control.TerminalOutputFlag + OCRNL; + descriptor: + Lcom/serial4j/core/serial/control/TerminalOutputFlag; + public + static + final + com.serial4j.core.serial.control.TerminalOutputFlag + OFDEL; + descriptor: + Lcom/serial4j/core/serial/control/TerminalOutputFlag; + public + static + final + com.serial4j.core.serial.control.TerminalOutputFlag + OFILL; + descriptor: + Lcom/serial4j/core/serial/control/TerminalOutputFlag; + public + static + final + com.serial4j.core.serial.control.TerminalOutputFlag + OLCUC; + descriptor: + Lcom/serial4j/core/serial/control/TerminalOutputFlag; + public + static + final + com.serial4j.core.serial.control.TerminalOutputFlag + ONLCR; + descriptor: + Lcom/serial4j/core/serial/control/TerminalOutputFlag; + public + static + final + com.serial4j.core.serial.control.TerminalOutputFlag + ONLRET; + descriptor: + Lcom/serial4j/core/serial/control/TerminalOutputFlag; + public + static + final + com.serial4j.core.serial.control.TerminalOutputFlag + ONOCR; + descriptor: + Lcom/serial4j/core/serial/control/TerminalOutputFlag; + public + static + final + com.serial4j.core.serial.control.TerminalOutputFlag + OPOST; + descriptor: + Lcom/serial4j/core/serial/control/TerminalOutputFlag; + public + static + final + com.serial4j.core.serial.control.TerminalOutputFlag + TAB0; + descriptor: + Lcom/serial4j/core/serial/control/TerminalOutputFlag; + public + static + final + com.serial4j.core.serial.control.TerminalOutputFlag + TAB1; + descriptor: + Lcom/serial4j/core/serial/control/TerminalOutputFlag; + public + static + final + com.serial4j.core.serial.control.TerminalOutputFlag + TAB2; + descriptor: + Lcom/serial4j/core/serial/control/TerminalOutputFlag; + public + static + final + com.serial4j.core.serial.control.TerminalOutputFlag + TAB3; + descriptor: + Lcom/serial4j/core/serial/control/TerminalOutputFlag; + public + static + final + com.serial4j.core.serial.control.TerminalOutputFlag + VT0; + descriptor: + Lcom/serial4j/core/serial/control/TerminalOutputFlag; + public + static + final + com.serial4j.core.serial.control.TerminalOutputFlag + VT1; + descriptor: + Lcom/serial4j/core/serial/control/TerminalOutputFlag; + protected + com.serial4j.core.serial.control.TerminalOutputFlag(long); + descriptor: + (J)V + static + {}; + descriptor: + ()V + } + Compiled + from + "TerminalControlFlag.java" + public + final + class + com.serial4j.core.serial.control.TerminalControlFlag + extends + com.serial4j.core.serial.control.TerminalFlag + { + public + static + final + com.serial4j.core.serial.control.TerminalControlFlag + EMPTY_INSTANCE; + descriptor: + Lcom/serial4j/core/serial/control/TerminalControlFlag; + public + static + final + com.serial4j.core.serial.control.TerminalControlFlag + CIBAUD; + descriptor: + Lcom/serial4j/core/serial/control/TerminalControlFlag; + public + static + final + com.serial4j.core.serial.control.TerminalControlFlag + CS5; + descriptor: + Lcom/serial4j/core/serial/control/TerminalControlFlag; + public + static + final + com.serial4j.core.serial.control.TerminalControlFlag + CS6; + descriptor: + Lcom/serial4j/core/serial/control/TerminalControlFlag; + public + static + final + com.serial4j.core.serial.control.TerminalControlFlag + CS7; + descriptor: + Lcom/serial4j/core/serial/control/TerminalControlFlag; + public + static + final + com.serial4j.core.serial.control.TerminalControlFlag + CS8; + descriptor: + Lcom/serial4j/core/serial/control/TerminalControlFlag; + public + static + final + com.serial4j.core.serial.control.TerminalControlFlag + CLOCAL; + descriptor: + Lcom/serial4j/core/serial/control/TerminalControlFlag; + public + static + final + com.serial4j.core.serial.control.TerminalControlFlag + CREAD; + descriptor: + Lcom/serial4j/core/serial/control/TerminalControlFlag; + public + static + final + com.serial4j.core.serial.control.TerminalControlFlag + CMSPAR; + descriptor: + Lcom/serial4j/core/serial/control/TerminalControlFlag; + public + static + final + com.serial4j.core.serial.control.TerminalControlFlag + CRTSCTS; + descriptor: + Lcom/serial4j/core/serial/control/TerminalControlFlag; + public + static + final + com.serial4j.core.serial.control.TerminalControlFlag + CSTOPB; + descriptor: + Lcom/serial4j/core/serial/control/TerminalControlFlag; + public + static + final + com.serial4j.core.serial.control.TerminalControlFlag + HUPCL; + descriptor: + Lcom/serial4j/core/serial/control/TerminalControlFlag; + public + static + final + com.serial4j.core.serial.control.TerminalControlFlag + PARENB; + descriptor: + Lcom/serial4j/core/serial/control/TerminalControlFlag; + public + static + final + com.serial4j.core.serial.control.TerminalControlFlag + PARODD; + descriptor: + Lcom/serial4j/core/serial/control/TerminalControlFlag; + protected + com.serial4j.core.serial.control.TerminalControlFlag(long); + descriptor: + (J)V + static + {}; + descriptor: + ()V + } + Compiled + from + "TerminalFlag.java" + public + abstract + class + com.serial4j.core.serial.control.TerminalFlag + { + private + long + value; + descriptor: + J + protected + com.serial4j.core.serial.control.TerminalFlag(long); + descriptor: + (J)V + public + com.serial4j.core.serial.control.TerminalFlag + append(com.serial4j.core.serial.control.TerminalFlag); + descriptor: + (Lcom/serial4j/core/serial/control/TerminalFlag;)Lcom/serial4j/core/serial/control/TerminalFlag; + public + com.serial4j.core.serial.control.TerminalFlag + disable(com.serial4j.core.serial.control.TerminalFlag); + descriptor: + (Lcom/serial4j/core/serial/control/TerminalFlag;)Lcom/serial4j/core/serial/control/TerminalFlag; + public + com.serial4j.core.serial.control.TerminalFlag + append(com.serial4j.core.serial.control.TerminalFlag...); + descriptor: + ([Lcom/serial4j/core/serial/control/TerminalFlag;)Lcom/serial4j/core/serial/control/TerminalFlag; + public + com.serial4j.core.serial.control.TerminalFlag + disable(com.serial4j.core.serial.control.TerminalFlag...); + descriptor: + ([Lcom/serial4j/core/serial/control/TerminalFlag;)Lcom/serial4j/core/serial/control/TerminalFlag; + public + com.serial4j.core.serial.control.TerminalFlag + enableAll(); + descriptor: + ()Lcom/serial4j/core/serial/control/TerminalFlag; + public + com.serial4j.core.serial.control.TerminalFlag + disableAll(); + descriptor: + ()Lcom/serial4j/core/serial/control/TerminalFlag; + public + long + getValue(); + descriptor: + ()J + public + void + setValue(long); + descriptor: + (J)V + } + Compiled + from + "TerminalDevice.java" + public + final + class + com.serial4j.core.serial.TerminalDevice + { + private + static + final + java.util.logging.Logger + LOGGER; + descriptor: + Ljava/util/logging/Logger; + private + final + com.serial4j.core.serial.NativeTerminalDevice + nativeTerminalDevice; + descriptor: + Lcom/serial4j/core/serial/NativeTerminalDevice; + private + com.serial4j.core.serial.Permissions + permissions; + descriptor: + Lcom/serial4j/core/serial/Permissions; + private + com.serial4j.core.serial.ReadConfiguration + readConfiguration; + descriptor: + Lcom/serial4j/core/serial/ReadConfiguration; + private + java.lang.String + permissionsDescription; + descriptor: + Ljava/lang/String; + private + boolean + loggingEnabled; + descriptor: + Z + private + java.io.InputStream + inputStream; + descriptor: + Ljava/io/InputStream; + private + java.io.OutputStream + outputStream; + descriptor: + Ljava/io/OutputStream; + public + com.serial4j.core.serial.TerminalDevice(); + descriptor: + ()V + private + static + void + setupJniEnvironment(); + descriptor: + ()V + public + void + openPort(com.serial4j.core.serial.SerialPort) + throws + com.serial4j.core.serial.throwable.NoSuchDeviceException, + com.serial4j.core.serial.throwable.NoSuchFileException, + com.serial4j.core.serial.throwable.FileAlreadyOpenedException, + com.serial4j.core.serial.throwable.InterruptedSystemCallException, + com.serial4j.core.serial.throwable.FileIsDirectoryException, + com.serial4j.core.serial.throwable.TooManyOpenedFilesException, + com.serial4j.core.serial.throwable.FileTableOverflowException, + com.serial4j.core.serial.throwable.NoSpaceLeftException, + com.serial4j.core.serial.throwable.ReadOnlyFileSystemException, + com.serial4j.core.serial.throwable.PermissionDeniedException; + descriptor: + (Lcom/serial4j/core/serial/SerialPort;)V + public + void + initTermios() + throws + com.serial4j.core.serial.throwable.InvalidPortException, + java.io.FileNotFoundException, + com.serial4j.core.serial.throwable.NoAvailableTtyDevicesException; + descriptor: + ()V + public + void + setTerminalControlFlag(com.serial4j.core.serial.control.TerminalControlFlag) + throws + com.serial4j.core.serial.throwable.BadFileDescriptorException, + com.serial4j.core.serial.throwable.InvalidPortException, + com.serial4j.core.serial.throwable.NotTtyDeviceException, + com.serial4j.core.serial.throwable.InvalidArgumentException; + descriptor: + (Lcom/serial4j/core/serial/control/TerminalControlFlag;)V + public + void + setTerminalLocalFlag(com.serial4j.core.serial.control.TerminalLocalFlag) + throws + com.serial4j.core.serial.throwable.BadFileDescriptorException, + com.serial4j.core.serial.throwable.InvalidPortException, + com.serial4j.core.serial.throwable.NotTtyDeviceException, + com.serial4j.core.serial.throwable.InvalidArgumentException; + descriptor: + (Lcom/serial4j/core/serial/control/TerminalLocalFlag;)V + public + void + setTerminalInputFlag(com.serial4j.core.serial.control.TerminalInputFlag) + throws + com.serial4j.core.serial.throwable.BadFileDescriptorException, + com.serial4j.core.serial.throwable.InvalidPortException, + com.serial4j.core.serial.throwable.NotTtyDeviceException, + com.serial4j.core.serial.throwable.InvalidArgumentException; + descriptor: + (Lcom/serial4j/core/serial/control/TerminalInputFlag;)V + public + void + setTerminalOutputFlag(com.serial4j.core.serial.control.TerminalOutputFlag) + throws + com.serial4j.core.serial.throwable.BadFileDescriptorException, + com.serial4j.core.serial.throwable.InvalidPortException, + com.serial4j.core.serial.throwable.NotTtyDeviceException, + com.serial4j.core.serial.throwable.InvalidArgumentException; + descriptor: + (Lcom/serial4j/core/serial/control/TerminalOutputFlag;)V + public + com.serial4j.core.serial.control.TerminalControlFlag + getTerminalControlFlag() + throws + com.serial4j.core.serial.throwable.BadFileDescriptorException, + com.serial4j.core.serial.throwable.InvalidPortException, + com.serial4j.core.serial.throwable.NotTtyDeviceException; + descriptor: + ()Lcom/serial4j/core/serial/control/TerminalControlFlag; + public + com.serial4j.core.serial.control.TerminalLocalFlag + getTerminalLocalFlag() + throws + com.serial4j.core.serial.throwable.BadFileDescriptorException, + com.serial4j.core.serial.throwable.InvalidPortException, + com.serial4j.core.serial.throwable.NotTtyDeviceException; + descriptor: + ()Lcom/serial4j/core/serial/control/TerminalLocalFlag; + public + com.serial4j.core.serial.control.TerminalInputFlag + getTerminalInputFlag() + throws + com.serial4j.core.serial.throwable.BadFileDescriptorException, + com.serial4j.core.serial.throwable.InvalidPortException, + com.serial4j.core.serial.throwable.NotTtyDeviceException; + descriptor: + ()Lcom/serial4j/core/serial/control/TerminalInputFlag; + public + com.serial4j.core.serial.control.TerminalOutputFlag + getTerminalOutputFlag() + throws + com.serial4j.core.serial.throwable.BadFileDescriptorException, + com.serial4j.core.serial.throwable.InvalidPortException, + com.serial4j.core.serial.throwable.NotTtyDeviceException; + descriptor: + ()Lcom/serial4j/core/serial/control/TerminalOutputFlag; + public + void + setPermissions(com.serial4j.core.serial.Permissions); + descriptor: + (Lcom/serial4j/core/serial/Permissions;)V + public + final + com.serial4j.core.serial.Permissions + getPermissions(); + descriptor: + ()Lcom/serial4j/core/serial/Permissions; + public + void + setBaudRate(com.serial4j.core.serial.BaudRate) + throws + com.serial4j.core.serial.throwable.BadFileDescriptorException, + com.serial4j.core.serial.throwable.InvalidPortException, + com.serial4j.core.serial.throwable.NotTtyDeviceException; + descriptor: + (Lcom/serial4j/core/serial/BaudRate;)V + public + void + setReadConfigurationMode(com.serial4j.core.serial.ReadConfiguration, + int, + int) + throws + com.serial4j.core.serial.throwable.NoSuchDeviceException, + com.serial4j.core.serial.throwable.PermissionDeniedException, + com.serial4j.core.serial.throwable.BrokenPipeException, + com.serial4j.core.serial.throwable.InvalidPortException, + com.serial4j.core.serial.throwable.NoAvailableTtyDevicesException; + descriptor: + (Lcom/serial4j/core/serial/ReadConfiguration;II)V + public + final + com.serial4j.core.serial.ReadConfiguration + getReadConfigurationMode(); + descriptor: + ()Lcom/serial4j/core/serial/ReadConfiguration; + public + final + long + writeBuffer(java.lang.String) + throws + com.serial4j.core.serial.throwable.NoSuchDeviceException, + com.serial4j.core.serial.throwable.PermissionDeniedException, + com.serial4j.core.serial.throwable.BrokenPipeException, + com.serial4j.core.serial.throwable.InvalidPortException, + com.serial4j.core.serial.throwable.NoAvailableTtyDevicesException; + descriptor: + (Ljava/lang/String;)J + public + long + writeData(int) + throws + com.serial4j.core.serial.throwable.NoSuchDeviceException, + com.serial4j.core.serial.throwable.PermissionDeniedException, + com.serial4j.core.serial.throwable.BrokenPipeException, + com.serial4j.core.serial.throwable.InvalidPortException, + com.serial4j.core.serial.throwable.NoAvailableTtyDevicesException; + descriptor: + (I)J + public + long + writeData(int[]) + throws + com.serial4j.core.serial.throwable.NoSuchDeviceException, + com.serial4j.core.serial.throwable.PermissionDeniedException, + com.serial4j.core.serial.throwable.BrokenPipeException, + com.serial4j.core.serial.throwable.InvalidPortException, + com.serial4j.core.serial.throwable.NoAvailableTtyDevicesException; + descriptor: + ([I)J + public + final + long + readData(); + descriptor: + ()J + public + final + long + readBuffer(); + descriptor: + ()J + public + final + java.lang.String + getReadBuffer(); + descriptor: + ()Ljava/lang/String; + public + final + int + getBaudRate() + throws + com.serial4j.core.serial.throwable.NoSuchDeviceException, + com.serial4j.core.serial.throwable.PermissionDeniedException, + com.serial4j.core.serial.throwable.BrokenPipeException, + com.serial4j.core.serial.throwable.InvalidPortException, + com.serial4j.core.serial.throwable.NoAvailableTtyDevicesException; + descriptor: + ()I + public + final + java.lang.String[] + getSerialPorts() + throws + com.serial4j.core.serial.throwable.NoSuchDeviceException, + com.serial4j.core.serial.throwable.PermissionDeniedException, + com.serial4j.core.serial.throwable.BrokenPipeException, + com.serial4j.core.serial.throwable.InvalidPortException, + com.serial4j.core.serial.throwable.NoAvailableTtyDevicesException; + descriptor: + ()[Ljava/lang/String; + public + void + throwExceptionFromNativeErrno() + throws + com.serial4j.core.serial.throwable.NoSuchDeviceException, + com.serial4j.core.serial.throwable.PermissionDeniedException, + com.serial4j.core.serial.throwable.BrokenPipeException, + com.serial4j.core.serial.throwable.InvalidPortException, + com.serial4j.core.serial.throwable.NoAvailableTtyDevicesException; + descriptor: + ()V + public + void + closePort() + throws + com.serial4j.core.serial.throwable.NoSuchDeviceException, + com.serial4j.core.serial.throwable.PermissionDeniedException, + com.serial4j.core.serial.throwable.BrokenPipeException, + com.serial4j.core.serial.throwable.InvalidPortException, + com.serial4j.core.serial.throwable.NoAvailableTtyDevicesException; + descriptor: + ()V + public + void + setSerial4jLoggingEnabled(boolean); + descriptor: + (Z)V + public + final + boolean + isSerial4jLoggingEnabled(); + descriptor: + ()Z + public + final + char[] + getReadData(); + descriptor: + ()[C + public + final + java.io.InputStream + getInputStream(); + descriptor: + ()Ljava/io/InputStream; + public + final + java.io.OutputStream + getOutputStream(); + descriptor: + ()Ljava/io/OutputStream; + public + final + com.serial4j.core.serial.SerialPort + getSerialPort(); + descriptor: + ()Lcom/serial4j/core/serial/SerialPort; + private + void + fetchSerialPorts() + throws + com.serial4j.core.serial.throwable.NoSuchDeviceException, + com.serial4j.core.serial.throwable.PermissionDeniedException, + com.serial4j.core.serial.throwable.BrokenPipeException, + com.serial4j.core.serial.throwable.InvalidPortException, + com.serial4j.core.serial.throwable.NoAvailableTtyDevicesException; + descriptor: + ()V + private + boolean + isOperationFailed(int); + descriptor: + (I)Z + private + boolean + isErrnoAvailable(int); + descriptor: + (I)Z + static + {}; + descriptor: + ()V + } + Compiled + from + "SerialMonitorException.java" + public + class + com.serial4j.core.serial.monitor.SerialMonitorException + extends + java.lang.IllegalStateException + { + public + static + final + java.lang.String + DEFAULT_MSG; + descriptor: + Ljava/lang/String; + public + com.serial4j.core.serial.monitor.SerialMonitorException(java.lang.String); + descriptor: + (Ljava/lang/String;)V + } + Compiled + from + "SerialDataListener.java" + public + interface + com.serial4j.core.serial.monitor.SerialDataListener + { + public + abstract + void + onDataReceived(int); + descriptor: + (I)V + public + abstract + void + onDataTransmitted(int); + descriptor: + (I)V + public + abstract + void + onDataReceived(java.lang.String); + descriptor: + (Ljava/lang/String;)V + } + Compiled + from + "SerialMonitor.java" + public + final + class + com.serial4j.core.serial.monitor.SerialMonitor + { + private + final + java.util.ArrayList + serialDataListeners; + descriptor: + Ljava/util/ArrayList; + private + final + java.lang.String + monitorName; + descriptor: + Ljava/lang/String; + public + volatile + com.serial4j.core.serial.entity.EntityStatus + serialReadEntityEntityStatus; + descriptor: + Lcom/serial4j/core/serial/entity/EntityStatus; + public + volatile + com.serial4j.core.serial.entity.EntityStatus + serialWriteEntityEntityStatus; + descriptor: + Lcom/serial4j/core/serial/entity/EntityStatus; + public + volatile + boolean + isReadSerialEntityInitialized; + descriptor: + Z + public + volatile + boolean + isWriteSerialEntityInitialized; + descriptor: + Z + public + volatile + boolean + isMonitoringStarted; + descriptor: + Z + public + volatile + boolean + useReturnCarriage; + descriptor: + Z + private + volatile + java.io.InputStream + readEntityStream; + descriptor: + Ljava/io/InputStream; + private + volatile + java.io.OutputStream + writeEntityStream; + descriptor: + Ljava/io/OutputStream; + private + volatile + com.serial4j.core.serial.TerminalDevice + terminalDevice; + descriptor: + Lcom/serial4j/core/serial/TerminalDevice; + private + volatile + boolean + terminate; + descriptor: + Z + private + volatile + com.serial4j.core.serial.entity.impl.SerialReadEntity + serialReadEntity; + descriptor: + Lcom/serial4j/core/serial/entity/impl/SerialReadEntity; + private + volatile + com.serial4j.core.serial.entity.impl.SerialWriteEntity + serialWriteEntity; + descriptor: + Lcom/serial4j/core/serial/entity/impl/SerialWriteEntity; + public + com.serial4j.core.serial.monitor.SerialMonitor(java.lang.String); + descriptor: + (Ljava/lang/String;)V + public + void + startDataMonitoring(java.lang.String, + com.serial4j.core.serial.BaudRate, + com.serial4j.core.serial.Permissions) + throws + com.serial4j.core.serial.throwable.NoSuchDeviceException, + com.serial4j.core.serial.throwable.PermissionDeniedException, + com.serial4j.core.serial.throwable.BrokenPipeException, + com.serial4j.core.serial.throwable.InvalidPortException, + com.serial4j.core.serial.throwable.OperationFailedException, + com.serial4j.core.serial.throwable.NoAvailableTtyDevicesException, + java.io.FileNotFoundException; + descriptor: + (Ljava/lang/String;Lcom/serial4j/core/serial/BaudRate;Lcom/serial4j/core/serial/Permissions;)V + public + java.lang.String + getMonitorName(); + descriptor: + ()Ljava/lang/String; + public + boolean + isTerminate(); + descriptor: + ()Z + public + void + setTerminate(); + descriptor: + ()V + public + java.io.InputStream + getReadEntityStream(); + descriptor: + ()Ljava/io/InputStream; + public + com.serial4j.core.serial.TerminalDevice + getTerminalDevice(); + descriptor: + ()Lcom/serial4j/core/serial/TerminalDevice; + public + java.io.OutputStream + getWriteEntityStream(); + descriptor: + ()Ljava/io/OutputStream; + public + com.serial4j.core.serial.entity.impl.SerialReadEntity + getSerialReadEntity(); + descriptor: + ()Lcom/serial4j/core/serial/entity/impl/SerialReadEntity; + public + com.serial4j.core.serial.entity.impl.SerialWriteEntity + getSerialWriteEntity(); + descriptor: + ()Lcom/serial4j/core/serial/entity/impl/SerialWriteEntity; + public + void + addSerialDataListener(com.serial4j.core.serial.monitor.SerialDataListener); + descriptor: + (Lcom/serial4j/core/serial/monitor/SerialDataListener;)V + public + void + removeSerialDataListener(com.serial4j.core.serial.monitor.SerialDataListener); + descriptor: + (Lcom/serial4j/core/serial/monitor/SerialDataListener;)V + public + void + setReadEntityListener(com.serial4j.core.serial.entity.EntityStatus); + descriptor: + (Lcom/serial4j/core/serial/entity/EntityStatus;)V + public + void + setWriteEntityStatus(com.serial4j.core.serial.entity.EntityStatus); + descriptor: + (Lcom/serial4j/core/serial/entity/EntityStatus;)V + public + boolean + isUsingReturnCarriage(); + descriptor: + ()Z + public + void + setUseReturnCarriage(boolean); + descriptor: + (Z)V + public + java.util.ArrayList + getSerialDataListeners(); + descriptor: + ()Ljava/util/ArrayList; + } + Compiled + from + "SerialPort.java" + public + final + class + com.serial4j.core.serial.SerialPort + { + private + java.lang.String + path; + descriptor: + Ljava/lang/String; + private + int + portOpened; + descriptor: + I + private + int + fd; + descriptor: + I + private + int + ioFlag; + descriptor: + I + public + com.serial4j.core.serial.SerialPort(java.lang.String); + descriptor: + (Ljava/lang/String;)V + public + int + getIOFlag(); + descriptor: + ()I + public + java.lang.String + getPath(); + descriptor: + ()Ljava/lang/String; + public + int + getFd(); + descriptor: + ()I + public + boolean + isPortOpened(); + descriptor: + ()Z + } + Compiled + from + "BaudRate.java" + public + final + class + com.serial4j.core.serial.BaudRate + extends + java.lang.Enum + { + public + static + final + com.serial4j.core.serial.BaudRate + B0; + descriptor: + Lcom/serial4j/core/serial/BaudRate; + public + static + final + com.serial4j.core.serial.BaudRate + B50; + descriptor: + Lcom/serial4j/core/serial/BaudRate; + public + static + final + com.serial4j.core.serial.BaudRate + B75; + descriptor: + Lcom/serial4j/core/serial/BaudRate; + public + static + final + com.serial4j.core.serial.BaudRate + B110; + descriptor: + Lcom/serial4j/core/serial/BaudRate; + public + static + final + com.serial4j.core.serial.BaudRate + B134; + descriptor: + Lcom/serial4j/core/serial/BaudRate; + public + static + final + com.serial4j.core.serial.BaudRate + B150; + descriptor: + Lcom/serial4j/core/serial/BaudRate; + public + static + final + com.serial4j.core.serial.BaudRate + B200; + descriptor: + Lcom/serial4j/core/serial/BaudRate; + public + static + final + com.serial4j.core.serial.BaudRate + B300; + descriptor: + Lcom/serial4j/core/serial/BaudRate; + public + static + final + com.serial4j.core.serial.BaudRate + B600; + descriptor: + Lcom/serial4j/core/serial/BaudRate; + public + static + final + com.serial4j.core.serial.BaudRate + B1200; + descriptor: + Lcom/serial4j/core/serial/BaudRate; + public + static + final + com.serial4j.core.serial.BaudRate + B1800; + descriptor: + Lcom/serial4j/core/serial/BaudRate; + public + static + final + com.serial4j.core.serial.BaudRate + B2400; + descriptor: + Lcom/serial4j/core/serial/BaudRate; + public + static + final + com.serial4j.core.serial.BaudRate + B4800; + descriptor: + Lcom/serial4j/core/serial/BaudRate; + public + static + final + com.serial4j.core.serial.BaudRate + B9600; + descriptor: + Lcom/serial4j/core/serial/BaudRate; + public + static + final + com.serial4j.core.serial.BaudRate + B19200; + descriptor: + Lcom/serial4j/core/serial/BaudRate; + public + static + final + com.serial4j.core.serial.BaudRate + B38400; + descriptor: + Lcom/serial4j/core/serial/BaudRate; + public + static + final + com.serial4j.core.serial.BaudRate + B57600; + descriptor: + Lcom/serial4j/core/serial/BaudRate; + public + static + final + com.serial4j.core.serial.BaudRate + B115200; + descriptor: + Lcom/serial4j/core/serial/BaudRate; + public + static + final + com.serial4j.core.serial.BaudRate + B230400; + descriptor: + Lcom/serial4j/core/serial/BaudRate; + public + static + final + com.serial4j.core.serial.BaudRate + B460800; + descriptor: + Lcom/serial4j/core/serial/BaudRate; + public + static + final + com.serial4j.core.serial.BaudRate + B500000; + descriptor: + Lcom/serial4j/core/serial/BaudRate; + public + static + final + com.serial4j.core.serial.BaudRate + B576000; + descriptor: + Lcom/serial4j/core/serial/BaudRate; + public + static + final + com.serial4j.core.serial.BaudRate + B921600; + descriptor: + Lcom/serial4j/core/serial/BaudRate; + public + static + final + com.serial4j.core.serial.BaudRate + B1000000; + descriptor: + Lcom/serial4j/core/serial/BaudRate; + public + static + final + com.serial4j.core.serial.BaudRate + B1152000; + descriptor: + Lcom/serial4j/core/serial/BaudRate; + public + static + final + com.serial4j.core.serial.BaudRate + B1500000; + descriptor: + Lcom/serial4j/core/serial/BaudRate; + public + static + final + com.serial4j.core.serial.BaudRate + B2000000; + descriptor: + Lcom/serial4j/core/serial/BaudRate; + public + static + final + com.serial4j.core.serial.BaudRate + B2500000; + descriptor: + Lcom/serial4j/core/serial/BaudRate; + public + static + final + com.serial4j.core.serial.BaudRate + B3000000; + descriptor: + Lcom/serial4j/core/serial/BaudRate; + public + static + final + com.serial4j.core.serial.BaudRate + B3500000; + descriptor: + Lcom/serial4j/core/serial/BaudRate; + public + static + final + com.serial4j.core.serial.BaudRate + B4000000; + descriptor: + Lcom/serial4j/core/serial/BaudRate; + public + static + final + com.serial4j.core.serial.BaudRate + MAX_BAUD; + descriptor: + Lcom/serial4j/core/serial/BaudRate; + private + final + int + baudRate; + descriptor: + I + private + final + long + realBaud; + descriptor: + J + private + static + final + com.serial4j.core.serial.BaudRate[] + $VALUES; + descriptor: + [Lcom/serial4j/core/serial/BaudRate; + public + static + com.serial4j.core.serial.BaudRate[] + values(); + descriptor: + ()[Lcom/serial4j/core/serial/BaudRate; + public + static + com.serial4j.core.serial.BaudRate + valueOf(java.lang.String); + descriptor: + (Ljava/lang/String;)Lcom/serial4j/core/serial/BaudRate; + private + com.serial4j.core.serial.BaudRate(int, + long); + descriptor: + (Ljava/lang/String;IIJ)V + public + long + getRealBaud(); + descriptor: + ()J + public + int + getBaudRate(); + descriptor: + ()I + private + static + com.serial4j.core.serial.BaudRate[] + $values(); + descriptor: + ()[Lcom/serial4j/core/serial/BaudRate; + static + {}; + descriptor: + ()V + } + Compiled + from + "Permissions.java" + public + final + class + com.serial4j.core.serial.Permissions + { + public + static + final + com.serial4j.core.serial.Permissions + O_RDONLY; + descriptor: + Lcom/serial4j/core/serial/Permissions; + public + static + final + com.serial4j.core.serial.Permissions + O_WRONLY; + descriptor: + Lcom/serial4j/core/serial/Permissions; + public + static + final + com.serial4j.core.serial.Permissions + O_RDWR; + descriptor: + Lcom/serial4j/core/serial/Permissions; + public + static + final + com.serial4j.core.serial.Permissions + O_NOCTTY; + descriptor: + Lcom/serial4j/core/serial/Permissions; + public + static + final + com.serial4j.core.serial.Permissions + O_NONBLOCK; + descriptor: + Lcom/serial4j/core/serial/Permissions; + private + int + value; + descriptor: + I + private + java.lang.String + description; + descriptor: + Ljava/lang/String; + protected + com.serial4j.core.serial.Permissions(int, + java.lang.String); + descriptor: + (ILjava/lang/String;)V + public + static + final + com.serial4j.core.serial.Permissions + createCustomPermissions(int, + java.lang.String); + descriptor: + (ILjava/lang/String;)Lcom/serial4j/core/serial/Permissions; + public + com.serial4j.core.serial.Permissions + append(com.serial4j.core.serial.Permissions); + descriptor: + (Lcom/serial4j/core/serial/Permissions;)Lcom/serial4j/core/serial/Permissions; + public + com.serial4j.core.serial.Permissions + append(com.serial4j.core.serial.Permissions...); + descriptor: + ([Lcom/serial4j/core/serial/Permissions;)Lcom/serial4j/core/serial/Permissions; + public + int + getValue(); + descriptor: + ()I + public + java.lang.String + getDescription(); + descriptor: + ()Ljava/lang/String; + static + {}; + descriptor: + ()V + } + Compiled + from + "ReadOnlyFileSystemException.java" + public + final + class + com.serial4j.core.serial.throwable.ReadOnlyFileSystemException + extends + com.serial4j.core.serial.throwable.SerialThrowable + { + public + com.serial4j.core.serial.throwable.ReadOnlyFileSystemException(java.lang.String); + descriptor: + (Ljava/lang/String;)V + public + com.serial4j.core.errno.Errno + getCausingErrno(); + descriptor: + ()Lcom/serial4j/core/errno/Errno; + } + Compiled + from + "TooManyOpenedFilesException.java" + public + final + class + com.serial4j.core.serial.throwable.TooManyOpenedFilesException + extends + com.serial4j.core.serial.throwable.SerialThrowable + { + public + com.serial4j.core.serial.throwable.TooManyOpenedFilesException(java.lang.String); + descriptor: + (Ljava/lang/String;)V + public + com.serial4j.core.errno.Errno + getCausingErrno(); + descriptor: + ()Lcom/serial4j/core/errno/Errno; + } + Compiled + from + "NoSuchFileException.java" + public + final + class + com.serial4j.core.serial.throwable.NoSuchFileException + extends + com.serial4j.core.serial.throwable.SerialThrowable + { + public + com.serial4j.core.serial.throwable.NoSuchFileException(java.lang.String); + descriptor: + (Ljava/lang/String;)V + public + com.serial4j.core.errno.Errno + getCausingErrno(); + descriptor: + ()Lcom/serial4j/core/errno/Errno; + } + Compiled + from + "TryAgainException.java" + public + final + class + com.serial4j.core.serial.throwable.TryAgainException + extends + com.serial4j.core.serial.throwable.SerialThrowable + { + public + com.serial4j.core.serial.throwable.TryAgainException(java.lang.String); + descriptor: + (Ljava/lang/String;)V + public + com.serial4j.core.errno.Errno + getCausingErrno(); + descriptor: + ()Lcom/serial4j/core/errno/Errno; + } + Compiled + from + "InvalidArgumentException.java" + public + class + com.serial4j.core.serial.throwable.InvalidArgumentException + extends + com.serial4j.core.serial.throwable.SerialThrowable + { + public + com.serial4j.core.serial.throwable.InvalidArgumentException(java.lang.String); + descriptor: + (Ljava/lang/String;)V + public + com.serial4j.core.errno.Errno + getCausingErrno(); + descriptor: + ()Lcom/serial4j/core/errno/Errno; + } + Compiled + from + "SerialThrowable.java" + public + abstract + class + com.serial4j.core.serial.throwable.SerialThrowable + extends + java.lang.RuntimeException + { + public + com.serial4j.core.serial.throwable.SerialThrowable(java.lang.String); + descriptor: + (Ljava/lang/String;)V + abstract + com.serial4j.core.errno.Errno + getCausingErrno(); + descriptor: + ()Lcom/serial4j/core/errno/Errno; + } + Compiled + from + "InterruptedSystemCallException.java" + public + class + com.serial4j.core.serial.throwable.InterruptedSystemCallException + extends + com.serial4j.core.serial.throwable.SerialThrowable + { + public + com.serial4j.core.serial.throwable.InterruptedSystemCallException(java.lang.String); + descriptor: + (Ljava/lang/String;)V + public + com.serial4j.core.errno.Errno + getCausingErrno(); + descriptor: + ()Lcom/serial4j/core/errno/Errno; + } + Compiled + from + "NoSuchDeviceException.java" + public + final + class + com.serial4j.core.serial.throwable.NoSuchDeviceException + extends + com.serial4j.core.serial.throwable.SerialThrowable + { + public + com.serial4j.core.serial.throwable.NoSuchDeviceException(java.lang.String); + descriptor: + (Ljava/lang/String;)V + public + com.serial4j.core.errno.Errno + getCausingErrno(); + descriptor: + ()Lcom/serial4j/core/errno/Errno; + } + Compiled + from + "BrokenPipeException.java" + public + final + class + com.serial4j.core.serial.throwable.BrokenPipeException + extends + com.serial4j.core.serial.throwable.SerialThrowable + { + public + com.serial4j.core.serial.throwable.BrokenPipeException(java.lang.String); + descriptor: + (Ljava/lang/String;)V + public + com.serial4j.core.errno.Errno + getCausingErrno(); + descriptor: + ()Lcom/serial4j/core/errno/Errno; + } + Compiled + from + "NoAvailableTtyDevicesException.java" + public + class + com.serial4j.core.serial.throwable.NoAvailableTtyDevicesException + extends + com.serial4j.core.serial.throwable.SerialThrowable + { + public + com.serial4j.core.serial.throwable.NoAvailableTtyDevicesException(java.lang.String); + descriptor: + (Ljava/lang/String;)V + public + com.serial4j.core.errno.Errno + getCausingErrno(); + descriptor: + ()Lcom/serial4j/core/errno/Errno; + } + Compiled + from + "FileTableOverflowException.java" + public + final + class + com.serial4j.core.serial.throwable.FileTableOverflowException + extends + com.serial4j.core.serial.throwable.SerialThrowable + { + public + com.serial4j.core.serial.throwable.FileTableOverflowException(java.lang.String); + descriptor: + (Ljava/lang/String;)V + public + com.serial4j.core.errno.Errno + getCausingErrno(); + descriptor: + ()Lcom/serial4j/core/errno/Errno; + } + Compiled + from + "NotTtyDeviceException.java" + public + final + class + com.serial4j.core.serial.throwable.NotTtyDeviceException + extends + com.serial4j.core.serial.throwable.SerialThrowable + { + public + com.serial4j.core.serial.throwable.NotTtyDeviceException(java.lang.String); + descriptor: + (Ljava/lang/String;)V + public + com.serial4j.core.errno.Errno + getCausingErrno(); + descriptor: + ()Lcom/serial4j/core/errno/Errno; + } + Compiled + from + "NoSpaceLeftException.java" + public + class + com.serial4j.core.serial.throwable.NoSpaceLeftException + extends + com.serial4j.core.serial.throwable.SerialThrowable + { + public + com.serial4j.core.serial.throwable.NoSpaceLeftException(java.lang.String); + descriptor: + (Ljava/lang/String;)V + public + com.serial4j.core.errno.Errno + getCausingErrno(); + descriptor: + ()Lcom/serial4j/core/errno/Errno; + } + Compiled + from + "InvalidPortException.java" + public + final + class + com.serial4j.core.serial.throwable.InvalidPortException + extends + com.serial4j.core.serial.throwable.SerialThrowable + { + public + com.serial4j.core.serial.throwable.InvalidPortException(java.lang.String); + descriptor: + (Ljava/lang/String;)V + public + com.serial4j.core.errno.Errno + getCausingErrno(); + descriptor: + ()Lcom/serial4j/core/errno/Errno; + } + Compiled + from + "FileIsDirectoryException.java" + public + final + class + com.serial4j.core.serial.throwable.FileIsDirectoryException + extends + com.serial4j.core.serial.throwable.SerialThrowable + { + public + com.serial4j.core.serial.throwable.FileIsDirectoryException(java.lang.String); + descriptor: + (Ljava/lang/String;)V + public + com.serial4j.core.errno.Errno + getCausingErrno(); + descriptor: + ()Lcom/serial4j/core/errno/Errno; + } + Compiled + from + "FileAlreadyOpenedException.java" + public + final + class + com.serial4j.core.serial.throwable.FileAlreadyOpenedException + extends + com.serial4j.core.serial.throwable.SerialThrowable + { + public + com.serial4j.core.serial.throwable.FileAlreadyOpenedException(java.lang.String); + descriptor: + (Ljava/lang/String;)V + public + com.serial4j.core.errno.Errno + getCausingErrno(); + descriptor: + ()Lcom/serial4j/core/errno/Errno; + } + Compiled + from + "PermissionDeniedException.java" + public + class + com.serial4j.core.serial.throwable.PermissionDeniedException + extends + com.serial4j.core.serial.throwable.SerialThrowable + { + public + com.serial4j.core.serial.throwable.PermissionDeniedException(java.lang.String); + descriptor: + (Ljava/lang/String;)V + public + com.serial4j.core.errno.Errno + getCausingErrno(); + descriptor: + ()Lcom/serial4j/core/errno/Errno; + } + Compiled + from + "ErrnoNotFoundError.java" + public + class + com.serial4j.core.serial.throwable.ErrnoNotFoundError + extends + java.lang.Error + { + public + com.serial4j.core.serial.throwable.ErrnoNotFoundError(java.lang.String); + descriptor: + (Ljava/lang/String;)V + } + Compiled + from + "FileTooLargeException.java" + public + class + com.serial4j.core.serial.throwable.FileTooLargeException + extends + com.serial4j.core.serial.throwable.SerialThrowable + { + public + com.serial4j.core.serial.throwable.FileTooLargeException(java.lang.String); + descriptor: + (Ljava/lang/String;)V + public + com.serial4j.core.errno.Errno + getCausingErrno(); + descriptor: + ()Lcom/serial4j/core/errno/Errno; + } + Compiled + from + "InputOutputException.java" + public + class + com.serial4j.core.serial.throwable.InputOutputException + extends + com.serial4j.core.serial.throwable.SerialThrowable + { + public + com.serial4j.core.serial.throwable.InputOutputException(java.lang.String); + descriptor: + (Ljava/lang/String;)V + public + com.serial4j.core.errno.Errno + getCausingErrno(); + descriptor: + ()Lcom/serial4j/core/errno/Errno; + } + Compiled + from + "OperationFailedException.java" + public + final + class + com.serial4j.core.serial.throwable.OperationFailedException + extends + com.serial4j.core.serial.throwable.SerialThrowable + { + public + com.serial4j.core.serial.throwable.OperationFailedException(java.lang.String); + descriptor: + (Ljava/lang/String;)V + public + com.serial4j.core.errno.Errno + getCausingErrno(); + descriptor: + ()Lcom/serial4j/core/errno/Errno; + } + Compiled + from + "BadFileDescriptorException.java" + public + final + class + com.serial4j.core.serial.throwable.BadFileDescriptorException + extends + com.serial4j.core.serial.throwable.SerialThrowable + { + public + com.serial4j.core.serial.throwable.BadFileDescriptorException(java.lang.String); + descriptor: + (Ljava/lang/String;)V + public + com.serial4j.core.errno.Errno + getCausingErrno(); + descriptor: + ()Lcom/serial4j/core/errno/Errno; + } + Compiled + from + "SerialMonitorEntity.java" + public + abstract + class + com.serial4j.core.serial.entity.SerialMonitorEntity + implements + java.lang.Runnable + { + protected + final + com.serial4j.core.util.process.Semaphore$Mutex + MUTEX; + descriptor: + Lcom/serial4j/core/util/process/Semaphore$Mutex; + protected + final + com.serial4j.core.util.process.Semaphore + SEMAPHORE; + descriptor: + Lcom/serial4j/core/util/process/Semaphore; + private + final + java.util.logging.Logger + entityLogger; + descriptor: + Ljava/util/logging/Logger; + private + boolean + hasLoggedMonitor; + descriptor: + Z + private + final + com.serial4j.core.serial.monitor.SerialMonitor + serialMonitor; + descriptor: + Lcom/serial4j/core/serial/monitor/SerialMonitor; + private + final + java.lang.String + entityName; + descriptor: + Ljava/lang/String; + public + com.serial4j.core.serial.entity.SerialMonitorEntity(com.serial4j.core.serial.monitor.SerialMonitor, + java.lang.String); + descriptor: + (Lcom/serial4j/core/serial/monitor/SerialMonitor;Ljava/lang/String;)V + public + void + run(); + descriptor: + ()V + protected + void + terminate(); + descriptor: + ()V + protected + boolean + isUsingReturnCarriage(); + descriptor: + ()Z + protected + boolean + isMonitoringStarted(); + descriptor: + ()Z + protected + void + setMonitoringStarted(boolean); + descriptor: + (Z)V + public + com.serial4j.core.serial.monitor.SerialMonitor + getSerialMonitor(); + descriptor: + ()Lcom/serial4j/core/serial/monitor/SerialMonitor; + protected + com.serial4j.core.serial.TerminalDevice + getTerminalDevice(); + descriptor: + ()Lcom/serial4j/core/serial/TerminalDevice; + protected + java.util.ArrayList + getSerialDataListeners(); + descriptor: + ()Ljava/util/ArrayList; + protected + boolean + isTerminate(); + descriptor: + ()Z + protected + abstract + void + onDataMonitored(com.serial4j.core.serial.monitor.SerialMonitor); + descriptor: + (Lcom/serial4j/core/serial/monitor/SerialMonitor;)V + protected + abstract + com.serial4j.core.serial.entity.EntityStatus + getSerialEntityStatusListener(); + descriptor: + ()Lcom/serial4j/core/serial/entity/EntityStatus; + protected + abstract + boolean + isSerialEntityInitialized(); + descriptor: + ()Z + protected + abstract + void + setSerialEntityInitialized(boolean); + descriptor: + (Z)V + protected + abstract + java.io.Closeable + getEntityStream(); + descriptor: + ()Ljava/io/Closeable; + private + void + initMutexWithLockData(); + descriptor: + ()V + } + Compiled + from + "SerialReadEntity.java" + public + class + com.serial4j.core.serial.entity.impl.SerialReadEntity + extends + com.serial4j.core.serial.entity.SerialMonitorEntity + { + private + java.lang.StringBuffer + stringBuffer; + descriptor: + Ljava/lang/StringBuffer; + public + com.serial4j.core.serial.entity.impl.SerialReadEntity(com.serial4j.core.serial.monitor.SerialMonitor); + descriptor: + (Lcom/serial4j/core/serial/monitor/SerialMonitor;)V + protected + void + onDataMonitored(com.serial4j.core.serial.monitor.SerialMonitor); + descriptor: + (Lcom/serial4j/core/serial/monitor/SerialMonitor;)V + protected + java.io.InputStream + getEntityStream(); + descriptor: + ()Ljava/io/InputStream; + protected + boolean + isSerialEntityInitialized(); + descriptor: + ()Z + protected + void + setSerialEntityInitialized(boolean); + descriptor: + (Z)V + protected + com.serial4j.core.serial.entity.EntityStatus + getSerialEntityStatusListener(); + descriptor: + ()Lcom/serial4j/core/serial/entity/EntityStatus; + protected + java.io.Closeable + getEntityStream(); + descriptor: + ()Ljava/io/Closeable; + } + Compiled + from + "SerialWriteEntity.java" + public + class + com.serial4j.core.serial.entity.impl.SerialWriteEntity + extends + com.serial4j.core.serial.entity.SerialMonitorEntity + { + private + final + java.util.ArrayList + writableCapsules; + descriptor: + Ljava/util/ArrayList; + public + com.serial4j.core.serial.entity.impl.SerialWriteEntity(com.serial4j.core.serial.monitor.SerialMonitor); + descriptor: + (Lcom/serial4j/core/serial/monitor/SerialMonitor;)V + protected + void + onDataMonitored(com.serial4j.core.serial.monitor.SerialMonitor); + descriptor: + (Lcom/serial4j/core/serial/monitor/SerialMonitor;)V + protected + java.io.OutputStream + getEntityStream(); + descriptor: + ()Ljava/io/OutputStream; + protected + boolean + isSerialEntityInitialized(); + descriptor: + ()Z + protected + void + setSerialEntityInitialized(boolean); + descriptor: + (Z)V + protected + com.serial4j.core.serial.entity.EntityStatus + getSerialEntityStatusListener(); + descriptor: + ()Lcom/serial4j/core/serial/entity/EntityStatus; + public + java.util.ArrayList + getSerialWriteCapsules(); + descriptor: + ()Ljava/util/ArrayList; + public + synchronized + void + addWritableCapsule(com.serial4j.core.serial.entity.impl.WritableCapsule); + descriptor: + (Lcom/serial4j/core/serial/entity/impl/WritableCapsule;)V + public + void + removeWritableCapsule(com.serial4j.core.serial.entity.impl.WritableCapsule); + descriptor: + (Lcom/serial4j/core/serial/entity/impl/WritableCapsule;)V + private + void + sendToUART(int); + descriptor: + (I)V + protected + java.io.Closeable + getEntityStream(); + descriptor: + ()Ljava/io/Closeable; + } + Compiled + from + "WritableCapsule.java" + public + final + class + com.serial4j.core.serial.entity.impl.WritableCapsule + implements + java.lang.Cloneable + { + private + java.lang.String + data; + descriptor: + Ljava/lang/String; + private + boolean + dataWritten; + descriptor: + Z + public + com.serial4j.core.serial.entity.impl.WritableCapsule(); + descriptor: + ()V + public + void + write(java.lang.String); + descriptor: + (Ljava/lang/String;)V + public + java.lang.String + getData(); + descriptor: + ()Ljava/lang/String; + public + boolean + isDataWritten(); + descriptor: + ()Z + public + void + setDataWritten(boolean); + descriptor: + (Z)V + } + Compiled + from + "EntityStatus.java" + public + interface + com.serial4j.core.serial.entity.EntityStatus + { + public + abstract + void + onSerialEntityInitialized(T); + descriptor: + (Lcom/serial4j/core/serial/entity/SerialMonitorEntity;)V + public + abstract + void + onSerialEntityTerminated(T); + descriptor: + (Lcom/serial4j/core/serial/entity/SerialMonitorEntity;)V + public + abstract + void + onUpdate(T); + descriptor: + (Lcom/serial4j/core/serial/entity/SerialMonitorEntity;)V + } + Compiled + from + "ReadConfiguration.java" + public + final + class + com.serial4j.core.serial.ReadConfiguration + extends + java.lang.Enum + { + public + static + final + com.serial4j.core.serial.ReadConfiguration + POLLING_READ; + descriptor: + Lcom/serial4j/core/serial/ReadConfiguration; + public + static + final + com.serial4j.core.serial.ReadConfiguration + BLOCKING_READ_ONE_CHAR; + descriptor: + Lcom/serial4j/core/serial/ReadConfiguration; + public + static + final + com.serial4j.core.serial.ReadConfiguration + READ_WITH_TIMEOUT; + descriptor: + Lcom/serial4j/core/serial/ReadConfiguration; + public + static + final + com.serial4j.core.serial.ReadConfiguration + READ_WITH_INTERBYTE_TIMEOUT; + descriptor: + Lcom/serial4j/core/serial/ReadConfiguration; + public + static + final + com.serial4j.core.serial.ReadConfiguration + ERR_INVALID_PORT; + descriptor: + Lcom/serial4j/core/serial/ReadConfiguration; + private + int[] + mode; + descriptor: + [I + private + final + java.lang.String + description; + descriptor: + Ljava/lang/String; + private + static + final + com.serial4j.core.serial.ReadConfiguration[] + $VALUES; + descriptor: + [Lcom/serial4j/core/serial/ReadConfiguration; + public + static + com.serial4j.core.serial.ReadConfiguration[] + values(); + descriptor: + ()[Lcom/serial4j/core/serial/ReadConfiguration; + public + static + com.serial4j.core.serial.ReadConfiguration + valueOf(java.lang.String); + descriptor: + (Ljava/lang/String;)Lcom/serial4j/core/serial/ReadConfiguration; + private + com.serial4j.core.serial.ReadConfiguration(int[], + java.lang.String); + descriptor: + (Ljava/lang/String;I[ILjava/lang/String;)V + public + int[] + getMode(); + descriptor: + ()[I + public + java.lang.String + getDescription(); + descriptor: + ()Ljava/lang/String; + public + static + com.serial4j.core.serial.ReadConfiguration + getFromNativeReadConfig(int[]); + descriptor: + ([I)Lcom/serial4j/core/serial/ReadConfiguration; + private + static + com.serial4j.core.serial.ReadConfiguration[] + $values(); + descriptor: + ()[Lcom/serial4j/core/serial/ReadConfiguration; + static + {}; + descriptor: + ()V + } + Compiled + from + "ErrnoToException.java" + public + final + class + com.serial4j.core.errno.ErrnoToException + { + private + com.serial4j.core.errno.ErrnoToException(); + descriptor: + ()V + public + static + void + throwFromErrno(int, + java.lang.String); + descriptor: + (ILjava/lang/String;)V + } + Compiled + from + "Errno.java" + public + final + class + com.serial4j.core.errno.Errno + extends + java.lang.Enum + { + public + static + final + com.serial4j.core.errno.Errno + ERR_INVALID_PORT; + descriptor: + Lcom/serial4j/core/errno/Errno; + public + static + final + com.serial4j.core.errno.Errno + ERR_OPERATION_FAILED; + descriptor: + Lcom/serial4j/core/errno/Errno; + public + static + final + com.serial4j.core.errno.Errno + ERR_NO_AVAILABLE_TTY_DEVICES; + descriptor: + Lcom/serial4j/core/errno/Errno; + public + static + final + com.serial4j.core.errno.Errno + EACCES; + descriptor: + Lcom/serial4j/core/errno/Errno; + public + static + final + com.serial4j.core.errno.Errno + EEXIST; + descriptor: + Lcom/serial4j/core/errno/Errno; + public + static + final + com.serial4j.core.errno.Errno + EINTR; + descriptor: + Lcom/serial4j/core/errno/Errno; + public + static + final + com.serial4j.core.errno.Errno + EISDIR; + descriptor: + Lcom/serial4j/core/errno/Errno; + public + static + final + com.serial4j.core.errno.Errno + EMFILE; + descriptor: + Lcom/serial4j/core/errno/Errno; + public + static + final + com.serial4j.core.errno.Errno + ENFILE; + descriptor: + Lcom/serial4j/core/errno/Errno; + public + static + final + com.serial4j.core.errno.Errno + ENOENT; + descriptor: + Lcom/serial4j/core/errno/Errno; + public + static + final + com.serial4j.core.errno.Errno + ENOSPC; + descriptor: + Lcom/serial4j/core/errno/Errno; + public + static + final + com.serial4j.core.errno.Errno + ENXIO; + descriptor: + Lcom/serial4j/core/errno/Errno; + public + static + final + com.serial4j.core.errno.Errno + EROFS; + descriptor: + Lcom/serial4j/core/errno/Errno; + public + static + final + com.serial4j.core.errno.Errno + EPIPE; + descriptor: + Lcom/serial4j/core/errno/Errno; + public + static + final + com.serial4j.core.errno.Errno + EBADF; + descriptor: + Lcom/serial4j/core/errno/Errno; + public + static + final + com.serial4j.core.errno.Errno + ENOTTY; + descriptor: + Lcom/serial4j/core/errno/Errno; + public + static + final + com.serial4j.core.errno.Errno + EINVAL; + descriptor: + Lcom/serial4j/core/errno/Errno; + public + static + final + com.serial4j.core.errno.Errno + EAGAIN; + descriptor: + Lcom/serial4j/core/errno/Errno; + public + static + final + com.serial4j.core.errno.Errno + EIO; + descriptor: + Lcom/serial4j/core/errno/Errno; + public + static + final + com.serial4j.core.errno.Errno + EFBIG; + descriptor: + Lcom/serial4j/core/errno/Errno; + private + final + int + value; + descriptor: + I + private + final + java.lang.String + description; + descriptor: + Ljava/lang/String; + private + static + final + com.serial4j.core.errno.Errno[] + $VALUES; + descriptor: + [Lcom/serial4j/core/errno/Errno; + public + static + com.serial4j.core.errno.Errno[] + values(); + descriptor: + ()[Lcom/serial4j/core/errno/Errno; + public + static + com.serial4j.core.errno.Errno + valueOf(java.lang.String); + descriptor: + (Ljava/lang/String;)Lcom/serial4j/core/errno/Errno; + private + com.serial4j.core.errno.Errno(int, + java.lang.String); + descriptor: + (Ljava/lang/String;IILjava/lang/String;)V + public + int + getValue(); + descriptor: + ()I + public + java.lang.String + getDescription(); + descriptor: + ()Ljava/lang/String; + private + static + com.serial4j.core.errno.Errno[] + $values(); + descriptor: + ()[Lcom/serial4j/core/errno/Errno; + static + {}; + descriptor: + ()V + } + Compiled + from + "NativeErrno.java" + public + final + class + com.serial4j.core.errno.NativeErrno + { + private + com.serial4j.core.errno.NativeErrno(); + descriptor: + ()V + protected + static + native + int + getBadFileDescriptorErrno(); + descriptor: + ()I + protected + static + native + int + getBrokenPipeErrno(); + descriptor: + ()I + protected + static + native + int + getFileAlreadyOpenedErrno(); + descriptor: + ()I + protected + static + native + int + getFileIsDirectoryErrno(); + descriptor: + ()I + protected + static + native + int + getFileTableOverflowErrno(); + descriptor: + ()I + protected + static + native + int + getFileTooLargeErrno(); + descriptor: + ()I + protected + static + native + int + getInputOutputErrno(); + descriptor: + ()I + protected + static + native + int + getInterruptedSystemCallErrno(); + descriptor: + ()I + protected + static + native + int + getInvalidArgumentErrno(); + descriptor: + ()I + protected + static + native + int + getInvalidPortErrno(); + descriptor: + ()I + protected + static + native + int + getNoAvailableTtyDevicesErrno(); + descriptor: + ()I + protected + static + native + int + getNoSpaceLeftErrno(); + descriptor: + ()I + protected + static + native + int + getNoSuchDeviceErrno(); + descriptor: + ()I + protected + static + native + int + getNoSuchFileErrno(); + descriptor: + ()I + protected + static + native + int + getNotTtyDeviceErrno(); + descriptor: + ()I + protected + static + native + int + getOperationFailedErrno(); + descriptor: + ()I + protected + static + native + int + getPermissionDeniedErrno(); + descriptor: + ()I + protected + static + native + int + getReadOnlyFileSystemErrno(); + descriptor: + ()I + protected + static + native + int + getTooManyOpenedFilesErrno(); + descriptor: + ()I + protected + static + native + int + getTryAgainErrno(); + descriptor: + ()I + } + Compiled + from + "Semaphore.java" + public + final + class + com.serial4j.core.util.process.Semaphore + { + private + final + com.serial4j.core.util.process.Semaphore$Mutex + mutex; + descriptor: + Lcom/serial4j/core/util/process/Semaphore$Mutex; + private + static + final + java.util.logging.Logger + logger; + descriptor: + Ljava/util/logging/Logger; + private + com.serial4j.core.util.process.Semaphore(com.serial4j.core.util.process.Semaphore$Mutex); + descriptor: + (Lcom/serial4j/core/util/process/Semaphore$Mutex;)V + public + static + com.serial4j.core.util.process.Semaphore + build(com.serial4j.core.util.process.Semaphore$Mutex); + descriptor: + (Lcom/serial4j/core/util/process/Semaphore$Mutex;)Lcom/serial4j/core/util/process/Semaphore; + public + + void + lock(MO); + descriptor: + (Ljava/lang/Object;)V + public + void + waitForUnlock(); + descriptor: + ()V + public + + void + unlock(O); + descriptor: + (Ljava/lang/Object;)V + public + com.serial4j.core.util.process.Semaphore$Mutex + getMutex(); + descriptor: + ()Lcom/serial4j/core/util/process/Semaphore$Mutex; + static + {}; + descriptor: + ()V + } + Compiled + from + "Semaphore.java" + public + final + class + com.serial4j.core.util.process.Semaphore$Mutex + { + private + java.lang.Object + lockData; + descriptor: + Ljava/lang/Object; + private + java.lang.Object + monitorObject; + descriptor: + Ljava/lang/Object; + private + java.lang.Object + unlockData; + descriptor: + Ljava/lang/Object; + public + + com.serial4j.core.util.process.Semaphore$Mutex(O, + LD, + ULD); + descriptor: + (Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)V + public + com.serial4j.core.util.process.Semaphore$Mutex(); + descriptor: + ()V + public + void + setLockData(java.lang.Object); + descriptor: + (Ljava/lang/Object;)V + public + void + setMonitorObject(java.lang.Object); + descriptor: + (Ljava/lang/Object;)V + protected + void + setUnlockData(java.lang.Object); + descriptor: + (Ljava/lang/Object;)V + public + java.lang.Object + getLockData(); + descriptor: + ()Ljava/lang/Object; + public + java.lang.Object + getMonitorObject(); + descriptor: + ()Ljava/lang/Object; + public + java.lang.Object + getUnlockData(); + descriptor: + ()Ljava/lang/Object; + protected + final + java.lang.Void + NO_JOB(); + descriptor: + ()Ljava/lang/Void; + } + Compiled + from + "NativeImageLoader.java" + final + class + com.serial4j.core.util.natives.NativeImageLoader$OS + extends + java.lang.Enum + { + public + static + final + com.serial4j.core.util.natives.NativeImageLoader$OS + NAME; + descriptor: + Lcom/serial4j/core/util/natives/NativeImageLoader$OS; + public + static + final + com.serial4j.core.util.natives.NativeImageLoader$OS + ARCH; + descriptor: + Lcom/serial4j/core/util/natives/NativeImageLoader$OS; + public + static + final + java.lang.String + Linux; + descriptor: + Ljava/lang/String; + public + static + final + java.lang.String + Windows; + descriptor: + Ljava/lang/String; + public + static + final + java.lang.String + Mac; + descriptor: + Ljava/lang/String; + public + static + final + java.lang.String + Android; + descriptor: + Ljava/lang/String; + private + final + java.lang.String + data; + descriptor: + Ljava/lang/String; + private + static + final + com.serial4j.core.util.natives.NativeImageLoader$OS[] + $VALUES; + descriptor: + [Lcom/serial4j/core/util/natives/NativeImageLoader$OS; + public + static + com.serial4j.core.util.natives.NativeImageLoader$OS[] + values(); + descriptor: + ()[Lcom/serial4j/core/util/natives/NativeImageLoader$OS; + public + static + com.serial4j.core.util.natives.NativeImageLoader$OS + valueOf(java.lang.String); + descriptor: + (Ljava/lang/String;)Lcom/serial4j/core/util/natives/NativeImageLoader$OS; + private + com.serial4j.core.util.natives.NativeImageLoader$OS(java.lang.String); + descriptor: + (Ljava/lang/String;ILjava/lang/String;)V + public + java.lang.String + getData(); + descriptor: + ()Ljava/lang/String; + public + static + boolean + is_x86_x64(java.lang.String); + descriptor: + (Ljava/lang/String;)Z + public + static + boolean + is_x86_x86(java.lang.String); + descriptor: + (Ljava/lang/String;)Z + public + static + boolean + is_arrm32(java.lang.String); + descriptor: + (Ljava/lang/String;)Z + private + static + com.serial4j.core.util.natives.NativeImageLoader$OS[] + $values(); + descriptor: + ()[Lcom/serial4j/core/util/natives/NativeImageLoader$OS; + static + {}; + descriptor: + ()V + } + Compiled + from + "NativeImageLoader.java" + public + final + class + com.serial4j.core.util.natives.NativeImageLoader$State + extends + java.lang.Enum + { + public + static + final + com.serial4j.core.util.natives.NativeImageLoader$State + TOGGLED; + descriptor: + Lcom/serial4j/core/util/natives/NativeImageLoader$State; + private + static + final + com.serial4j.core.util.natives.NativeImageLoader$State[] + $VALUES; + descriptor: + [Lcom/serial4j/core/util/natives/NativeImageLoader$State; + public + static + com.serial4j.core.util.natives.NativeImageLoader$State[] + values(); + descriptor: + ()[Lcom/serial4j/core/util/natives/NativeImageLoader$State; + public + static + com.serial4j.core.util.natives.NativeImageLoader$State + valueOf(java.lang.String); + descriptor: + (Ljava/lang/String;)Lcom/serial4j/core/util/natives/NativeImageLoader$State; + private + com.serial4j.core.util.natives.NativeImageLoader$State(); + descriptor: + (Ljava/lang/String;I)V + private + static + com.serial4j.core.util.natives.NativeImageLoader$State[] + $values(); + descriptor: + ()[Lcom/serial4j/core/util/natives/NativeImageLoader$State; + static + {}; + descriptor: + ()V + } + Compiled + from + "NativeImageLoader.java" + public + final + class + com.serial4j.core.util.natives.NativeImageLoader + { + protected + static + final + com.serial4j.core.util.process.Semaphore$Mutex + MUTEX; + descriptor: + Lcom/serial4j/core/util/process/Semaphore$Mutex; + protected + static + final + com.serial4j.core.util.process.Semaphore + SEMAPHORE; + descriptor: + Lcom/serial4j/core/util/process/Semaphore; + private + static + boolean + isLoaded; + descriptor: + Z + private + com.serial4j.core.util.natives.NativeImageLoader(); + descriptor: + ()V + public + static + void + loadLibrary(); + descriptor: + ()V + private + static + void + loadLinux(); + descriptor: + ()V + private + static + void + loadWindows(); + descriptor: + ()V + private + static + void + loadMac(); + descriptor: + ()V + private + static + void + loadAndroid(); + descriptor: + ()V + private + static + void + extractImage(com.serial4j.core.util.natives.NativeImageLoader$NativeImage); + descriptor: + (Lcom/serial4j/core/util/natives/NativeImageLoader$NativeImage;)V + private + static + void + initMutexWithLockData(); + descriptor: + ()V + static + {}; + descriptor: + ()V + } + Compiled + from + "NativeImageLoader.java" + public + final + class + com.serial4j.core.util.natives.NativeImageLoader$NativeImage + extends + java.lang.Enum + { + public + static + final + com.serial4j.core.util.natives.NativeImageLoader$NativeImage + LINUX_x86_x64; + descriptor: + Lcom/serial4j/core/util/natives/NativeImageLoader$NativeImage; + public + static + final + com.serial4j.core.util.natives.NativeImageLoader$NativeImage + LINUX_x86_x86; + descriptor: + Lcom/serial4j/core/util/natives/NativeImageLoader$NativeImage; + public + static + final + com.serial4j.core.util.natives.NativeImageLoader$NativeImage + MAC_x86_x64; + descriptor: + Lcom/serial4j/core/util/natives/NativeImageLoader$NativeImage; + public + static + final + com.serial4j.core.util.natives.NativeImageLoader$NativeImage + WIN_x86_x64; + descriptor: + Lcom/serial4j/core/util/natives/NativeImageLoader$NativeImage; + private + final + java.lang.String + image; + descriptor: + Ljava/lang/String; + private + static + final + com.serial4j.core.util.natives.NativeImageLoader$NativeImage[] + $VALUES; + descriptor: + [Lcom/serial4j/core/util/natives/NativeImageLoader$NativeImage; + public + static + com.serial4j.core.util.natives.NativeImageLoader$NativeImage[] + values(); + descriptor: + ()[Lcom/serial4j/core/util/natives/NativeImageLoader$NativeImage; + public + static + com.serial4j.core.util.natives.NativeImageLoader$NativeImage + valueOf(java.lang.String); + descriptor: + (Ljava/lang/String;)Lcom/serial4j/core/util/natives/NativeImageLoader$NativeImage; + private + com.serial4j.core.util.natives.NativeImageLoader$NativeImage(java.lang.String); + descriptor: + (Ljava/lang/String;ILjava/lang/String;)V + public + java.lang.String + getImage(); + descriptor: + ()Ljava/lang/String; + private + static + com.serial4j.core.util.natives.NativeImageLoader$NativeImage[] + $values(); + descriptor: + ()[Lcom/serial4j/core/util/natives/NativeImageLoader$NativeImage; + static + {}; + descriptor: + ()V + } + Compiled + from + "HelloSerialMonitor.java" + public + class + com.serial4j.example.monitor.HelloSerialMonitor + implements + com.serial4j.core.serial.monitor.SerialDataListener, + com.serial4j.core.serial.entity.EntityStatus, + java.lang.Runnable + { + private + static + boolean + isDataSent; + descriptor: + Z + public + com.serial4j.example.monitor.HelloSerialMonitor(); + descriptor: + ()V + public + void + run(); + descriptor: + ()V + private + void + writeInUARTCapsule(com.serial4j.core.serial.monitor.SerialMonitor, + java.lang.String); + descriptor: + (Lcom/serial4j/core/serial/monitor/SerialMonitor;Ljava/lang/String;)V + private + void + delay(long); + descriptor: + (J)V + public + void + onSerialEntityInitialized(com.serial4j.core.serial.entity.impl.SerialWriteEntity); + descriptor: + (Lcom/serial4j/core/serial/entity/impl/SerialWriteEntity;)V + public + void + onSerialEntityTerminated(com.serial4j.core.serial.entity.impl.SerialWriteEntity); + descriptor: + (Lcom/serial4j/core/serial/entity/impl/SerialWriteEntity;)V + public + void + onUpdate(com.serial4j.core.serial.entity.impl.SerialWriteEntity); + descriptor: + (Lcom/serial4j/core/serial/entity/impl/SerialWriteEntity;)V + public + void + onDataReceived(int); + descriptor: + (I)V + public + void + onDataTransmitted(int); + descriptor: + (I)V + public + void + onDataReceived(java.lang.String); + descriptor: + (Ljava/lang/String;)V + public + void + onUpdate(com.serial4j.core.serial.entity.SerialMonitorEntity); + descriptor: + (Lcom/serial4j/core/serial/entity/SerialMonitorEntity;)V + public + void + onSerialEntityTerminated(com.serial4j.core.serial.entity.SerialMonitorEntity); + descriptor: + (Lcom/serial4j/core/serial/entity/SerialMonitorEntity;)V + public + void + onSerialEntityInitialized(com.serial4j.core.serial.entity.SerialMonitorEntity); + descriptor: + (Lcom/serial4j/core/serial/entity/SerialMonitorEntity;)V + } + Compiled + from + "Launcher.java" + public + final + class + com.serial4j.example.Launcher + { + public + com.serial4j.example.Launcher(); + descriptor: + ()V + public + static + void + main(java.lang.String[]) + throws + java.lang.InterruptedException; + descriptor: + ([Ljava/lang/String;)V + } + Compiled + from + "HelloNativeSerial4J.java" + class + com.serial4j.example.serial4j.HelloNativeSerial4J$2 + implements + java.lang.Runnable + { + final + long + val$millis; + descriptor: + J + final + com.serial4j.core.serial.TerminalDevice + val$ttyDevice; + descriptor: + Lcom/serial4j/core/serial/TerminalDevice; + com.serial4j.example.serial4j.HelloNativeSerial4J$2(); + descriptor: + (Lcom/serial4j/example/serial4j/HelloNativeSerial4J;JLcom/serial4j/core/serial/TerminalDevice;)V + public + void + run(); + descriptor: + ()V + } + Compiled + from + "HelloSerial4jIO.java" + class + com.serial4j.example.serial4j.HelloSerial4jIO$1 + implements + java.lang.Runnable + { + final + long + val$millis; + descriptor: + J + final + com.serial4j.core.serial.TerminalDevice + val$ttyDevice; + descriptor: + Lcom/serial4j/core/serial/TerminalDevice; + com.serial4j.example.serial4j.HelloSerial4jIO$1(); + descriptor: + (JLcom/serial4j/core/serial/TerminalDevice;)V + public + void + run(); + descriptor: + ()V + } + Compiled + from + "HelloNativeSerial4J.java" + class + com.serial4j.example.serial4j.HelloNativeSerial4J$1 + implements + java.lang.Runnable + { + final + long + val$millis; + descriptor: + J + final + com.serial4j.core.serial.TerminalDevice + val$ttyDevice; + descriptor: + Lcom/serial4j/core/serial/TerminalDevice; + com.serial4j.example.serial4j.HelloNativeSerial4J$1(); + descriptor: + (Lcom/serial4j/example/serial4j/HelloNativeSerial4J;JLcom/serial4j/core/serial/TerminalDevice;)V + public + void + run(); + descriptor: + ()V + } + Compiled + from + "HelloSerial4jIO.java" + public + final + class + com.serial4j.example.serial4j.HelloSerial4jIO + implements + java.lang.Runnable + { + protected + final + com.serial4j.core.serial.TerminalDevice + ttyDevice; + descriptor: + Lcom/serial4j/core/serial/TerminalDevice; + public + com.serial4j.example.serial4j.HelloSerial4jIO(); + descriptor: + ()V + public + void + run(); + descriptor: + ()V + private + static + void + startWriteThread(com.serial4j.core.serial.TerminalDevice, + long); + descriptor: + (Lcom/serial4j/core/serial/TerminalDevice;J)V + private + static + void + startReadThread(com.serial4j.core.serial.TerminalDevice, + long); + descriptor: + (Lcom/serial4j/core/serial/TerminalDevice;J)V + } + Compiled + from + "HelloSerial4jIO.java" + class + com.serial4j.example.serial4j.HelloSerial4jIO$2 + implements + java.lang.Runnable + { + final + long + val$millis; + descriptor: + J + final + com.serial4j.core.serial.TerminalDevice + val$ttyDevice; + descriptor: + Lcom/serial4j/core/serial/TerminalDevice; + com.serial4j.example.serial4j.HelloSerial4jIO$2(); + descriptor: + (JLcom/serial4j/core/serial/TerminalDevice;)V + public + void + run(); + descriptor: + ()V + } + Compiled + from + "HelloNativeSerial4J.java" + public + final + class + com.serial4j.example.serial4j.HelloNativeSerial4J + implements + java.lang.Runnable + { + protected + final + com.serial4j.core.serial.TerminalDevice + ttyDevice; + descriptor: + Lcom/serial4j/core/serial/TerminalDevice; + protected + static + final + java.util.logging.Logger + EXAMPLE_LOGGER; + descriptor: + Ljava/util/logging/Logger; + public + com.serial4j.example.serial4j.HelloNativeSerial4J(); + descriptor: + ()V + public + void + run(); + descriptor: + ()V + private + void + startReadThread(com.serial4j.core.serial.TerminalDevice, + long); + descriptor: + (Lcom/serial4j/core/serial/TerminalDevice;J)V + private + void + startWriteThread(com.serial4j.core.serial.TerminalDevice, + long); + descriptor: + (Lcom/serial4j/core/serial/TerminalDevice;J)V + static + {}; + descriptor: + ()V + } diff --git a/HelloSerial4j/build/assemble/assemble.sh b/HelloSerial4j/build/assemble/assemble.sh new file mode 100755 index 00000000..8f40f69c --- /dev/null +++ b/HelloSerial4j/build/assemble/assemble.sh @@ -0,0 +1,133 @@ +#** +#* Ccoffee Build tool, manual build, alpha-v1. +#* Custom Includsions for GTKmm cpp wrapper +#* dependencies '-I"/usr/include/glibmm-2.9.1/glib" -I"/usr/include/sigc++-2.0/sigc++" -I"/usr/include/giomm-2.4" -I"/usr/include/gtkmm-4.2.0/gtk"' +#* +#* @author pavl_g. +#*# + +# Sanity check the build directory +source variables.sh + +if [[ ! -d $javabuild_directory ]]; then + chmod +x $project_root'/build/compile/compile.sh' + cd $project_root'/build/compile' + ./'compile.sh' +fi + +echo "Assemble JAR" +echo -e $RESET_Cs +echo "--------Script start--------" +cd $project_root'/build/assemble' +source script.sh +source clean.sh + +clean=`clean` +if (( clean > 0 )); then + echo -e "$RED_C Task@Clean : Failed" +else + echo -e "$CYAN_C Task@Clean : Completed" +fi + +echo -e $RESET_Cs + +make_output_dir=`makeOutputDir` +if (( make_output_dir > 0 )); then + echo -e "$RED_C Task@MakeOutputDirectory : Failed" +else + echo -e "$WHITE_C Task@MakeOutputDirectory : Completed" +fi + +echo -e $RESET_Cs + +create_manifest=`createManifest` +if (( create_manifest > 0 )); then + echo -e "$RED_C Task@CreateJarManifest : Failed" +else + echo -e "$ORANGE_C Task@CreateJarManifest : Completed" +fi + +echo -e $RESET_Cs + +generate_docs=`generateDocs` +if (( generate_docs > 0 )); then + echo -e "$RED_C Task@GenerateJavaDocs : Failed" +else + echo -e "$ORANGE_C Task@GenerateJavaDocs : Completed" +fi + +echo -e $RESET_Cs + +add_docs=`addJavaDocs` +if (( add_docs > 0 )); then + echo -e "$RED_C Task@AddJavaDocs : Failed" +else + echo -e "$MAGNETA_C Task@AddJavaDocs : Completed" +fi + +echo -e $RESET_Cs + +add_natives=`addDesktopNativeDependencies` +if (( add_natives > 0 )); then + echo -e "$RED_C Task@AddDesktopNativeDependencies : Failed" +else + echo -e "$MAGNETA_C Task@AddDesktopNativeDependencies : Completed" +fi + +echo -e $RESET_Cs + +add_android_natives=`addAndroidNativeDependencies` +if (( add_android_natives > 0 )); then + echo -e "$RED_C Task@AddNativeDependencies : Failed" +else + echo -e "$MAGNETA_C Task@AddNativeDependencies : Completed" +fi + +echo -e $RESET_Cs + +add_assets=`addAssets` +if (( add_assets > 0 )); then + echo -e "$RED_C Task@AddAssets : Failed -- AssetsNotFound" +else + echo -e "$ORANGE_C Task@AddAssets : Completed" +fi + +echo -e $RESET_Cs + +create_jar=`createJar` +if (( create_jar > 0 )); then + echo -e "$RED_C Task@CreateJar : Failed" +else + echo -e "$ORANGE_C Task@CreateJar : Completed" +fi + +echo -e $RESET_Cs + +create_docsjar=`createDocsJar` +if (( create_jar > 0 )); then + echo -e "$RED_C Task@CreateDocsJar : Failed" +else + echo -e "$ORANGE_C Task@CreateDocsJar : Completed" +fi + +echo -e $RESET_Cs + +create_output=`createOutput` +if (( create_jar > 0 )); then + echo -e "$RED_C Task@CreateOutput : Failed" +else + echo -e "$WHITE_C Task@CreateOutput : Completed" +fi + +echo -e $RESET_Cs + +remove_manifest=`removeManifest` +if (( create_jar > 0 )); then + echo -e "$RED_C Task@RemoveManifest : Failed" +else + echo -e "$WHITE_C Task@RemoveManifest : Completed" +fi + +echo -e $RESET_Cs + +echo "--------Script end--------" diff --git a/HelloSerial4j/build/assemble/clean.sh b/HelloSerial4j/build/assemble/clean.sh new file mode 100644 index 00000000..a5d4c684 --- /dev/null +++ b/HelloSerial4j/build/assemble/clean.sh @@ -0,0 +1,16 @@ +#** +#* Ccoffee Build tool, manual build, alpha-v1. +#* Custom Includsions for GTKmm cpp wrapper +#* dependencies '-I"/usr/include/glibmm-2.9.1/glib" -I"/usr/include/sigc++-2.0/sigc++" -I"/usr/include/giomm-2.4" -I"/usr/include/gtkmm-4.2.0/gtk"' +#* +#* @author pavl_g. +#*# + +source variables.sh + +function clean() { + if [[ -d $project_root'/output/'$jar_folder ]]; then + rm -rf ${project_root}'/output/'$jar_folder + fi + return $? +} diff --git a/HelloSerial4j/build/assemble/generatedocs.sh b/HelloSerial4j/build/assemble/generatedocs.sh new file mode 100755 index 00000000..a6eb6a1b --- /dev/null +++ b/HelloSerial4j/build/assemble/generatedocs.sh @@ -0,0 +1,5 @@ +source variables.sh + +function generateDocs() { + $javadoc -d docs -sourcepath $project_root'/src/main/java/' -subpackages $root_package -d $project_root'/'$java_docs_folder +} diff --git a/HelloSerial4j/build/assemble/script.sh b/HelloSerial4j/build/assemble/script.sh new file mode 100644 index 00000000..250e1f69 --- /dev/null +++ b/HelloSerial4j/build/assemble/script.sh @@ -0,0 +1,184 @@ +#** +#* Ccoffee Build tool, manual build, alpha-v1. +#* +#* @author pavl_g. +#*# + +source variables.sh +source generatedocs.sh + +function makeDir() { + local folder=$1 + + if [[ ! -d $folder ]]; then + if [[ ! `mkdir $folder` -eq 0 ]]; then + errors=$(( $errors + 1 )) + fi + fi + return $errors +} + +#** +#* Makes an output directory at the output location. +# +#* @return the number of errors. +#** +function makeOutputDir() { + local errors + cd $javabuild_directory + + makeDir $jar_folder + + return $errors +} + +#** +#* Creates a Manifest.mf file for the jar main class designation and dependencies inclusion. +# +#* @return the number of errors, 0 if no errors, 1 or 2 if there are errors. +#** +function createManifest() { + local errors=0 + cd $jar_tmp + if [[ ! `echo $manifest > Manifest.mf` -eq 0 ]]; then + errors=$(( $errors + 1 )) + fi + if [[ ! `echo $mainclass >> Manifest.mf` -eq 0 ]]; then + errors=$(( $errors + 1 )) + fi + if [[ ! `echo $api_name >> Manifest.mf` -eq 0 ]]; then + errors=$(( $errors + 1 )) + fi + if [[ ! `echo $version >> Manifest.mf` -eq 0 ]]; then + errors=$(( $errors + 1 )) + fi + return $errors +} + +#** +#* Adds the API generated java docs from the javadoc tool. +# +#* @return the number of errors, 0 if no errors, 1 or 2 if there are errors. +#** +function addJavaDocs() { + local errors=0 + cd $project_root + + if [[ $docs_dir ]]; then + # copy the object file to the build dir + if [[ ! `cp -r $docs_dir $jar_tmp` -eq 0 ]]; then + errors=$(( $errors + 1 )) + fi + fi + return $errors + +} + +#** +#* Adds the android native dependencies (the .so native object files) as a jar dependency +#* at the output/Arithmos/dependencies relative path. +# +#* @return the number of errors, 0 if no errors, 1 or 2 if there are errors. +#** +function addAndroidNativeDependencies() { + local errors=0 + # get the object files to link them + cd $shared_root_dir + if [[ ! `zip -r $android_natives_jar . -i "lib/*"` -eq 0 ]]; then + errors=$(( $errors + 1 )) + fi + + android_jar=$shared_root_dir"/$android_natives_jar" + if [[ $android_jar ]]; then + # copy the object file to the build dir + if [[ ! `mv $android_jar $jar_tmp` -eq 0 ]]; then + errors=$(( $errors + 1 )) + fi + fi + return $errors +} + +#** +#* Adds the linux native dependencies (the .so native object files) +#* at the output/Arithmos relative path. +#* +#* @return the number of errors, 0 if no errors, 1 or 2 if there are errors. +#** +function addDesktopNativeDependencies() { + local errors=0 + cd $shared_root_dir + + if [[ $shared_root_dir ]]; then + # copy the object file to the build dir + if [[ ! `cp -r $shared_root_dir'/native' $jar_tmp` -eq 0 ]]; then + errors=$(( $errors + 1 )) + fi + fi + return $errors +} + +function addAssets() { + local errors=1 + if [[ -f $assets ]]; then + if [[ ! `mkdir $jar_tmp'/assets'` -eq 0 ]]; then + errors=$(( $errors + 1 )) + fi + # copy to an asset folder + cp -r $assets $jar_tmp'/assets' + cd $jar_tmp + # zip the assets into a jar file + if [[ ! `zip -r assets.jar . -i 'assets/*'` -eq 0 ]]; then + errors=$(( $errors + 1 )) + fi + # remove the assets folder + rm -rf 'assets' + else + errors=$(( $errors + 1 )) + fi + return $errors +} + +function createDocsJar() { + local errors=0 + # get the manifest file to link it + cd $docs_tmp + if [[ ! `$java_jar --create --file $java_docs_jar --manifest $manifest_file './'` -eq 0 ]]; then + errors=$(( $errors + 1 )) + fi + + # move the jar to its respective output folder + mv $java_docs_jar $jar_tmp + + rm -r $docs_tmp + return $errors +} + +function createJar() { + local errors=0 + # get the manifest file to link it + cd $javabuild_directory + # get the class files ready + bytecode=`find -name "*.class"` + # command and output a jar file with linked manifest, java class files and object files + if [[ ! `$java_jar --create --file $jar --manifest $manifest_file $bytecode -C $jar_tmp './native'` -eq 0 ]]; then + errors=$(( $errors + 1 )) + fi + + # move the jar to its respective output folder + mv $jar $jar_tmp + + rm -r $jar_tmp'/native/' + + return $errors +} + +function createOutput() { + # move the jar directory containing the jar and the assets to the output directory + mv $jar_tmp $project_root'/output' +} + +function removeManifest() { + # remove the residual manifest file + cd $project_root'/output/'$jar_folder + rm 'Manifest.mf' +} diff --git a/HelloSerial4j/build/assemble/variables.sh b/HelloSerial4j/build/assemble/variables.sh new file mode 100644 index 00000000..8167a956 --- /dev/null +++ b/HelloSerial4j/build/assemble/variables.sh @@ -0,0 +1,39 @@ +#** +#* Ccoffee Build tool, manual build, alpha-v1. +#* +#* @author pavl_g. +#*# + +jar_folder='serial4j' +version_number='0.3A' +jar=${jar_folder}'.jar' + +java_docs_folder=$jar_folder'-'$version_number'-javadoc' +java_docs_jar=$java_docs_folder'.jar' + +# Manifest attributes +manifest='Manifest-Version: 1.0' +mainclass='Main-Class: com.serial4j.example.Launcher' +classpath='Class-Path: dependencies' +api_name='Name: '$jar_folder +version='Version: '$version_number + +assemble_dir=`pwd` +# cut the working directory from its end by a one '/' delimiter +build_dir="${assemble_dir%/*}" +# cut the working directory from its end by a one '/' delimiter again +project_root="${build_dir%/*}" +root_package='com.serial4j' +docs_dir=$project_root'/'$java_docs_folder + +source ${project_root}'/JAVAHOME.sh' +source ${build_dir}'/compile/variables.sh' +source ${project_root}'/CommonVariables.sh' + +java_jar=${JAVA__HOME}'/jar' +javadoc=${JAVA__HOME}'/javadoc' +jar_tmp=$javabuild_directory"/$jar_folder" +docs_tmp=$jar_tmp"/$java_docs_folder" + +manifest_file=$javabuild_directory'/'$jar_folder'/Manifest.mf' + diff --git a/HelloSerial4j/build/compile/buildJava.sh b/HelloSerial4j/build/compile/buildJava.sh new file mode 100644 index 00000000..edc6a00a --- /dev/null +++ b/HelloSerial4j/build/compile/buildJava.sh @@ -0,0 +1,52 @@ +#** +#* Ccoffee Build tool, manual build, alpha-v1. +#* +#* @author pavl_g. +#*# +source variables.sh + +# make a dir for java byte code +if [[ ! -d $javabuild_directory ]]; then + mkdir $javabuild_directory +fi + +## +# Copies the source files to a single dir to be compiled manually. +## +function copyJavaSources() { + #copy code to buildDir to compile java files + java_packages=($javasrc_directory'/*') + cp -r $java_packages $javabuild_directory +} + +## +# Generates C headers for the java native files and compiles java code inside the buildDir. +## +function generateHeaders() { + local result=-1 + cd $javabuild_directory + java_sources=`find -name "*.java"` + # creates C headers file for java natives. + $javac -cp '.:'$dependencies -h . $java_sources -Xlint:unchecked --release '19' --enable-preview + result=$? + # generate a methods signature file to help in invocation api + bytecode=`find -name "*.class"` + sigs=`$JAVA__HOME'/javap' -s -p $bytecode` + printf ' %s \n' $sigs > 'sig.signature' + # remove the source code + rm $java_sources + return $result +} + +## +# Moves all the generated header files from the build dir to the include dir of the natives. +## +function moveHeaders() { + cd $javabuild_directory + headers=`find -name "*.h"` + # check if the headers exist then move them + if [[ $headers ]]; then + mv $headers $nativessrc_directory'/include/jni' + fi +} + diff --git a/HelloSerial4j/build/compile/buildNatives.sh b/HelloSerial4j/build/compile/buildNatives.sh new file mode 100644 index 00000000..f7a683dc --- /dev/null +++ b/HelloSerial4j/build/compile/buildNatives.sh @@ -0,0 +1,119 @@ +#** +#* Ccoffee Build tool, manual build, alpha-v1. +#* +#* @author pavl_g. +#*# +source variables.sh + +## +# Compile and build native sources. +# +# @echo Script Succeeded if all the commands have passed successfully, exit with error code otherwise. +## +function compile() { + native_sources=`find $nativessrc_directory'/lib' -name '*.c' -o -name '*.cxx' -o -name '*.cpp' -o -name '*.h' -o -name '*.c++'-o -name '*.ino' -o -name '*.hxx'` + # tests if the sources exist, then give the current user full permissions on them and compile them + if [[ $native_sources ]]; then + chmod +x $native_sources + # append -lwiringPi for raspberry wiringPi includes + # ${JAVA__HOME%/*} : % returns back to the root base directory of the java home, / is the separator delimiter of the directory string + # compile and build a shared lib for linux systems + if [[ `linux_x86_x64 "${native_sources}"` -eq 0 ]]; then + echo -e "$GREEN_C Task@Build Linux-x86-x64 : Succeeded" + else + echo -e "$RED_C Task@Build Linux-x86-x64 : Failed" + echo -e "$RED_C Exiting Script with error 150" + exit 150 + fi + # compile and build a shared lib for android systems + if [[ $enable_android_build == true ]]; then + if [[ `linux_android "${arm64}" "${arm64_lib}" "${native_sources}" "${min_android_sdk}"` -eq 0 ]]; then + echo -e "$GREEN_C Task@Build Android-Arm-64 : Succeeded" + else + echo -e "$RED_C Task@Build Android-Arm-64 : Failed" + echo -e "$RED_C Exiting Script with error 250" + exit 250 + fi + + if [[ `linux_android "${arm32}" "${arm32_lib}" "${native_sources}" "${min_android_sdk}"` -eq 0 ]]; then + echo -e "$GREEN_C Task@Build Android-Arm-32 : Succeeded" + else + echo -e "$RED_C Task@Build Android-Arm-32 : Failed" + echo -e "$RED_C Exiting Script with error 350" + exit 350 + fi + + if [[ `linux_android "${intel64}" "${intel64_lib}" "${native_sources}" "${min_android_sdk}"` -eq 0 ]]; then + echo -e "$GREEN_C Task@Build Android-Intel-64 : Succeeded" + else + echo -e "$RED_C Task@Build Android-Intel-64 : Failed" + echo -e "$RED_C Exiting Script with error 450" + exit 450 + fi + + if [[ `linux_android "${intel32}" "${intel32_lib}" "${native_sources}" "${min_android_sdk}"` -eq 0 ]]; then + echo -e "$GREEN_C Task@Build Android-Intel-32 : Succeeded" + else + echo -e "$RED_C Task@Build Android-Intel-32 : Failed" + echo -e "$RED_C Exiting Script with error 550" + exit 550 + fi + fi + fi + echo -e "$GREEN_C---MajorTask@Build Native Sources : Succeeded---" +} + +## +# Build for desktop linux systems +# +# @param nativeSources sources to be compiled for linux desktop. +# @return 0 if command passes, non zero number otherwise with exit code 150 (search the code on repo's wiki). +## +function linux_x86_x64() { + local native_sources=$1 + if [[ ! -d $linux_natives_dir'/linux-x86-x64' ]]; then + mkdir -p $linux_natives_dir'/linux-x86-x64' + fi + $gcc -fPIC $native_sources -shared -o $linux_natives_dir'/linux-x86-x64/'${clibName} \ + -I${JAVA__HOME%/*}'/include' \ + -I${JAVA__HOME%/*}'/include/linux' \ + -I${nativessrc_directory}'/include/linux/' \ + -I${nativessrc_directory}'/include/' \ + + return $? +} + +## +# Building native code for arm and intel android. +# +# @param triple the ABI triple name, also used for -target flag of the clang++. +# @param folder the created folder name. +# @param sources the sources to compile and build an object file for them. +# @param min_android_sdk the minimum android sdk to compile against. +# @return 0 if command passes, non zero number otherwise. +## +function linux_android() { + # parameters attributes + local triple=$1 + local folder=$2 + local sources=$3 + local min_android_sdk=$4 + + if [[ ! -d $android_natives_dir ]]; then + mkdir $android_natives_dir + fi + + if [[ ! -d $android_natives_dir"/$folder" ]]; then + mkdir $android_natives_dir"/$folder" + fi + $NDK__BASEHOME'/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++' -target ${triple}${min_android_sdk} \ + -fPIC $sources -shared \ + -stdlib=libstdc++ \ + -o $android_natives_dir"/$folder/"${clibName} \ + -I$nativessrc_directory'/includes' \ + -I$NDK__BASEHOME'/sources/cxx-stl/llvm-libc++/include' \ + -lc++_shared + result=$? + cp $NDK__BASEHOME"/sources/cxx-stl/llvm-libc++/libs/${folder}/libc++_shared.so" $android_natives_dir"/$folder" + return $result +} diff --git a/HelloSerial4j/build/compile/compile.sh b/HelloSerial4j/build/compile/compile.sh new file mode 100755 index 00000000..8d6abdac --- /dev/null +++ b/HelloSerial4j/build/compile/compile.sh @@ -0,0 +1,34 @@ +#** +#* Ccoffee Build tool, manual build, alpha-v1. +#* +#* @author pavl_g. +#*# + +echo "Compiling the project" +echo -e $RESET_Cs +echo "--------Script start--------" +source buildJava.sh +source buildNatives.sh + +if [[ $enable_java_build == true ]]; then + echo -e "$ORANGE_C---MajorTask@Build Java Sources : Java build started" + copyJavaSources + if [[ `generateHeaders` -eq 0 ]]; then + moveHeaders + echo -e "$GREEN_C Task@Build Compile Java : Succeeded" + else + echo -e "$RED_C Task@Build Compile Java : Failed" + fi + echo -e "$ORANGE_C---MajorTask@Build Java Sources : Java build finished" +fi + +echo -e $RESET_Cs + +if [[ $enable_natives_build == true ]]; then + echo -e "$MAGNETA_C---MajorTask@Build Native Sources : Native build started" + compile + echo -e "$MAGNETA_C---MajorTask@Build Native Sources : Native build finished" +fi + +echo -e $RESET_Cs +echo "--------Script end--------" diff --git a/HelloSerial4j/build/compile/variables.sh b/HelloSerial4j/build/compile/variables.sh new file mode 100644 index 00000000..bc25d669 --- /dev/null +++ b/HelloSerial4j/build/compile/variables.sh @@ -0,0 +1,57 @@ +#** +#* Ccoffee Build tool, manual build, alpha-v1. +#* +#* @author pavl_g. +#*# + +# constant independent +clibName=('libserial4j.so') + +# native toolchains +gcc='g++-10' + +# android tool-chain constants +min_android_sdk=21 +arm64="aarch64-linux-android" +arm64_lib="arm64-v8a" +arm32="armv7a-linux-androideabi" +arm32_lib="armeabi-v7a" +intel32="i686-linux-android" +intel32_lib="x86" +intel64="x86_64-linux-android" +intel64_lib="x86_64" +android_natives_jar="android-natives-${min_android_sdk}.jar" + +# set some build guards +enable_java_build=true +enable_natives_build=true +enable_android_build=false + +# work directories +compile_dir=`pwd` +build_dir="${compile_dir%/*}" +project_root="${build_dir%/*}" + +# resources and dependencies +java_resources=$project_root'/src/resources' +dependencies=$java_resources'/dependencies' +assets=$java_resources'/assets' + + +# code sources +javasrc_directory=$project_root'/src/main/java' +nativessrc_directory=$project_root'/src/main/native' + +# build directories +javabuild_directory=$project_root'/build/.buildJava' + +# native shared/dynamic libs +shared_root_dir=$project_root'/shared' +android_natives_dir=$project_root'/shared/lib' +linux_natives_dir=$project_root'/shared/native/Linux' + +source $project_root'/JAVAHOME.sh' +javac=$JAVA__HOME'/javac' + +source $project_root'/NDKPATH.sh' +source $project_root'/CommonVariables.sh' diff --git a/HelloSerial4j/datasheets/Apt docs/apt-howto.en.pdf b/HelloSerial4j/datasheets/Apt docs/apt-howto.en.pdf new file mode 100644 index 00000000..2176ce76 Binary files /dev/null and b/HelloSerial4j/datasheets/Apt docs/apt-howto.en.pdf differ diff --git a/HelloSerial4j/datasheets/GNU C Compiler/gcc.pdf b/HelloSerial4j/datasheets/GNU C Compiler/gcc.pdf new file mode 100644 index 00000000..47e3805d Binary files /dev/null and b/HelloSerial4j/datasheets/GNU C Compiler/gcc.pdf differ diff --git a/HelloSerial4j/datasheets/GNU language Manual/gnu-c-manual.pdf b/HelloSerial4j/datasheets/GNU language Manual/gnu-c-manual.pdf new file mode 100644 index 00000000..962ca5f2 Binary files /dev/null and b/HelloSerial4j/datasheets/GNU language Manual/gnu-c-manual.pdf differ diff --git a/HelloSerial4j/datasheets/GNU language Manual/libstdc++-manual.pdf.gz b/HelloSerial4j/datasheets/GNU language Manual/libstdc++-manual.pdf.gz new file mode 100644 index 00000000..084145d4 Binary files /dev/null and b/HelloSerial4j/datasheets/GNU language Manual/libstdc++-manual.pdf.gz differ diff --git a/HelloSerial4j/datasheets/GNU libc docs/libc.pdf b/HelloSerial4j/datasheets/GNU libc docs/libc.pdf new file mode 100644 index 00000000..bc4303b3 Binary files /dev/null and b/HelloSerial4j/datasheets/GNU libc docs/libc.pdf differ diff --git a/HelloSerial4j/datasheets/IBM C Language Reference/C-C++ Reference.pdf b/HelloSerial4j/datasheets/IBM C Language Reference/C-C++ Reference.pdf new file mode 100644 index 00000000..93c426d2 Binary files /dev/null and b/HelloSerial4j/datasheets/IBM C Language Reference/C-C++ Reference.pdf differ diff --git a/HelloSerial4j/datasheets/JVM Manual/jls8.pdf b/HelloSerial4j/datasheets/JVM Manual/jls8.pdf new file mode 100644 index 00000000..d6838983 Binary files /dev/null and b/HelloSerial4j/datasheets/JVM Manual/jls8.pdf differ diff --git a/HelloSerial4j/datasheets/JVM Manual/jvms8.pdf b/HelloSerial4j/datasheets/JVM Manual/jvms8.pdf new file mode 100644 index 00000000..e0fdef7c Binary files /dev/null and b/HelloSerial4j/datasheets/JVM Manual/jvms8.pdf differ diff --git a/HelloSerial4j/datasheets/Jni Docs/JDK-19 Jni/Java Native Interface Specification_ 1 - Introduction.pdf b/HelloSerial4j/datasheets/Jni Docs/JDK-19 Jni/Java Native Interface Specification_ 1 - Introduction.pdf new file mode 100644 index 00000000..cd5574ae Binary files /dev/null and b/HelloSerial4j/datasheets/Jni Docs/JDK-19 Jni/Java Native Interface Specification_ 1 - Introduction.pdf differ diff --git a/HelloSerial4j/datasheets/Jni Docs/JDK-19 Jni/Java Native Interface Specification_ 2 - Design Overview.pdf b/HelloSerial4j/datasheets/Jni Docs/JDK-19 Jni/Java Native Interface Specification_ 2 - Design Overview.pdf new file mode 100644 index 00000000..73cbbc8d Binary files /dev/null and b/HelloSerial4j/datasheets/Jni Docs/JDK-19 Jni/Java Native Interface Specification_ 2 - Design Overview.pdf differ diff --git a/HelloSerial4j/datasheets/Jni Docs/JDK-19 Jni/Java Native Interface Specification_ 3 - JNI Types and Data Structures.pdf b/HelloSerial4j/datasheets/Jni Docs/JDK-19 Jni/Java Native Interface Specification_ 3 - JNI Types and Data Structures.pdf new file mode 100644 index 00000000..05d021aa Binary files /dev/null and b/HelloSerial4j/datasheets/Jni Docs/JDK-19 Jni/Java Native Interface Specification_ 3 - JNI Types and Data Structures.pdf differ diff --git a/HelloSerial4j/datasheets/Jni Docs/JDK-19 Jni/Java Native Interface Specification_ 4 - JNI Functions.pdf b/HelloSerial4j/datasheets/Jni Docs/JDK-19 Jni/Java Native Interface Specification_ 4 - JNI Functions.pdf new file mode 100644 index 00000000..7e466b35 Binary files /dev/null and b/HelloSerial4j/datasheets/Jni Docs/JDK-19 Jni/Java Native Interface Specification_ 4 - JNI Functions.pdf differ diff --git a/HelloSerial4j/datasheets/Jni Docs/JDK-19 Jni/Java Native Interface Specification_ 5 - The Invocation API.pdf b/HelloSerial4j/datasheets/Jni Docs/JDK-19 Jni/Java Native Interface Specification_ 5 - The Invocation API.pdf new file mode 100644 index 00000000..e415417e Binary files /dev/null and b/HelloSerial4j/datasheets/Jni Docs/JDK-19 Jni/Java Native Interface Specification_ 5 - The Invocation API.pdf differ diff --git a/HelloSerial4j/datasheets/Jni Docs/JDK-8 Jni/Design Overview.pdf b/HelloSerial4j/datasheets/Jni Docs/JDK-8 Jni/Design Overview.pdf new file mode 100644 index 00000000..61fbcf05 Binary files /dev/null and b/HelloSerial4j/datasheets/Jni Docs/JDK-8 Jni/Design Overview.pdf differ diff --git a/HelloSerial4j/datasheets/Jni Docs/JDK-8 Jni/Introduction.pdf b/HelloSerial4j/datasheets/Jni Docs/JDK-8 Jni/Introduction.pdf new file mode 100644 index 00000000..528df4d4 Binary files /dev/null and b/HelloSerial4j/datasheets/Jni Docs/JDK-8 Jni/Introduction.pdf differ diff --git a/HelloSerial4j/datasheets/Jni Docs/JDK-8 Jni/JNI Functions.pdf b/HelloSerial4j/datasheets/Jni Docs/JDK-8 Jni/JNI Functions.pdf new file mode 100644 index 00000000..a61adf33 Binary files /dev/null and b/HelloSerial4j/datasheets/Jni Docs/JDK-8 Jni/JNI Functions.pdf differ diff --git a/HelloSerial4j/datasheets/Jni Docs/JDK-8 Jni/JNI Types and Data Structures.pdf b/HelloSerial4j/datasheets/Jni Docs/JDK-8 Jni/JNI Types and Data Structures.pdf new file mode 100644 index 00000000..be2f384b Binary files /dev/null and b/HelloSerial4j/datasheets/Jni Docs/JDK-8 Jni/JNI Types and Data Structures.pdf differ diff --git a/HelloSerial4j/datasheets/Jni Docs/JDK-8 Jni/The Invocation API.pdf b/HelloSerial4j/datasheets/Jni Docs/JDK-8 Jni/The Invocation API.pdf new file mode 100644 index 00000000..bb4023ff Binary files /dev/null and b/HelloSerial4j/datasheets/Jni Docs/JDK-8 Jni/The Invocation API.pdf differ diff --git a/HelloSerial4j/datasheets/Jni Docs/Jni Include files (for reference only)/classfile_constants.h b/HelloSerial4j/datasheets/Jni Docs/Jni Include files (for reference only)/classfile_constants.h new file mode 100644 index 00000000..e5c20cd9 --- /dev/null +++ b/HelloSerial4j/datasheets/Jni Docs/Jni Include files (for reference only)/classfile_constants.h @@ -0,0 +1,560 @@ +/* + * Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved. + * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + */ + +#ifndef CLASSFILE_CONSTANTS_H +#define CLASSFILE_CONSTANTS_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Classfile version number for this information */ +#define JVM_CLASSFILE_MAJOR_VERSION 52 +#define JVM_CLASSFILE_MINOR_VERSION 0 + +/* Flags */ + +enum { + JVM_ACC_PUBLIC = 0x0001, + JVM_ACC_PRIVATE = 0x0002, + JVM_ACC_PROTECTED = 0x0004, + JVM_ACC_STATIC = 0x0008, + JVM_ACC_FINAL = 0x0010, + JVM_ACC_SYNCHRONIZED = 0x0020, + JVM_ACC_SUPER = 0x0020, + JVM_ACC_VOLATILE = 0x0040, + JVM_ACC_BRIDGE = 0x0040, + JVM_ACC_TRANSIENT = 0x0080, + JVM_ACC_VARARGS = 0x0080, + JVM_ACC_NATIVE = 0x0100, + JVM_ACC_INTERFACE = 0x0200, + JVM_ACC_ABSTRACT = 0x0400, + JVM_ACC_STRICT = 0x0800, + JVM_ACC_SYNTHETIC = 0x1000, + JVM_ACC_ANNOTATION = 0x2000, + JVM_ACC_ENUM = 0x4000 +}; + +/* Used in newarray instruction. */ + +enum { + JVM_T_BOOLEAN = 4, + JVM_T_CHAR = 5, + JVM_T_FLOAT = 6, + JVM_T_DOUBLE = 7, + JVM_T_BYTE = 8, + JVM_T_SHORT = 9, + JVM_T_INT = 10, + JVM_T_LONG = 11 +}; + +/* Constant Pool Entries */ + +enum { + JVM_CONSTANT_Utf8 = 1, + JVM_CONSTANT_Unicode = 2, /* unused */ + JVM_CONSTANT_Integer = 3, + JVM_CONSTANT_Float = 4, + JVM_CONSTANT_Long = 5, + JVM_CONSTANT_Double = 6, + JVM_CONSTANT_Class = 7, + JVM_CONSTANT_String = 8, + JVM_CONSTANT_Fieldref = 9, + JVM_CONSTANT_Methodref = 10, + JVM_CONSTANT_InterfaceMethodref = 11, + JVM_CONSTANT_NameAndType = 12, + JVM_CONSTANT_MethodHandle = 15, // JSR 292 + JVM_CONSTANT_MethodType = 16, // JSR 292 + JVM_CONSTANT_InvokeDynamic = 18 +}; + +/* JVM_CONSTANT_MethodHandle subtypes */ +enum { + JVM_REF_getField = 1, + JVM_REF_getStatic = 2, + JVM_REF_putField = 3, + JVM_REF_putStatic = 4, + JVM_REF_invokeVirtual = 5, + JVM_REF_invokeStatic = 6, + JVM_REF_invokeSpecial = 7, + JVM_REF_newInvokeSpecial = 8, + JVM_REF_invokeInterface = 9 +}; + +/* StackMapTable type item numbers */ + +enum { + JVM_ITEM_Top = 0, + JVM_ITEM_Integer = 1, + JVM_ITEM_Float = 2, + JVM_ITEM_Double = 3, + JVM_ITEM_Long = 4, + JVM_ITEM_Null = 5, + JVM_ITEM_UninitializedThis = 6, + JVM_ITEM_Object = 7, + JVM_ITEM_Uninitialized = 8 +}; + +/* Type signatures */ + +enum { + JVM_SIGNATURE_ARRAY = '[', + JVM_SIGNATURE_BYTE = 'B', + JVM_SIGNATURE_CHAR = 'C', + JVM_SIGNATURE_CLASS = 'L', + JVM_SIGNATURE_ENDCLASS = ';', + JVM_SIGNATURE_ENUM = 'E', + JVM_SIGNATURE_FLOAT = 'F', + JVM_SIGNATURE_DOUBLE = 'D', + JVM_SIGNATURE_FUNC = '(', + JVM_SIGNATURE_ENDFUNC = ')', + JVM_SIGNATURE_INT = 'I', + JVM_SIGNATURE_LONG = 'J', + JVM_SIGNATURE_SHORT = 'S', + JVM_SIGNATURE_VOID = 'V', + JVM_SIGNATURE_BOOLEAN = 'Z' +}; + +/* Opcodes */ + +enum { + JVM_OPC_nop = 0, + JVM_OPC_aconst_null = 1, + JVM_OPC_iconst_m1 = 2, + JVM_OPC_iconst_0 = 3, + JVM_OPC_iconst_1 = 4, + JVM_OPC_iconst_2 = 5, + JVM_OPC_iconst_3 = 6, + JVM_OPC_iconst_4 = 7, + JVM_OPC_iconst_5 = 8, + JVM_OPC_lconst_0 = 9, + JVM_OPC_lconst_1 = 10, + JVM_OPC_fconst_0 = 11, + JVM_OPC_fconst_1 = 12, + JVM_OPC_fconst_2 = 13, + JVM_OPC_dconst_0 = 14, + JVM_OPC_dconst_1 = 15, + JVM_OPC_bipush = 16, + JVM_OPC_sipush = 17, + JVM_OPC_ldc = 18, + JVM_OPC_ldc_w = 19, + JVM_OPC_ldc2_w = 20, + JVM_OPC_iload = 21, + JVM_OPC_lload = 22, + JVM_OPC_fload = 23, + JVM_OPC_dload = 24, + JVM_OPC_aload = 25, + JVM_OPC_iload_0 = 26, + JVM_OPC_iload_1 = 27, + JVM_OPC_iload_2 = 28, + JVM_OPC_iload_3 = 29, + JVM_OPC_lload_0 = 30, + JVM_OPC_lload_1 = 31, + JVM_OPC_lload_2 = 32, + JVM_OPC_lload_3 = 33, + JVM_OPC_fload_0 = 34, + JVM_OPC_fload_1 = 35, + JVM_OPC_fload_2 = 36, + JVM_OPC_fload_3 = 37, + JVM_OPC_dload_0 = 38, + JVM_OPC_dload_1 = 39, + JVM_OPC_dload_2 = 40, + JVM_OPC_dload_3 = 41, + JVM_OPC_aload_0 = 42, + JVM_OPC_aload_1 = 43, + JVM_OPC_aload_2 = 44, + JVM_OPC_aload_3 = 45, + JVM_OPC_iaload = 46, + JVM_OPC_laload = 47, + JVM_OPC_faload = 48, + JVM_OPC_daload = 49, + JVM_OPC_aaload = 50, + JVM_OPC_baload = 51, + JVM_OPC_caload = 52, + JVM_OPC_saload = 53, + JVM_OPC_istore = 54, + JVM_OPC_lstore = 55, + JVM_OPC_fstore = 56, + JVM_OPC_dstore = 57, + JVM_OPC_astore = 58, + JVM_OPC_istore_0 = 59, + JVM_OPC_istore_1 = 60, + JVM_OPC_istore_2 = 61, + JVM_OPC_istore_3 = 62, + JVM_OPC_lstore_0 = 63, + JVM_OPC_lstore_1 = 64, + JVM_OPC_lstore_2 = 65, + JVM_OPC_lstore_3 = 66, + JVM_OPC_fstore_0 = 67, + JVM_OPC_fstore_1 = 68, + JVM_OPC_fstore_2 = 69, + JVM_OPC_fstore_3 = 70, + JVM_OPC_dstore_0 = 71, + JVM_OPC_dstore_1 = 72, + JVM_OPC_dstore_2 = 73, + JVM_OPC_dstore_3 = 74, + JVM_OPC_astore_0 = 75, + JVM_OPC_astore_1 = 76, + JVM_OPC_astore_2 = 77, + JVM_OPC_astore_3 = 78, + JVM_OPC_iastore = 79, + JVM_OPC_lastore = 80, + JVM_OPC_fastore = 81, + JVM_OPC_dastore = 82, + JVM_OPC_aastore = 83, + JVM_OPC_bastore = 84, + JVM_OPC_castore = 85, + JVM_OPC_sastore = 86, + JVM_OPC_pop = 87, + JVM_OPC_pop2 = 88, + JVM_OPC_dup = 89, + JVM_OPC_dup_x1 = 90, + JVM_OPC_dup_x2 = 91, + JVM_OPC_dup2 = 92, + JVM_OPC_dup2_x1 = 93, + JVM_OPC_dup2_x2 = 94, + JVM_OPC_swap = 95, + JVM_OPC_iadd = 96, + JVM_OPC_ladd = 97, + JVM_OPC_fadd = 98, + JVM_OPC_dadd = 99, + JVM_OPC_isub = 100, + JVM_OPC_lsub = 101, + JVM_OPC_fsub = 102, + JVM_OPC_dsub = 103, + JVM_OPC_imul = 104, + JVM_OPC_lmul = 105, + JVM_OPC_fmul = 106, + JVM_OPC_dmul = 107, + JVM_OPC_idiv = 108, + JVM_OPC_ldiv = 109, + JVM_OPC_fdiv = 110, + JVM_OPC_ddiv = 111, + JVM_OPC_irem = 112, + JVM_OPC_lrem = 113, + JVM_OPC_frem = 114, + JVM_OPC_drem = 115, + JVM_OPC_ineg = 116, + JVM_OPC_lneg = 117, + JVM_OPC_fneg = 118, + JVM_OPC_dneg = 119, + JVM_OPC_ishl = 120, + JVM_OPC_lshl = 121, + JVM_OPC_ishr = 122, + JVM_OPC_lshr = 123, + JVM_OPC_iushr = 124, + JVM_OPC_lushr = 125, + JVM_OPC_iand = 126, + JVM_OPC_land = 127, + JVM_OPC_ior = 128, + JVM_OPC_lor = 129, + JVM_OPC_ixor = 130, + JVM_OPC_lxor = 131, + JVM_OPC_iinc = 132, + JVM_OPC_i2l = 133, + JVM_OPC_i2f = 134, + JVM_OPC_i2d = 135, + JVM_OPC_l2i = 136, + JVM_OPC_l2f = 137, + JVM_OPC_l2d = 138, + JVM_OPC_f2i = 139, + JVM_OPC_f2l = 140, + JVM_OPC_f2d = 141, + JVM_OPC_d2i = 142, + JVM_OPC_d2l = 143, + JVM_OPC_d2f = 144, + JVM_OPC_i2b = 145, + JVM_OPC_i2c = 146, + JVM_OPC_i2s = 147, + JVM_OPC_lcmp = 148, + JVM_OPC_fcmpl = 149, + JVM_OPC_fcmpg = 150, + JVM_OPC_dcmpl = 151, + JVM_OPC_dcmpg = 152, + JVM_OPC_ifeq = 153, + JVM_OPC_ifne = 154, + JVM_OPC_iflt = 155, + JVM_OPC_ifge = 156, + JVM_OPC_ifgt = 157, + JVM_OPC_ifle = 158, + JVM_OPC_if_icmpeq = 159, + JVM_OPC_if_icmpne = 160, + JVM_OPC_if_icmplt = 161, + JVM_OPC_if_icmpge = 162, + JVM_OPC_if_icmpgt = 163, + JVM_OPC_if_icmple = 164, + JVM_OPC_if_acmpeq = 165, + JVM_OPC_if_acmpne = 166, + JVM_OPC_goto = 167, + JVM_OPC_jsr = 168, + JVM_OPC_ret = 169, + JVM_OPC_tableswitch = 170, + JVM_OPC_lookupswitch = 171, + JVM_OPC_ireturn = 172, + JVM_OPC_lreturn = 173, + JVM_OPC_freturn = 174, + JVM_OPC_dreturn = 175, + JVM_OPC_areturn = 176, + JVM_OPC_return = 177, + JVM_OPC_getstatic = 178, + JVM_OPC_putstatic = 179, + JVM_OPC_getfield = 180, + JVM_OPC_putfield = 181, + JVM_OPC_invokevirtual = 182, + JVM_OPC_invokespecial = 183, + JVM_OPC_invokestatic = 184, + JVM_OPC_invokeinterface = 185, + JVM_OPC_invokedynamic = 186, + JVM_OPC_new = 187, + JVM_OPC_newarray = 188, + JVM_OPC_anewarray = 189, + JVM_OPC_arraylength = 190, + JVM_OPC_athrow = 191, + JVM_OPC_checkcast = 192, + JVM_OPC_instanceof = 193, + JVM_OPC_monitorenter = 194, + JVM_OPC_monitorexit = 195, + JVM_OPC_wide = 196, + JVM_OPC_multianewarray = 197, + JVM_OPC_ifnull = 198, + JVM_OPC_ifnonnull = 199, + JVM_OPC_goto_w = 200, + JVM_OPC_jsr_w = 201, + JVM_OPC_MAX = 201 +}; + +/* Opcode length initializer, use with something like: + * unsigned char opcode_length[JVM_OPC_MAX+1] = JVM_OPCODE_LENGTH_INITIALIZER; + */ +#define JVM_OPCODE_LENGTH_INITIALIZER { \ + 1, /* nop */ \ + 1, /* aconst_null */ \ + 1, /* iconst_m1 */ \ + 1, /* iconst_0 */ \ + 1, /* iconst_1 */ \ + 1, /* iconst_2 */ \ + 1, /* iconst_3 */ \ + 1, /* iconst_4 */ \ + 1, /* iconst_5 */ \ + 1, /* lconst_0 */ \ + 1, /* lconst_1 */ \ + 1, /* fconst_0 */ \ + 1, /* fconst_1 */ \ + 1, /* fconst_2 */ \ + 1, /* dconst_0 */ \ + 1, /* dconst_1 */ \ + 2, /* bipush */ \ + 3, /* sipush */ \ + 2, /* ldc */ \ + 3, /* ldc_w */ \ + 3, /* ldc2_w */ \ + 2, /* iload */ \ + 2, /* lload */ \ + 2, /* fload */ \ + 2, /* dload */ \ + 2, /* aload */ \ + 1, /* iload_0 */ \ + 1, /* iload_1 */ \ + 1, /* iload_2 */ \ + 1, /* iload_3 */ \ + 1, /* lload_0 */ \ + 1, /* lload_1 */ \ + 1, /* lload_2 */ \ + 1, /* lload_3 */ \ + 1, /* fload_0 */ \ + 1, /* fload_1 */ \ + 1, /* fload_2 */ \ + 1, /* fload_3 */ \ + 1, /* dload_0 */ \ + 1, /* dload_1 */ \ + 1, /* dload_2 */ \ + 1, /* dload_3 */ \ + 1, /* aload_0 */ \ + 1, /* aload_1 */ \ + 1, /* aload_2 */ \ + 1, /* aload_3 */ \ + 1, /* iaload */ \ + 1, /* laload */ \ + 1, /* faload */ \ + 1, /* daload */ \ + 1, /* aaload */ \ + 1, /* baload */ \ + 1, /* caload */ \ + 1, /* saload */ \ + 2, /* istore */ \ + 2, /* lstore */ \ + 2, /* fstore */ \ + 2, /* dstore */ \ + 2, /* astore */ \ + 1, /* istore_0 */ \ + 1, /* istore_1 */ \ + 1, /* istore_2 */ \ + 1, /* istore_3 */ \ + 1, /* lstore_0 */ \ + 1, /* lstore_1 */ \ + 1, /* lstore_2 */ \ + 1, /* lstore_3 */ \ + 1, /* fstore_0 */ \ + 1, /* fstore_1 */ \ + 1, /* fstore_2 */ \ + 1, /* fstore_3 */ \ + 1, /* dstore_0 */ \ + 1, /* dstore_1 */ \ + 1, /* dstore_2 */ \ + 1, /* dstore_3 */ \ + 1, /* astore_0 */ \ + 1, /* astore_1 */ \ + 1, /* astore_2 */ \ + 1, /* astore_3 */ \ + 1, /* iastore */ \ + 1, /* lastore */ \ + 1, /* fastore */ \ + 1, /* dastore */ \ + 1, /* aastore */ \ + 1, /* bastore */ \ + 1, /* castore */ \ + 1, /* sastore */ \ + 1, /* pop */ \ + 1, /* pop2 */ \ + 1, /* dup */ \ + 1, /* dup_x1 */ \ + 1, /* dup_x2 */ \ + 1, /* dup2 */ \ + 1, /* dup2_x1 */ \ + 1, /* dup2_x2 */ \ + 1, /* swap */ \ + 1, /* iadd */ \ + 1, /* ladd */ \ + 1, /* fadd */ \ + 1, /* dadd */ \ + 1, /* isub */ \ + 1, /* lsub */ \ + 1, /* fsub */ \ + 1, /* dsub */ \ + 1, /* imul */ \ + 1, /* lmul */ \ + 1, /* fmul */ \ + 1, /* dmul */ \ + 1, /* idiv */ \ + 1, /* ldiv */ \ + 1, /* fdiv */ \ + 1, /* ddiv */ \ + 1, /* irem */ \ + 1, /* lrem */ \ + 1, /* frem */ \ + 1, /* drem */ \ + 1, /* ineg */ \ + 1, /* lneg */ \ + 1, /* fneg */ \ + 1, /* dneg */ \ + 1, /* ishl */ \ + 1, /* lshl */ \ + 1, /* ishr */ \ + 1, /* lshr */ \ + 1, /* iushr */ \ + 1, /* lushr */ \ + 1, /* iand */ \ + 1, /* land */ \ + 1, /* ior */ \ + 1, /* lor */ \ + 1, /* ixor */ \ + 1, /* lxor */ \ + 3, /* iinc */ \ + 1, /* i2l */ \ + 1, /* i2f */ \ + 1, /* i2d */ \ + 1, /* l2i */ \ + 1, /* l2f */ \ + 1, /* l2d */ \ + 1, /* f2i */ \ + 1, /* f2l */ \ + 1, /* f2d */ \ + 1, /* d2i */ \ + 1, /* d2l */ \ + 1, /* d2f */ \ + 1, /* i2b */ \ + 1, /* i2c */ \ + 1, /* i2s */ \ + 1, /* lcmp */ \ + 1, /* fcmpl */ \ + 1, /* fcmpg */ \ + 1, /* dcmpl */ \ + 1, /* dcmpg */ \ + 3, /* ifeq */ \ + 3, /* ifne */ \ + 3, /* iflt */ \ + 3, /* ifge */ \ + 3, /* ifgt */ \ + 3, /* ifle */ \ + 3, /* if_icmpeq */ \ + 3, /* if_icmpne */ \ + 3, /* if_icmplt */ \ + 3, /* if_icmpge */ \ + 3, /* if_icmpgt */ \ + 3, /* if_icmple */ \ + 3, /* if_acmpeq */ \ + 3, /* if_acmpne */ \ + 3, /* goto */ \ + 3, /* jsr */ \ + 2, /* ret */ \ + 99, /* tableswitch */ \ + 99, /* lookupswitch */ \ + 1, /* ireturn */ \ + 1, /* lreturn */ \ + 1, /* freturn */ \ + 1, /* dreturn */ \ + 1, /* areturn */ \ + 1, /* return */ \ + 3, /* getstatic */ \ + 3, /* putstatic */ \ + 3, /* getfield */ \ + 3, /* putfield */ \ + 3, /* invokevirtual */ \ + 3, /* invokespecial */ \ + 3, /* invokestatic */ \ + 5, /* invokeinterface */ \ + 5, /* invokedynamic */ \ + 3, /* new */ \ + 2, /* newarray */ \ + 3, /* anewarray */ \ + 1, /* arraylength */ \ + 1, /* athrow */ \ + 3, /* checkcast */ \ + 3, /* instanceof */ \ + 1, /* monitorenter */ \ + 1, /* monitorexit */ \ + 0, /* wide */ \ + 4, /* multianewarray */ \ + 3, /* ifnull */ \ + 3, /* ifnonnull */ \ + 5, /* goto_w */ \ + 5 /* jsr_w */ \ +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif /* __cplusplus */ + +#endif /* CLASSFILE_CONSTANTS */ diff --git a/HelloSerial4j/datasheets/Jni Docs/Jni Include files (for reference only)/jawt.h b/HelloSerial4j/datasheets/Jni Docs/Jni Include files (for reference only)/jawt.h new file mode 100644 index 00000000..f06e8071 --- /dev/null +++ b/HelloSerial4j/datasheets/Jni Docs/Jni Include files (for reference only)/jawt.h @@ -0,0 +1,299 @@ +/* + * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. + * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + */ + +#ifndef _JAVASOFT_JAWT_H_ +#define _JAVASOFT_JAWT_H_ + +#include "jni.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * AWT native interface (new in JDK 1.3) + * + * The AWT native interface allows a native C or C++ application a means + * by which to access native structures in AWT. This is to facilitate moving + * legacy C and C++ applications to Java and to target the needs of the + * community who, at present, wish to do their own native rendering to canvases + * for performance reasons. Standard extensions such as Java3D also require a + * means to access the underlying native data structures of AWT. + * + * There may be future extensions to this API depending on demand. + * + * A VM does not have to implement this API in order to pass the JCK. + * It is recommended, however, that this API is implemented on VMs that support + * standard extensions, such as Java3D. + * + * Since this is a native API, any program which uses it cannot be considered + * 100% pure java. + */ + +/* + * AWT Native Drawing Surface (JAWT_DrawingSurface). + * + * For each platform, there is a native drawing surface structure. This + * platform-specific structure can be found in jawt_md.h. It is recommended + * that additional platforms follow the same model. It is also recommended + * that VMs on Win32 and Solaris support the existing structures in jawt_md.h. + * + ******************* + * EXAMPLE OF USAGE: + ******************* + * + * In Win32, a programmer wishes to access the HWND of a canvas to perform + * native rendering into it. The programmer has declared the paint() method + * for their canvas subclass to be native: + * + * + * MyCanvas.java: + * + * import java.awt.*; + * + * public class MyCanvas extends Canvas { + * + * static { + * System.loadLibrary("mylib"); + * } + * + * public native void paint(Graphics g); + * } + * + * + * myfile.c: + * + * #include "jawt_md.h" + * #include + * + * JNIEXPORT void JNICALL + * Java_MyCanvas_paint(JNIEnv* env, jobject canvas, jobject graphics) + * { + * JAWT awt; + * JAWT_DrawingSurface* ds; + * JAWT_DrawingSurfaceInfo* dsi; + * JAWT_Win32DrawingSurfaceInfo* dsi_win; + * jboolean result; + * jint lock; + * + * // Get the AWT + * awt.version = JAWT_VERSION_1_3; + * result = JAWT_GetAWT(env, &awt); + * assert(result != JNI_FALSE); + * + * // Get the drawing surface + * ds = awt.GetDrawingSurface(env, canvas); + * assert(ds != NULL); + * + * // Lock the drawing surface + * lock = ds->Lock(ds); + * assert((lock & JAWT_LOCK_ERROR) == 0); + * + * // Get the drawing surface info + * dsi = ds->GetDrawingSurfaceInfo(ds); + * + * // Get the platform-specific drawing info + * dsi_win = (JAWT_Win32DrawingSurfaceInfo*)dsi->platformInfo; + * + * ////////////////////////////// + * // !!! DO PAINTING HERE !!! // + * ////////////////////////////// + * + * // Free the drawing surface info + * ds->FreeDrawingSurfaceInfo(dsi); + * + * // Unlock the drawing surface + * ds->Unlock(ds); + * + * // Free the drawing surface + * awt.FreeDrawingSurface(ds); + * } + * + */ + +/* + * JAWT_Rectangle + * Structure for a native rectangle. + */ +typedef struct jawt_Rectangle { + jint x; + jint y; + jint width; + jint height; +} JAWT_Rectangle; + +struct jawt_DrawingSurface; + +/* + * JAWT_DrawingSurfaceInfo + * Structure for containing the underlying drawing information of a component. + */ +typedef struct jawt_DrawingSurfaceInfo { + /* + * Pointer to the platform-specific information. This can be safely + * cast to a JAWT_Win32DrawingSurfaceInfo on Windows or a + * JAWT_X11DrawingSurfaceInfo on Solaris. On Mac OS X this is a + * pointer to a NSObject that conforms to the JAWT_SurfaceLayers + * protocol. See jawt_md.h for details. + */ + void* platformInfo; + /* Cached pointer to the underlying drawing surface */ + struct jawt_DrawingSurface* ds; + /* Bounding rectangle of the drawing surface */ + JAWT_Rectangle bounds; + /* Number of rectangles in the clip */ + jint clipSize; + /* Clip rectangle array */ + JAWT_Rectangle* clip; +} JAWT_DrawingSurfaceInfo; + +#define JAWT_LOCK_ERROR 0x00000001 +#define JAWT_LOCK_CLIP_CHANGED 0x00000002 +#define JAWT_LOCK_BOUNDS_CHANGED 0x00000004 +#define JAWT_LOCK_SURFACE_CHANGED 0x00000008 + +/* + * JAWT_DrawingSurface + * Structure for containing the underlying drawing information of a component. + * All operations on a JAWT_DrawingSurface MUST be performed from the same + * thread as the call to GetDrawingSurface. + */ +typedef struct jawt_DrawingSurface { + /* + * Cached reference to the Java environment of the calling thread. + * If Lock(), Unlock(), GetDrawingSurfaceInfo() or + * FreeDrawingSurfaceInfo() are called from a different thread, + * this data member should be set before calling those functions. + */ + JNIEnv* env; + /* Cached reference to the target object */ + jobject target; + /* + * Lock the surface of the target component for native rendering. + * When finished drawing, the surface must be unlocked with + * Unlock(). This function returns a bitmask with one or more of the + * following values: + * + * JAWT_LOCK_ERROR - When an error has occurred and the surface could not + * be locked. + * + * JAWT_LOCK_CLIP_CHANGED - When the clip region has changed. + * + * JAWT_LOCK_BOUNDS_CHANGED - When the bounds of the surface have changed. + * + * JAWT_LOCK_SURFACE_CHANGED - When the surface itself has changed + */ + jint (JNICALL *Lock) + (struct jawt_DrawingSurface* ds); + /* + * Get the drawing surface info. + * The value returned may be cached, but the values may change if + * additional calls to Lock() or Unlock() are made. + * Lock() must be called before this can return a valid value. + * Returns NULL if an error has occurred. + * When finished with the returned value, FreeDrawingSurfaceInfo must be + * called. + */ + JAWT_DrawingSurfaceInfo* (JNICALL *GetDrawingSurfaceInfo) + (struct jawt_DrawingSurface* ds); + /* + * Free the drawing surface info. + */ + void (JNICALL *FreeDrawingSurfaceInfo) + (JAWT_DrawingSurfaceInfo* dsi); + /* + * Unlock the drawing surface of the target component for native rendering. + */ + void (JNICALL *Unlock) + (struct jawt_DrawingSurface* ds); +} JAWT_DrawingSurface; + +/* + * JAWT + * Structure for containing native AWT functions. + */ +typedef struct jawt { + /* + * Version of this structure. This must always be set before + * calling JAWT_GetAWT() + */ + jint version; + /* + * Return a drawing surface from a target jobject. This value + * may be cached. + * Returns NULL if an error has occurred. + * Target must be a java.awt.Component (should be a Canvas + * or Window for native rendering). + * FreeDrawingSurface() must be called when finished with the + * returned JAWT_DrawingSurface. + */ + JAWT_DrawingSurface* (JNICALL *GetDrawingSurface) + (JNIEnv* env, jobject target); + /* + * Free the drawing surface allocated in GetDrawingSurface. + */ + void (JNICALL *FreeDrawingSurface) + (JAWT_DrawingSurface* ds); + /* + * Since 1.4 + * Locks the entire AWT for synchronization purposes + */ + void (JNICALL *Lock)(JNIEnv* env); + /* + * Since 1.4 + * Unlocks the entire AWT for synchronization purposes + */ + void (JNICALL *Unlock)(JNIEnv* env); + /* + * Since 1.4 + * Returns a reference to a java.awt.Component from a native + * platform handle. On Windows, this corresponds to an HWND; + * on Solaris and Linux, this is a Drawable. For other platforms, + * see the appropriate machine-dependent header file for a description. + * The reference returned by this function is a local + * reference that is only valid in this environment. + * This function returns a NULL reference if no component could be + * found with matching platform information. + */ + jobject (JNICALL *GetComponent)(JNIEnv* env, void* platformInfo); + +} JAWT; + +/* + * Get the AWT native structure. This function returns JNI_FALSE if + * an error occurs. + */ +_JNI_IMPORT_OR_EXPORT_ +jboolean JNICALL JAWT_GetAWT(JNIEnv* env, JAWT* awt); + +#define JAWT_VERSION_1_3 0x00010003 +#define JAWT_VERSION_1_4 0x00010004 +#define JAWT_VERSION_1_7 0x00010007 + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* !_JAVASOFT_JAWT_H_ */ diff --git a/HelloSerial4j/datasheets/Jni Docs/Jni Include files (for reference only)/jdwpTransport.h b/HelloSerial4j/datasheets/Jni Docs/Jni Include files (for reference only)/jdwpTransport.h new file mode 100644 index 00000000..4f4b92ed --- /dev/null +++ b/HelloSerial4j/datasheets/Jni Docs/Jni Include files (for reference only)/jdwpTransport.h @@ -0,0 +1,259 @@ +/* + * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. + * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + */ + +/* + * Java Debug Wire Protocol Transport Service Provider Interface. + */ + +#ifndef JDWPTRANSPORT_H +#define JDWPTRANSPORT_H + +#include "jni.h" + +enum { + JDWPTRANSPORT_VERSION_1_0 = 0x00010000 +}; + +#ifdef __cplusplus +extern "C" { +#endif + +struct jdwpTransportNativeInterface_; + +struct _jdwpTransportEnv; + +#ifdef __cplusplus +typedef _jdwpTransportEnv jdwpTransportEnv; +#else +typedef const struct jdwpTransportNativeInterface_ *jdwpTransportEnv; +#endif /* __cplusplus */ + +/* + * Errors. Universal errors with JVMTI/JVMDI equivalents keep the + * values the same. + */ +typedef enum { + JDWPTRANSPORT_ERROR_NONE = 0, + JDWPTRANSPORT_ERROR_ILLEGAL_ARGUMENT = 103, + JDWPTRANSPORT_ERROR_OUT_OF_MEMORY = 110, + JDWPTRANSPORT_ERROR_INTERNAL = 113, + JDWPTRANSPORT_ERROR_ILLEGAL_STATE = 201, + JDWPTRANSPORT_ERROR_IO_ERROR = 202, + JDWPTRANSPORT_ERROR_TIMEOUT = 203, + JDWPTRANSPORT_ERROR_MSG_NOT_AVAILABLE = 204 +} jdwpTransportError; + + +/* + * Structure to define capabilities + */ +typedef struct { + unsigned int can_timeout_attach :1; + unsigned int can_timeout_accept :1; + unsigned int can_timeout_handshake :1; + unsigned int reserved3 :1; + unsigned int reserved4 :1; + unsigned int reserved5 :1; + unsigned int reserved6 :1; + unsigned int reserved7 :1; + unsigned int reserved8 :1; + unsigned int reserved9 :1; + unsigned int reserved10 :1; + unsigned int reserved11 :1; + unsigned int reserved12 :1; + unsigned int reserved13 :1; + unsigned int reserved14 :1; + unsigned int reserved15 :1; +} JDWPTransportCapabilities; + + +/* + * Structures to define packet layout. + * + * See: http://java.sun.com/j2se/1.5/docs/guide/jpda/jdwp-spec.html + */ + +enum { + /* + * If additional flags are added that apply to jdwpCmdPacket, + * then debugLoop.c: reader() will need to be updated to + * accept more than JDWPTRANSPORT_FLAGS_NONE. + */ + JDWPTRANSPORT_FLAGS_NONE = 0x0, + JDWPTRANSPORT_FLAGS_REPLY = 0x80 +}; + +typedef struct { + jint len; + jint id; + jbyte flags; + jbyte cmdSet; + jbyte cmd; + jbyte *data; +} jdwpCmdPacket; + +typedef struct { + jint len; + jint id; + jbyte flags; + jshort errorCode; + jbyte *data; +} jdwpReplyPacket; + +typedef struct { + union { + jdwpCmdPacket cmd; + jdwpReplyPacket reply; + } type; +} jdwpPacket; + +/* + * JDWP functions called by the transport. + */ +typedef struct jdwpTransportCallback { + void *(*alloc)(jint numBytes); /* Call this for all allocations */ + void (*free)(void *buffer); /* Call this for all deallocations */ +} jdwpTransportCallback; + +typedef jint (JNICALL *jdwpTransport_OnLoad_t)(JavaVM *jvm, + jdwpTransportCallback *callback, + jint version, + jdwpTransportEnv** env); + + + +/* Function Interface */ + +struct jdwpTransportNativeInterface_ { + /* 1 : RESERVED */ + void *reserved1; + + /* 2 : Get Capabilities */ + jdwpTransportError (JNICALL *GetCapabilities)(jdwpTransportEnv* env, + JDWPTransportCapabilities *capabilities_ptr); + + /* 3 : Attach */ + jdwpTransportError (JNICALL *Attach)(jdwpTransportEnv* env, + const char* address, + jlong attach_timeout, + jlong handshake_timeout); + + /* 4: StartListening */ + jdwpTransportError (JNICALL *StartListening)(jdwpTransportEnv* env, + const char* address, + char** actual_address); + + /* 5: StopListening */ + jdwpTransportError (JNICALL *StopListening)(jdwpTransportEnv* env); + + /* 6: Accept */ + jdwpTransportError (JNICALL *Accept)(jdwpTransportEnv* env, + jlong accept_timeout, + jlong handshake_timeout); + + /* 7: IsOpen */ + jboolean (JNICALL *IsOpen)(jdwpTransportEnv* env); + + /* 8: Close */ + jdwpTransportError (JNICALL *Close)(jdwpTransportEnv* env); + + /* 9: ReadPacket */ + jdwpTransportError (JNICALL *ReadPacket)(jdwpTransportEnv* env, + jdwpPacket *pkt); + + /* 10: Write Packet */ + jdwpTransportError (JNICALL *WritePacket)(jdwpTransportEnv* env, + const jdwpPacket* pkt); + + /* 11: GetLastError */ + jdwpTransportError (JNICALL *GetLastError)(jdwpTransportEnv* env, + char** error); + +}; + + +/* + * Use inlined functions so that C++ code can use syntax such as + * env->Attach("mymachine:5000", 10*1000, 0); + * + * rather than using C's :- + * + * (*env)->Attach(env, "mymachine:5000", 10*1000, 0); + */ +struct _jdwpTransportEnv { + const struct jdwpTransportNativeInterface_ *functions; +#ifdef __cplusplus + + jdwpTransportError GetCapabilities(JDWPTransportCapabilities *capabilities_ptr) { + return functions->GetCapabilities(this, capabilities_ptr); + } + + jdwpTransportError Attach(const char* address, jlong attach_timeout, + jlong handshake_timeout) { + return functions->Attach(this, address, attach_timeout, handshake_timeout); + } + + jdwpTransportError StartListening(const char* address, + char** actual_address) { + return functions->StartListening(this, address, actual_address); + } + + jdwpTransportError StopListening(void) { + return functions->StopListening(this); + } + + jdwpTransportError Accept(jlong accept_timeout, jlong handshake_timeout) { + return functions->Accept(this, accept_timeout, handshake_timeout); + } + + jboolean IsOpen(void) { + return functions->IsOpen(this); + } + + jdwpTransportError Close(void) { + return functions->Close(this); + } + + jdwpTransportError ReadPacket(jdwpPacket *pkt) { + return functions->ReadPacket(this, pkt); + } + + jdwpTransportError WritePacket(const jdwpPacket* pkt) { + return functions->WritePacket(this, pkt); + } + + jdwpTransportError GetLastError(char** error) { + return functions->GetLastError(this, error); + } + + +#endif /* __cplusplus */ +}; + +#ifdef __cplusplus +} /* extern "C" */ +#endif /* __cplusplus */ + +#endif /* JDWPTRANSPORT_H */ diff --git a/HelloSerial4j/datasheets/Jni Docs/Jni Include files (for reference only)/jni.h b/HelloSerial4j/datasheets/Jni Docs/Jni Include files (for reference only)/jni.h new file mode 100644 index 00000000..0ffe244b --- /dev/null +++ b/HelloSerial4j/datasheets/Jni Docs/Jni Include files (for reference only)/jni.h @@ -0,0 +1,1960 @@ +/* + * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved. + * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + */ + +/* + * We used part of Netscape's Java Runtime Interface (JRI) as the starting + * point of our design and implementation. + */ + +/****************************************************************************** + * Java Runtime Interface + * Copyright (c) 1996 Netscape Communications Corporation. All rights reserved. + *****************************************************************************/ + +#ifndef _JAVASOFT_JNI_H_ +#define _JAVASOFT_JNI_H_ + +#include +#include + +/* jni_md.h contains the machine-dependent typedefs for jbyte, jint + and jlong */ + +#include "jni_md.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * JNI Types + */ + +#ifndef JNI_TYPES_ALREADY_DEFINED_IN_JNI_MD_H + +typedef unsigned char jboolean; +typedef unsigned short jchar; +typedef short jshort; +typedef float jfloat; +typedef double jdouble; + +typedef jint jsize; + +#ifdef __cplusplus + +class _jobject {}; +class _jclass : public _jobject {}; +class _jthrowable : public _jobject {}; +class _jstring : public _jobject {}; +class _jarray : public _jobject {}; +class _jbooleanArray : public _jarray {}; +class _jbyteArray : public _jarray {}; +class _jcharArray : public _jarray {}; +class _jshortArray : public _jarray {}; +class _jintArray : public _jarray {}; +class _jlongArray : public _jarray {}; +class _jfloatArray : public _jarray {}; +class _jdoubleArray : public _jarray {}; +class _jobjectArray : public _jarray {}; + +typedef _jobject *jobject; +typedef _jclass *jclass; +typedef _jthrowable *jthrowable; +typedef _jstring *jstring; +typedef _jarray *jarray; +typedef _jbooleanArray *jbooleanArray; +typedef _jbyteArray *jbyteArray; +typedef _jcharArray *jcharArray; +typedef _jshortArray *jshortArray; +typedef _jintArray *jintArray; +typedef _jlongArray *jlongArray; +typedef _jfloatArray *jfloatArray; +typedef _jdoubleArray *jdoubleArray; +typedef _jobjectArray *jobjectArray; + +#else + +struct _jobject; + +typedef struct _jobject *jobject; +typedef jobject jclass; +typedef jobject jthrowable; +typedef jobject jstring; +typedef jobject jarray; +typedef jarray jbooleanArray; +typedef jarray jbyteArray; +typedef jarray jcharArray; +typedef jarray jshortArray; +typedef jarray jintArray; +typedef jarray jlongArray; +typedef jarray jfloatArray; +typedef jarray jdoubleArray; +typedef jarray jobjectArray; + +#endif + +typedef jobject jweak; + +typedef union jvalue { + jboolean z; + jbyte b; + jchar c; + jshort s; + jint i; + jlong j; + jfloat f; + jdouble d; + jobject l; +} jvalue; + +struct _jfieldID; +typedef struct _jfieldID *jfieldID; + +struct _jmethodID; +typedef struct _jmethodID *jmethodID; + +/* Return values from jobjectRefType */ +typedef enum _jobjectType { + JNIInvalidRefType = 0, + JNILocalRefType = 1, + JNIGlobalRefType = 2, + JNIWeakGlobalRefType = 3 +} jobjectRefType; + + +#endif /* JNI_TYPES_ALREADY_DEFINED_IN_JNI_MD_H */ + +/* + * jboolean constants + */ + +#define JNI_FALSE 0 +#define JNI_TRUE 1 + +/* + * possible return values for JNI functions. + */ + +#define JNI_OK 0 /* success */ +#define JNI_ERR (-1) /* unknown error */ +#define JNI_EDETACHED (-2) /* thread detached from the VM */ +#define JNI_EVERSION (-3) /* JNI version error */ +#define JNI_ENOMEM (-4) /* not enough memory */ +#define JNI_EEXIST (-5) /* VM already created */ +#define JNI_EINVAL (-6) /* invalid arguments */ + +/* + * used in ReleaseScalarArrayElements + */ + +#define JNI_COMMIT 1 +#define JNI_ABORT 2 + +/* + * used in RegisterNatives to describe native method name, signature, + * and function pointer. + */ + +typedef struct { + char *name; + char *signature; + void *fnPtr; +} JNINativeMethod; + +/* + * JNI Native Method Interface. + */ + +struct JNINativeInterface_; + +struct JNIEnv_; + +#ifdef __cplusplus +typedef JNIEnv_ JNIEnv; +#else +typedef const struct JNINativeInterface_ *JNIEnv; +#endif + +/* + * JNI Invocation Interface. + */ + +struct JNIInvokeInterface_; + +struct JavaVM_; + +#ifdef __cplusplus +typedef JavaVM_ JavaVM; +#else +typedef const struct JNIInvokeInterface_ *JavaVM; +#endif + +struct JNINativeInterface_ { + void *reserved0; + void *reserved1; + void *reserved2; + + void *reserved3; + jint (JNICALL *GetVersion)(JNIEnv *env); + + jclass (JNICALL *DefineClass) + (JNIEnv *env, const char *name, jobject loader, const jbyte *buf, + jsize len); + jclass (JNICALL *FindClass) + (JNIEnv *env, const char *name); + + jmethodID (JNICALL *FromReflectedMethod) + (JNIEnv *env, jobject method); + jfieldID (JNICALL *FromReflectedField) + (JNIEnv *env, jobject field); + + jobject (JNICALL *ToReflectedMethod) + (JNIEnv *env, jclass cls, jmethodID methodID, jboolean isStatic); + + jclass (JNICALL *GetSuperclass) + (JNIEnv *env, jclass sub); + jboolean (JNICALL *IsAssignableFrom) + (JNIEnv *env, jclass sub, jclass sup); + + jobject (JNICALL *ToReflectedField) + (JNIEnv *env, jclass cls, jfieldID fieldID, jboolean isStatic); + + jint (JNICALL *Throw) + (JNIEnv *env, jthrowable obj); + jint (JNICALL *ThrowNew) + (JNIEnv *env, jclass clazz, const char *msg); + jthrowable (JNICALL *ExceptionOccurred) + (JNIEnv *env); + void (JNICALL *ExceptionDescribe) + (JNIEnv *env); + void (JNICALL *ExceptionClear) + (JNIEnv *env); + void (JNICALL *FatalError) + (JNIEnv *env, const char *msg); + + jint (JNICALL *PushLocalFrame) + (JNIEnv *env, jint capacity); + jobject (JNICALL *PopLocalFrame) + (JNIEnv *env, jobject result); + + jobject (JNICALL *NewGlobalRef) + (JNIEnv *env, jobject lobj); + void (JNICALL *DeleteGlobalRef) + (JNIEnv *env, jobject gref); + void (JNICALL *DeleteLocalRef) + (JNIEnv *env, jobject obj); + jboolean (JNICALL *IsSameObject) + (JNIEnv *env, jobject obj1, jobject obj2); + jobject (JNICALL *NewLocalRef) + (JNIEnv *env, jobject ref); + jint (JNICALL *EnsureLocalCapacity) + (JNIEnv *env, jint capacity); + + jobject (JNICALL *AllocObject) + (JNIEnv *env, jclass clazz); + jobject (JNICALL *NewObject) + (JNIEnv *env, jclass clazz, jmethodID methodID, ...); + jobject (JNICALL *NewObjectV) + (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); + jobject (JNICALL *NewObjectA) + (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args); + + jclass (JNICALL *GetObjectClass) + (JNIEnv *env, jobject obj); + jboolean (JNICALL *IsInstanceOf) + (JNIEnv *env, jobject obj, jclass clazz); + + jmethodID (JNICALL *GetMethodID) + (JNIEnv *env, jclass clazz, const char *name, const char *sig); + + jobject (JNICALL *CallObjectMethod) + (JNIEnv *env, jobject obj, jmethodID methodID, ...); + jobject (JNICALL *CallObjectMethodV) + (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); + jobject (JNICALL *CallObjectMethodA) + (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue * args); + + jboolean (JNICALL *CallBooleanMethod) + (JNIEnv *env, jobject obj, jmethodID methodID, ...); + jboolean (JNICALL *CallBooleanMethodV) + (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); + jboolean (JNICALL *CallBooleanMethodA) + (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue * args); + + jbyte (JNICALL *CallByteMethod) + (JNIEnv *env, jobject obj, jmethodID methodID, ...); + jbyte (JNICALL *CallByteMethodV) + (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); + jbyte (JNICALL *CallByteMethodA) + (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args); + + jchar (JNICALL *CallCharMethod) + (JNIEnv *env, jobject obj, jmethodID methodID, ...); + jchar (JNICALL *CallCharMethodV) + (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); + jchar (JNICALL *CallCharMethodA) + (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args); + + jshort (JNICALL *CallShortMethod) + (JNIEnv *env, jobject obj, jmethodID methodID, ...); + jshort (JNICALL *CallShortMethodV) + (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); + jshort (JNICALL *CallShortMethodA) + (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args); + + jint (JNICALL *CallIntMethod) + (JNIEnv *env, jobject obj, jmethodID methodID, ...); + jint (JNICALL *CallIntMethodV) + (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); + jint (JNICALL *CallIntMethodA) + (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args); + + jlong (JNICALL *CallLongMethod) + (JNIEnv *env, jobject obj, jmethodID methodID, ...); + jlong (JNICALL *CallLongMethodV) + (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); + jlong (JNICALL *CallLongMethodA) + (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args); + + jfloat (JNICALL *CallFloatMethod) + (JNIEnv *env, jobject obj, jmethodID methodID, ...); + jfloat (JNICALL *CallFloatMethodV) + (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); + jfloat (JNICALL *CallFloatMethodA) + (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args); + + jdouble (JNICALL *CallDoubleMethod) + (JNIEnv *env, jobject obj, jmethodID methodID, ...); + jdouble (JNICALL *CallDoubleMethodV) + (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); + jdouble (JNICALL *CallDoubleMethodA) + (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args); + + void (JNICALL *CallVoidMethod) + (JNIEnv *env, jobject obj, jmethodID methodID, ...); + void (JNICALL *CallVoidMethodV) + (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); + void (JNICALL *CallVoidMethodA) + (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue * args); + + jobject (JNICALL *CallNonvirtualObjectMethod) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); + jobject (JNICALL *CallNonvirtualObjectMethodV) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + va_list args); + jobject (JNICALL *CallNonvirtualObjectMethodA) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + const jvalue * args); + + jboolean (JNICALL *CallNonvirtualBooleanMethod) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); + jboolean (JNICALL *CallNonvirtualBooleanMethodV) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + va_list args); + jboolean (JNICALL *CallNonvirtualBooleanMethodA) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + const jvalue * args); + + jbyte (JNICALL *CallNonvirtualByteMethod) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); + jbyte (JNICALL *CallNonvirtualByteMethodV) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + va_list args); + jbyte (JNICALL *CallNonvirtualByteMethodA) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + const jvalue *args); + + jchar (JNICALL *CallNonvirtualCharMethod) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); + jchar (JNICALL *CallNonvirtualCharMethodV) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + va_list args); + jchar (JNICALL *CallNonvirtualCharMethodA) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + const jvalue *args); + + jshort (JNICALL *CallNonvirtualShortMethod) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); + jshort (JNICALL *CallNonvirtualShortMethodV) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + va_list args); + jshort (JNICALL *CallNonvirtualShortMethodA) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + const jvalue *args); + + jint (JNICALL *CallNonvirtualIntMethod) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); + jint (JNICALL *CallNonvirtualIntMethodV) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + va_list args); + jint (JNICALL *CallNonvirtualIntMethodA) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + const jvalue *args); + + jlong (JNICALL *CallNonvirtualLongMethod) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); + jlong (JNICALL *CallNonvirtualLongMethodV) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + va_list args); + jlong (JNICALL *CallNonvirtualLongMethodA) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + const jvalue *args); + + jfloat (JNICALL *CallNonvirtualFloatMethod) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); + jfloat (JNICALL *CallNonvirtualFloatMethodV) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + va_list args); + jfloat (JNICALL *CallNonvirtualFloatMethodA) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + const jvalue *args); + + jdouble (JNICALL *CallNonvirtualDoubleMethod) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); + jdouble (JNICALL *CallNonvirtualDoubleMethodV) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + va_list args); + jdouble (JNICALL *CallNonvirtualDoubleMethodA) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + const jvalue *args); + + void (JNICALL *CallNonvirtualVoidMethod) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); + void (JNICALL *CallNonvirtualVoidMethodV) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + va_list args); + void (JNICALL *CallNonvirtualVoidMethodA) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + const jvalue * args); + + jfieldID (JNICALL *GetFieldID) + (JNIEnv *env, jclass clazz, const char *name, const char *sig); + + jobject (JNICALL *GetObjectField) + (JNIEnv *env, jobject obj, jfieldID fieldID); + jboolean (JNICALL *GetBooleanField) + (JNIEnv *env, jobject obj, jfieldID fieldID); + jbyte (JNICALL *GetByteField) + (JNIEnv *env, jobject obj, jfieldID fieldID); + jchar (JNICALL *GetCharField) + (JNIEnv *env, jobject obj, jfieldID fieldID); + jshort (JNICALL *GetShortField) + (JNIEnv *env, jobject obj, jfieldID fieldID); + jint (JNICALL *GetIntField) + (JNIEnv *env, jobject obj, jfieldID fieldID); + jlong (JNICALL *GetLongField) + (JNIEnv *env, jobject obj, jfieldID fieldID); + jfloat (JNICALL *GetFloatField) + (JNIEnv *env, jobject obj, jfieldID fieldID); + jdouble (JNICALL *GetDoubleField) + (JNIEnv *env, jobject obj, jfieldID fieldID); + + void (JNICALL *SetObjectField) + (JNIEnv *env, jobject obj, jfieldID fieldID, jobject val); + void (JNICALL *SetBooleanField) + (JNIEnv *env, jobject obj, jfieldID fieldID, jboolean val); + void (JNICALL *SetByteField) + (JNIEnv *env, jobject obj, jfieldID fieldID, jbyte val); + void (JNICALL *SetCharField) + (JNIEnv *env, jobject obj, jfieldID fieldID, jchar val); + void (JNICALL *SetShortField) + (JNIEnv *env, jobject obj, jfieldID fieldID, jshort val); + void (JNICALL *SetIntField) + (JNIEnv *env, jobject obj, jfieldID fieldID, jint val); + void (JNICALL *SetLongField) + (JNIEnv *env, jobject obj, jfieldID fieldID, jlong val); + void (JNICALL *SetFloatField) + (JNIEnv *env, jobject obj, jfieldID fieldID, jfloat val); + void (JNICALL *SetDoubleField) + (JNIEnv *env, jobject obj, jfieldID fieldID, jdouble val); + + jmethodID (JNICALL *GetStaticMethodID) + (JNIEnv *env, jclass clazz, const char *name, const char *sig); + + jobject (JNICALL *CallStaticObjectMethod) + (JNIEnv *env, jclass clazz, jmethodID methodID, ...); + jobject (JNICALL *CallStaticObjectMethodV) + (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); + jobject (JNICALL *CallStaticObjectMethodA) + (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args); + + jboolean (JNICALL *CallStaticBooleanMethod) + (JNIEnv *env, jclass clazz, jmethodID methodID, ...); + jboolean (JNICALL *CallStaticBooleanMethodV) + (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); + jboolean (JNICALL *CallStaticBooleanMethodA) + (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args); + + jbyte (JNICALL *CallStaticByteMethod) + (JNIEnv *env, jclass clazz, jmethodID methodID, ...); + jbyte (JNICALL *CallStaticByteMethodV) + (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); + jbyte (JNICALL *CallStaticByteMethodA) + (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args); + + jchar (JNICALL *CallStaticCharMethod) + (JNIEnv *env, jclass clazz, jmethodID methodID, ...); + jchar (JNICALL *CallStaticCharMethodV) + (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); + jchar (JNICALL *CallStaticCharMethodA) + (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args); + + jshort (JNICALL *CallStaticShortMethod) + (JNIEnv *env, jclass clazz, jmethodID methodID, ...); + jshort (JNICALL *CallStaticShortMethodV) + (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); + jshort (JNICALL *CallStaticShortMethodA) + (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args); + + jint (JNICALL *CallStaticIntMethod) + (JNIEnv *env, jclass clazz, jmethodID methodID, ...); + jint (JNICALL *CallStaticIntMethodV) + (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); + jint (JNICALL *CallStaticIntMethodA) + (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args); + + jlong (JNICALL *CallStaticLongMethod) + (JNIEnv *env, jclass clazz, jmethodID methodID, ...); + jlong (JNICALL *CallStaticLongMethodV) + (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); + jlong (JNICALL *CallStaticLongMethodA) + (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args); + + jfloat (JNICALL *CallStaticFloatMethod) + (JNIEnv *env, jclass clazz, jmethodID methodID, ...); + jfloat (JNICALL *CallStaticFloatMethodV) + (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); + jfloat (JNICALL *CallStaticFloatMethodA) + (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args); + + jdouble (JNICALL *CallStaticDoubleMethod) + (JNIEnv *env, jclass clazz, jmethodID methodID, ...); + jdouble (JNICALL *CallStaticDoubleMethodV) + (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); + jdouble (JNICALL *CallStaticDoubleMethodA) + (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args); + + void (JNICALL *CallStaticVoidMethod) + (JNIEnv *env, jclass cls, jmethodID methodID, ...); + void (JNICALL *CallStaticVoidMethodV) + (JNIEnv *env, jclass cls, jmethodID methodID, va_list args); + void (JNICALL *CallStaticVoidMethodA) + (JNIEnv *env, jclass cls, jmethodID methodID, const jvalue * args); + + jfieldID (JNICALL *GetStaticFieldID) + (JNIEnv *env, jclass clazz, const char *name, const char *sig); + jobject (JNICALL *GetStaticObjectField) + (JNIEnv *env, jclass clazz, jfieldID fieldID); + jboolean (JNICALL *GetStaticBooleanField) + (JNIEnv *env, jclass clazz, jfieldID fieldID); + jbyte (JNICALL *GetStaticByteField) + (JNIEnv *env, jclass clazz, jfieldID fieldID); + jchar (JNICALL *GetStaticCharField) + (JNIEnv *env, jclass clazz, jfieldID fieldID); + jshort (JNICALL *GetStaticShortField) + (JNIEnv *env, jclass clazz, jfieldID fieldID); + jint (JNICALL *GetStaticIntField) + (JNIEnv *env, jclass clazz, jfieldID fieldID); + jlong (JNICALL *GetStaticLongField) + (JNIEnv *env, jclass clazz, jfieldID fieldID); + jfloat (JNICALL *GetStaticFloatField) + (JNIEnv *env, jclass clazz, jfieldID fieldID); + jdouble (JNICALL *GetStaticDoubleField) + (JNIEnv *env, jclass clazz, jfieldID fieldID); + + void (JNICALL *SetStaticObjectField) + (JNIEnv *env, jclass clazz, jfieldID fieldID, jobject value); + void (JNICALL *SetStaticBooleanField) + (JNIEnv *env, jclass clazz, jfieldID fieldID, jboolean value); + void (JNICALL *SetStaticByteField) + (JNIEnv *env, jclass clazz, jfieldID fieldID, jbyte value); + void (JNICALL *SetStaticCharField) + (JNIEnv *env, jclass clazz, jfieldID fieldID, jchar value); + void (JNICALL *SetStaticShortField) + (JNIEnv *env, jclass clazz, jfieldID fieldID, jshort value); + void (JNICALL *SetStaticIntField) + (JNIEnv *env, jclass clazz, jfieldID fieldID, jint value); + void (JNICALL *SetStaticLongField) + (JNIEnv *env, jclass clazz, jfieldID fieldID, jlong value); + void (JNICALL *SetStaticFloatField) + (JNIEnv *env, jclass clazz, jfieldID fieldID, jfloat value); + void (JNICALL *SetStaticDoubleField) + (JNIEnv *env, jclass clazz, jfieldID fieldID, jdouble value); + + jstring (JNICALL *NewString) + (JNIEnv *env, const jchar *unicode, jsize len); + jsize (JNICALL *GetStringLength) + (JNIEnv *env, jstring str); + const jchar *(JNICALL *GetStringChars) + (JNIEnv *env, jstring str, jboolean *isCopy); + void (JNICALL *ReleaseStringChars) + (JNIEnv *env, jstring str, const jchar *chars); + + jstring (JNICALL *NewStringUTF) + (JNIEnv *env, const char *utf); + jsize (JNICALL *GetStringUTFLength) + (JNIEnv *env, jstring str); + const char* (JNICALL *GetStringUTFChars) + (JNIEnv *env, jstring str, jboolean *isCopy); + void (JNICALL *ReleaseStringUTFChars) + (JNIEnv *env, jstring str, const char* chars); + + + jsize (JNICALL *GetArrayLength) + (JNIEnv *env, jarray array); + + jobjectArray (JNICALL *NewObjectArray) + (JNIEnv *env, jsize len, jclass clazz, jobject init); + jobject (JNICALL *GetObjectArrayElement) + (JNIEnv *env, jobjectArray array, jsize index); + void (JNICALL *SetObjectArrayElement) + (JNIEnv *env, jobjectArray array, jsize index, jobject val); + + jbooleanArray (JNICALL *NewBooleanArray) + (JNIEnv *env, jsize len); + jbyteArray (JNICALL *NewByteArray) + (JNIEnv *env, jsize len); + jcharArray (JNICALL *NewCharArray) + (JNIEnv *env, jsize len); + jshortArray (JNICALL *NewShortArray) + (JNIEnv *env, jsize len); + jintArray (JNICALL *NewIntArray) + (JNIEnv *env, jsize len); + jlongArray (JNICALL *NewLongArray) + (JNIEnv *env, jsize len); + jfloatArray (JNICALL *NewFloatArray) + (JNIEnv *env, jsize len); + jdoubleArray (JNICALL *NewDoubleArray) + (JNIEnv *env, jsize len); + + jboolean * (JNICALL *GetBooleanArrayElements) + (JNIEnv *env, jbooleanArray array, jboolean *isCopy); + jbyte * (JNICALL *GetByteArrayElements) + (JNIEnv *env, jbyteArray array, jboolean *isCopy); + jchar * (JNICALL *GetCharArrayElements) + (JNIEnv *env, jcharArray array, jboolean *isCopy); + jshort * (JNICALL *GetShortArrayElements) + (JNIEnv *env, jshortArray array, jboolean *isCopy); + jint * (JNICALL *GetIntArrayElements) + (JNIEnv *env, jintArray array, jboolean *isCopy); + jlong * (JNICALL *GetLongArrayElements) + (JNIEnv *env, jlongArray array, jboolean *isCopy); + jfloat * (JNICALL *GetFloatArrayElements) + (JNIEnv *env, jfloatArray array, jboolean *isCopy); + jdouble * (JNICALL *GetDoubleArrayElements) + (JNIEnv *env, jdoubleArray array, jboolean *isCopy); + + void (JNICALL *ReleaseBooleanArrayElements) + (JNIEnv *env, jbooleanArray array, jboolean *elems, jint mode); + void (JNICALL *ReleaseByteArrayElements) + (JNIEnv *env, jbyteArray array, jbyte *elems, jint mode); + void (JNICALL *ReleaseCharArrayElements) + (JNIEnv *env, jcharArray array, jchar *elems, jint mode); + void (JNICALL *ReleaseShortArrayElements) + (JNIEnv *env, jshortArray array, jshort *elems, jint mode); + void (JNICALL *ReleaseIntArrayElements) + (JNIEnv *env, jintArray array, jint *elems, jint mode); + void (JNICALL *ReleaseLongArrayElements) + (JNIEnv *env, jlongArray array, jlong *elems, jint mode); + void (JNICALL *ReleaseFloatArrayElements) + (JNIEnv *env, jfloatArray array, jfloat *elems, jint mode); + void (JNICALL *ReleaseDoubleArrayElements) + (JNIEnv *env, jdoubleArray array, jdouble *elems, jint mode); + + void (JNICALL *GetBooleanArrayRegion) + (JNIEnv *env, jbooleanArray array, jsize start, jsize l, jboolean *buf); + void (JNICALL *GetByteArrayRegion) + (JNIEnv *env, jbyteArray array, jsize start, jsize len, jbyte *buf); + void (JNICALL *GetCharArrayRegion) + (JNIEnv *env, jcharArray array, jsize start, jsize len, jchar *buf); + void (JNICALL *GetShortArrayRegion) + (JNIEnv *env, jshortArray array, jsize start, jsize len, jshort *buf); + void (JNICALL *GetIntArrayRegion) + (JNIEnv *env, jintArray array, jsize start, jsize len, jint *buf); + void (JNICALL *GetLongArrayRegion) + (JNIEnv *env, jlongArray array, jsize start, jsize len, jlong *buf); + void (JNICALL *GetFloatArrayRegion) + (JNIEnv *env, jfloatArray array, jsize start, jsize len, jfloat *buf); + void (JNICALL *GetDoubleArrayRegion) + (JNIEnv *env, jdoubleArray array, jsize start, jsize len, jdouble *buf); + + void (JNICALL *SetBooleanArrayRegion) + (JNIEnv *env, jbooleanArray array, jsize start, jsize l, const jboolean *buf); + void (JNICALL *SetByteArrayRegion) + (JNIEnv *env, jbyteArray array, jsize start, jsize len, const jbyte *buf); + void (JNICALL *SetCharArrayRegion) + (JNIEnv *env, jcharArray array, jsize start, jsize len, const jchar *buf); + void (JNICALL *SetShortArrayRegion) + (JNIEnv *env, jshortArray array, jsize start, jsize len, const jshort *buf); + void (JNICALL *SetIntArrayRegion) + (JNIEnv *env, jintArray array, jsize start, jsize len, const jint *buf); + void (JNICALL *SetLongArrayRegion) + (JNIEnv *env, jlongArray array, jsize start, jsize len, const jlong *buf); + void (JNICALL *SetFloatArrayRegion) + (JNIEnv *env, jfloatArray array, jsize start, jsize len, const jfloat *buf); + void (JNICALL *SetDoubleArrayRegion) + (JNIEnv *env, jdoubleArray array, jsize start, jsize len, const jdouble *buf); + + jint (JNICALL *RegisterNatives) + (JNIEnv *env, jclass clazz, const JNINativeMethod *methods, + jint nMethods); + jint (JNICALL *UnregisterNatives) + (JNIEnv *env, jclass clazz); + + jint (JNICALL *MonitorEnter) + (JNIEnv *env, jobject obj); + jint (JNICALL *MonitorExit) + (JNIEnv *env, jobject obj); + + jint (JNICALL *GetJavaVM) + (JNIEnv *env, JavaVM **vm); + + void (JNICALL *GetStringRegion) + (JNIEnv *env, jstring str, jsize start, jsize len, jchar *buf); + void (JNICALL *GetStringUTFRegion) + (JNIEnv *env, jstring str, jsize start, jsize len, char *buf); + + void * (JNICALL *GetPrimitiveArrayCritical) + (JNIEnv *env, jarray array, jboolean *isCopy); + void (JNICALL *ReleasePrimitiveArrayCritical) + (JNIEnv *env, jarray array, void *carray, jint mode); + + const jchar * (JNICALL *GetStringCritical) + (JNIEnv *env, jstring string, jboolean *isCopy); + void (JNICALL *ReleaseStringCritical) + (JNIEnv *env, jstring string, const jchar *cstring); + + jweak (JNICALL *NewWeakGlobalRef) + (JNIEnv *env, jobject obj); + void (JNICALL *DeleteWeakGlobalRef) + (JNIEnv *env, jweak ref); + + jboolean (JNICALL *ExceptionCheck) + (JNIEnv *env); + + jobject (JNICALL *NewDirectByteBuffer) + (JNIEnv* env, void* address, jlong capacity); + void* (JNICALL *GetDirectBufferAddress) + (JNIEnv* env, jobject buf); + jlong (JNICALL *GetDirectBufferCapacity) + (JNIEnv* env, jobject buf); + + /* New JNI 1.6 Features */ + + jobjectRefType (JNICALL *GetObjectRefType) + (JNIEnv* env, jobject obj); +}; + +/* + * We use inlined functions for C++ so that programmers can write: + * + * env->FindClass("java/lang/String") + * + * in C++ rather than: + * + * (*env)->FindClass(env, "java/lang/String") + * + * in C. + */ + +struct JNIEnv_ { + const struct JNINativeInterface_ *functions; +#ifdef __cplusplus + + jint GetVersion() { + return functions->GetVersion(this); + } + jclass DefineClass(const char *name, jobject loader, const jbyte *buf, + jsize len) { + return functions->DefineClass(this, name, loader, buf, len); + } + jclass FindClass(const char *name) { + return functions->FindClass(this, name); + } + jmethodID FromReflectedMethod(jobject method) { + return functions->FromReflectedMethod(this,method); + } + jfieldID FromReflectedField(jobject field) { + return functions->FromReflectedField(this,field); + } + + jobject ToReflectedMethod(jclass cls, jmethodID methodID, jboolean isStatic) { + return functions->ToReflectedMethod(this, cls, methodID, isStatic); + } + + jclass GetSuperclass(jclass sub) { + return functions->GetSuperclass(this, sub); + } + jboolean IsAssignableFrom(jclass sub, jclass sup) { + return functions->IsAssignableFrom(this, sub, sup); + } + + jobject ToReflectedField(jclass cls, jfieldID fieldID, jboolean isStatic) { + return functions->ToReflectedField(this,cls,fieldID,isStatic); + } + + jint Throw(jthrowable obj) { + return functions->Throw(this, obj); + } + jint ThrowNew(jclass clazz, const char *msg) { + return functions->ThrowNew(this, clazz, msg); + } + jthrowable ExceptionOccurred() { + return functions->ExceptionOccurred(this); + } + void ExceptionDescribe() { + functions->ExceptionDescribe(this); + } + void ExceptionClear() { + functions->ExceptionClear(this); + } + void FatalError(const char *msg) { + functions->FatalError(this, msg); + } + + jint PushLocalFrame(jint capacity) { + return functions->PushLocalFrame(this,capacity); + } + jobject PopLocalFrame(jobject result) { + return functions->PopLocalFrame(this,result); + } + + jobject NewGlobalRef(jobject lobj) { + return functions->NewGlobalRef(this,lobj); + } + void DeleteGlobalRef(jobject gref) { + functions->DeleteGlobalRef(this,gref); + } + void DeleteLocalRef(jobject obj) { + functions->DeleteLocalRef(this, obj); + } + + jboolean IsSameObject(jobject obj1, jobject obj2) { + return functions->IsSameObject(this,obj1,obj2); + } + + jobject NewLocalRef(jobject ref) { + return functions->NewLocalRef(this,ref); + } + jint EnsureLocalCapacity(jint capacity) { + return functions->EnsureLocalCapacity(this,capacity); + } + + jobject AllocObject(jclass clazz) { + return functions->AllocObject(this,clazz); + } + jobject NewObject(jclass clazz, jmethodID methodID, ...) { + va_list args; + jobject result; + va_start(args, methodID); + result = functions->NewObjectV(this,clazz,methodID,args); + va_end(args); + return result; + } + jobject NewObjectV(jclass clazz, jmethodID methodID, + va_list args) { + return functions->NewObjectV(this,clazz,methodID,args); + } + jobject NewObjectA(jclass clazz, jmethodID methodID, + const jvalue *args) { + return functions->NewObjectA(this,clazz,methodID,args); + } + + jclass GetObjectClass(jobject obj) { + return functions->GetObjectClass(this,obj); + } + jboolean IsInstanceOf(jobject obj, jclass clazz) { + return functions->IsInstanceOf(this,obj,clazz); + } + + jmethodID GetMethodID(jclass clazz, const char *name, + const char *sig) { + return functions->GetMethodID(this,clazz,name,sig); + } + + jobject CallObjectMethod(jobject obj, jmethodID methodID, ...) { + va_list args; + jobject result; + va_start(args,methodID); + result = functions->CallObjectMethodV(this,obj,methodID,args); + va_end(args); + return result; + } + jobject CallObjectMethodV(jobject obj, jmethodID methodID, + va_list args) { + return functions->CallObjectMethodV(this,obj,methodID,args); + } + jobject CallObjectMethodA(jobject obj, jmethodID methodID, + const jvalue * args) { + return functions->CallObjectMethodA(this,obj,methodID,args); + } + + jboolean CallBooleanMethod(jobject obj, + jmethodID methodID, ...) { + va_list args; + jboolean result; + va_start(args,methodID); + result = functions->CallBooleanMethodV(this,obj,methodID,args); + va_end(args); + return result; + } + jboolean CallBooleanMethodV(jobject obj, jmethodID methodID, + va_list args) { + return functions->CallBooleanMethodV(this,obj,methodID,args); + } + jboolean CallBooleanMethodA(jobject obj, jmethodID methodID, + const jvalue * args) { + return functions->CallBooleanMethodA(this,obj,methodID, args); + } + + jbyte CallByteMethod(jobject obj, jmethodID methodID, ...) { + va_list args; + jbyte result; + va_start(args,methodID); + result = functions->CallByteMethodV(this,obj,methodID,args); + va_end(args); + return result; + } + jbyte CallByteMethodV(jobject obj, jmethodID methodID, + va_list args) { + return functions->CallByteMethodV(this,obj,methodID,args); + } + jbyte CallByteMethodA(jobject obj, jmethodID methodID, + const jvalue * args) { + return functions->CallByteMethodA(this,obj,methodID,args); + } + + jchar CallCharMethod(jobject obj, jmethodID methodID, ...) { + va_list args; + jchar result; + va_start(args,methodID); + result = functions->CallCharMethodV(this,obj,methodID,args); + va_end(args); + return result; + } + jchar CallCharMethodV(jobject obj, jmethodID methodID, + va_list args) { + return functions->CallCharMethodV(this,obj,methodID,args); + } + jchar CallCharMethodA(jobject obj, jmethodID methodID, + const jvalue * args) { + return functions->CallCharMethodA(this,obj,methodID,args); + } + + jshort CallShortMethod(jobject obj, jmethodID methodID, ...) { + va_list args; + jshort result; + va_start(args,methodID); + result = functions->CallShortMethodV(this,obj,methodID,args); + va_end(args); + return result; + } + jshort CallShortMethodV(jobject obj, jmethodID methodID, + va_list args) { + return functions->CallShortMethodV(this,obj,methodID,args); + } + jshort CallShortMethodA(jobject obj, jmethodID methodID, + const jvalue * args) { + return functions->CallShortMethodA(this,obj,methodID,args); + } + + jint CallIntMethod(jobject obj, jmethodID methodID, ...) { + va_list args; + jint result; + va_start(args,methodID); + result = functions->CallIntMethodV(this,obj,methodID,args); + va_end(args); + return result; + } + jint CallIntMethodV(jobject obj, jmethodID methodID, + va_list args) { + return functions->CallIntMethodV(this,obj,methodID,args); + } + jint CallIntMethodA(jobject obj, jmethodID methodID, + const jvalue * args) { + return functions->CallIntMethodA(this,obj,methodID,args); + } + + jlong CallLongMethod(jobject obj, jmethodID methodID, ...) { + va_list args; + jlong result; + va_start(args,methodID); + result = functions->CallLongMethodV(this,obj,methodID,args); + va_end(args); + return result; + } + jlong CallLongMethodV(jobject obj, jmethodID methodID, + va_list args) { + return functions->CallLongMethodV(this,obj,methodID,args); + } + jlong CallLongMethodA(jobject obj, jmethodID methodID, + const jvalue * args) { + return functions->CallLongMethodA(this,obj,methodID,args); + } + + jfloat CallFloatMethod(jobject obj, jmethodID methodID, ...) { + va_list args; + jfloat result; + va_start(args,methodID); + result = functions->CallFloatMethodV(this,obj,methodID,args); + va_end(args); + return result; + } + jfloat CallFloatMethodV(jobject obj, jmethodID methodID, + va_list args) { + return functions->CallFloatMethodV(this,obj,methodID,args); + } + jfloat CallFloatMethodA(jobject obj, jmethodID methodID, + const jvalue * args) { + return functions->CallFloatMethodA(this,obj,methodID,args); + } + + jdouble CallDoubleMethod(jobject obj, jmethodID methodID, ...) { + va_list args; + jdouble result; + va_start(args,methodID); + result = functions->CallDoubleMethodV(this,obj,methodID,args); + va_end(args); + return result; + } + jdouble CallDoubleMethodV(jobject obj, jmethodID methodID, + va_list args) { + return functions->CallDoubleMethodV(this,obj,methodID,args); + } + jdouble CallDoubleMethodA(jobject obj, jmethodID methodID, + const jvalue * args) { + return functions->CallDoubleMethodA(this,obj,methodID,args); + } + + void CallVoidMethod(jobject obj, jmethodID methodID, ...) { + va_list args; + va_start(args,methodID); + functions->CallVoidMethodV(this,obj,methodID,args); + va_end(args); + } + void CallVoidMethodV(jobject obj, jmethodID methodID, + va_list args) { + functions->CallVoidMethodV(this,obj,methodID,args); + } + void CallVoidMethodA(jobject obj, jmethodID methodID, + const jvalue * args) { + functions->CallVoidMethodA(this,obj,methodID,args); + } + + jobject CallNonvirtualObjectMethod(jobject obj, jclass clazz, + jmethodID methodID, ...) { + va_list args; + jobject result; + va_start(args,methodID); + result = functions->CallNonvirtualObjectMethodV(this,obj,clazz, + methodID,args); + va_end(args); + return result; + } + jobject CallNonvirtualObjectMethodV(jobject obj, jclass clazz, + jmethodID methodID, va_list args) { + return functions->CallNonvirtualObjectMethodV(this,obj,clazz, + methodID,args); + } + jobject CallNonvirtualObjectMethodA(jobject obj, jclass clazz, + jmethodID methodID, const jvalue * args) { + return functions->CallNonvirtualObjectMethodA(this,obj,clazz, + methodID,args); + } + + jboolean CallNonvirtualBooleanMethod(jobject obj, jclass clazz, + jmethodID methodID, ...) { + va_list args; + jboolean result; + va_start(args,methodID); + result = functions->CallNonvirtualBooleanMethodV(this,obj,clazz, + methodID,args); + va_end(args); + return result; + } + jboolean CallNonvirtualBooleanMethodV(jobject obj, jclass clazz, + jmethodID methodID, va_list args) { + return functions->CallNonvirtualBooleanMethodV(this,obj,clazz, + methodID,args); + } + jboolean CallNonvirtualBooleanMethodA(jobject obj, jclass clazz, + jmethodID methodID, const jvalue * args) { + return functions->CallNonvirtualBooleanMethodA(this,obj,clazz, + methodID, args); + } + + jbyte CallNonvirtualByteMethod(jobject obj, jclass clazz, + jmethodID methodID, ...) { + va_list args; + jbyte result; + va_start(args,methodID); + result = functions->CallNonvirtualByteMethodV(this,obj,clazz, + methodID,args); + va_end(args); + return result; + } + jbyte CallNonvirtualByteMethodV(jobject obj, jclass clazz, + jmethodID methodID, va_list args) { + return functions->CallNonvirtualByteMethodV(this,obj,clazz, + methodID,args); + } + jbyte CallNonvirtualByteMethodA(jobject obj, jclass clazz, + jmethodID methodID, const jvalue * args) { + return functions->CallNonvirtualByteMethodA(this,obj,clazz, + methodID,args); + } + + jchar CallNonvirtualCharMethod(jobject obj, jclass clazz, + jmethodID methodID, ...) { + va_list args; + jchar result; + va_start(args,methodID); + result = functions->CallNonvirtualCharMethodV(this,obj,clazz, + methodID,args); + va_end(args); + return result; + } + jchar CallNonvirtualCharMethodV(jobject obj, jclass clazz, + jmethodID methodID, va_list args) { + return functions->CallNonvirtualCharMethodV(this,obj,clazz, + methodID,args); + } + jchar CallNonvirtualCharMethodA(jobject obj, jclass clazz, + jmethodID methodID, const jvalue * args) { + return functions->CallNonvirtualCharMethodA(this,obj,clazz, + methodID,args); + } + + jshort CallNonvirtualShortMethod(jobject obj, jclass clazz, + jmethodID methodID, ...) { + va_list args; + jshort result; + va_start(args,methodID); + result = functions->CallNonvirtualShortMethodV(this,obj,clazz, + methodID,args); + va_end(args); + return result; + } + jshort CallNonvirtualShortMethodV(jobject obj, jclass clazz, + jmethodID methodID, va_list args) { + return functions->CallNonvirtualShortMethodV(this,obj,clazz, + methodID,args); + } + jshort CallNonvirtualShortMethodA(jobject obj, jclass clazz, + jmethodID methodID, const jvalue * args) { + return functions->CallNonvirtualShortMethodA(this,obj,clazz, + methodID,args); + } + + jint CallNonvirtualIntMethod(jobject obj, jclass clazz, + jmethodID methodID, ...) { + va_list args; + jint result; + va_start(args,methodID); + result = functions->CallNonvirtualIntMethodV(this,obj,clazz, + methodID,args); + va_end(args); + return result; + } + jint CallNonvirtualIntMethodV(jobject obj, jclass clazz, + jmethodID methodID, va_list args) { + return functions->CallNonvirtualIntMethodV(this,obj,clazz, + methodID,args); + } + jint CallNonvirtualIntMethodA(jobject obj, jclass clazz, + jmethodID methodID, const jvalue * args) { + return functions->CallNonvirtualIntMethodA(this,obj,clazz, + methodID,args); + } + + jlong CallNonvirtualLongMethod(jobject obj, jclass clazz, + jmethodID methodID, ...) { + va_list args; + jlong result; + va_start(args,methodID); + result = functions->CallNonvirtualLongMethodV(this,obj,clazz, + methodID,args); + va_end(args); + return result; + } + jlong CallNonvirtualLongMethodV(jobject obj, jclass clazz, + jmethodID methodID, va_list args) { + return functions->CallNonvirtualLongMethodV(this,obj,clazz, + methodID,args); + } + jlong CallNonvirtualLongMethodA(jobject obj, jclass clazz, + jmethodID methodID, const jvalue * args) { + return functions->CallNonvirtualLongMethodA(this,obj,clazz, + methodID,args); + } + + jfloat CallNonvirtualFloatMethod(jobject obj, jclass clazz, + jmethodID methodID, ...) { + va_list args; + jfloat result; + va_start(args,methodID); + result = functions->CallNonvirtualFloatMethodV(this,obj,clazz, + methodID,args); + va_end(args); + return result; + } + jfloat CallNonvirtualFloatMethodV(jobject obj, jclass clazz, + jmethodID methodID, + va_list args) { + return functions->CallNonvirtualFloatMethodV(this,obj,clazz, + methodID,args); + } + jfloat CallNonvirtualFloatMethodA(jobject obj, jclass clazz, + jmethodID methodID, + const jvalue * args) { + return functions->CallNonvirtualFloatMethodA(this,obj,clazz, + methodID,args); + } + + jdouble CallNonvirtualDoubleMethod(jobject obj, jclass clazz, + jmethodID methodID, ...) { + va_list args; + jdouble result; + va_start(args,methodID); + result = functions->CallNonvirtualDoubleMethodV(this,obj,clazz, + methodID,args); + va_end(args); + return result; + } + jdouble CallNonvirtualDoubleMethodV(jobject obj, jclass clazz, + jmethodID methodID, + va_list args) { + return functions->CallNonvirtualDoubleMethodV(this,obj,clazz, + methodID,args); + } + jdouble CallNonvirtualDoubleMethodA(jobject obj, jclass clazz, + jmethodID methodID, + const jvalue * args) { + return functions->CallNonvirtualDoubleMethodA(this,obj,clazz, + methodID,args); + } + + void CallNonvirtualVoidMethod(jobject obj, jclass clazz, + jmethodID methodID, ...) { + va_list args; + va_start(args,methodID); + functions->CallNonvirtualVoidMethodV(this,obj,clazz,methodID,args); + va_end(args); + } + void CallNonvirtualVoidMethodV(jobject obj, jclass clazz, + jmethodID methodID, + va_list args) { + functions->CallNonvirtualVoidMethodV(this,obj,clazz,methodID,args); + } + void CallNonvirtualVoidMethodA(jobject obj, jclass clazz, + jmethodID methodID, + const jvalue * args) { + functions->CallNonvirtualVoidMethodA(this,obj,clazz,methodID,args); + } + + jfieldID GetFieldID(jclass clazz, const char *name, + const char *sig) { + return functions->GetFieldID(this,clazz,name,sig); + } + + jobject GetObjectField(jobject obj, jfieldID fieldID) { + return functions->GetObjectField(this,obj,fieldID); + } + jboolean GetBooleanField(jobject obj, jfieldID fieldID) { + return functions->GetBooleanField(this,obj,fieldID); + } + jbyte GetByteField(jobject obj, jfieldID fieldID) { + return functions->GetByteField(this,obj,fieldID); + } + jchar GetCharField(jobject obj, jfieldID fieldID) { + return functions->GetCharField(this,obj,fieldID); + } + jshort GetShortField(jobject obj, jfieldID fieldID) { + return functions->GetShortField(this,obj,fieldID); + } + jint GetIntField(jobject obj, jfieldID fieldID) { + return functions->GetIntField(this,obj,fieldID); + } + jlong GetLongField(jobject obj, jfieldID fieldID) { + return functions->GetLongField(this,obj,fieldID); + } + jfloat GetFloatField(jobject obj, jfieldID fieldID) { + return functions->GetFloatField(this,obj,fieldID); + } + jdouble GetDoubleField(jobject obj, jfieldID fieldID) { + return functions->GetDoubleField(this,obj,fieldID); + } + + void SetObjectField(jobject obj, jfieldID fieldID, jobject val) { + functions->SetObjectField(this,obj,fieldID,val); + } + void SetBooleanField(jobject obj, jfieldID fieldID, + jboolean val) { + functions->SetBooleanField(this,obj,fieldID,val); + } + void SetByteField(jobject obj, jfieldID fieldID, + jbyte val) { + functions->SetByteField(this,obj,fieldID,val); + } + void SetCharField(jobject obj, jfieldID fieldID, + jchar val) { + functions->SetCharField(this,obj,fieldID,val); + } + void SetShortField(jobject obj, jfieldID fieldID, + jshort val) { + functions->SetShortField(this,obj,fieldID,val); + } + void SetIntField(jobject obj, jfieldID fieldID, + jint val) { + functions->SetIntField(this,obj,fieldID,val); + } + void SetLongField(jobject obj, jfieldID fieldID, + jlong val) { + functions->SetLongField(this,obj,fieldID,val); + } + void SetFloatField(jobject obj, jfieldID fieldID, + jfloat val) { + functions->SetFloatField(this,obj,fieldID,val); + } + void SetDoubleField(jobject obj, jfieldID fieldID, + jdouble val) { + functions->SetDoubleField(this,obj,fieldID,val); + } + + jmethodID GetStaticMethodID(jclass clazz, const char *name, + const char *sig) { + return functions->GetStaticMethodID(this,clazz,name,sig); + } + + jobject CallStaticObjectMethod(jclass clazz, jmethodID methodID, + ...) { + va_list args; + jobject result; + va_start(args,methodID); + result = functions->CallStaticObjectMethodV(this,clazz,methodID,args); + va_end(args); + return result; + } + jobject CallStaticObjectMethodV(jclass clazz, jmethodID methodID, + va_list args) { + return functions->CallStaticObjectMethodV(this,clazz,methodID,args); + } + jobject CallStaticObjectMethodA(jclass clazz, jmethodID methodID, + const jvalue *args) { + return functions->CallStaticObjectMethodA(this,clazz,methodID,args); + } + + jboolean CallStaticBooleanMethod(jclass clazz, + jmethodID methodID, ...) { + va_list args; + jboolean result; + va_start(args,methodID); + result = functions->CallStaticBooleanMethodV(this,clazz,methodID,args); + va_end(args); + return result; + } + jboolean CallStaticBooleanMethodV(jclass clazz, + jmethodID methodID, va_list args) { + return functions->CallStaticBooleanMethodV(this,clazz,methodID,args); + } + jboolean CallStaticBooleanMethodA(jclass clazz, + jmethodID methodID, const jvalue *args) { + return functions->CallStaticBooleanMethodA(this,clazz,methodID,args); + } + + jbyte CallStaticByteMethod(jclass clazz, + jmethodID methodID, ...) { + va_list args; + jbyte result; + va_start(args,methodID); + result = functions->CallStaticByteMethodV(this,clazz,methodID,args); + va_end(args); + return result; + } + jbyte CallStaticByteMethodV(jclass clazz, + jmethodID methodID, va_list args) { + return functions->CallStaticByteMethodV(this,clazz,methodID,args); + } + jbyte CallStaticByteMethodA(jclass clazz, + jmethodID methodID, const jvalue *args) { + return functions->CallStaticByteMethodA(this,clazz,methodID,args); + } + + jchar CallStaticCharMethod(jclass clazz, + jmethodID methodID, ...) { + va_list args; + jchar result; + va_start(args,methodID); + result = functions->CallStaticCharMethodV(this,clazz,methodID,args); + va_end(args); + return result; + } + jchar CallStaticCharMethodV(jclass clazz, + jmethodID methodID, va_list args) { + return functions->CallStaticCharMethodV(this,clazz,methodID,args); + } + jchar CallStaticCharMethodA(jclass clazz, + jmethodID methodID, const jvalue *args) { + return functions->CallStaticCharMethodA(this,clazz,methodID,args); + } + + jshort CallStaticShortMethod(jclass clazz, + jmethodID methodID, ...) { + va_list args; + jshort result; + va_start(args,methodID); + result = functions->CallStaticShortMethodV(this,clazz,methodID,args); + va_end(args); + return result; + } + jshort CallStaticShortMethodV(jclass clazz, + jmethodID methodID, va_list args) { + return functions->CallStaticShortMethodV(this,clazz,methodID,args); + } + jshort CallStaticShortMethodA(jclass clazz, + jmethodID methodID, const jvalue *args) { + return functions->CallStaticShortMethodA(this,clazz,methodID,args); + } + + jint CallStaticIntMethod(jclass clazz, + jmethodID methodID, ...) { + va_list args; + jint result; + va_start(args,methodID); + result = functions->CallStaticIntMethodV(this,clazz,methodID,args); + va_end(args); + return result; + } + jint CallStaticIntMethodV(jclass clazz, + jmethodID methodID, va_list args) { + return functions->CallStaticIntMethodV(this,clazz,methodID,args); + } + jint CallStaticIntMethodA(jclass clazz, + jmethodID methodID, const jvalue *args) { + return functions->CallStaticIntMethodA(this,clazz,methodID,args); + } + + jlong CallStaticLongMethod(jclass clazz, + jmethodID methodID, ...) { + va_list args; + jlong result; + va_start(args,methodID); + result = functions->CallStaticLongMethodV(this,clazz,methodID,args); + va_end(args); + return result; + } + jlong CallStaticLongMethodV(jclass clazz, + jmethodID methodID, va_list args) { + return functions->CallStaticLongMethodV(this,clazz,methodID,args); + } + jlong CallStaticLongMethodA(jclass clazz, + jmethodID methodID, const jvalue *args) { + return functions->CallStaticLongMethodA(this,clazz,methodID,args); + } + + jfloat CallStaticFloatMethod(jclass clazz, + jmethodID methodID, ...) { + va_list args; + jfloat result; + va_start(args,methodID); + result = functions->CallStaticFloatMethodV(this,clazz,methodID,args); + va_end(args); + return result; + } + jfloat CallStaticFloatMethodV(jclass clazz, + jmethodID methodID, va_list args) { + return functions->CallStaticFloatMethodV(this,clazz,methodID,args); + } + jfloat CallStaticFloatMethodA(jclass clazz, + jmethodID methodID, const jvalue *args) { + return functions->CallStaticFloatMethodA(this,clazz,methodID,args); + } + + jdouble CallStaticDoubleMethod(jclass clazz, + jmethodID methodID, ...) { + va_list args; + jdouble result; + va_start(args,methodID); + result = functions->CallStaticDoubleMethodV(this,clazz,methodID,args); + va_end(args); + return result; + } + jdouble CallStaticDoubleMethodV(jclass clazz, + jmethodID methodID, va_list args) { + return functions->CallStaticDoubleMethodV(this,clazz,methodID,args); + } + jdouble CallStaticDoubleMethodA(jclass clazz, + jmethodID methodID, const jvalue *args) { + return functions->CallStaticDoubleMethodA(this,clazz,methodID,args); + } + + void CallStaticVoidMethod(jclass cls, jmethodID methodID, ...) { + va_list args; + va_start(args,methodID); + functions->CallStaticVoidMethodV(this,cls,methodID,args); + va_end(args); + } + void CallStaticVoidMethodV(jclass cls, jmethodID methodID, + va_list args) { + functions->CallStaticVoidMethodV(this,cls,methodID,args); + } + void CallStaticVoidMethodA(jclass cls, jmethodID methodID, + const jvalue * args) { + functions->CallStaticVoidMethodA(this,cls,methodID,args); + } + + jfieldID GetStaticFieldID(jclass clazz, const char *name, + const char *sig) { + return functions->GetStaticFieldID(this,clazz,name,sig); + } + jobject GetStaticObjectField(jclass clazz, jfieldID fieldID) { + return functions->GetStaticObjectField(this,clazz,fieldID); + } + jboolean GetStaticBooleanField(jclass clazz, jfieldID fieldID) { + return functions->GetStaticBooleanField(this,clazz,fieldID); + } + jbyte GetStaticByteField(jclass clazz, jfieldID fieldID) { + return functions->GetStaticByteField(this,clazz,fieldID); + } + jchar GetStaticCharField(jclass clazz, jfieldID fieldID) { + return functions->GetStaticCharField(this,clazz,fieldID); + } + jshort GetStaticShortField(jclass clazz, jfieldID fieldID) { + return functions->GetStaticShortField(this,clazz,fieldID); + } + jint GetStaticIntField(jclass clazz, jfieldID fieldID) { + return functions->GetStaticIntField(this,clazz,fieldID); + } + jlong GetStaticLongField(jclass clazz, jfieldID fieldID) { + return functions->GetStaticLongField(this,clazz,fieldID); + } + jfloat GetStaticFloatField(jclass clazz, jfieldID fieldID) { + return functions->GetStaticFloatField(this,clazz,fieldID); + } + jdouble GetStaticDoubleField(jclass clazz, jfieldID fieldID) { + return functions->GetStaticDoubleField(this,clazz,fieldID); + } + + void SetStaticObjectField(jclass clazz, jfieldID fieldID, + jobject value) { + functions->SetStaticObjectField(this,clazz,fieldID,value); + } + void SetStaticBooleanField(jclass clazz, jfieldID fieldID, + jboolean value) { + functions->SetStaticBooleanField(this,clazz,fieldID,value); + } + void SetStaticByteField(jclass clazz, jfieldID fieldID, + jbyte value) { + functions->SetStaticByteField(this,clazz,fieldID,value); + } + void SetStaticCharField(jclass clazz, jfieldID fieldID, + jchar value) { + functions->SetStaticCharField(this,clazz,fieldID,value); + } + void SetStaticShortField(jclass clazz, jfieldID fieldID, + jshort value) { + functions->SetStaticShortField(this,clazz,fieldID,value); + } + void SetStaticIntField(jclass clazz, jfieldID fieldID, + jint value) { + functions->SetStaticIntField(this,clazz,fieldID,value); + } + void SetStaticLongField(jclass clazz, jfieldID fieldID, + jlong value) { + functions->SetStaticLongField(this,clazz,fieldID,value); + } + void SetStaticFloatField(jclass clazz, jfieldID fieldID, + jfloat value) { + functions->SetStaticFloatField(this,clazz,fieldID,value); + } + void SetStaticDoubleField(jclass clazz, jfieldID fieldID, + jdouble value) { + functions->SetStaticDoubleField(this,clazz,fieldID,value); + } + + jstring NewString(const jchar *unicode, jsize len) { + return functions->NewString(this,unicode,len); + } + jsize GetStringLength(jstring str) { + return functions->GetStringLength(this,str); + } + const jchar *GetStringChars(jstring str, jboolean *isCopy) { + return functions->GetStringChars(this,str,isCopy); + } + void ReleaseStringChars(jstring str, const jchar *chars) { + functions->ReleaseStringChars(this,str,chars); + } + + jstring NewStringUTF(const char *utf) { + return functions->NewStringUTF(this,utf); + } + jsize GetStringUTFLength(jstring str) { + return functions->GetStringUTFLength(this,str); + } + const char* GetStringUTFChars(jstring str, jboolean *isCopy) { + return functions->GetStringUTFChars(this,str,isCopy); + } + void ReleaseStringUTFChars(jstring str, const char* chars) { + functions->ReleaseStringUTFChars(this,str,chars); + } + + jsize GetArrayLength(jarray array) { + return functions->GetArrayLength(this,array); + } + + jobjectArray NewObjectArray(jsize len, jclass clazz, + jobject init) { + return functions->NewObjectArray(this,len,clazz,init); + } + jobject GetObjectArrayElement(jobjectArray array, jsize index) { + return functions->GetObjectArrayElement(this,array,index); + } + void SetObjectArrayElement(jobjectArray array, jsize index, + jobject val) { + functions->SetObjectArrayElement(this,array,index,val); + } + + jbooleanArray NewBooleanArray(jsize len) { + return functions->NewBooleanArray(this,len); + } + jbyteArray NewByteArray(jsize len) { + return functions->NewByteArray(this,len); + } + jcharArray NewCharArray(jsize len) { + return functions->NewCharArray(this,len); + } + jshortArray NewShortArray(jsize len) { + return functions->NewShortArray(this,len); + } + jintArray NewIntArray(jsize len) { + return functions->NewIntArray(this,len); + } + jlongArray NewLongArray(jsize len) { + return functions->NewLongArray(this,len); + } + jfloatArray NewFloatArray(jsize len) { + return functions->NewFloatArray(this,len); + } + jdoubleArray NewDoubleArray(jsize len) { + return functions->NewDoubleArray(this,len); + } + + jboolean * GetBooleanArrayElements(jbooleanArray array, jboolean *isCopy) { + return functions->GetBooleanArrayElements(this,array,isCopy); + } + jbyte * GetByteArrayElements(jbyteArray array, jboolean *isCopy) { + return functions->GetByteArrayElements(this,array,isCopy); + } + jchar * GetCharArrayElements(jcharArray array, jboolean *isCopy) { + return functions->GetCharArrayElements(this,array,isCopy); + } + jshort * GetShortArrayElements(jshortArray array, jboolean *isCopy) { + return functions->GetShortArrayElements(this,array,isCopy); + } + jint * GetIntArrayElements(jintArray array, jboolean *isCopy) { + return functions->GetIntArrayElements(this,array,isCopy); + } + jlong * GetLongArrayElements(jlongArray array, jboolean *isCopy) { + return functions->GetLongArrayElements(this,array,isCopy); + } + jfloat * GetFloatArrayElements(jfloatArray array, jboolean *isCopy) { + return functions->GetFloatArrayElements(this,array,isCopy); + } + jdouble * GetDoubleArrayElements(jdoubleArray array, jboolean *isCopy) { + return functions->GetDoubleArrayElements(this,array,isCopy); + } + + void ReleaseBooleanArrayElements(jbooleanArray array, + jboolean *elems, + jint mode) { + functions->ReleaseBooleanArrayElements(this,array,elems,mode); + } + void ReleaseByteArrayElements(jbyteArray array, + jbyte *elems, + jint mode) { + functions->ReleaseByteArrayElements(this,array,elems,mode); + } + void ReleaseCharArrayElements(jcharArray array, + jchar *elems, + jint mode) { + functions->ReleaseCharArrayElements(this,array,elems,mode); + } + void ReleaseShortArrayElements(jshortArray array, + jshort *elems, + jint mode) { + functions->ReleaseShortArrayElements(this,array,elems,mode); + } + void ReleaseIntArrayElements(jintArray array, + jint *elems, + jint mode) { + functions->ReleaseIntArrayElements(this,array,elems,mode); + } + void ReleaseLongArrayElements(jlongArray array, + jlong *elems, + jint mode) { + functions->ReleaseLongArrayElements(this,array,elems,mode); + } + void ReleaseFloatArrayElements(jfloatArray array, + jfloat *elems, + jint mode) { + functions->ReleaseFloatArrayElements(this,array,elems,mode); + } + void ReleaseDoubleArrayElements(jdoubleArray array, + jdouble *elems, + jint mode) { + functions->ReleaseDoubleArrayElements(this,array,elems,mode); + } + + void GetBooleanArrayRegion(jbooleanArray array, + jsize start, jsize len, jboolean *buf) { + functions->GetBooleanArrayRegion(this,array,start,len,buf); + } + void GetByteArrayRegion(jbyteArray array, + jsize start, jsize len, jbyte *buf) { + functions->GetByteArrayRegion(this,array,start,len,buf); + } + void GetCharArrayRegion(jcharArray array, + jsize start, jsize len, jchar *buf) { + functions->GetCharArrayRegion(this,array,start,len,buf); + } + void GetShortArrayRegion(jshortArray array, + jsize start, jsize len, jshort *buf) { + functions->GetShortArrayRegion(this,array,start,len,buf); + } + void GetIntArrayRegion(jintArray array, + jsize start, jsize len, jint *buf) { + functions->GetIntArrayRegion(this,array,start,len,buf); + } + void GetLongArrayRegion(jlongArray array, + jsize start, jsize len, jlong *buf) { + functions->GetLongArrayRegion(this,array,start,len,buf); + } + void GetFloatArrayRegion(jfloatArray array, + jsize start, jsize len, jfloat *buf) { + functions->GetFloatArrayRegion(this,array,start,len,buf); + } + void GetDoubleArrayRegion(jdoubleArray array, + jsize start, jsize len, jdouble *buf) { + functions->GetDoubleArrayRegion(this,array,start,len,buf); + } + + void SetBooleanArrayRegion(jbooleanArray array, jsize start, jsize len, + const jboolean *buf) { + functions->SetBooleanArrayRegion(this,array,start,len,buf); + } + void SetByteArrayRegion(jbyteArray array, jsize start, jsize len, + const jbyte *buf) { + functions->SetByteArrayRegion(this,array,start,len,buf); + } + void SetCharArrayRegion(jcharArray array, jsize start, jsize len, + const jchar *buf) { + functions->SetCharArrayRegion(this,array,start,len,buf); + } + void SetShortArrayRegion(jshortArray array, jsize start, jsize len, + const jshort *buf) { + functions->SetShortArrayRegion(this,array,start,len,buf); + } + void SetIntArrayRegion(jintArray array, jsize start, jsize len, + const jint *buf) { + functions->SetIntArrayRegion(this,array,start,len,buf); + } + void SetLongArrayRegion(jlongArray array, jsize start, jsize len, + const jlong *buf) { + functions->SetLongArrayRegion(this,array,start,len,buf); + } + void SetFloatArrayRegion(jfloatArray array, jsize start, jsize len, + const jfloat *buf) { + functions->SetFloatArrayRegion(this,array,start,len,buf); + } + void SetDoubleArrayRegion(jdoubleArray array, jsize start, jsize len, + const jdouble *buf) { + functions->SetDoubleArrayRegion(this,array,start,len,buf); + } + + jint RegisterNatives(jclass clazz, const JNINativeMethod *methods, + jint nMethods) { + return functions->RegisterNatives(this,clazz,methods,nMethods); + } + jint UnregisterNatives(jclass clazz) { + return functions->UnregisterNatives(this,clazz); + } + + jint MonitorEnter(jobject obj) { + return functions->MonitorEnter(this,obj); + } + jint MonitorExit(jobject obj) { + return functions->MonitorExit(this,obj); + } + + jint GetJavaVM(JavaVM **vm) { + return functions->GetJavaVM(this,vm); + } + + void GetStringRegion(jstring str, jsize start, jsize len, jchar *buf) { + functions->GetStringRegion(this,str,start,len,buf); + } + void GetStringUTFRegion(jstring str, jsize start, jsize len, char *buf) { + functions->GetStringUTFRegion(this,str,start,len,buf); + } + + void * GetPrimitiveArrayCritical(jarray array, jboolean *isCopy) { + return functions->GetPrimitiveArrayCritical(this,array,isCopy); + } + void ReleasePrimitiveArrayCritical(jarray array, void *carray, jint mode) { + functions->ReleasePrimitiveArrayCritical(this,array,carray,mode); + } + + const jchar * GetStringCritical(jstring string, jboolean *isCopy) { + return functions->GetStringCritical(this,string,isCopy); + } + void ReleaseStringCritical(jstring string, const jchar *cstring) { + functions->ReleaseStringCritical(this,string,cstring); + } + + jweak NewWeakGlobalRef(jobject obj) { + return functions->NewWeakGlobalRef(this,obj); + } + void DeleteWeakGlobalRef(jweak ref) { + functions->DeleteWeakGlobalRef(this,ref); + } + + jboolean ExceptionCheck() { + return functions->ExceptionCheck(this); + } + + jobject NewDirectByteBuffer(void* address, jlong capacity) { + return functions->NewDirectByteBuffer(this, address, capacity); + } + void* GetDirectBufferAddress(jobject buf) { + return functions->GetDirectBufferAddress(this, buf); + } + jlong GetDirectBufferCapacity(jobject buf) { + return functions->GetDirectBufferCapacity(this, buf); + } + jobjectRefType GetObjectRefType(jobject obj) { + return functions->GetObjectRefType(this, obj); + } + +#endif /* __cplusplus */ +}; + +typedef struct JavaVMOption { + char *optionString; + void *extraInfo; +} JavaVMOption; + +typedef struct JavaVMInitArgs { + jint version; + + jint nOptions; + JavaVMOption *options; + jboolean ignoreUnrecognized; +} JavaVMInitArgs; + +typedef struct JavaVMAttachArgs { + jint version; + + char *name; + jobject group; +} JavaVMAttachArgs; + +/* These will be VM-specific. */ + +#define JDK1_2 +#define JDK1_4 + +/* End VM-specific. */ + +struct JNIInvokeInterface_ { + void *reserved0; + void *reserved1; + void *reserved2; + + jint (JNICALL *DestroyJavaVM)(JavaVM *vm); + + jint (JNICALL *AttachCurrentThread)(JavaVM *vm, void **penv, void *args); + + jint (JNICALL *DetachCurrentThread)(JavaVM *vm); + + jint (JNICALL *GetEnv)(JavaVM *vm, void **penv, jint version); + + jint (JNICALL *AttachCurrentThreadAsDaemon)(JavaVM *vm, void **penv, void *args); +}; + +struct JavaVM_ { + const struct JNIInvokeInterface_ *functions; +#ifdef __cplusplus + + jint DestroyJavaVM() { + return functions->DestroyJavaVM(this); + } + jint AttachCurrentThread(void **penv, void *args) { + return functions->AttachCurrentThread(this, penv, args); + } + jint DetachCurrentThread() { + return functions->DetachCurrentThread(this); + } + + jint GetEnv(void **penv, jint version) { + return functions->GetEnv(this, penv, version); + } + jint AttachCurrentThreadAsDaemon(void **penv, void *args) { + return functions->AttachCurrentThreadAsDaemon(this, penv, args); + } +#endif +}; + +#ifdef _JNI_IMPLEMENTATION_ +#define _JNI_IMPORT_OR_EXPORT_ JNIEXPORT +#else +#define _JNI_IMPORT_OR_EXPORT_ JNIIMPORT +#endif +_JNI_IMPORT_OR_EXPORT_ jint JNICALL +JNI_GetDefaultJavaVMInitArgs(void *args); + +_JNI_IMPORT_OR_EXPORT_ jint JNICALL +JNI_CreateJavaVM(JavaVM **pvm, void **penv, void *args); + +_JNI_IMPORT_OR_EXPORT_ jint JNICALL +JNI_GetCreatedJavaVMs(JavaVM **, jsize, jsize *); + +/* Defined by native libraries. */ +JNIEXPORT jint JNICALL +JNI_OnLoad(JavaVM *vm, void *reserved); + +JNIEXPORT void JNICALL +JNI_OnUnload(JavaVM *vm, void *reserved); + +#define JNI_VERSION_1_1 0x00010001 +#define JNI_VERSION_1_2 0x00010002 +#define JNI_VERSION_1_4 0x00010004 +#define JNI_VERSION_1_6 0x00010006 +#define JNI_VERSION_1_8 0x00010008 + +#ifdef __cplusplus +} /* extern "C" */ +#endif /* __cplusplus */ + +#endif /* !_JAVASOFT_JNI_H_ */ diff --git a/HelloSerial4j/datasheets/Jni Docs/Jni Include files (for reference only)/jvmti.h b/HelloSerial4j/datasheets/Jni Docs/Jni Include files (for reference only)/jvmti.h new file mode 100644 index 00000000..74243f54 --- /dev/null +++ b/HelloSerial4j/datasheets/Jni Docs/Jni Include files (for reference only)/jvmti.h @@ -0,0 +1,2534 @@ +/* + * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved. + * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + */ + + /* AUTOMATICALLY GENERATED FILE - DO NOT EDIT */ + + + /* Include file for the Java(tm) Virtual Machine Tool Interface */ + +#ifndef _JAVA_JVMTI_H_ +#define _JAVA_JVMTI_H_ + +#include "jni.h" + +#ifdef __cplusplus +extern "C" { +#endif + +enum { + JVMTI_VERSION_1 = 0x30010000, + JVMTI_VERSION_1_0 = 0x30010000, + JVMTI_VERSION_1_1 = 0x30010100, + JVMTI_VERSION_1_2 = 0x30010200, + + JVMTI_VERSION = 0x30000000 + (1 * 0x10000) + (2 * 0x100) + 1 /* version: 1.2.1 */ +}; + +JNIEXPORT jint JNICALL +Agent_OnLoad(JavaVM *vm, char *options, void *reserved); + +JNIEXPORT jint JNICALL +Agent_OnAttach(JavaVM* vm, char* options, void* reserved); + +JNIEXPORT void JNICALL +Agent_OnUnload(JavaVM *vm); + + /* Forward declaration of the environment */ + +struct _jvmtiEnv; + +struct jvmtiInterface_1_; + +#ifdef __cplusplus +typedef _jvmtiEnv jvmtiEnv; +#else +typedef const struct jvmtiInterface_1_ *jvmtiEnv; +#endif /* __cplusplus */ + +/* Derived Base Types */ + +typedef jobject jthread; +typedef jobject jthreadGroup; +typedef jlong jlocation; +struct _jrawMonitorID; +typedef struct _jrawMonitorID *jrawMonitorID; +typedef struct JNINativeInterface_ jniNativeInterface; + + /* Constants */ + + + /* Thread State Flags */ + +enum { + JVMTI_THREAD_STATE_ALIVE = 0x0001, + JVMTI_THREAD_STATE_TERMINATED = 0x0002, + JVMTI_THREAD_STATE_RUNNABLE = 0x0004, + JVMTI_THREAD_STATE_BLOCKED_ON_MONITOR_ENTER = 0x0400, + JVMTI_THREAD_STATE_WAITING = 0x0080, + JVMTI_THREAD_STATE_WAITING_INDEFINITELY = 0x0010, + JVMTI_THREAD_STATE_WAITING_WITH_TIMEOUT = 0x0020, + JVMTI_THREAD_STATE_SLEEPING = 0x0040, + JVMTI_THREAD_STATE_IN_OBJECT_WAIT = 0x0100, + JVMTI_THREAD_STATE_PARKED = 0x0200, + JVMTI_THREAD_STATE_SUSPENDED = 0x100000, + JVMTI_THREAD_STATE_INTERRUPTED = 0x200000, + JVMTI_THREAD_STATE_IN_NATIVE = 0x400000, + JVMTI_THREAD_STATE_VENDOR_1 = 0x10000000, + JVMTI_THREAD_STATE_VENDOR_2 = 0x20000000, + JVMTI_THREAD_STATE_VENDOR_3 = 0x40000000 +}; + + /* java.lang.Thread.State Conversion Masks */ + +enum { + JVMTI_JAVA_LANG_THREAD_STATE_MASK = JVMTI_THREAD_STATE_TERMINATED | JVMTI_THREAD_STATE_ALIVE | JVMTI_THREAD_STATE_RUNNABLE | JVMTI_THREAD_STATE_BLOCKED_ON_MONITOR_ENTER | JVMTI_THREAD_STATE_WAITING | JVMTI_THREAD_STATE_WAITING_INDEFINITELY | JVMTI_THREAD_STATE_WAITING_WITH_TIMEOUT, + JVMTI_JAVA_LANG_THREAD_STATE_NEW = 0, + JVMTI_JAVA_LANG_THREAD_STATE_TERMINATED = JVMTI_THREAD_STATE_TERMINATED, + JVMTI_JAVA_LANG_THREAD_STATE_RUNNABLE = JVMTI_THREAD_STATE_ALIVE | JVMTI_THREAD_STATE_RUNNABLE, + JVMTI_JAVA_LANG_THREAD_STATE_BLOCKED = JVMTI_THREAD_STATE_ALIVE | JVMTI_THREAD_STATE_BLOCKED_ON_MONITOR_ENTER, + JVMTI_JAVA_LANG_THREAD_STATE_WAITING = JVMTI_THREAD_STATE_ALIVE | JVMTI_THREAD_STATE_WAITING | JVMTI_THREAD_STATE_WAITING_INDEFINITELY, + JVMTI_JAVA_LANG_THREAD_STATE_TIMED_WAITING = JVMTI_THREAD_STATE_ALIVE | JVMTI_THREAD_STATE_WAITING | JVMTI_THREAD_STATE_WAITING_WITH_TIMEOUT +}; + + /* Thread Priority Constants */ + +enum { + JVMTI_THREAD_MIN_PRIORITY = 1, + JVMTI_THREAD_NORM_PRIORITY = 5, + JVMTI_THREAD_MAX_PRIORITY = 10 +}; + + /* Heap Filter Flags */ + +enum { + JVMTI_HEAP_FILTER_TAGGED = 0x4, + JVMTI_HEAP_FILTER_UNTAGGED = 0x8, + JVMTI_HEAP_FILTER_CLASS_TAGGED = 0x10, + JVMTI_HEAP_FILTER_CLASS_UNTAGGED = 0x20 +}; + + /* Heap Visit Control Flags */ + +enum { + JVMTI_VISIT_OBJECTS = 0x100, + JVMTI_VISIT_ABORT = 0x8000 +}; + + /* Heap Reference Enumeration */ + +typedef enum { + JVMTI_HEAP_REFERENCE_CLASS = 1, + JVMTI_HEAP_REFERENCE_FIELD = 2, + JVMTI_HEAP_REFERENCE_ARRAY_ELEMENT = 3, + JVMTI_HEAP_REFERENCE_CLASS_LOADER = 4, + JVMTI_HEAP_REFERENCE_SIGNERS = 5, + JVMTI_HEAP_REFERENCE_PROTECTION_DOMAIN = 6, + JVMTI_HEAP_REFERENCE_INTERFACE = 7, + JVMTI_HEAP_REFERENCE_STATIC_FIELD = 8, + JVMTI_HEAP_REFERENCE_CONSTANT_POOL = 9, + JVMTI_HEAP_REFERENCE_SUPERCLASS = 10, + JVMTI_HEAP_REFERENCE_JNI_GLOBAL = 21, + JVMTI_HEAP_REFERENCE_SYSTEM_CLASS = 22, + JVMTI_HEAP_REFERENCE_MONITOR = 23, + JVMTI_HEAP_REFERENCE_STACK_LOCAL = 24, + JVMTI_HEAP_REFERENCE_JNI_LOCAL = 25, + JVMTI_HEAP_REFERENCE_THREAD = 26, + JVMTI_HEAP_REFERENCE_OTHER = 27 +} jvmtiHeapReferenceKind; + + /* Primitive Type Enumeration */ + +typedef enum { + JVMTI_PRIMITIVE_TYPE_BOOLEAN = 90, + JVMTI_PRIMITIVE_TYPE_BYTE = 66, + JVMTI_PRIMITIVE_TYPE_CHAR = 67, + JVMTI_PRIMITIVE_TYPE_SHORT = 83, + JVMTI_PRIMITIVE_TYPE_INT = 73, + JVMTI_PRIMITIVE_TYPE_LONG = 74, + JVMTI_PRIMITIVE_TYPE_FLOAT = 70, + JVMTI_PRIMITIVE_TYPE_DOUBLE = 68 +} jvmtiPrimitiveType; + + /* Heap Object Filter Enumeration */ + +typedef enum { + JVMTI_HEAP_OBJECT_TAGGED = 1, + JVMTI_HEAP_OBJECT_UNTAGGED = 2, + JVMTI_HEAP_OBJECT_EITHER = 3 +} jvmtiHeapObjectFilter; + + /* Heap Root Kind Enumeration */ + +typedef enum { + JVMTI_HEAP_ROOT_JNI_GLOBAL = 1, + JVMTI_HEAP_ROOT_SYSTEM_CLASS = 2, + JVMTI_HEAP_ROOT_MONITOR = 3, + JVMTI_HEAP_ROOT_STACK_LOCAL = 4, + JVMTI_HEAP_ROOT_JNI_LOCAL = 5, + JVMTI_HEAP_ROOT_THREAD = 6, + JVMTI_HEAP_ROOT_OTHER = 7 +} jvmtiHeapRootKind; + + /* Object Reference Enumeration */ + +typedef enum { + JVMTI_REFERENCE_CLASS = 1, + JVMTI_REFERENCE_FIELD = 2, + JVMTI_REFERENCE_ARRAY_ELEMENT = 3, + JVMTI_REFERENCE_CLASS_LOADER = 4, + JVMTI_REFERENCE_SIGNERS = 5, + JVMTI_REFERENCE_PROTECTION_DOMAIN = 6, + JVMTI_REFERENCE_INTERFACE = 7, + JVMTI_REFERENCE_STATIC_FIELD = 8, + JVMTI_REFERENCE_CONSTANT_POOL = 9 +} jvmtiObjectReferenceKind; + + /* Iteration Control Enumeration */ + +typedef enum { + JVMTI_ITERATION_CONTINUE = 1, + JVMTI_ITERATION_IGNORE = 2, + JVMTI_ITERATION_ABORT = 0 +} jvmtiIterationControl; + + /* Class Status Flags */ + +enum { + JVMTI_CLASS_STATUS_VERIFIED = 1, + JVMTI_CLASS_STATUS_PREPARED = 2, + JVMTI_CLASS_STATUS_INITIALIZED = 4, + JVMTI_CLASS_STATUS_ERROR = 8, + JVMTI_CLASS_STATUS_ARRAY = 16, + JVMTI_CLASS_STATUS_PRIMITIVE = 32 +}; + + /* Event Enable/Disable */ + +typedef enum { + JVMTI_ENABLE = 1, + JVMTI_DISABLE = 0 +} jvmtiEventMode; + + /* Extension Function/Event Parameter Types */ + +typedef enum { + JVMTI_TYPE_JBYTE = 101, + JVMTI_TYPE_JCHAR = 102, + JVMTI_TYPE_JSHORT = 103, + JVMTI_TYPE_JINT = 104, + JVMTI_TYPE_JLONG = 105, + JVMTI_TYPE_JFLOAT = 106, + JVMTI_TYPE_JDOUBLE = 107, + JVMTI_TYPE_JBOOLEAN = 108, + JVMTI_TYPE_JOBJECT = 109, + JVMTI_TYPE_JTHREAD = 110, + JVMTI_TYPE_JCLASS = 111, + JVMTI_TYPE_JVALUE = 112, + JVMTI_TYPE_JFIELDID = 113, + JVMTI_TYPE_JMETHODID = 114, + JVMTI_TYPE_CCHAR = 115, + JVMTI_TYPE_CVOID = 116, + JVMTI_TYPE_JNIENV = 117 +} jvmtiParamTypes; + + /* Extension Function/Event Parameter Kinds */ + +typedef enum { + JVMTI_KIND_IN = 91, + JVMTI_KIND_IN_PTR = 92, + JVMTI_KIND_IN_BUF = 93, + JVMTI_KIND_ALLOC_BUF = 94, + JVMTI_KIND_ALLOC_ALLOC_BUF = 95, + JVMTI_KIND_OUT = 96, + JVMTI_KIND_OUT_BUF = 97 +} jvmtiParamKind; + + /* Timer Kinds */ + +typedef enum { + JVMTI_TIMER_USER_CPU = 30, + JVMTI_TIMER_TOTAL_CPU = 31, + JVMTI_TIMER_ELAPSED = 32 +} jvmtiTimerKind; + + /* Phases of execution */ + +typedef enum { + JVMTI_PHASE_ONLOAD = 1, + JVMTI_PHASE_PRIMORDIAL = 2, + JVMTI_PHASE_START = 6, + JVMTI_PHASE_LIVE = 4, + JVMTI_PHASE_DEAD = 8 +} jvmtiPhase; + + /* Version Interface Types */ + +enum { + JVMTI_VERSION_INTERFACE_JNI = 0x00000000, + JVMTI_VERSION_INTERFACE_JVMTI = 0x30000000 +}; + + /* Version Masks */ + +enum { + JVMTI_VERSION_MASK_INTERFACE_TYPE = 0x70000000, + JVMTI_VERSION_MASK_MAJOR = 0x0FFF0000, + JVMTI_VERSION_MASK_MINOR = 0x0000FF00, + JVMTI_VERSION_MASK_MICRO = 0x000000FF +}; + + /* Version Shifts */ + +enum { + JVMTI_VERSION_SHIFT_MAJOR = 16, + JVMTI_VERSION_SHIFT_MINOR = 8, + JVMTI_VERSION_SHIFT_MICRO = 0 +}; + + /* Verbose Flag Enumeration */ + +typedef enum { + JVMTI_VERBOSE_OTHER = 0, + JVMTI_VERBOSE_GC = 1, + JVMTI_VERBOSE_CLASS = 2, + JVMTI_VERBOSE_JNI = 4 +} jvmtiVerboseFlag; + + /* JLocation Format Enumeration */ + +typedef enum { + JVMTI_JLOCATION_JVMBCI = 1, + JVMTI_JLOCATION_MACHINEPC = 2, + JVMTI_JLOCATION_OTHER = 0 +} jvmtiJlocationFormat; + + /* Resource Exhaustion Flags */ + +enum { + JVMTI_RESOURCE_EXHAUSTED_OOM_ERROR = 0x0001, + JVMTI_RESOURCE_EXHAUSTED_JAVA_HEAP = 0x0002, + JVMTI_RESOURCE_EXHAUSTED_THREADS = 0x0004 +}; + + /* Errors */ + +typedef enum { + JVMTI_ERROR_NONE = 0, + JVMTI_ERROR_INVALID_THREAD = 10, + JVMTI_ERROR_INVALID_THREAD_GROUP = 11, + JVMTI_ERROR_INVALID_PRIORITY = 12, + JVMTI_ERROR_THREAD_NOT_SUSPENDED = 13, + JVMTI_ERROR_THREAD_SUSPENDED = 14, + JVMTI_ERROR_THREAD_NOT_ALIVE = 15, + JVMTI_ERROR_INVALID_OBJECT = 20, + JVMTI_ERROR_INVALID_CLASS = 21, + JVMTI_ERROR_CLASS_NOT_PREPARED = 22, + JVMTI_ERROR_INVALID_METHODID = 23, + JVMTI_ERROR_INVALID_LOCATION = 24, + JVMTI_ERROR_INVALID_FIELDID = 25, + JVMTI_ERROR_NO_MORE_FRAMES = 31, + JVMTI_ERROR_OPAQUE_FRAME = 32, + JVMTI_ERROR_TYPE_MISMATCH = 34, + JVMTI_ERROR_INVALID_SLOT = 35, + JVMTI_ERROR_DUPLICATE = 40, + JVMTI_ERROR_NOT_FOUND = 41, + JVMTI_ERROR_INVALID_MONITOR = 50, + JVMTI_ERROR_NOT_MONITOR_OWNER = 51, + JVMTI_ERROR_INTERRUPT = 52, + JVMTI_ERROR_INVALID_CLASS_FORMAT = 60, + JVMTI_ERROR_CIRCULAR_CLASS_DEFINITION = 61, + JVMTI_ERROR_FAILS_VERIFICATION = 62, + JVMTI_ERROR_UNSUPPORTED_REDEFINITION_METHOD_ADDED = 63, + JVMTI_ERROR_UNSUPPORTED_REDEFINITION_SCHEMA_CHANGED = 64, + JVMTI_ERROR_INVALID_TYPESTATE = 65, + JVMTI_ERROR_UNSUPPORTED_REDEFINITION_HIERARCHY_CHANGED = 66, + JVMTI_ERROR_UNSUPPORTED_REDEFINITION_METHOD_DELETED = 67, + JVMTI_ERROR_UNSUPPORTED_VERSION = 68, + JVMTI_ERROR_NAMES_DONT_MATCH = 69, + JVMTI_ERROR_UNSUPPORTED_REDEFINITION_CLASS_MODIFIERS_CHANGED = 70, + JVMTI_ERROR_UNSUPPORTED_REDEFINITION_METHOD_MODIFIERS_CHANGED = 71, + JVMTI_ERROR_UNMODIFIABLE_CLASS = 79, + JVMTI_ERROR_NOT_AVAILABLE = 98, + JVMTI_ERROR_MUST_POSSESS_CAPABILITY = 99, + JVMTI_ERROR_NULL_POINTER = 100, + JVMTI_ERROR_ABSENT_INFORMATION = 101, + JVMTI_ERROR_INVALID_EVENT_TYPE = 102, + JVMTI_ERROR_ILLEGAL_ARGUMENT = 103, + JVMTI_ERROR_NATIVE_METHOD = 104, + JVMTI_ERROR_CLASS_LOADER_UNSUPPORTED = 106, + JVMTI_ERROR_OUT_OF_MEMORY = 110, + JVMTI_ERROR_ACCESS_DENIED = 111, + JVMTI_ERROR_WRONG_PHASE = 112, + JVMTI_ERROR_INTERNAL = 113, + JVMTI_ERROR_UNATTACHED_THREAD = 115, + JVMTI_ERROR_INVALID_ENVIRONMENT = 116, + JVMTI_ERROR_MAX = 116 +} jvmtiError; + + /* Event IDs */ + +typedef enum { + JVMTI_MIN_EVENT_TYPE_VAL = 50, + JVMTI_EVENT_VM_INIT = 50, + JVMTI_EVENT_VM_DEATH = 51, + JVMTI_EVENT_THREAD_START = 52, + JVMTI_EVENT_THREAD_END = 53, + JVMTI_EVENT_CLASS_FILE_LOAD_HOOK = 54, + JVMTI_EVENT_CLASS_LOAD = 55, + JVMTI_EVENT_CLASS_PREPARE = 56, + JVMTI_EVENT_VM_START = 57, + JVMTI_EVENT_EXCEPTION = 58, + JVMTI_EVENT_EXCEPTION_CATCH = 59, + JVMTI_EVENT_SINGLE_STEP = 60, + JVMTI_EVENT_FRAME_POP = 61, + JVMTI_EVENT_BREAKPOINT = 62, + JVMTI_EVENT_FIELD_ACCESS = 63, + JVMTI_EVENT_FIELD_MODIFICATION = 64, + JVMTI_EVENT_METHOD_ENTRY = 65, + JVMTI_EVENT_METHOD_EXIT = 66, + JVMTI_EVENT_NATIVE_METHOD_BIND = 67, + JVMTI_EVENT_COMPILED_METHOD_LOAD = 68, + JVMTI_EVENT_COMPILED_METHOD_UNLOAD = 69, + JVMTI_EVENT_DYNAMIC_CODE_GENERATED = 70, + JVMTI_EVENT_DATA_DUMP_REQUEST = 71, + JVMTI_EVENT_MONITOR_WAIT = 73, + JVMTI_EVENT_MONITOR_WAITED = 74, + JVMTI_EVENT_MONITOR_CONTENDED_ENTER = 75, + JVMTI_EVENT_MONITOR_CONTENDED_ENTERED = 76, + JVMTI_EVENT_RESOURCE_EXHAUSTED = 80, + JVMTI_EVENT_GARBAGE_COLLECTION_START = 81, + JVMTI_EVENT_GARBAGE_COLLECTION_FINISH = 82, + JVMTI_EVENT_OBJECT_FREE = 83, + JVMTI_EVENT_VM_OBJECT_ALLOC = 84, + JVMTI_MAX_EVENT_TYPE_VAL = 84 +} jvmtiEvent; + + + /* Pre-Declarations */ +struct _jvmtiThreadInfo; +typedef struct _jvmtiThreadInfo jvmtiThreadInfo; +struct _jvmtiMonitorStackDepthInfo; +typedef struct _jvmtiMonitorStackDepthInfo jvmtiMonitorStackDepthInfo; +struct _jvmtiThreadGroupInfo; +typedef struct _jvmtiThreadGroupInfo jvmtiThreadGroupInfo; +struct _jvmtiFrameInfo; +typedef struct _jvmtiFrameInfo jvmtiFrameInfo; +struct _jvmtiStackInfo; +typedef struct _jvmtiStackInfo jvmtiStackInfo; +struct _jvmtiHeapReferenceInfoField; +typedef struct _jvmtiHeapReferenceInfoField jvmtiHeapReferenceInfoField; +struct _jvmtiHeapReferenceInfoArray; +typedef struct _jvmtiHeapReferenceInfoArray jvmtiHeapReferenceInfoArray; +struct _jvmtiHeapReferenceInfoConstantPool; +typedef struct _jvmtiHeapReferenceInfoConstantPool jvmtiHeapReferenceInfoConstantPool; +struct _jvmtiHeapReferenceInfoStackLocal; +typedef struct _jvmtiHeapReferenceInfoStackLocal jvmtiHeapReferenceInfoStackLocal; +struct _jvmtiHeapReferenceInfoJniLocal; +typedef struct _jvmtiHeapReferenceInfoJniLocal jvmtiHeapReferenceInfoJniLocal; +struct _jvmtiHeapReferenceInfoReserved; +typedef struct _jvmtiHeapReferenceInfoReserved jvmtiHeapReferenceInfoReserved; +union _jvmtiHeapReferenceInfo; +typedef union _jvmtiHeapReferenceInfo jvmtiHeapReferenceInfo; +struct _jvmtiHeapCallbacks; +typedef struct _jvmtiHeapCallbacks jvmtiHeapCallbacks; +struct _jvmtiClassDefinition; +typedef struct _jvmtiClassDefinition jvmtiClassDefinition; +struct _jvmtiMonitorUsage; +typedef struct _jvmtiMonitorUsage jvmtiMonitorUsage; +struct _jvmtiLineNumberEntry; +typedef struct _jvmtiLineNumberEntry jvmtiLineNumberEntry; +struct _jvmtiLocalVariableEntry; +typedef struct _jvmtiLocalVariableEntry jvmtiLocalVariableEntry; +struct _jvmtiParamInfo; +typedef struct _jvmtiParamInfo jvmtiParamInfo; +struct _jvmtiExtensionFunctionInfo; +typedef struct _jvmtiExtensionFunctionInfo jvmtiExtensionFunctionInfo; +struct _jvmtiExtensionEventInfo; +typedef struct _jvmtiExtensionEventInfo jvmtiExtensionEventInfo; +struct _jvmtiTimerInfo; +typedef struct _jvmtiTimerInfo jvmtiTimerInfo; +struct _jvmtiAddrLocationMap; +typedef struct _jvmtiAddrLocationMap jvmtiAddrLocationMap; + + /* Function Types */ + +typedef void (JNICALL *jvmtiStartFunction) + (jvmtiEnv* jvmti_env, JNIEnv* jni_env, void* arg); + +typedef jint (JNICALL *jvmtiHeapIterationCallback) + (jlong class_tag, jlong size, jlong* tag_ptr, jint length, void* user_data); + +typedef jint (JNICALL *jvmtiHeapReferenceCallback) + (jvmtiHeapReferenceKind reference_kind, const jvmtiHeapReferenceInfo* reference_info, jlong class_tag, jlong referrer_class_tag, jlong size, jlong* tag_ptr, jlong* referrer_tag_ptr, jint length, void* user_data); + +typedef jint (JNICALL *jvmtiPrimitiveFieldCallback) + (jvmtiHeapReferenceKind kind, const jvmtiHeapReferenceInfo* info, jlong object_class_tag, jlong* object_tag_ptr, jvalue value, jvmtiPrimitiveType value_type, void* user_data); + +typedef jint (JNICALL *jvmtiArrayPrimitiveValueCallback) + (jlong class_tag, jlong size, jlong* tag_ptr, jint element_count, jvmtiPrimitiveType element_type, const void* elements, void* user_data); + +typedef jint (JNICALL *jvmtiStringPrimitiveValueCallback) + (jlong class_tag, jlong size, jlong* tag_ptr, const jchar* value, jint value_length, void* user_data); + +typedef jint (JNICALL *jvmtiReservedCallback) + (); + +typedef jvmtiIterationControl (JNICALL *jvmtiHeapObjectCallback) + (jlong class_tag, jlong size, jlong* tag_ptr, void* user_data); + +typedef jvmtiIterationControl (JNICALL *jvmtiHeapRootCallback) + (jvmtiHeapRootKind root_kind, jlong class_tag, jlong size, jlong* tag_ptr, void* user_data); + +typedef jvmtiIterationControl (JNICALL *jvmtiStackReferenceCallback) + (jvmtiHeapRootKind root_kind, jlong class_tag, jlong size, jlong* tag_ptr, jlong thread_tag, jint depth, jmethodID method, jint slot, void* user_data); + +typedef jvmtiIterationControl (JNICALL *jvmtiObjectReferenceCallback) + (jvmtiObjectReferenceKind reference_kind, jlong class_tag, jlong size, jlong* tag_ptr, jlong referrer_tag, jint referrer_index, void* user_data); + +typedef jvmtiError (JNICALL *jvmtiExtensionFunction) + (jvmtiEnv* jvmti_env, ...); + +typedef void (JNICALL *jvmtiExtensionEvent) + (jvmtiEnv* jvmti_env, ...); + + + /* Structure Types */ +struct _jvmtiThreadInfo { + char* name; + jint priority; + jboolean is_daemon; + jthreadGroup thread_group; + jobject context_class_loader; +}; +struct _jvmtiMonitorStackDepthInfo { + jobject monitor; + jint stack_depth; +}; +struct _jvmtiThreadGroupInfo { + jthreadGroup parent; + char* name; + jint max_priority; + jboolean is_daemon; +}; +struct _jvmtiFrameInfo { + jmethodID method; + jlocation location; +}; +struct _jvmtiStackInfo { + jthread thread; + jint state; + jvmtiFrameInfo* frame_buffer; + jint frame_count; +}; +struct _jvmtiHeapReferenceInfoField { + jint index; +}; +struct _jvmtiHeapReferenceInfoArray { + jint index; +}; +struct _jvmtiHeapReferenceInfoConstantPool { + jint index; +}; +struct _jvmtiHeapReferenceInfoStackLocal { + jlong thread_tag; + jlong thread_id; + jint depth; + jmethodID method; + jlocation location; + jint slot; +}; +struct _jvmtiHeapReferenceInfoJniLocal { + jlong thread_tag; + jlong thread_id; + jint depth; + jmethodID method; +}; +struct _jvmtiHeapReferenceInfoReserved { + jlong reserved1; + jlong reserved2; + jlong reserved3; + jlong reserved4; + jlong reserved5; + jlong reserved6; + jlong reserved7; + jlong reserved8; +}; +union _jvmtiHeapReferenceInfo { + jvmtiHeapReferenceInfoField field; + jvmtiHeapReferenceInfoArray array; + jvmtiHeapReferenceInfoConstantPool constant_pool; + jvmtiHeapReferenceInfoStackLocal stack_local; + jvmtiHeapReferenceInfoJniLocal jni_local; + jvmtiHeapReferenceInfoReserved other; +}; +struct _jvmtiHeapCallbacks { + jvmtiHeapIterationCallback heap_iteration_callback; + jvmtiHeapReferenceCallback heap_reference_callback; + jvmtiPrimitiveFieldCallback primitive_field_callback; + jvmtiArrayPrimitiveValueCallback array_primitive_value_callback; + jvmtiStringPrimitiveValueCallback string_primitive_value_callback; + jvmtiReservedCallback reserved5; + jvmtiReservedCallback reserved6; + jvmtiReservedCallback reserved7; + jvmtiReservedCallback reserved8; + jvmtiReservedCallback reserved9; + jvmtiReservedCallback reserved10; + jvmtiReservedCallback reserved11; + jvmtiReservedCallback reserved12; + jvmtiReservedCallback reserved13; + jvmtiReservedCallback reserved14; + jvmtiReservedCallback reserved15; +}; +struct _jvmtiClassDefinition { + jclass klass; + jint class_byte_count; + const unsigned char* class_bytes; +}; +struct _jvmtiMonitorUsage { + jthread owner; + jint entry_count; + jint waiter_count; + jthread* waiters; + jint notify_waiter_count; + jthread* notify_waiters; +}; +struct _jvmtiLineNumberEntry { + jlocation start_location; + jint line_number; +}; +struct _jvmtiLocalVariableEntry { + jlocation start_location; + jint length; + char* name; + char* signature; + char* generic_signature; + jint slot; +}; +struct _jvmtiParamInfo { + char* name; + jvmtiParamKind kind; + jvmtiParamTypes base_type; + jboolean null_ok; +}; +struct _jvmtiExtensionFunctionInfo { + jvmtiExtensionFunction func; + char* id; + char* short_description; + jint param_count; + jvmtiParamInfo* params; + jint error_count; + jvmtiError* errors; +}; +struct _jvmtiExtensionEventInfo { + jint extension_event_index; + char* id; + char* short_description; + jint param_count; + jvmtiParamInfo* params; +}; +struct _jvmtiTimerInfo { + jlong max_value; + jboolean may_skip_forward; + jboolean may_skip_backward; + jvmtiTimerKind kind; + jlong reserved1; + jlong reserved2; +}; +struct _jvmtiAddrLocationMap { + const void* start_address; + jlocation location; +}; + +typedef struct { + unsigned int can_tag_objects : 1; + unsigned int can_generate_field_modification_events : 1; + unsigned int can_generate_field_access_events : 1; + unsigned int can_get_bytecodes : 1; + unsigned int can_get_synthetic_attribute : 1; + unsigned int can_get_owned_monitor_info : 1; + unsigned int can_get_current_contended_monitor : 1; + unsigned int can_get_monitor_info : 1; + unsigned int can_pop_frame : 1; + unsigned int can_redefine_classes : 1; + unsigned int can_signal_thread : 1; + unsigned int can_get_source_file_name : 1; + unsigned int can_get_line_numbers : 1; + unsigned int can_get_source_debug_extension : 1; + unsigned int can_access_local_variables : 1; + unsigned int can_maintain_original_method_order : 1; + unsigned int can_generate_single_step_events : 1; + unsigned int can_generate_exception_events : 1; + unsigned int can_generate_frame_pop_events : 1; + unsigned int can_generate_breakpoint_events : 1; + unsigned int can_suspend : 1; + unsigned int can_redefine_any_class : 1; + unsigned int can_get_current_thread_cpu_time : 1; + unsigned int can_get_thread_cpu_time : 1; + unsigned int can_generate_method_entry_events : 1; + unsigned int can_generate_method_exit_events : 1; + unsigned int can_generate_all_class_hook_events : 1; + unsigned int can_generate_compiled_method_load_events : 1; + unsigned int can_generate_monitor_events : 1; + unsigned int can_generate_vm_object_alloc_events : 1; + unsigned int can_generate_native_method_bind_events : 1; + unsigned int can_generate_garbage_collection_events : 1; + unsigned int can_generate_object_free_events : 1; + unsigned int can_force_early_return : 1; + unsigned int can_get_owned_monitor_stack_depth_info : 1; + unsigned int can_get_constant_pool : 1; + unsigned int can_set_native_method_prefix : 1; + unsigned int can_retransform_classes : 1; + unsigned int can_retransform_any_class : 1; + unsigned int can_generate_resource_exhaustion_heap_events : 1; + unsigned int can_generate_resource_exhaustion_threads_events : 1; + unsigned int : 7; + unsigned int : 16; + unsigned int : 16; + unsigned int : 16; + unsigned int : 16; + unsigned int : 16; +} jvmtiCapabilities; + + + /* Event Definitions */ + +typedef void (JNICALL *jvmtiEventReserved)(void); + + +typedef void (JNICALL *jvmtiEventBreakpoint) + (jvmtiEnv *jvmti_env, + JNIEnv* jni_env, + jthread thread, + jmethodID method, + jlocation location); + +typedef void (JNICALL *jvmtiEventClassFileLoadHook) + (jvmtiEnv *jvmti_env, + JNIEnv* jni_env, + jclass class_being_redefined, + jobject loader, + const char* name, + jobject protection_domain, + jint class_data_len, + const unsigned char* class_data, + jint* new_class_data_len, + unsigned char** new_class_data); + +typedef void (JNICALL *jvmtiEventClassLoad) + (jvmtiEnv *jvmti_env, + JNIEnv* jni_env, + jthread thread, + jclass klass); + +typedef void (JNICALL *jvmtiEventClassPrepare) + (jvmtiEnv *jvmti_env, + JNIEnv* jni_env, + jthread thread, + jclass klass); + +typedef void (JNICALL *jvmtiEventCompiledMethodLoad) + (jvmtiEnv *jvmti_env, + jmethodID method, + jint code_size, + const void* code_addr, + jint map_length, + const jvmtiAddrLocationMap* map, + const void* compile_info); + +typedef void (JNICALL *jvmtiEventCompiledMethodUnload) + (jvmtiEnv *jvmti_env, + jmethodID method, + const void* code_addr); + +typedef void (JNICALL *jvmtiEventDataDumpRequest) + (jvmtiEnv *jvmti_env); + +typedef void (JNICALL *jvmtiEventDynamicCodeGenerated) + (jvmtiEnv *jvmti_env, + const char* name, + const void* address, + jint length); + +typedef void (JNICALL *jvmtiEventException) + (jvmtiEnv *jvmti_env, + JNIEnv* jni_env, + jthread thread, + jmethodID method, + jlocation location, + jobject exception, + jmethodID catch_method, + jlocation catch_location); + +typedef void (JNICALL *jvmtiEventExceptionCatch) + (jvmtiEnv *jvmti_env, + JNIEnv* jni_env, + jthread thread, + jmethodID method, + jlocation location, + jobject exception); + +typedef void (JNICALL *jvmtiEventFieldAccess) + (jvmtiEnv *jvmti_env, + JNIEnv* jni_env, + jthread thread, + jmethodID method, + jlocation location, + jclass field_klass, + jobject object, + jfieldID field); + +typedef void (JNICALL *jvmtiEventFieldModification) + (jvmtiEnv *jvmti_env, + JNIEnv* jni_env, + jthread thread, + jmethodID method, + jlocation location, + jclass field_klass, + jobject object, + jfieldID field, + char signature_type, + jvalue new_value); + +typedef void (JNICALL *jvmtiEventFramePop) + (jvmtiEnv *jvmti_env, + JNIEnv* jni_env, + jthread thread, + jmethodID method, + jboolean was_popped_by_exception); + +typedef void (JNICALL *jvmtiEventGarbageCollectionFinish) + (jvmtiEnv *jvmti_env); + +typedef void (JNICALL *jvmtiEventGarbageCollectionStart) + (jvmtiEnv *jvmti_env); + +typedef void (JNICALL *jvmtiEventMethodEntry) + (jvmtiEnv *jvmti_env, + JNIEnv* jni_env, + jthread thread, + jmethodID method); + +typedef void (JNICALL *jvmtiEventMethodExit) + (jvmtiEnv *jvmti_env, + JNIEnv* jni_env, + jthread thread, + jmethodID method, + jboolean was_popped_by_exception, + jvalue return_value); + +typedef void (JNICALL *jvmtiEventMonitorContendedEnter) + (jvmtiEnv *jvmti_env, + JNIEnv* jni_env, + jthread thread, + jobject object); + +typedef void (JNICALL *jvmtiEventMonitorContendedEntered) + (jvmtiEnv *jvmti_env, + JNIEnv* jni_env, + jthread thread, + jobject object); + +typedef void (JNICALL *jvmtiEventMonitorWait) + (jvmtiEnv *jvmti_env, + JNIEnv* jni_env, + jthread thread, + jobject object, + jlong timeout); + +typedef void (JNICALL *jvmtiEventMonitorWaited) + (jvmtiEnv *jvmti_env, + JNIEnv* jni_env, + jthread thread, + jobject object, + jboolean timed_out); + +typedef void (JNICALL *jvmtiEventNativeMethodBind) + (jvmtiEnv *jvmti_env, + JNIEnv* jni_env, + jthread thread, + jmethodID method, + void* address, + void** new_address_ptr); + +typedef void (JNICALL *jvmtiEventObjectFree) + (jvmtiEnv *jvmti_env, + jlong tag); + +typedef void (JNICALL *jvmtiEventResourceExhausted) + (jvmtiEnv *jvmti_env, + JNIEnv* jni_env, + jint flags, + const void* reserved, + const char* description); + +typedef void (JNICALL *jvmtiEventSingleStep) + (jvmtiEnv *jvmti_env, + JNIEnv* jni_env, + jthread thread, + jmethodID method, + jlocation location); + +typedef void (JNICALL *jvmtiEventThreadEnd) + (jvmtiEnv *jvmti_env, + JNIEnv* jni_env, + jthread thread); + +typedef void (JNICALL *jvmtiEventThreadStart) + (jvmtiEnv *jvmti_env, + JNIEnv* jni_env, + jthread thread); + +typedef void (JNICALL *jvmtiEventVMDeath) + (jvmtiEnv *jvmti_env, + JNIEnv* jni_env); + +typedef void (JNICALL *jvmtiEventVMInit) + (jvmtiEnv *jvmti_env, + JNIEnv* jni_env, + jthread thread); + +typedef void (JNICALL *jvmtiEventVMObjectAlloc) + (jvmtiEnv *jvmti_env, + JNIEnv* jni_env, + jthread thread, + jobject object, + jclass object_klass, + jlong size); + +typedef void (JNICALL *jvmtiEventVMStart) + (jvmtiEnv *jvmti_env, + JNIEnv* jni_env); + + /* Event Callback Structure */ + +typedef struct { + /* 50 : VM Initialization Event */ + jvmtiEventVMInit VMInit; + /* 51 : VM Death Event */ + jvmtiEventVMDeath VMDeath; + /* 52 : Thread Start */ + jvmtiEventThreadStart ThreadStart; + /* 53 : Thread End */ + jvmtiEventThreadEnd ThreadEnd; + /* 54 : Class File Load Hook */ + jvmtiEventClassFileLoadHook ClassFileLoadHook; + /* 55 : Class Load */ + jvmtiEventClassLoad ClassLoad; + /* 56 : Class Prepare */ + jvmtiEventClassPrepare ClassPrepare; + /* 57 : VM Start Event */ + jvmtiEventVMStart VMStart; + /* 58 : Exception */ + jvmtiEventException Exception; + /* 59 : Exception Catch */ + jvmtiEventExceptionCatch ExceptionCatch; + /* 60 : Single Step */ + jvmtiEventSingleStep SingleStep; + /* 61 : Frame Pop */ + jvmtiEventFramePop FramePop; + /* 62 : Breakpoint */ + jvmtiEventBreakpoint Breakpoint; + /* 63 : Field Access */ + jvmtiEventFieldAccess FieldAccess; + /* 64 : Field Modification */ + jvmtiEventFieldModification FieldModification; + /* 65 : Method Entry */ + jvmtiEventMethodEntry MethodEntry; + /* 66 : Method Exit */ + jvmtiEventMethodExit MethodExit; + /* 67 : Native Method Bind */ + jvmtiEventNativeMethodBind NativeMethodBind; + /* 68 : Compiled Method Load */ + jvmtiEventCompiledMethodLoad CompiledMethodLoad; + /* 69 : Compiled Method Unload */ + jvmtiEventCompiledMethodUnload CompiledMethodUnload; + /* 70 : Dynamic Code Generated */ + jvmtiEventDynamicCodeGenerated DynamicCodeGenerated; + /* 71 : Data Dump Request */ + jvmtiEventDataDumpRequest DataDumpRequest; + /* 72 */ + jvmtiEventReserved reserved72; + /* 73 : Monitor Wait */ + jvmtiEventMonitorWait MonitorWait; + /* 74 : Monitor Waited */ + jvmtiEventMonitorWaited MonitorWaited; + /* 75 : Monitor Contended Enter */ + jvmtiEventMonitorContendedEnter MonitorContendedEnter; + /* 76 : Monitor Contended Entered */ + jvmtiEventMonitorContendedEntered MonitorContendedEntered; + /* 77 */ + jvmtiEventReserved reserved77; + /* 78 */ + jvmtiEventReserved reserved78; + /* 79 */ + jvmtiEventReserved reserved79; + /* 80 : Resource Exhausted */ + jvmtiEventResourceExhausted ResourceExhausted; + /* 81 : Garbage Collection Start */ + jvmtiEventGarbageCollectionStart GarbageCollectionStart; + /* 82 : Garbage Collection Finish */ + jvmtiEventGarbageCollectionFinish GarbageCollectionFinish; + /* 83 : Object Free */ + jvmtiEventObjectFree ObjectFree; + /* 84 : VM Object Allocation */ + jvmtiEventVMObjectAlloc VMObjectAlloc; +} jvmtiEventCallbacks; + + + /* Function Interface */ + +typedef struct jvmtiInterface_1_ { + + /* 1 : RESERVED */ + void *reserved1; + + /* 2 : Set Event Notification Mode */ + jvmtiError (JNICALL *SetEventNotificationMode) (jvmtiEnv* env, + jvmtiEventMode mode, + jvmtiEvent event_type, + jthread event_thread, + ...); + + /* 3 : RESERVED */ + void *reserved3; + + /* 4 : Get All Threads */ + jvmtiError (JNICALL *GetAllThreads) (jvmtiEnv* env, + jint* threads_count_ptr, + jthread** threads_ptr); + + /* 5 : Suspend Thread */ + jvmtiError (JNICALL *SuspendThread) (jvmtiEnv* env, + jthread thread); + + /* 6 : Resume Thread */ + jvmtiError (JNICALL *ResumeThread) (jvmtiEnv* env, + jthread thread); + + /* 7 : Stop Thread */ + jvmtiError (JNICALL *StopThread) (jvmtiEnv* env, + jthread thread, + jobject exception); + + /* 8 : Interrupt Thread */ + jvmtiError (JNICALL *InterruptThread) (jvmtiEnv* env, + jthread thread); + + /* 9 : Get Thread Info */ + jvmtiError (JNICALL *GetThreadInfo) (jvmtiEnv* env, + jthread thread, + jvmtiThreadInfo* info_ptr); + + /* 10 : Get Owned Monitor Info */ + jvmtiError (JNICALL *GetOwnedMonitorInfo) (jvmtiEnv* env, + jthread thread, + jint* owned_monitor_count_ptr, + jobject** owned_monitors_ptr); + + /* 11 : Get Current Contended Monitor */ + jvmtiError (JNICALL *GetCurrentContendedMonitor) (jvmtiEnv* env, + jthread thread, + jobject* monitor_ptr); + + /* 12 : Run Agent Thread */ + jvmtiError (JNICALL *RunAgentThread) (jvmtiEnv* env, + jthread thread, + jvmtiStartFunction proc, + const void* arg, + jint priority); + + /* 13 : Get Top Thread Groups */ + jvmtiError (JNICALL *GetTopThreadGroups) (jvmtiEnv* env, + jint* group_count_ptr, + jthreadGroup** groups_ptr); + + /* 14 : Get Thread Group Info */ + jvmtiError (JNICALL *GetThreadGroupInfo) (jvmtiEnv* env, + jthreadGroup group, + jvmtiThreadGroupInfo* info_ptr); + + /* 15 : Get Thread Group Children */ + jvmtiError (JNICALL *GetThreadGroupChildren) (jvmtiEnv* env, + jthreadGroup group, + jint* thread_count_ptr, + jthread** threads_ptr, + jint* group_count_ptr, + jthreadGroup** groups_ptr); + + /* 16 : Get Frame Count */ + jvmtiError (JNICALL *GetFrameCount) (jvmtiEnv* env, + jthread thread, + jint* count_ptr); + + /* 17 : Get Thread State */ + jvmtiError (JNICALL *GetThreadState) (jvmtiEnv* env, + jthread thread, + jint* thread_state_ptr); + + /* 18 : Get Current Thread */ + jvmtiError (JNICALL *GetCurrentThread) (jvmtiEnv* env, + jthread* thread_ptr); + + /* 19 : Get Frame Location */ + jvmtiError (JNICALL *GetFrameLocation) (jvmtiEnv* env, + jthread thread, + jint depth, + jmethodID* method_ptr, + jlocation* location_ptr); + + /* 20 : Notify Frame Pop */ + jvmtiError (JNICALL *NotifyFramePop) (jvmtiEnv* env, + jthread thread, + jint depth); + + /* 21 : Get Local Variable - Object */ + jvmtiError (JNICALL *GetLocalObject) (jvmtiEnv* env, + jthread thread, + jint depth, + jint slot, + jobject* value_ptr); + + /* 22 : Get Local Variable - Int */ + jvmtiError (JNICALL *GetLocalInt) (jvmtiEnv* env, + jthread thread, + jint depth, + jint slot, + jint* value_ptr); + + /* 23 : Get Local Variable - Long */ + jvmtiError (JNICALL *GetLocalLong) (jvmtiEnv* env, + jthread thread, + jint depth, + jint slot, + jlong* value_ptr); + + /* 24 : Get Local Variable - Float */ + jvmtiError (JNICALL *GetLocalFloat) (jvmtiEnv* env, + jthread thread, + jint depth, + jint slot, + jfloat* value_ptr); + + /* 25 : Get Local Variable - Double */ + jvmtiError (JNICALL *GetLocalDouble) (jvmtiEnv* env, + jthread thread, + jint depth, + jint slot, + jdouble* value_ptr); + + /* 26 : Set Local Variable - Object */ + jvmtiError (JNICALL *SetLocalObject) (jvmtiEnv* env, + jthread thread, + jint depth, + jint slot, + jobject value); + + /* 27 : Set Local Variable - Int */ + jvmtiError (JNICALL *SetLocalInt) (jvmtiEnv* env, + jthread thread, + jint depth, + jint slot, + jint value); + + /* 28 : Set Local Variable - Long */ + jvmtiError (JNICALL *SetLocalLong) (jvmtiEnv* env, + jthread thread, + jint depth, + jint slot, + jlong value); + + /* 29 : Set Local Variable - Float */ + jvmtiError (JNICALL *SetLocalFloat) (jvmtiEnv* env, + jthread thread, + jint depth, + jint slot, + jfloat value); + + /* 30 : Set Local Variable - Double */ + jvmtiError (JNICALL *SetLocalDouble) (jvmtiEnv* env, + jthread thread, + jint depth, + jint slot, + jdouble value); + + /* 31 : Create Raw Monitor */ + jvmtiError (JNICALL *CreateRawMonitor) (jvmtiEnv* env, + const char* name, + jrawMonitorID* monitor_ptr); + + /* 32 : Destroy Raw Monitor */ + jvmtiError (JNICALL *DestroyRawMonitor) (jvmtiEnv* env, + jrawMonitorID monitor); + + /* 33 : Raw Monitor Enter */ + jvmtiError (JNICALL *RawMonitorEnter) (jvmtiEnv* env, + jrawMonitorID monitor); + + /* 34 : Raw Monitor Exit */ + jvmtiError (JNICALL *RawMonitorExit) (jvmtiEnv* env, + jrawMonitorID monitor); + + /* 35 : Raw Monitor Wait */ + jvmtiError (JNICALL *RawMonitorWait) (jvmtiEnv* env, + jrawMonitorID monitor, + jlong millis); + + /* 36 : Raw Monitor Notify */ + jvmtiError (JNICALL *RawMonitorNotify) (jvmtiEnv* env, + jrawMonitorID monitor); + + /* 37 : Raw Monitor Notify All */ + jvmtiError (JNICALL *RawMonitorNotifyAll) (jvmtiEnv* env, + jrawMonitorID monitor); + + /* 38 : Set Breakpoint */ + jvmtiError (JNICALL *SetBreakpoint) (jvmtiEnv* env, + jmethodID method, + jlocation location); + + /* 39 : Clear Breakpoint */ + jvmtiError (JNICALL *ClearBreakpoint) (jvmtiEnv* env, + jmethodID method, + jlocation location); + + /* 40 : RESERVED */ + void *reserved40; + + /* 41 : Set Field Access Watch */ + jvmtiError (JNICALL *SetFieldAccessWatch) (jvmtiEnv* env, + jclass klass, + jfieldID field); + + /* 42 : Clear Field Access Watch */ + jvmtiError (JNICALL *ClearFieldAccessWatch) (jvmtiEnv* env, + jclass klass, + jfieldID field); + + /* 43 : Set Field Modification Watch */ + jvmtiError (JNICALL *SetFieldModificationWatch) (jvmtiEnv* env, + jclass klass, + jfieldID field); + + /* 44 : Clear Field Modification Watch */ + jvmtiError (JNICALL *ClearFieldModificationWatch) (jvmtiEnv* env, + jclass klass, + jfieldID field); + + /* 45 : Is Modifiable Class */ + jvmtiError (JNICALL *IsModifiableClass) (jvmtiEnv* env, + jclass klass, + jboolean* is_modifiable_class_ptr); + + /* 46 : Allocate */ + jvmtiError (JNICALL *Allocate) (jvmtiEnv* env, + jlong size, + unsigned char** mem_ptr); + + /* 47 : Deallocate */ + jvmtiError (JNICALL *Deallocate) (jvmtiEnv* env, + unsigned char* mem); + + /* 48 : Get Class Signature */ + jvmtiError (JNICALL *GetClassSignature) (jvmtiEnv* env, + jclass klass, + char** signature_ptr, + char** generic_ptr); + + /* 49 : Get Class Status */ + jvmtiError (JNICALL *GetClassStatus) (jvmtiEnv* env, + jclass klass, + jint* status_ptr); + + /* 50 : Get Source File Name */ + jvmtiError (JNICALL *GetSourceFileName) (jvmtiEnv* env, + jclass klass, + char** source_name_ptr); + + /* 51 : Get Class Modifiers */ + jvmtiError (JNICALL *GetClassModifiers) (jvmtiEnv* env, + jclass klass, + jint* modifiers_ptr); + + /* 52 : Get Class Methods */ + jvmtiError (JNICALL *GetClassMethods) (jvmtiEnv* env, + jclass klass, + jint* method_count_ptr, + jmethodID** methods_ptr); + + /* 53 : Get Class Fields */ + jvmtiError (JNICALL *GetClassFields) (jvmtiEnv* env, + jclass klass, + jint* field_count_ptr, + jfieldID** fields_ptr); + + /* 54 : Get Implemented Interfaces */ + jvmtiError (JNICALL *GetImplementedInterfaces) (jvmtiEnv* env, + jclass klass, + jint* interface_count_ptr, + jclass** interfaces_ptr); + + /* 55 : Is Interface */ + jvmtiError (JNICALL *IsInterface) (jvmtiEnv* env, + jclass klass, + jboolean* is_interface_ptr); + + /* 56 : Is Array Class */ + jvmtiError (JNICALL *IsArrayClass) (jvmtiEnv* env, + jclass klass, + jboolean* is_array_class_ptr); + + /* 57 : Get Class Loader */ + jvmtiError (JNICALL *GetClassLoader) (jvmtiEnv* env, + jclass klass, + jobject* classloader_ptr); + + /* 58 : Get Object Hash Code */ + jvmtiError (JNICALL *GetObjectHashCode) (jvmtiEnv* env, + jobject object, + jint* hash_code_ptr); + + /* 59 : Get Object Monitor Usage */ + jvmtiError (JNICALL *GetObjectMonitorUsage) (jvmtiEnv* env, + jobject object, + jvmtiMonitorUsage* info_ptr); + + /* 60 : Get Field Name (and Signature) */ + jvmtiError (JNICALL *GetFieldName) (jvmtiEnv* env, + jclass klass, + jfieldID field, + char** name_ptr, + char** signature_ptr, + char** generic_ptr); + + /* 61 : Get Field Declaring Class */ + jvmtiError (JNICALL *GetFieldDeclaringClass) (jvmtiEnv* env, + jclass klass, + jfieldID field, + jclass* declaring_class_ptr); + + /* 62 : Get Field Modifiers */ + jvmtiError (JNICALL *GetFieldModifiers) (jvmtiEnv* env, + jclass klass, + jfieldID field, + jint* modifiers_ptr); + + /* 63 : Is Field Synthetic */ + jvmtiError (JNICALL *IsFieldSynthetic) (jvmtiEnv* env, + jclass klass, + jfieldID field, + jboolean* is_synthetic_ptr); + + /* 64 : Get Method Name (and Signature) */ + jvmtiError (JNICALL *GetMethodName) (jvmtiEnv* env, + jmethodID method, + char** name_ptr, + char** signature_ptr, + char** generic_ptr); + + /* 65 : Get Method Declaring Class */ + jvmtiError (JNICALL *GetMethodDeclaringClass) (jvmtiEnv* env, + jmethodID method, + jclass* declaring_class_ptr); + + /* 66 : Get Method Modifiers */ + jvmtiError (JNICALL *GetMethodModifiers) (jvmtiEnv* env, + jmethodID method, + jint* modifiers_ptr); + + /* 67 : RESERVED */ + void *reserved67; + + /* 68 : Get Max Locals */ + jvmtiError (JNICALL *GetMaxLocals) (jvmtiEnv* env, + jmethodID method, + jint* max_ptr); + + /* 69 : Get Arguments Size */ + jvmtiError (JNICALL *GetArgumentsSize) (jvmtiEnv* env, + jmethodID method, + jint* size_ptr); + + /* 70 : Get Line Number Table */ + jvmtiError (JNICALL *GetLineNumberTable) (jvmtiEnv* env, + jmethodID method, + jint* entry_count_ptr, + jvmtiLineNumberEntry** table_ptr); + + /* 71 : Get Method Location */ + jvmtiError (JNICALL *GetMethodLocation) (jvmtiEnv* env, + jmethodID method, + jlocation* start_location_ptr, + jlocation* end_location_ptr); + + /* 72 : Get Local Variable Table */ + jvmtiError (JNICALL *GetLocalVariableTable) (jvmtiEnv* env, + jmethodID method, + jint* entry_count_ptr, + jvmtiLocalVariableEntry** table_ptr); + + /* 73 : Set Native Method Prefix */ + jvmtiError (JNICALL *SetNativeMethodPrefix) (jvmtiEnv* env, + const char* prefix); + + /* 74 : Set Native Method Prefixes */ + jvmtiError (JNICALL *SetNativeMethodPrefixes) (jvmtiEnv* env, + jint prefix_count, + char** prefixes); + + /* 75 : Get Bytecodes */ + jvmtiError (JNICALL *GetBytecodes) (jvmtiEnv* env, + jmethodID method, + jint* bytecode_count_ptr, + unsigned char** bytecodes_ptr); + + /* 76 : Is Method Native */ + jvmtiError (JNICALL *IsMethodNative) (jvmtiEnv* env, + jmethodID method, + jboolean* is_native_ptr); + + /* 77 : Is Method Synthetic */ + jvmtiError (JNICALL *IsMethodSynthetic) (jvmtiEnv* env, + jmethodID method, + jboolean* is_synthetic_ptr); + + /* 78 : Get Loaded Classes */ + jvmtiError (JNICALL *GetLoadedClasses) (jvmtiEnv* env, + jint* class_count_ptr, + jclass** classes_ptr); + + /* 79 : Get Classloader Classes */ + jvmtiError (JNICALL *GetClassLoaderClasses) (jvmtiEnv* env, + jobject initiating_loader, + jint* class_count_ptr, + jclass** classes_ptr); + + /* 80 : Pop Frame */ + jvmtiError (JNICALL *PopFrame) (jvmtiEnv* env, + jthread thread); + + /* 81 : Force Early Return - Object */ + jvmtiError (JNICALL *ForceEarlyReturnObject) (jvmtiEnv* env, + jthread thread, + jobject value); + + /* 82 : Force Early Return - Int */ + jvmtiError (JNICALL *ForceEarlyReturnInt) (jvmtiEnv* env, + jthread thread, + jint value); + + /* 83 : Force Early Return - Long */ + jvmtiError (JNICALL *ForceEarlyReturnLong) (jvmtiEnv* env, + jthread thread, + jlong value); + + /* 84 : Force Early Return - Float */ + jvmtiError (JNICALL *ForceEarlyReturnFloat) (jvmtiEnv* env, + jthread thread, + jfloat value); + + /* 85 : Force Early Return - Double */ + jvmtiError (JNICALL *ForceEarlyReturnDouble) (jvmtiEnv* env, + jthread thread, + jdouble value); + + /* 86 : Force Early Return - Void */ + jvmtiError (JNICALL *ForceEarlyReturnVoid) (jvmtiEnv* env, + jthread thread); + + /* 87 : Redefine Classes */ + jvmtiError (JNICALL *RedefineClasses) (jvmtiEnv* env, + jint class_count, + const jvmtiClassDefinition* class_definitions); + + /* 88 : Get Version Number */ + jvmtiError (JNICALL *GetVersionNumber) (jvmtiEnv* env, + jint* version_ptr); + + /* 89 : Get Capabilities */ + jvmtiError (JNICALL *GetCapabilities) (jvmtiEnv* env, + jvmtiCapabilities* capabilities_ptr); + + /* 90 : Get Source Debug Extension */ + jvmtiError (JNICALL *GetSourceDebugExtension) (jvmtiEnv* env, + jclass klass, + char** source_debug_extension_ptr); + + /* 91 : Is Method Obsolete */ + jvmtiError (JNICALL *IsMethodObsolete) (jvmtiEnv* env, + jmethodID method, + jboolean* is_obsolete_ptr); + + /* 92 : Suspend Thread List */ + jvmtiError (JNICALL *SuspendThreadList) (jvmtiEnv* env, + jint request_count, + const jthread* request_list, + jvmtiError* results); + + /* 93 : Resume Thread List */ + jvmtiError (JNICALL *ResumeThreadList) (jvmtiEnv* env, + jint request_count, + const jthread* request_list, + jvmtiError* results); + + /* 94 : RESERVED */ + void *reserved94; + + /* 95 : RESERVED */ + void *reserved95; + + /* 96 : RESERVED */ + void *reserved96; + + /* 97 : RESERVED */ + void *reserved97; + + /* 98 : RESERVED */ + void *reserved98; + + /* 99 : RESERVED */ + void *reserved99; + + /* 100 : Get All Stack Traces */ + jvmtiError (JNICALL *GetAllStackTraces) (jvmtiEnv* env, + jint max_frame_count, + jvmtiStackInfo** stack_info_ptr, + jint* thread_count_ptr); + + /* 101 : Get Thread List Stack Traces */ + jvmtiError (JNICALL *GetThreadListStackTraces) (jvmtiEnv* env, + jint thread_count, + const jthread* thread_list, + jint max_frame_count, + jvmtiStackInfo** stack_info_ptr); + + /* 102 : Get Thread Local Storage */ + jvmtiError (JNICALL *GetThreadLocalStorage) (jvmtiEnv* env, + jthread thread, + void** data_ptr); + + /* 103 : Set Thread Local Storage */ + jvmtiError (JNICALL *SetThreadLocalStorage) (jvmtiEnv* env, + jthread thread, + const void* data); + + /* 104 : Get Stack Trace */ + jvmtiError (JNICALL *GetStackTrace) (jvmtiEnv* env, + jthread thread, + jint start_depth, + jint max_frame_count, + jvmtiFrameInfo* frame_buffer, + jint* count_ptr); + + /* 105 : RESERVED */ + void *reserved105; + + /* 106 : Get Tag */ + jvmtiError (JNICALL *GetTag) (jvmtiEnv* env, + jobject object, + jlong* tag_ptr); + + /* 107 : Set Tag */ + jvmtiError (JNICALL *SetTag) (jvmtiEnv* env, + jobject object, + jlong tag); + + /* 108 : Force Garbage Collection */ + jvmtiError (JNICALL *ForceGarbageCollection) (jvmtiEnv* env); + + /* 109 : Iterate Over Objects Reachable From Object */ + jvmtiError (JNICALL *IterateOverObjectsReachableFromObject) (jvmtiEnv* env, + jobject object, + jvmtiObjectReferenceCallback object_reference_callback, + const void* user_data); + + /* 110 : Iterate Over Reachable Objects */ + jvmtiError (JNICALL *IterateOverReachableObjects) (jvmtiEnv* env, + jvmtiHeapRootCallback heap_root_callback, + jvmtiStackReferenceCallback stack_ref_callback, + jvmtiObjectReferenceCallback object_ref_callback, + const void* user_data); + + /* 111 : Iterate Over Heap */ + jvmtiError (JNICALL *IterateOverHeap) (jvmtiEnv* env, + jvmtiHeapObjectFilter object_filter, + jvmtiHeapObjectCallback heap_object_callback, + const void* user_data); + + /* 112 : Iterate Over Instances Of Class */ + jvmtiError (JNICALL *IterateOverInstancesOfClass) (jvmtiEnv* env, + jclass klass, + jvmtiHeapObjectFilter object_filter, + jvmtiHeapObjectCallback heap_object_callback, + const void* user_data); + + /* 113 : RESERVED */ + void *reserved113; + + /* 114 : Get Objects With Tags */ + jvmtiError (JNICALL *GetObjectsWithTags) (jvmtiEnv* env, + jint tag_count, + const jlong* tags, + jint* count_ptr, + jobject** object_result_ptr, + jlong** tag_result_ptr); + + /* 115 : Follow References */ + jvmtiError (JNICALL *FollowReferences) (jvmtiEnv* env, + jint heap_filter, + jclass klass, + jobject initial_object, + const jvmtiHeapCallbacks* callbacks, + const void* user_data); + + /* 116 : Iterate Through Heap */ + jvmtiError (JNICALL *IterateThroughHeap) (jvmtiEnv* env, + jint heap_filter, + jclass klass, + const jvmtiHeapCallbacks* callbacks, + const void* user_data); + + /* 117 : RESERVED */ + void *reserved117; + + /* 118 : RESERVED */ + void *reserved118; + + /* 119 : RESERVED */ + void *reserved119; + + /* 120 : Set JNI Function Table */ + jvmtiError (JNICALL *SetJNIFunctionTable) (jvmtiEnv* env, + const jniNativeInterface* function_table); + + /* 121 : Get JNI Function Table */ + jvmtiError (JNICALL *GetJNIFunctionTable) (jvmtiEnv* env, + jniNativeInterface** function_table); + + /* 122 : Set Event Callbacks */ + jvmtiError (JNICALL *SetEventCallbacks) (jvmtiEnv* env, + const jvmtiEventCallbacks* callbacks, + jint size_of_callbacks); + + /* 123 : Generate Events */ + jvmtiError (JNICALL *GenerateEvents) (jvmtiEnv* env, + jvmtiEvent event_type); + + /* 124 : Get Extension Functions */ + jvmtiError (JNICALL *GetExtensionFunctions) (jvmtiEnv* env, + jint* extension_count_ptr, + jvmtiExtensionFunctionInfo** extensions); + + /* 125 : Get Extension Events */ + jvmtiError (JNICALL *GetExtensionEvents) (jvmtiEnv* env, + jint* extension_count_ptr, + jvmtiExtensionEventInfo** extensions); + + /* 126 : Set Extension Event Callback */ + jvmtiError (JNICALL *SetExtensionEventCallback) (jvmtiEnv* env, + jint extension_event_index, + jvmtiExtensionEvent callback); + + /* 127 : Dispose Environment */ + jvmtiError (JNICALL *DisposeEnvironment) (jvmtiEnv* env); + + /* 128 : Get Error Name */ + jvmtiError (JNICALL *GetErrorName) (jvmtiEnv* env, + jvmtiError error, + char** name_ptr); + + /* 129 : Get JLocation Format */ + jvmtiError (JNICALL *GetJLocationFormat) (jvmtiEnv* env, + jvmtiJlocationFormat* format_ptr); + + /* 130 : Get System Properties */ + jvmtiError (JNICALL *GetSystemProperties) (jvmtiEnv* env, + jint* count_ptr, + char*** property_ptr); + + /* 131 : Get System Property */ + jvmtiError (JNICALL *GetSystemProperty) (jvmtiEnv* env, + const char* property, + char** value_ptr); + + /* 132 : Set System Property */ + jvmtiError (JNICALL *SetSystemProperty) (jvmtiEnv* env, + const char* property, + const char* value); + + /* 133 : Get Phase */ + jvmtiError (JNICALL *GetPhase) (jvmtiEnv* env, + jvmtiPhase* phase_ptr); + + /* 134 : Get Current Thread CPU Timer Information */ + jvmtiError (JNICALL *GetCurrentThreadCpuTimerInfo) (jvmtiEnv* env, + jvmtiTimerInfo* info_ptr); + + /* 135 : Get Current Thread CPU Time */ + jvmtiError (JNICALL *GetCurrentThreadCpuTime) (jvmtiEnv* env, + jlong* nanos_ptr); + + /* 136 : Get Thread CPU Timer Information */ + jvmtiError (JNICALL *GetThreadCpuTimerInfo) (jvmtiEnv* env, + jvmtiTimerInfo* info_ptr); + + /* 137 : Get Thread CPU Time */ + jvmtiError (JNICALL *GetThreadCpuTime) (jvmtiEnv* env, + jthread thread, + jlong* nanos_ptr); + + /* 138 : Get Timer Information */ + jvmtiError (JNICALL *GetTimerInfo) (jvmtiEnv* env, + jvmtiTimerInfo* info_ptr); + + /* 139 : Get Time */ + jvmtiError (JNICALL *GetTime) (jvmtiEnv* env, + jlong* nanos_ptr); + + /* 140 : Get Potential Capabilities */ + jvmtiError (JNICALL *GetPotentialCapabilities) (jvmtiEnv* env, + jvmtiCapabilities* capabilities_ptr); + + /* 141 : RESERVED */ + void *reserved141; + + /* 142 : Add Capabilities */ + jvmtiError (JNICALL *AddCapabilities) (jvmtiEnv* env, + const jvmtiCapabilities* capabilities_ptr); + + /* 143 : Relinquish Capabilities */ + jvmtiError (JNICALL *RelinquishCapabilities) (jvmtiEnv* env, + const jvmtiCapabilities* capabilities_ptr); + + /* 144 : Get Available Processors */ + jvmtiError (JNICALL *GetAvailableProcessors) (jvmtiEnv* env, + jint* processor_count_ptr); + + /* 145 : Get Class Version Numbers */ + jvmtiError (JNICALL *GetClassVersionNumbers) (jvmtiEnv* env, + jclass klass, + jint* minor_version_ptr, + jint* major_version_ptr); + + /* 146 : Get Constant Pool */ + jvmtiError (JNICALL *GetConstantPool) (jvmtiEnv* env, + jclass klass, + jint* constant_pool_count_ptr, + jint* constant_pool_byte_count_ptr, + unsigned char** constant_pool_bytes_ptr); + + /* 147 : Get Environment Local Storage */ + jvmtiError (JNICALL *GetEnvironmentLocalStorage) (jvmtiEnv* env, + void** data_ptr); + + /* 148 : Set Environment Local Storage */ + jvmtiError (JNICALL *SetEnvironmentLocalStorage) (jvmtiEnv* env, + const void* data); + + /* 149 : Add To Bootstrap Class Loader Search */ + jvmtiError (JNICALL *AddToBootstrapClassLoaderSearch) (jvmtiEnv* env, + const char* segment); + + /* 150 : Set Verbose Flag */ + jvmtiError (JNICALL *SetVerboseFlag) (jvmtiEnv* env, + jvmtiVerboseFlag flag, + jboolean value); + + /* 151 : Add To System Class Loader Search */ + jvmtiError (JNICALL *AddToSystemClassLoaderSearch) (jvmtiEnv* env, + const char* segment); + + /* 152 : Retransform Classes */ + jvmtiError (JNICALL *RetransformClasses) (jvmtiEnv* env, + jint class_count, + const jclass* classes); + + /* 153 : Get Owned Monitor Stack Depth Info */ + jvmtiError (JNICALL *GetOwnedMonitorStackDepthInfo) (jvmtiEnv* env, + jthread thread, + jint* monitor_info_count_ptr, + jvmtiMonitorStackDepthInfo** monitor_info_ptr); + + /* 154 : Get Object Size */ + jvmtiError (JNICALL *GetObjectSize) (jvmtiEnv* env, + jobject object, + jlong* size_ptr); + + /* 155 : Get Local Instance */ + jvmtiError (JNICALL *GetLocalInstance) (jvmtiEnv* env, + jthread thread, + jint depth, + jobject* value_ptr); + +} jvmtiInterface_1; + +struct _jvmtiEnv { + const struct jvmtiInterface_1_ *functions; +#ifdef __cplusplus + + + jvmtiError Allocate(jlong size, + unsigned char** mem_ptr) { + return functions->Allocate(this, size, mem_ptr); + } + + jvmtiError Deallocate(unsigned char* mem) { + return functions->Deallocate(this, mem); + } + + jvmtiError GetThreadState(jthread thread, + jint* thread_state_ptr) { + return functions->GetThreadState(this, thread, thread_state_ptr); + } + + jvmtiError GetCurrentThread(jthread* thread_ptr) { + return functions->GetCurrentThread(this, thread_ptr); + } + + jvmtiError GetAllThreads(jint* threads_count_ptr, + jthread** threads_ptr) { + return functions->GetAllThreads(this, threads_count_ptr, threads_ptr); + } + + jvmtiError SuspendThread(jthread thread) { + return functions->SuspendThread(this, thread); + } + + jvmtiError SuspendThreadList(jint request_count, + const jthread* request_list, + jvmtiError* results) { + return functions->SuspendThreadList(this, request_count, request_list, results); + } + + jvmtiError ResumeThread(jthread thread) { + return functions->ResumeThread(this, thread); + } + + jvmtiError ResumeThreadList(jint request_count, + const jthread* request_list, + jvmtiError* results) { + return functions->ResumeThreadList(this, request_count, request_list, results); + } + + jvmtiError StopThread(jthread thread, + jobject exception) { + return functions->StopThread(this, thread, exception); + } + + jvmtiError InterruptThread(jthread thread) { + return functions->InterruptThread(this, thread); + } + + jvmtiError GetThreadInfo(jthread thread, + jvmtiThreadInfo* info_ptr) { + return functions->GetThreadInfo(this, thread, info_ptr); + } + + jvmtiError GetOwnedMonitorInfo(jthread thread, + jint* owned_monitor_count_ptr, + jobject** owned_monitors_ptr) { + return functions->GetOwnedMonitorInfo(this, thread, owned_monitor_count_ptr, owned_monitors_ptr); + } + + jvmtiError GetOwnedMonitorStackDepthInfo(jthread thread, + jint* monitor_info_count_ptr, + jvmtiMonitorStackDepthInfo** monitor_info_ptr) { + return functions->GetOwnedMonitorStackDepthInfo(this, thread, monitor_info_count_ptr, monitor_info_ptr); + } + + jvmtiError GetCurrentContendedMonitor(jthread thread, + jobject* monitor_ptr) { + return functions->GetCurrentContendedMonitor(this, thread, monitor_ptr); + } + + jvmtiError RunAgentThread(jthread thread, + jvmtiStartFunction proc, + const void* arg, + jint priority) { + return functions->RunAgentThread(this, thread, proc, arg, priority); + } + + jvmtiError SetThreadLocalStorage(jthread thread, + const void* data) { + return functions->SetThreadLocalStorage(this, thread, data); + } + + jvmtiError GetThreadLocalStorage(jthread thread, + void** data_ptr) { + return functions->GetThreadLocalStorage(this, thread, data_ptr); + } + + jvmtiError GetTopThreadGroups(jint* group_count_ptr, + jthreadGroup** groups_ptr) { + return functions->GetTopThreadGroups(this, group_count_ptr, groups_ptr); + } + + jvmtiError GetThreadGroupInfo(jthreadGroup group, + jvmtiThreadGroupInfo* info_ptr) { + return functions->GetThreadGroupInfo(this, group, info_ptr); + } + + jvmtiError GetThreadGroupChildren(jthreadGroup group, + jint* thread_count_ptr, + jthread** threads_ptr, + jint* group_count_ptr, + jthreadGroup** groups_ptr) { + return functions->GetThreadGroupChildren(this, group, thread_count_ptr, threads_ptr, group_count_ptr, groups_ptr); + } + + jvmtiError GetStackTrace(jthread thread, + jint start_depth, + jint max_frame_count, + jvmtiFrameInfo* frame_buffer, + jint* count_ptr) { + return functions->GetStackTrace(this, thread, start_depth, max_frame_count, frame_buffer, count_ptr); + } + + jvmtiError GetAllStackTraces(jint max_frame_count, + jvmtiStackInfo** stack_info_ptr, + jint* thread_count_ptr) { + return functions->GetAllStackTraces(this, max_frame_count, stack_info_ptr, thread_count_ptr); + } + + jvmtiError GetThreadListStackTraces(jint thread_count, + const jthread* thread_list, + jint max_frame_count, + jvmtiStackInfo** stack_info_ptr) { + return functions->GetThreadListStackTraces(this, thread_count, thread_list, max_frame_count, stack_info_ptr); + } + + jvmtiError GetFrameCount(jthread thread, + jint* count_ptr) { + return functions->GetFrameCount(this, thread, count_ptr); + } + + jvmtiError PopFrame(jthread thread) { + return functions->PopFrame(this, thread); + } + + jvmtiError GetFrameLocation(jthread thread, + jint depth, + jmethodID* method_ptr, + jlocation* location_ptr) { + return functions->GetFrameLocation(this, thread, depth, method_ptr, location_ptr); + } + + jvmtiError NotifyFramePop(jthread thread, + jint depth) { + return functions->NotifyFramePop(this, thread, depth); + } + + jvmtiError ForceEarlyReturnObject(jthread thread, + jobject value) { + return functions->ForceEarlyReturnObject(this, thread, value); + } + + jvmtiError ForceEarlyReturnInt(jthread thread, + jint value) { + return functions->ForceEarlyReturnInt(this, thread, value); + } + + jvmtiError ForceEarlyReturnLong(jthread thread, + jlong value) { + return functions->ForceEarlyReturnLong(this, thread, value); + } + + jvmtiError ForceEarlyReturnFloat(jthread thread, + jfloat value) { + return functions->ForceEarlyReturnFloat(this, thread, value); + } + + jvmtiError ForceEarlyReturnDouble(jthread thread, + jdouble value) { + return functions->ForceEarlyReturnDouble(this, thread, value); + } + + jvmtiError ForceEarlyReturnVoid(jthread thread) { + return functions->ForceEarlyReturnVoid(this, thread); + } + + jvmtiError FollowReferences(jint heap_filter, + jclass klass, + jobject initial_object, + const jvmtiHeapCallbacks* callbacks, + const void* user_data) { + return functions->FollowReferences(this, heap_filter, klass, initial_object, callbacks, user_data); + } + + jvmtiError IterateThroughHeap(jint heap_filter, + jclass klass, + const jvmtiHeapCallbacks* callbacks, + const void* user_data) { + return functions->IterateThroughHeap(this, heap_filter, klass, callbacks, user_data); + } + + jvmtiError GetTag(jobject object, + jlong* tag_ptr) { + return functions->GetTag(this, object, tag_ptr); + } + + jvmtiError SetTag(jobject object, + jlong tag) { + return functions->SetTag(this, object, tag); + } + + jvmtiError GetObjectsWithTags(jint tag_count, + const jlong* tags, + jint* count_ptr, + jobject** object_result_ptr, + jlong** tag_result_ptr) { + return functions->GetObjectsWithTags(this, tag_count, tags, count_ptr, object_result_ptr, tag_result_ptr); + } + + jvmtiError ForceGarbageCollection() { + return functions->ForceGarbageCollection(this); + } + + jvmtiError IterateOverObjectsReachableFromObject(jobject object, + jvmtiObjectReferenceCallback object_reference_callback, + const void* user_data) { + return functions->IterateOverObjectsReachableFromObject(this, object, object_reference_callback, user_data); + } + + jvmtiError IterateOverReachableObjects(jvmtiHeapRootCallback heap_root_callback, + jvmtiStackReferenceCallback stack_ref_callback, + jvmtiObjectReferenceCallback object_ref_callback, + const void* user_data) { + return functions->IterateOverReachableObjects(this, heap_root_callback, stack_ref_callback, object_ref_callback, user_data); + } + + jvmtiError IterateOverHeap(jvmtiHeapObjectFilter object_filter, + jvmtiHeapObjectCallback heap_object_callback, + const void* user_data) { + return functions->IterateOverHeap(this, object_filter, heap_object_callback, user_data); + } + + jvmtiError IterateOverInstancesOfClass(jclass klass, + jvmtiHeapObjectFilter object_filter, + jvmtiHeapObjectCallback heap_object_callback, + const void* user_data) { + return functions->IterateOverInstancesOfClass(this, klass, object_filter, heap_object_callback, user_data); + } + + jvmtiError GetLocalObject(jthread thread, + jint depth, + jint slot, + jobject* value_ptr) { + return functions->GetLocalObject(this, thread, depth, slot, value_ptr); + } + + jvmtiError GetLocalInstance(jthread thread, + jint depth, + jobject* value_ptr) { + return functions->GetLocalInstance(this, thread, depth, value_ptr); + } + + jvmtiError GetLocalInt(jthread thread, + jint depth, + jint slot, + jint* value_ptr) { + return functions->GetLocalInt(this, thread, depth, slot, value_ptr); + } + + jvmtiError GetLocalLong(jthread thread, + jint depth, + jint slot, + jlong* value_ptr) { + return functions->GetLocalLong(this, thread, depth, slot, value_ptr); + } + + jvmtiError GetLocalFloat(jthread thread, + jint depth, + jint slot, + jfloat* value_ptr) { + return functions->GetLocalFloat(this, thread, depth, slot, value_ptr); + } + + jvmtiError GetLocalDouble(jthread thread, + jint depth, + jint slot, + jdouble* value_ptr) { + return functions->GetLocalDouble(this, thread, depth, slot, value_ptr); + } + + jvmtiError SetLocalObject(jthread thread, + jint depth, + jint slot, + jobject value) { + return functions->SetLocalObject(this, thread, depth, slot, value); + } + + jvmtiError SetLocalInt(jthread thread, + jint depth, + jint slot, + jint value) { + return functions->SetLocalInt(this, thread, depth, slot, value); + } + + jvmtiError SetLocalLong(jthread thread, + jint depth, + jint slot, + jlong value) { + return functions->SetLocalLong(this, thread, depth, slot, value); + } + + jvmtiError SetLocalFloat(jthread thread, + jint depth, + jint slot, + jfloat value) { + return functions->SetLocalFloat(this, thread, depth, slot, value); + } + + jvmtiError SetLocalDouble(jthread thread, + jint depth, + jint slot, + jdouble value) { + return functions->SetLocalDouble(this, thread, depth, slot, value); + } + + jvmtiError SetBreakpoint(jmethodID method, + jlocation location) { + return functions->SetBreakpoint(this, method, location); + } + + jvmtiError ClearBreakpoint(jmethodID method, + jlocation location) { + return functions->ClearBreakpoint(this, method, location); + } + + jvmtiError SetFieldAccessWatch(jclass klass, + jfieldID field) { + return functions->SetFieldAccessWatch(this, klass, field); + } + + jvmtiError ClearFieldAccessWatch(jclass klass, + jfieldID field) { + return functions->ClearFieldAccessWatch(this, klass, field); + } + + jvmtiError SetFieldModificationWatch(jclass klass, + jfieldID field) { + return functions->SetFieldModificationWatch(this, klass, field); + } + + jvmtiError ClearFieldModificationWatch(jclass klass, + jfieldID field) { + return functions->ClearFieldModificationWatch(this, klass, field); + } + + jvmtiError GetLoadedClasses(jint* class_count_ptr, + jclass** classes_ptr) { + return functions->GetLoadedClasses(this, class_count_ptr, classes_ptr); + } + + jvmtiError GetClassLoaderClasses(jobject initiating_loader, + jint* class_count_ptr, + jclass** classes_ptr) { + return functions->GetClassLoaderClasses(this, initiating_loader, class_count_ptr, classes_ptr); + } + + jvmtiError GetClassSignature(jclass klass, + char** signature_ptr, + char** generic_ptr) { + return functions->GetClassSignature(this, klass, signature_ptr, generic_ptr); + } + + jvmtiError GetClassStatus(jclass klass, + jint* status_ptr) { + return functions->GetClassStatus(this, klass, status_ptr); + } + + jvmtiError GetSourceFileName(jclass klass, + char** source_name_ptr) { + return functions->GetSourceFileName(this, klass, source_name_ptr); + } + + jvmtiError GetClassModifiers(jclass klass, + jint* modifiers_ptr) { + return functions->GetClassModifiers(this, klass, modifiers_ptr); + } + + jvmtiError GetClassMethods(jclass klass, + jint* method_count_ptr, + jmethodID** methods_ptr) { + return functions->GetClassMethods(this, klass, method_count_ptr, methods_ptr); + } + + jvmtiError GetClassFields(jclass klass, + jint* field_count_ptr, + jfieldID** fields_ptr) { + return functions->GetClassFields(this, klass, field_count_ptr, fields_ptr); + } + + jvmtiError GetImplementedInterfaces(jclass klass, + jint* interface_count_ptr, + jclass** interfaces_ptr) { + return functions->GetImplementedInterfaces(this, klass, interface_count_ptr, interfaces_ptr); + } + + jvmtiError GetClassVersionNumbers(jclass klass, + jint* minor_version_ptr, + jint* major_version_ptr) { + return functions->GetClassVersionNumbers(this, klass, minor_version_ptr, major_version_ptr); + } + + jvmtiError GetConstantPool(jclass klass, + jint* constant_pool_count_ptr, + jint* constant_pool_byte_count_ptr, + unsigned char** constant_pool_bytes_ptr) { + return functions->GetConstantPool(this, klass, constant_pool_count_ptr, constant_pool_byte_count_ptr, constant_pool_bytes_ptr); + } + + jvmtiError IsInterface(jclass klass, + jboolean* is_interface_ptr) { + return functions->IsInterface(this, klass, is_interface_ptr); + } + + jvmtiError IsArrayClass(jclass klass, + jboolean* is_array_class_ptr) { + return functions->IsArrayClass(this, klass, is_array_class_ptr); + } + + jvmtiError IsModifiableClass(jclass klass, + jboolean* is_modifiable_class_ptr) { + return functions->IsModifiableClass(this, klass, is_modifiable_class_ptr); + } + + jvmtiError GetClassLoader(jclass klass, + jobject* classloader_ptr) { + return functions->GetClassLoader(this, klass, classloader_ptr); + } + + jvmtiError GetSourceDebugExtension(jclass klass, + char** source_debug_extension_ptr) { + return functions->GetSourceDebugExtension(this, klass, source_debug_extension_ptr); + } + + jvmtiError RetransformClasses(jint class_count, + const jclass* classes) { + return functions->RetransformClasses(this, class_count, classes); + } + + jvmtiError RedefineClasses(jint class_count, + const jvmtiClassDefinition* class_definitions) { + return functions->RedefineClasses(this, class_count, class_definitions); + } + + jvmtiError GetObjectSize(jobject object, + jlong* size_ptr) { + return functions->GetObjectSize(this, object, size_ptr); + } + + jvmtiError GetObjectHashCode(jobject object, + jint* hash_code_ptr) { + return functions->GetObjectHashCode(this, object, hash_code_ptr); + } + + jvmtiError GetObjectMonitorUsage(jobject object, + jvmtiMonitorUsage* info_ptr) { + return functions->GetObjectMonitorUsage(this, object, info_ptr); + } + + jvmtiError GetFieldName(jclass klass, + jfieldID field, + char** name_ptr, + char** signature_ptr, + char** generic_ptr) { + return functions->GetFieldName(this, klass, field, name_ptr, signature_ptr, generic_ptr); + } + + jvmtiError GetFieldDeclaringClass(jclass klass, + jfieldID field, + jclass* declaring_class_ptr) { + return functions->GetFieldDeclaringClass(this, klass, field, declaring_class_ptr); + } + + jvmtiError GetFieldModifiers(jclass klass, + jfieldID field, + jint* modifiers_ptr) { + return functions->GetFieldModifiers(this, klass, field, modifiers_ptr); + } + + jvmtiError IsFieldSynthetic(jclass klass, + jfieldID field, + jboolean* is_synthetic_ptr) { + return functions->IsFieldSynthetic(this, klass, field, is_synthetic_ptr); + } + + jvmtiError GetMethodName(jmethodID method, + char** name_ptr, + char** signature_ptr, + char** generic_ptr) { + return functions->GetMethodName(this, method, name_ptr, signature_ptr, generic_ptr); + } + + jvmtiError GetMethodDeclaringClass(jmethodID method, + jclass* declaring_class_ptr) { + return functions->GetMethodDeclaringClass(this, method, declaring_class_ptr); + } + + jvmtiError GetMethodModifiers(jmethodID method, + jint* modifiers_ptr) { + return functions->GetMethodModifiers(this, method, modifiers_ptr); + } + + jvmtiError GetMaxLocals(jmethodID method, + jint* max_ptr) { + return functions->GetMaxLocals(this, method, max_ptr); + } + + jvmtiError GetArgumentsSize(jmethodID method, + jint* size_ptr) { + return functions->GetArgumentsSize(this, method, size_ptr); + } + + jvmtiError GetLineNumberTable(jmethodID method, + jint* entry_count_ptr, + jvmtiLineNumberEntry** table_ptr) { + return functions->GetLineNumberTable(this, method, entry_count_ptr, table_ptr); + } + + jvmtiError GetMethodLocation(jmethodID method, + jlocation* start_location_ptr, + jlocation* end_location_ptr) { + return functions->GetMethodLocation(this, method, start_location_ptr, end_location_ptr); + } + + jvmtiError GetLocalVariableTable(jmethodID method, + jint* entry_count_ptr, + jvmtiLocalVariableEntry** table_ptr) { + return functions->GetLocalVariableTable(this, method, entry_count_ptr, table_ptr); + } + + jvmtiError GetBytecodes(jmethodID method, + jint* bytecode_count_ptr, + unsigned char** bytecodes_ptr) { + return functions->GetBytecodes(this, method, bytecode_count_ptr, bytecodes_ptr); + } + + jvmtiError IsMethodNative(jmethodID method, + jboolean* is_native_ptr) { + return functions->IsMethodNative(this, method, is_native_ptr); + } + + jvmtiError IsMethodSynthetic(jmethodID method, + jboolean* is_synthetic_ptr) { + return functions->IsMethodSynthetic(this, method, is_synthetic_ptr); + } + + jvmtiError IsMethodObsolete(jmethodID method, + jboolean* is_obsolete_ptr) { + return functions->IsMethodObsolete(this, method, is_obsolete_ptr); + } + + jvmtiError SetNativeMethodPrefix(const char* prefix) { + return functions->SetNativeMethodPrefix(this, prefix); + } + + jvmtiError SetNativeMethodPrefixes(jint prefix_count, + char** prefixes) { + return functions->SetNativeMethodPrefixes(this, prefix_count, prefixes); + } + + jvmtiError CreateRawMonitor(const char* name, + jrawMonitorID* monitor_ptr) { + return functions->CreateRawMonitor(this, name, monitor_ptr); + } + + jvmtiError DestroyRawMonitor(jrawMonitorID monitor) { + return functions->DestroyRawMonitor(this, monitor); + } + + jvmtiError RawMonitorEnter(jrawMonitorID monitor) { + return functions->RawMonitorEnter(this, monitor); + } + + jvmtiError RawMonitorExit(jrawMonitorID monitor) { + return functions->RawMonitorExit(this, monitor); + } + + jvmtiError RawMonitorWait(jrawMonitorID monitor, + jlong millis) { + return functions->RawMonitorWait(this, monitor, millis); + } + + jvmtiError RawMonitorNotify(jrawMonitorID monitor) { + return functions->RawMonitorNotify(this, monitor); + } + + jvmtiError RawMonitorNotifyAll(jrawMonitorID monitor) { + return functions->RawMonitorNotifyAll(this, monitor); + } + + jvmtiError SetJNIFunctionTable(const jniNativeInterface* function_table) { + return functions->SetJNIFunctionTable(this, function_table); + } + + jvmtiError GetJNIFunctionTable(jniNativeInterface** function_table) { + return functions->GetJNIFunctionTable(this, function_table); + } + + jvmtiError SetEventCallbacks(const jvmtiEventCallbacks* callbacks, + jint size_of_callbacks) { + return functions->SetEventCallbacks(this, callbacks, size_of_callbacks); + } + + jvmtiError SetEventNotificationMode(jvmtiEventMode mode, + jvmtiEvent event_type, + jthread event_thread, + ...) { + return functions->SetEventNotificationMode(this, mode, event_type, event_thread); + } + + jvmtiError GenerateEvents(jvmtiEvent event_type) { + return functions->GenerateEvents(this, event_type); + } + + jvmtiError GetExtensionFunctions(jint* extension_count_ptr, + jvmtiExtensionFunctionInfo** extensions) { + return functions->GetExtensionFunctions(this, extension_count_ptr, extensions); + } + + jvmtiError GetExtensionEvents(jint* extension_count_ptr, + jvmtiExtensionEventInfo** extensions) { + return functions->GetExtensionEvents(this, extension_count_ptr, extensions); + } + + jvmtiError SetExtensionEventCallback(jint extension_event_index, + jvmtiExtensionEvent callback) { + return functions->SetExtensionEventCallback(this, extension_event_index, callback); + } + + jvmtiError GetPotentialCapabilities(jvmtiCapabilities* capabilities_ptr) { + return functions->GetPotentialCapabilities(this, capabilities_ptr); + } + + jvmtiError AddCapabilities(const jvmtiCapabilities* capabilities_ptr) { + return functions->AddCapabilities(this, capabilities_ptr); + } + + jvmtiError RelinquishCapabilities(const jvmtiCapabilities* capabilities_ptr) { + return functions->RelinquishCapabilities(this, capabilities_ptr); + } + + jvmtiError GetCapabilities(jvmtiCapabilities* capabilities_ptr) { + return functions->GetCapabilities(this, capabilities_ptr); + } + + jvmtiError GetCurrentThreadCpuTimerInfo(jvmtiTimerInfo* info_ptr) { + return functions->GetCurrentThreadCpuTimerInfo(this, info_ptr); + } + + jvmtiError GetCurrentThreadCpuTime(jlong* nanos_ptr) { + return functions->GetCurrentThreadCpuTime(this, nanos_ptr); + } + + jvmtiError GetThreadCpuTimerInfo(jvmtiTimerInfo* info_ptr) { + return functions->GetThreadCpuTimerInfo(this, info_ptr); + } + + jvmtiError GetThreadCpuTime(jthread thread, + jlong* nanos_ptr) { + return functions->GetThreadCpuTime(this, thread, nanos_ptr); + } + + jvmtiError GetTimerInfo(jvmtiTimerInfo* info_ptr) { + return functions->GetTimerInfo(this, info_ptr); + } + + jvmtiError GetTime(jlong* nanos_ptr) { + return functions->GetTime(this, nanos_ptr); + } + + jvmtiError GetAvailableProcessors(jint* processor_count_ptr) { + return functions->GetAvailableProcessors(this, processor_count_ptr); + } + + jvmtiError AddToBootstrapClassLoaderSearch(const char* segment) { + return functions->AddToBootstrapClassLoaderSearch(this, segment); + } + + jvmtiError AddToSystemClassLoaderSearch(const char* segment) { + return functions->AddToSystemClassLoaderSearch(this, segment); + } + + jvmtiError GetSystemProperties(jint* count_ptr, + char*** property_ptr) { + return functions->GetSystemProperties(this, count_ptr, property_ptr); + } + + jvmtiError GetSystemProperty(const char* property, + char** value_ptr) { + return functions->GetSystemProperty(this, property, value_ptr); + } + + jvmtiError SetSystemProperty(const char* property, + const char* value) { + return functions->SetSystemProperty(this, property, value); + } + + jvmtiError GetPhase(jvmtiPhase* phase_ptr) { + return functions->GetPhase(this, phase_ptr); + } + + jvmtiError DisposeEnvironment() { + return functions->DisposeEnvironment(this); + } + + jvmtiError SetEnvironmentLocalStorage(const void* data) { + return functions->SetEnvironmentLocalStorage(this, data); + } + + jvmtiError GetEnvironmentLocalStorage(void** data_ptr) { + return functions->GetEnvironmentLocalStorage(this, data_ptr); + } + + jvmtiError GetVersionNumber(jint* version_ptr) { + return functions->GetVersionNumber(this, version_ptr); + } + + jvmtiError GetErrorName(jvmtiError error, + char** name_ptr) { + return functions->GetErrorName(this, error, name_ptr); + } + + jvmtiError SetVerboseFlag(jvmtiVerboseFlag flag, + jboolean value) { + return functions->SetVerboseFlag(this, flag, value); + } + + jvmtiError GetJLocationFormat(jvmtiJlocationFormat* format_ptr) { + return functions->GetJLocationFormat(this, format_ptr); + } + +#endif /* __cplusplus */ +}; + + +#ifdef __cplusplus +} /* extern "C" */ +#endif /* __cplusplus */ + +#endif /* !_JAVA_JVMTI_H_ */ + diff --git a/HelloSerial4j/datasheets/Jni Docs/Jni Include files (for reference only)/jvmticmlr.h b/HelloSerial4j/datasheets/Jni Docs/Jni Include files (for reference only)/jvmticmlr.h new file mode 100644 index 00000000..a9c88f36 --- /dev/null +++ b/HelloSerial4j/datasheets/Jni Docs/Jni Include files (for reference only)/jvmticmlr.h @@ -0,0 +1,115 @@ +/* + * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + */ + +/* + * This header file defines the data structures sent by the VM + * through the JVMTI CompiledMethodLoad callback function via the + * "void * compile_info" parameter. The memory pointed to by the + * compile_info parameter may not be referenced after returning from + * the CompiledMethodLoad callback. These are VM implementation + * specific data structures that may evolve in future releases. A + * JVMTI agent should interpret a non-NULL compile_info as a pointer + * to a region of memory containing a list of records. In a typical + * usage scenario, a JVMTI agent would cast each record to a + * jvmtiCompiledMethodLoadRecordHeader, a struct that represents + * arbitrary information. This struct contains a kind field to indicate + * the kind of information being passed, and a pointer to the next + * record. If the kind field indicates inlining information, then the + * agent would cast the record to a jvmtiCompiledMethodLoadInlineRecord. + * This record contains an array of PCStackInfo structs, which indicate + * for every pc address what are the methods on the invocation stack. + * The "methods" and "bcis" fields in each PCStackInfo struct specify a + * 1-1 mapping between these inlined methods and their bytecode indices. + * This can be used to derive the proper source lines of the inlined + * methods. + */ + +#ifndef _JVMTI_CMLR_H_ +#define _JVMTI_CMLR_H_ + +enum { + JVMTI_CMLR_MAJOR_VERSION_1 = 0x00000001, + JVMTI_CMLR_MINOR_VERSION_0 = 0x00000000, + + JVMTI_CMLR_MAJOR_VERSION = 0x00000001, + JVMTI_CMLR_MINOR_VERSION = 0x00000000 + + /* + * This comment is for the "JDK import from HotSpot" sanity check: + * version: 1.0.0 + */ +}; + +typedef enum { + JVMTI_CMLR_DUMMY = 1, + JVMTI_CMLR_INLINE_INFO = 2 +} jvmtiCMLRKind; + +/* + * Record that represents arbitrary information passed through JVMTI + * CompiledMethodLoadEvent void pointer. + */ +typedef struct _jvmtiCompiledMethodLoadRecordHeader { + jvmtiCMLRKind kind; /* id for the kind of info passed in the record */ + jint majorinfoversion; /* major and minor info version values. Init'ed */ + jint minorinfoversion; /* to current version value in jvmtiExport.cpp. */ + + struct _jvmtiCompiledMethodLoadRecordHeader* next; +} jvmtiCompiledMethodLoadRecordHeader; + +/* + * Record that gives information about the methods on the compile-time + * stack at a specific pc address of a compiled method. Each element in + * the methods array maps to same element in the bcis array. + */ +typedef struct _PCStackInfo { + void* pc; /* the pc address for this compiled method */ + jint numstackframes; /* number of methods on the stack */ + jmethodID* methods; /* array of numstackframes method ids */ + jint* bcis; /* array of numstackframes bytecode indices */ +} PCStackInfo; + +/* + * Record that contains inlining information for each pc address of + * an nmethod. + */ +typedef struct _jvmtiCompiledMethodLoadInlineRecord { + jvmtiCompiledMethodLoadRecordHeader header; /* common header for casting */ + jint numpcs; /* number of pc descriptors in this nmethod */ + PCStackInfo* pcinfo; /* array of numpcs pc descriptors */ +} jvmtiCompiledMethodLoadInlineRecord; + +/* + * Dummy record used to test that we can pass records with different + * information through the void pointer provided that they can be cast + * to a jvmtiCompiledMethodLoadRecordHeader. + */ + +typedef struct _jvmtiCompiledMethodLoadDummyRecord { + jvmtiCompiledMethodLoadRecordHeader header; /* common header for casting */ + char message[50]; +} jvmtiCompiledMethodLoadDummyRecord; + +#endif diff --git a/HelloSerial4j/datasheets/Jni Docs/Jni Include files (for reference only)/linux/jawt_md.h b/HelloSerial4j/datasheets/Jni Docs/Jni Include files (for reference only)/linux/jawt_md.h new file mode 100644 index 00000000..825142ca --- /dev/null +++ b/HelloSerial4j/datasheets/Jni Docs/Jni Include files (for reference only)/linux/jawt_md.h @@ -0,0 +1,61 @@ +/* + * Copyright (c) 1999, 2001, Oracle and/or its affiliates. All rights reserved. + * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + */ + +#ifndef _JAVASOFT_JAWT_MD_H_ +#define _JAVASOFT_JAWT_MD_H_ + +#include +#include +#include +#include "jawt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * X11-specific declarations for AWT native interface. + * See notes in jawt.h for an example of use. + */ +typedef struct jawt_X11DrawingSurfaceInfo { + Drawable drawable; + Display* display; + VisualID visualID; + Colormap colormapID; + int depth; + /* + * Since 1.4 + * Returns a pixel value from a set of RGB values. + * This is useful for paletted color (256 color) modes. + */ + int (JNICALL *GetAWTColor)(JAWT_DrawingSurface* ds, + int r, int g, int b); +} JAWT_X11DrawingSurfaceInfo; + +#ifdef __cplusplus +} +#endif + +#endif /* !_JAVASOFT_JAWT_MD_H_ */ diff --git a/HelloSerial4j/datasheets/Jni Docs/Jni Include files (for reference only)/linux/jni_md.h b/HelloSerial4j/datasheets/Jni Docs/Jni Include files (for reference only)/linux/jni_md.h new file mode 100644 index 00000000..ff30a32c --- /dev/null +++ b/HelloSerial4j/datasheets/Jni Docs/Jni Include files (for reference only)/linux/jni_md.h @@ -0,0 +1,51 @@ +/* + * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved. + * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + */ + +#ifndef _JAVASOFT_JNI_MD_H_ +#define _JAVASOFT_JNI_MD_H_ + +#ifndef __has_attribute + #define __has_attribute(x) 0 +#endif +#if (defined(__GNUC__) && ((__GNUC__ > 4) || (__GNUC__ == 4) && (__GNUC_MINOR__ > 2))) || __has_attribute(visibility) + #define JNIEXPORT __attribute__((visibility("default"))) + #define JNIIMPORT __attribute__((visibility("default"))) +#else + #define JNIEXPORT + #define JNIIMPORT +#endif + +#define JNICALL + +typedef int jint; +#ifdef _LP64 /* 64-bit Solaris */ +typedef long jlong; +#else +typedef long long jlong; +#endif + +typedef signed char jbyte; + +#endif /* !_JAVASOFT_JNI_MD_H_ */ diff --git a/HelloSerial4j/datasheets/POSIX File Handling/Advanced File Handling POSIX Systems.pdf b/HelloSerial4j/datasheets/POSIX File Handling/Advanced File Handling POSIX Systems.pdf new file mode 100644 index 00000000..f924415d Binary files /dev/null and b/HelloSerial4j/datasheets/POSIX File Handling/Advanced File Handling POSIX Systems.pdf differ diff --git a/HelloSerial4j/datasheets/POSIX File Handling/File Handling POSIX Systems.pdf b/HelloSerial4j/datasheets/POSIX File Handling/File Handling POSIX Systems.pdf new file mode 100644 index 00000000..e411a23e Binary files /dev/null and b/HelloSerial4j/datasheets/POSIX File Handling/File Handling POSIX Systems.pdf differ diff --git a/HelloSerial4j/datasheets/POSIX Terminal Control/UNIX Terminal Control.pdf b/HelloSerial4j/datasheets/POSIX Terminal Control/UNIX Terminal Control.pdf new file mode 100644 index 00000000..9b70dadc Binary files /dev/null and b/HelloSerial4j/datasheets/POSIX Terminal Control/UNIX Terminal Control.pdf differ diff --git a/HelloSerial4j/output/run/run.sh b/HelloSerial4j/output/run/run.sh new file mode 100755 index 00000000..e95c46fb --- /dev/null +++ b/HelloSerial4j/output/run/run.sh @@ -0,0 +1,11 @@ +source script.sh +echo -e "$ORANGE_C...................................It's Ccoffee time..................................." +echo -e $RESET_Cs +echo -e $WHITE_C +echo "........................................................................................................." + + +run + +echo -e $RESET_Cs + diff --git a/HelloSerial4j/output/run/script.sh b/HelloSerial4j/output/run/script.sh new file mode 100644 index 00000000..44a78455 --- /dev/null +++ b/HelloSerial4j/output/run/script.sh @@ -0,0 +1,12 @@ +#** +#* Ccoffee Build tool, manual build, alpha-v1. +#* +#* @author pavl_g. +#*# + +source variables.sh + +function run() { + cd $project_root'/output/'$jar_folder + $java --enable-preview -jar 'serial4j.jar' +} diff --git a/HelloSerial4j/output/run/variables.sh b/HelloSerial4j/output/run/variables.sh new file mode 100644 index 00000000..7dc0bade --- /dev/null +++ b/HelloSerial4j/output/run/variables.sh @@ -0,0 +1,19 @@ +#** +#* Ccoffee Build tool, manual build, alpha-v1. +#* +#* @author pavl_g. +#*# + +# 1) print the current working directory to a string value +run_dir=`pwd` +# cut the working directory from its end by a one '/' delimiter +output_dir="${run_dir%/*}" +# cut the working directory from its end by a one '/' delimiter again +project_root="${output_dir%/*}" + +# include the JAVAHOME +source $project_root'/JAVAHOME.sh' +source $project_root'/CommonVariables.sh' +source $project_root'/build/assemble/variables.sh' + +java=$JAVA__HOME'/java' diff --git a/HelloSerial4j/output/serial4j/android-natives-21.jar b/HelloSerial4j/output/serial4j/android-natives-21.jar new file mode 100644 index 00000000..15cb0ecb Binary files /dev/null and b/HelloSerial4j/output/serial4j/android-natives-21.jar differ diff --git a/HelloSerial4j/output/serial4j/libserial4j.so b/HelloSerial4j/output/serial4j/libserial4j.so new file mode 100644 index 00000000..c82844dd Binary files /dev/null and b/HelloSerial4j/output/serial4j/libserial4j.so differ diff --git a/HelloSerial4j/output/serial4j/serial4j-0.3A-javadoc.jar b/HelloSerial4j/output/serial4j/serial4j-0.3A-javadoc.jar new file mode 100644 index 00000000..5c0fde18 Binary files /dev/null and b/HelloSerial4j/output/serial4j/serial4j-0.3A-javadoc.jar differ diff --git a/HelloSerial4j/output/serial4j/serial4j.jar b/HelloSerial4j/output/serial4j/serial4j.jar new file mode 100644 index 00000000..cdc0e92a Binary files /dev/null and b/HelloSerial4j/output/serial4j/serial4j.jar differ diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/allclasses-index.html b/HelloSerial4j/serial4j-0.3A-javadoc/allclasses-index.html new file mode 100644 index 00000000..f8967082 --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/allclasses-index.html @@ -0,0 +1,247 @@ + + + + +All Classes and Interfaces + + + + + + + + + + + + + + + +
+ +
+
+
+

All Classes and Interfaces

+
+
+
+
+
+
Class
+
Description
+ +
 
+ +
+
Represents codes for the POSIX Systems baud rates and their real values + defined from invalid input: '<'./usr/include/x86_64-linux-gnu/bits/termios.h>.
+
+ +
 
+ +
+
Represents the serial entity status listener.
+
+ +
+
Interprets the native methods bad return values into error codes, + used by the java ErrnoToException + to throw exceptions against the JRE.
+
+ +
+
Reflects C native errnos into real java exceptions.
+
+ +
 
+ +
 
+ +
 
+ +
 
+ +
+
An example for Serial4j showing Native terminal control and + native file io on a serial port using a java binding to invalid input: '<'fcntl.h> and invalid input: '<'unistd.h> read (...) and write (...).
+
+ +
+
An example showing serial and terminal io using java.io API.
+
+ +
+
Represents an example for UART using jSerialComm.
+
+ +
 
+ +
 
+ +
 
+ +
 
+ +
+
Starts the applications test cases.
+
+ +
 
+ +
+
Helper utility for loading native images.
+
+ +
+
Represents an image domain.
+
+ +
+
A state for a critical section.
+
+ +
+
Represents the native java binding for Serial4j API, represented by + [com_serial4j_core_serial_NativeTerminalDevice.h] natively.
+
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
+
Implements an operation failed exception with error code [EOPERATION_FAILED] or [-1].
+
+ +
+
Implements a permission exception for error code [EACCESS] or [13] as defined by invalid input: '<'errno.h>.
+
+ +
+
Provides Unix file system permissions for the specified serial port + of the terminal device.
+
+ +
+
Provides a Unix terminal read configuration for the specified serial port of the + terminal device.
+
+ +
 
+ +
+
A thread synchronizer utility using mutex data states.
+
+ +
 
+ +
+
Listens to Serial Monitor entities +
+invalid @link +
serial.entity.impl.SerialReadEntity
+
+ and +
+invalid @link +
serial.entity.impl.SerialWriteEntity
+
+.
+
+ +
+
Monitors the UART Data Port using SerialReadEntity for serial data read and SerialWriteEntity for serial + data write.
+
+ +
+
Represents the base implementation for serial monitor Read and Write entities.
+
+ +
+
Raised whenever the user tries to access the serial monitor without opening the port.
+
+ +
+
Represents a Unix terminal device port properties wrapper.
+
+ +
+
Represents a Read entity for the SerialMonitor.
+
+ +
+
Defines an abstract entity for the serial throwable exceptions.
+
+ +
+
Represents a serial write data entity for the SerialMonitor.
+
+ +
 
+ +
+
The main entry class for the native terminal device for Serial4j api.
+
+ +
+
Represents the base implementation for the termios.h terminal flags values.
+
+ +
+
Provides Unix [c_iflag] termios bits.
+
+ +
 
+ +
 
+ +
 
+ +
 
+ +
+
Represents a serial write capsule for the SerialWriteEntity.
+
+
+
+
+
+
+
+ + diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/allpackages-index.html b/HelloSerial4j/serial4j-0.3A-javadoc/allpackages-index.html new file mode 100644 index 00000000..a7020beb --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/allpackages-index.html @@ -0,0 +1,103 @@ + + + + +All Packages + + + + + + + + + + + + + + + +
+ +
+
+
+

All Packages

+
+
Package Summary
+
+
Package
+
Description
+ +
+
Provides a native errno to java exception converter ErrnoToException and Errno for + native errno interpretation.
+
+ +
+
Provides a Serial UART Monitor API using Serial4j with 2 monitor entities, SerialReadEntity + and SerialWriteEntity.
+
+ +
 
+ +
+
Provides R/W serial monitor entities with a subscriber pattern.
+
+ +
+
An implementation code for +
+invalid @link +
serial.entity.SerialMonitorEntity
+
+ providing both read and + write serial monitor entities.
+
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+
+
+
+
+ + diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/errno/Errno.html b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/errno/Errno.html new file mode 100644 index 00000000..5051444f --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/errno/Errno.html @@ -0,0 +1,429 @@ + + + + +Errno + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Enum Class Errno

+
+
java.lang.Object +
java.lang.Enum<Errno> +
com.serial4j.core.errno.Errno
+
+
+
+
+
All Implemented Interfaces:
+
Serializable, Comparable<Errno>, Constable
+
+
+
public enum Errno +extends Enum<Errno>
+
Interprets the native methods bad return values into error codes, + used by the java ErrnoToException + to throw exceptions against the JRE.
+
+
+ +
+
+
    + +
  • +
    +

    Enum Constant Details

    +
      +
    • +
      +

      ERR_INVALID_PORT

      +
      public static final Errno ERR_INVALID_PORT
      +
      Serial4j business errors.
      +
      +
    • +
    • +
      +

      ERR_OPERATION_FAILED

      +
      public static final Errno ERR_OPERATION_FAILED
      +
      +
    • +
    • +
      +

      ERR_NO_AVAILABLE_TTY_DEVICES

      +
      public static final Errno ERR_NO_AVAILABLE_TTY_DEVICES
      +
      +
    • +
    • +
      +

      EACCES

      +
      public static final Errno EACCES
      +
      Error codes for open(const char*, int), file names and IO.
      +
      +
    • +
    • +
      +

      EEXIST

      +
      public static final Errno EEXIST
      +
      +
    • +
    • +
      +

      EINTR

      +
      public static final Errno EINTR
      +
      +
    • +
    • +
      +

      EISDIR

      +
      public static final Errno EISDIR
      +
      +
    • +
    • +
      +

      EMFILE

      +
      public static final Errno EMFILE
      +
      +
    • +
    • +
      +

      ENFILE

      +
      public static final Errno ENFILE
      +
      +
    • +
    • +
      +

      ENOENT

      +
      public static final Errno ENOENT
      +
      +
    • +
    • +
      +

      ENOSPC

      +
      public static final Errno ENOSPC
      +
      +
    • +
    • +
      +

      ENXIO

      +
      public static final Errno ENXIO
      +
      +
    • +
    • +
      +

      EROFS

      +
      public static final Errno EROFS
      +
      +
    • +
    • +
      +

      EPIPE

      +
      public static final Errno EPIPE
      +
      +
    • +
    • +
      +

      EBADF

      +
      public static final Errno EBADF
      +
      Error codes for tcgetattr(int, struct termios*) and tcsetattr(int, struct termios*).
      +
      +
    • +
    • +
      +

      ENOTTY

      +
      public static final Errno ENOTTY
      +
      +
    • +
    • +
      +

      EINVAL

      +
      public static final Errno EINVAL
      +
      tcsetattr(int, struct termios*) only.
      +
      +
    • +
    • +
      +

      EAGAIN

      +
      public static final Errno EAGAIN
      +
      Additional error codes for basic R/W from invalid input: '<'fcntl.h>
      +
      +
    • +
    • +
      +

      EIO

      +
      public static final Errno EIO
      +
      +
    • +
    • +
      +

      EFBIG

      +
      public static final Errno EFBIG
      +
      For write(int, void*, int); only.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      values

      +
      public static Errno[] values()
      +
      Returns an array containing the constants of this enum class, in +the order they are declared.
      +
      +
      Returns:
      +
      an array containing the constants of this enum class, in the order they are declared
      +
      +
      +
    • +
    • +
      +

      valueOf

      +
      public static Errno valueOf(String name)
      +
      Returns the enum constant of this class with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this class. (Extraneous whitespace characters are +not permitted.)
      +
      +
      Parameters:
      +
      name - the name of the enum constant to be returned.
      +
      Returns:
      +
      the enum constant with the specified name
      +
      Throws:
      +
      IllegalArgumentException - if this enum class has no constant with the specified name
      +
      NullPointerException - if the argument is null
      +
      +
      +
    • +
    • +
      +

      getValue

      +
      public int getValue()
      +
      Gets the native error code of the Err.
      +
      +
      Returns:
      +
      an integer reference to the error code.
      +
      +
      +
    • +
    • +
      +

      getDescription

      +
      public String getDescription()
      +
      Gets the native error code descritption.
      +
      +
      Returns:
      +
      the error code description in String format.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/errno/ErrnoToException.html b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/errno/ErrnoToException.html new file mode 100644 index 00000000..c7c3a7ad --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/errno/ErrnoToException.html @@ -0,0 +1,164 @@ + + + + +ErrnoToException + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class ErrnoToException

+
+
java.lang.Object +
com.serial4j.core.errno.ErrnoToException
+
+
+
+
public final class ErrnoToException +extends Object
+
Reflects C native errnos into real java exceptions.
+
+
+ +
+
+ +
+ +
+
+
+ + diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/errno/NativeErrno.html b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/errno/NativeErrno.html new file mode 100644 index 00000000..f083d78e --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/errno/NativeErrno.html @@ -0,0 +1,317 @@ + + + + +NativeErrno + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class NativeErrno

+
+
java.lang.Object +
com.serial4j.core.errno.NativeErrno
+
+
+
+
public final class NativeErrno +extends Object
+
+
+ +
+
+
    + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getBadFileDescriptorErrno

      +
      protected static int getBadFileDescriptorErrno()
      +
      +
    • +
    • +
      +

      getBrokenPipeErrno

      +
      protected static int getBrokenPipeErrno()
      +
      +
    • +
    • +
      +

      getFileAlreadyOpenedErrno

      +
      protected static int getFileAlreadyOpenedErrno()
      +
      +
    • +
    • +
      +

      getFileIsDirectoryErrno

      +
      protected static int getFileIsDirectoryErrno()
      +
      +
    • +
    • +
      +

      getFileTableOverflowErrno

      +
      protected static int getFileTableOverflowErrno()
      +
      +
    • +
    • +
      +

      getFileTooLargeErrno

      +
      protected static int getFileTooLargeErrno()
      +
      +
    • +
    • +
      +

      getInputOutputErrno

      +
      protected static int getInputOutputErrno()
      +
      +
    • +
    • +
      +

      getInterruptedSystemCallErrno

      +
      protected static int getInterruptedSystemCallErrno()
      +
      +
    • +
    • +
      +

      getInvalidArgumentErrno

      +
      protected static int getInvalidArgumentErrno()
      +
      +
    • +
    • +
      +

      getInvalidPortErrno

      +
      protected static int getInvalidPortErrno()
      +
      +
    • +
    • +
      +

      getNoAvailableTtyDevicesErrno

      +
      protected static int getNoAvailableTtyDevicesErrno()
      +
      +
    • +
    • +
      +

      getNoSpaceLeftErrno

      +
      protected static int getNoSpaceLeftErrno()
      +
      +
    • +
    • +
      +

      getNoSuchDeviceErrno

      +
      protected static int getNoSuchDeviceErrno()
      +
      +
    • +
    • +
      +

      getNoSuchFileErrno

      +
      protected static int getNoSuchFileErrno()
      +
      +
    • +
    • +
      +

      getNotTtyDeviceErrno

      +
      protected static int getNotTtyDeviceErrno()
      +
      +
    • +
    • +
      +

      getOperationFailedErrno

      +
      protected static int getOperationFailedErrno()
      +
      +
    • +
    • +
      +

      getPermissionDeniedErrno

      +
      protected static int getPermissionDeniedErrno()
      +
      +
    • +
    • +
      +

      getReadOnlyFileSystemErrno

      +
      protected static int getReadOnlyFileSystemErrno()
      +
      +
    • +
    • +
      +

      getTooManyOpenedFilesErrno

      +
      protected static int getTooManyOpenedFilesErrno()
      +
      +
    • +
    • +
      +

      getTryAgainErrno

      +
      protected static int getTryAgainErrno()
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/errno/package-summary.html b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/errno/package-summary.html new file mode 100644 index 00000000..b78e6b64 --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/errno/package-summary.html @@ -0,0 +1,108 @@ + + + + +com.serial4j.core.errno + + + + + + + + + + + + + + + +
+ +
+
+
+

Package com.serial4j.core.errno

+
+
+
package com.serial4j.core.errno
+
+
Provides a native errno to java exception converter ErrnoToException and Errno for + native errno interpretation.
+
+
+
    +
  • +
    +
    +
    +
    +
    Class
    +
    Description
    + +
    +
    Interprets the native methods bad return values into error codes, + used by the java ErrnoToException + to throw exceptions against the JRE.
    +
    + +
    +
    Reflects C native errnos into real java exceptions.
    +
    + +
     
    +
    +
    +
    +
  • +
+
+
+
+
+ + diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/errno/package-tree.html b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/errno/package-tree.html new file mode 100644 index 00000000..ea60866e --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/errno/package-tree.html @@ -0,0 +1,87 @@ + + + + +com.serial4j.core.errno Class Hierarchy + + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package com.serial4j.core.errno

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+
+

Enum Class Hierarchy

+ +
+
+
+
+ + diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/BaudRate.html b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/BaudRate.html new file mode 100644 index 00000000..2e7de14d --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/BaudRate.html @@ -0,0 +1,513 @@ + + + + +BaudRate + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Enum Class BaudRate

+
+
java.lang.Object +
java.lang.Enum<BaudRate> +
com.serial4j.core.serial.BaudRate
+
+
+
+
+
All Implemented Interfaces:
+
Serializable, Comparable<BaudRate>, Constable
+
+
+
public enum BaudRate +extends Enum<BaudRate>
+
Represents codes for the POSIX Systems baud rates and their real values + defined from invalid input: '<'./usr/include/x86_64-linux-gnu/bits/termios.h>.
+
+
+ +
+
+
    + +
  • +
    +

    Enum Constant Details

    +
      +
    • +
      +

      B0

      +
      public static final BaudRate B0
      +
      Baudrates for POSIX systems as defined by invalid input: '<'termios.h>
      +
      +
    • +
    • +
      +

      B50

      +
      public static final BaudRate B50
      +
      +
    • +
    • +
      +

      B75

      +
      public static final BaudRate B75
      +
      +
    • +
    • +
      +

      B110

      +
      public static final BaudRate B110
      +
      +
    • +
    • +
      +

      B134

      +
      public static final BaudRate B134
      +
      +
    • +
    • +
      +

      B150

      +
      public static final BaudRate B150
      +
      +
    • +
    • +
      +

      B200

      +
      public static final BaudRate B200
      +
      +
    • +
    • +
      +

      B300

      +
      public static final BaudRate B300
      +
      +
    • +
    • +
      +

      B600

      +
      public static final BaudRate B600
      +
      +
    • +
    • +
      +

      B1200

      +
      public static final BaudRate B1200
      +
      +
    • +
    • +
      +

      B1800

      +
      public static final BaudRate B1800
      +
      +
    • +
    • +
      +

      B2400

      +
      public static final BaudRate B2400
      +
      +
    • +
    • +
      +

      B4800

      +
      public static final BaudRate B4800
      +
      +
    • +
    • +
      +

      B9600

      +
      public static final BaudRate B9600
      +
      +
    • +
    • +
      +

      B19200

      +
      public static final BaudRate B19200
      +
      +
    • +
    • +
      +

      B38400

      +
      public static final BaudRate B38400
      +
      +
    • +
    • +
      +

      B57600

      +
      public static final BaudRate B57600
      +
      +
    • +
    • +
      +

      B115200

      +
      public static final BaudRate B115200
      +
      +
    • +
    • +
      +

      B230400

      +
      public static final BaudRate B230400
      +
      +
    • +
    • +
      +

      B460800

      +
      public static final BaudRate B460800
      +
      +
    • +
    • +
      +

      B500000

      +
      public static final BaudRate B500000
      +
      +
    • +
    • +
      +

      B576000

      +
      public static final BaudRate B576000
      +
      +
    • +
    • +
      +

      B921600

      +
      public static final BaudRate B921600
      +
      +
    • +
    • +
      +

      B1000000

      +
      public static final BaudRate B1000000
      +
      +
    • +
    • +
      +

      B1152000

      +
      public static final BaudRate B1152000
      +
      +
    • +
    • +
      +

      B1500000

      +
      public static final BaudRate B1500000
      +
      +
    • +
    • +
      +

      B2000000

      +
      public static final BaudRate B2000000
      +
      +
    • +
    • +
      +

      B2500000

      +
      public static final BaudRate B2500000
      +
      +
    • +
    • +
      +

      B3000000

      +
      public static final BaudRate B3000000
      +
      +
    • +
    • +
      +

      B3500000

      +
      public static final BaudRate B3500000
      +
      +
    • +
    • +
      +

      B4000000

      +
      public static final BaudRate B4000000
      +
      +
    • +
    • +
      +

      MAX_BAUD

      +
      public static final BaudRate MAX_BAUD
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      values

      +
      public static BaudRate[] values()
      +
      Returns an array containing the constants of this enum class, in +the order they are declared.
      +
      +
      Returns:
      +
      an array containing the constants of this enum class, in the order they are declared
      +
      +
      +
    • +
    • +
      +

      valueOf

      +
      public static BaudRate valueOf(String name)
      +
      Returns the enum constant of this class with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this class. (Extraneous whitespace characters are +not permitted.)
      +
      +
      Parameters:
      +
      name - the name of the enum constant to be returned.
      +
      Returns:
      +
      the enum constant with the specified name
      +
      Throws:
      +
      IllegalArgumentException - if this enum class has no constant with the specified name
      +
      NullPointerException - if the argument is null
      +
      +
      +
    • +
    • +
      +

      getRealBaud

      +
      public long getRealBaud()
      +
      Retrieves the real baud rate value from the baud + rate structure defined by the POSIX code.
      +
      +
      Returns:
      +
      the real baud rate.
      +
      +
      +
    • +
    • +
      +

      getBaudRate

      +
      public int getBaudRate()
      +
      Retrieves the baud rate code defined from invalid input: '<'termios.h> for + POSIX systems.
      +
      +
      Returns:
      +
      the code for this baud rate.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/NativeTerminalDevice.html b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/NativeTerminalDevice.html new file mode 100644 index 00000000..d38f8a44 --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/NativeTerminalDevice.html @@ -0,0 +1,700 @@ + + + + +NativeTerminalDevice + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class NativeTerminalDevice

+
+
java.lang.Object +
com.serial4j.core.serial.NativeTerminalDevice
+
+
+
+
public final class NativeTerminalDevice +extends Object
+
Represents the native java binding for Serial4j API, represented by + [com_serial4j_core_serial_NativeTerminalDevice.h] natively.
+
+
+
    + +
  • +
    +

    Constructor Summary

    +
    Constructors
    +
    +
    Modifier
    +
    Constructor
    +
    Description
    +
    protected
    + +
     
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    protected int
    + +
    +
    Closes the serial port of this terminal device releasing the resources.
    +
    +
    protected int
    + +
    +
    Fetches the available system teletype terminal devices (tty) located within "/dev" directory + and insert the result into serialPorts.
    +
    +
    protected int
    + +
    +
    Retrieves the baud rate POSIX code for this terminal process, find more at invalid input: '<'./usr/include/x86_64-linux-gnu/bits/termios.h>.
    +
    +
    protected int
    + +
    +
    Retrieves the last error encountered by the native code,
    +
    + + +
     
    +
    protected int[]
    + +
    +
    Gets the read configuration for this terminal device defining the timeout value as the first index and + the minimum number of read byte in this timeout as the second index.
    +
    +
    char[]
    + +
    +
    Gets the read data in an up-to 32-bit integer format resulting from using the native method readData0().
    +
    + + +
    +
    Retrieves the serial port associated with this terminal device.
    +
    + + +
    +
    Retrieves all the available teletype terminal (tty) devices from the filesystem "/dev".
    +
    +
    protected long
    + +
    +
    Retrieves the terminal control flag from this terminal device port descriptor in 64-bit format.
    +
    +
    protected long
    + +
    +
    Retrieves the terminal input flag from this terminal device port descriptor in 64-bit format.
    +
    +
    protected long
    + +
    +
    Retrieves the terminal local flag from this terminal device port descriptor in 64-bit format.
    +
    +
    protected long
    + +
    +
    Retrieves the terminal output flag from this terminal device port descriptor in 64-bit format.
    +
    +
    protected int
    + +
    +
    Initializes this terminal device with the default terminal flags and read timeout properties: + ----------- + # c_cflag: for control mode flags.
    +
    +
    protected int
    +
    openPort0(String port, + int flag)
    +
    +
    Opens this terminal device using the path to the port [port] in strings and the port permissions [flag] in integers.
    +
    +
    protected long
    + +
    +
    Reads the data from this terminal device and insert the result into the readBuffer + string buffer.
    +
    +
    protected long
    + +
    +
    Reads the data from the terminal device and inserts the result into an integer buffer + readData.
    +
    +
    protected int
    +
    setBaudRate0(int baudRate)
    +
    +
    Adjusts the baud rate aka.
    +
    +
    protected int
    +
    setReadConfigurationMode0(int VTIME_VALUE, + int VMIN_VALUE)
    +
    +
    Adjusts the read mode for this terminal device, the read mode is defined by the read timeout value and the minimum + number of bytes to read at that time.
    +
    +
    protected void
    + +
    +
    Initializes the serial port path of the native terminal device before opening the terminal device port.
    +
    +
    protected int
    + +
    +
    Adjusts the native terminal control [c_cflag] of the [termios] structure variable for this terminal device.
    +
    +
    protected int
    + +
    +
    Adjusts the native terminal input [c_iflag] of the [termios] structure variable for this terminal device.
    +
    +
    protected int
    + +
    +
    Adjusts the native terminal local [c_lflag] of the [termios] structure variable for this terminal device.
    +
    +
    protected int
    + +
    +
    Adjusts the native terminal output [c_oflag] of the [termios] structure variable for this terminal device.
    +
    +
    protected static int
    + +
    +
    Sets up the native environment for this terminal device.
    +
    +
    protected long
    +
    writeBuffer0(String buffer, + int length)
    +
    +
    Writes a string buffer (const char*) with a length to this terminal device.
    +
    +
    protected long
    +
    writeData0(int data)
    +
    +
    Writes an integer buffer to this terminal device.
    +
    +
    +
    +
    +
    +

    Methods inherited from class java.lang.Object

    +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      NativeTerminalDevice

      +
      protected NativeTerminalDevice()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      setSerialPort

      +
      protected void setSerialPort(SerialPort serialPort)
      +
      Initializes the serial port path of the native terminal device before opening the terminal device port.
      +
      +
      Parameters:
      +
      serialPort - the object to initialize the serial port with.
      +
      +
      +
    • +
    • +
      +

      getSerialPort

      +
      public SerialPort getSerialPort()
      +
      Retrieves the serial port associated with this terminal device.
      +
      +
      Returns:
      +
      the serial port object associated with this terminal device.
      +
      +
      +
    • +
    • +
      +

      getSerialPorts

      +
      public String[] getSerialPorts()
      +
      Retrieves all the available teletype terminal (tty) devices from the filesystem "/dev".
      +
      +
      Returns:
      +
      the available tty devices in an array of strings format.
      +
      +
      +
    • +
    • +
      +

      getReadData

      +
      public char[] getReadData()
      +
      Gets the read data in an up-to 32-bit integer format resulting from using the native method readData0().
      +
      +
      Returns:
      +
      the read data from this terminal device in an up-to 32-bit integer format.
      +
      +
      +
    • +
    • +
      +

      getReadBuffer

      +
      public String getReadBuffer()
      +
      +
    • +
    • +
      +

      setupJniEnvironment0

      +
      protected static int setupJniEnvironment0()
      +
      Sets up the native environment for this terminal device.
      +
      +
      Returns:
      +
      (-1) if the jni env pointer is NULL, (1) for successful initialization.
      +
      +
      +
    • +
    • +
      +

      setTerminalControlFlag

      +
      protected int setTerminalControlFlag(long flag)
      +
      Adjusts the native terminal control [c_cflag] of the [termios] structure variable for this terminal device.
      +
      +
      Parameters:
      +
      flag - the flag to set the [c_cflag] to.
      +
      Returns:
      +
      errno(-1) for failure, errno(-2) for invalid port, errno(1) for success.
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      setTerminalLocalFlag

      +
      protected int setTerminalLocalFlag(long flag)
      +
      Adjusts the native terminal local [c_lflag] of the [termios] structure variable for this terminal device.
      +
      +
      Parameters:
      +
      flag - the flag to set the [c_lflag] to.
      +
      Returns:
      +
      errno(-1) for failure, errno(-2) for invalid port, errno(1) for success.
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      setTerminalInputFlag

      +
      protected int setTerminalInputFlag(long flag)
      +
      Adjusts the native terminal input [c_iflag] of the [termios] structure variable for this terminal device.
      +
      +
      Parameters:
      +
      flag - the flag to set the [c_iflag] to.
      +
      Returns:
      +
      errno(-1) for failure, errno(-2) for invalid port, errno(1) for success.
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      setTerminalOutputFlag

      +
      protected int setTerminalOutputFlag(long flag)
      +
      Adjusts the native terminal output [c_oflag] of the [termios] structure variable for this terminal device.
      +
      +
      Parameters:
      +
      flag - the flag to set the [c_oflag] to.
      +
      Returns:
      +
      errno(-1) for failure, errno(-2) for invalid port, errno(1) for success.
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      getTerminalControlFlag

      +
      protected long getTerminalControlFlag()
      +
      Retrieves the terminal control flag from this terminal device port descriptor in 64-bit format.
      +
      +
      Returns:
      +
      the [c_cflag] value in longs.
      +
      +
      +
    • +
    • +
      +

      getTerminalLocalFlag

      +
      protected long getTerminalLocalFlag()
      +
      Retrieves the terminal local flag from this terminal device port descriptor in 64-bit format.
      +
      +
      Returns:
      +
      the [c_lflag] value in longs.
      +
      +
      +
    • +
    • +
      +

      getTerminalInputFlag

      +
      protected long getTerminalInputFlag()
      +
      Retrieves the terminal input flag from this terminal device port descriptor in 64-bit format.
      +
      +
      Returns:
      +
      the [c_iflag] value in longs.
      +
      +
      +
    • +
    • +
      +

      getTerminalOutputFlag

      +
      protected long getTerminalOutputFlag()
      +
      Retrieves the terminal output flag from this terminal device port descriptor in 64-bit format.
      +
      +
      Returns:
      +
      the [c_oflag] value in longs.
      +
      +
      +
    • +
    • +
      +

      setReadConfigurationMode0

      +
      protected int setReadConfigurationMode0(int VTIME_VALUE, + int VMIN_VALUE)
      +
      Adjusts the read mode for this terminal device, the read mode is defined by the read timeout value and the minimum + number of bytes to read at that time. + + Default value = BLOCKING_READ_ONE_CHAR {0, 1}; defined by initTermios0().
      +
      +
      Parameters:
      +
      VTIME_VALUE - the value of the read timeout, applied only when the first index of [mode] is 1 (aka read timeout is activated).
      +
      VMIN_VALUE - the value of the minimum byte to read in this time.
      +
      mode - the read mode in a 2 lengthed array format, where first index refers to the timeout config and second index + refers to the bytes config.
      +
      Returns:
      +
      errno(-1) for failure, errno(-2) for invalid port, errno(1) for success.
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      getReadConfigurationMode0

      +
      protected int[] getReadConfigurationMode0()
      +
      Gets the read configuration for this terminal device defining the timeout value as the first index and + the minimum number of read byte in this timeout as the second index. + + Default value = BLOCKING_READ_ONE_CHAR {0, 1}; defined by initTermios0().
      +
      +
      Returns:
      +
      an array refering to the read mode, where index [0] represents the read timeout, index [1] represents + the minimum bytes to read.
      +
      +
      +
    • +
    • +
      +

      getErrno0

      +
      protected int getErrno0()
      +
      Retrieves the last error encountered by the native code,
      +
      +
      Returns:
      +
      the last error code from the native invalid input: '<'errno.h>.
      +
      +
      +
    • +
    • +
      +

      fetchSerialPorts0

      +
      protected int fetchSerialPorts0()
      +
      Fetches the available system teletype terminal devices (tty) located within "/dev" directory + and insert the result into serialPorts.
      +
      +
      Returns:
      +
      errno(-1) for failure, errno(-2) for invalid port, errno(1) for success.
      +
      +
      +
    • +
    • +
      +

      getBaudRate0

      +
      protected int getBaudRate0()
      +
      Retrieves the baud rate POSIX code for this terminal process, find more at invalid input: '<'./usr/include/x86_64-linux-gnu/bits/termios.h>.
      +
      +
      Returns:
      +
      the baud rate code in integers.
      +
      +
      +
    • +
    • +
      +

      writeData0

      +
      protected long writeData0(int data)
      +
      Writes an integer buffer to this terminal device.
      +
      +
      Parameters:
      +
      data - an integer data buffer to write up-to 32-bit.
      +
      Returns:
      +
      the number of written bytes in long format.
      +
      +
      +
    • +
    • +
      +

      readData0

      +
      protected long readData0()
      +
      Reads the data from the terminal device and inserts the result into an integer buffer + readData.
      +
      +
      Returns:
      +
      the number of read bytes.
      +
      +
      +
    • +
    • +
      +

      writeBuffer0

      +
      protected long writeBuffer0(String buffer, + int length)
      +
      Writes a string buffer (const char*) with a length to this terminal device.
      +
      +
      Parameters:
      +
      buffer - a string buffer to write to this terminal device.
      +
      length - the string buffer length in integers, this minimizes the jni native calls.
      +
      Returns:
      +
      the number of written bytes to this terminal device.
      +
      +
      +
    • +
    • +
      +

      readBuffer0

      +
      protected long readBuffer0()
      +
      Reads the data from this terminal device and insert the result into the readBuffer + string buffer.
      +
      +
      Returns:
      +
      the number of read bytes from this terminal device.
      +
      +
      +
    • +
    • +
      +

      openPort0

      +
      protected int openPort0(String port, + int flag)
      +
      Opens this terminal device using the path to the port [port] in strings and the port permissions [flag] in integers.
      +
      +
      Parameters:
      +
      port - the port path in strings.
      +
      int - the flag for the base file control native api [fcntl].
      +
      Returns:
      +
      errno(-1) for failure, errno(1) for success.
      +
      +
      +
    • +
    • +
      +

      initTermios0

      +
      protected int initTermios0()
      +
      Initializes this terminal device with the default terminal flags and read timeout properties: + ----------- + # c_cflag: for control mode flags. + *** Enable these bits: + - [CREAD]: Allow input to be received. + - [CS8]: For charachter size 8-bit, you can use the bit mask CSIZE to read this value. + - [CLOCAL]: Ignore modem status lines (donÂ’t check carrier signal). + ----------- + # c_lflag: for local mode flags. + ***Disable these bits: + - [ICANON]: Canonical mode (line-by-line) input. + - [ECHO]: Echo input characters. + - [ECHOE]: Perform ERASE visually. + - [ECHOK]: Echo KILL visually. + - [ECHOKE]: DonÂ’t output a newline after echoed KILL. + - [ECHONL]: Echo NL (in canonical mode) even if echoing is disabled. + - [ECHOPRT]: Echo deleted characters backward (between \ and / ). + - [ECHOCTL]: Echo control characters visually (e.g., ^L ). + - [ISIG]: Enable signal-generating characters (INTR, QUIT, SUSP). + - [IEXTEN]: Enable extended processing of input characters. + ----------- + # c_oflag: for output mode flags. + ***Disable these bits: + - [OPOST]: Perform output postprocessing. + - [ONLCR]: Map NL to CR-NL on output. + ----------- + # c_iflag: for input mode flags. + ***Disable all input bit masks. + ----------- + # c_cc: For control characters. + ***Sets to BLOCKING READ ONE CHAR AT A TIME MODE. + -----------
      +
      +
      Returns:
      +
      errno(-1) for failure, errno(-2) for invalid port, errno(1) for success.
      +
      +
      +
    • +
    • +
      +

      setBaudRate0

      +
      protected int setBaudRate0(int baudRate)
      +
      Adjusts the baud rate aka. the speed of data transmission in bits/seconds for this bus.
      +
      +
      Parameters:
      +
      baudRate - the baud rate POSIX native code, find more about baud rate codes at invalid input: '<'./usr/include/x86_64-linux-gnu/bits/termios.h>.
      +
      Returns:
      +
      errno(-1) for failure, errno(-2) for invalid port, errno(1) for success.
      +
      +
      +
    • +
    • +
      +

      closePort0

      +
      protected int closePort0()
      +
      Closes the serial port of this terminal device releasing the resources.
      +
      +
      Returns:
      +
      errno(-1) for failure, errno(-2) for invalid port, errno(1) for success.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/Permissions.html b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/Permissions.html new file mode 100644 index 00000000..14010010 --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/Permissions.html @@ -0,0 +1,332 @@ + + + + +Permissions + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class Permissions

+
+
java.lang.Object +
com.serial4j.core.serial.Permissions
+
+
+
+
public final class Permissions +extends Object
+
Provides Unix file system permissions for the specified serial port + of the terminal device.
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      O_RDONLY

      +
      public static final Permissions O_RDONLY
      +
      +
    • +
    • +
      +

      O_WRONLY

      +
      public static final Permissions O_WRONLY
      +
      +
    • +
    • +
      +

      O_RDWR

      +
      public static final Permissions O_RDWR
      +
      +
    • +
    • +
      +

      O_NOCTTY

      +
      public static final Permissions O_NOCTTY
      +
      +
    • +
    • +
      +

      O_NONBLOCK

      +
      public static final Permissions O_NONBLOCK
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      Permissions

      +
      protected Permissions(int value, + String description)
      +
      Wraps a POSIX IO flag using an integer value.
      +
      +
      Parameters:
      +
      value - the value of the permission flag.
      +
      description - the description of the flag.
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      createCustomPermissions

      +
      public static final Permissions createCustomPermissions(int value, + String description)
      +
      Create a custom permissions object from a source value.
      +
      +
      Parameters:
      +
      value - the value of the permission flag.
      +
      description - the description for this flag.
      +
      Returns:
      +
      a new Permissions object wrapping the POSIX IO flag.
      +
      +
      +
    • +
    • +
      +

      append

      +
      public Permissions append(Permissions permissions)
      +
      Appends new permissions to this permissions object.
      +
      +
      Parameters:
      +
      permissions - the new permissions to append.
      +
      Returns:
      +
      this permissions object with the new appended value.
      +
      +
      +
    • +
    • +
      +

      append

      +
      public Permissions append(Permissions... permissions)
      +
      Appends some new permissions to this permissions object.
      +
      +
      Parameters:
      +
      permissions - an array args of the new permissions to append.
      +
      Returns:
      +
      this permissions object with the new appended value.
      +
      +
      +
    • +
    • +
      +

      getValue

      +
      public int getValue()
      +
      Retrieves the value of this permissions object.
      +
      +
      Returns:
      +
      the value of this permissions object.
      +
      +
      +
    • +
    • +
      +

      getDescription

      +
      public String getDescription()
      +
      Retrieves the description of this permissions object.
      +
      +
      Returns:
      +
      the description of this permissions object.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/ReadConfiguration.html b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/ReadConfiguration.html new file mode 100644 index 00000000..5b7baae3 --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/ReadConfiguration.html @@ -0,0 +1,285 @@ + + + + +ReadConfiguration + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Enum Class ReadConfiguration

+
+
java.lang.Object +
java.lang.Enum<ReadConfiguration> +
com.serial4j.core.serial.ReadConfiguration
+
+
+
+
+
All Implemented Interfaces:
+
Serializable, Comparable<ReadConfiguration>, Constable
+
+
+
public enum ReadConfiguration +extends Enum<ReadConfiguration>
+
Provides a Unix terminal read configuration for the specified serial port of the + terminal device.
+
+
+ +
+
+
    + +
  • +
    +

    Enum Constant Details

    +
      +
    • +
      +

      POLLING_READ

      +
      public static final ReadConfiguration POLLING_READ
      +
      +
    • +
    • +
      +

      BLOCKING_READ_ONE_CHAR

      +
      public static final ReadConfiguration BLOCKING_READ_ONE_CHAR
      +
      +
    • +
    • +
      +

      READ_WITH_TIMEOUT

      +
      public static final ReadConfiguration READ_WITH_TIMEOUT
      +
      +
    • +
    • +
      +

      READ_WITH_INTERBYTE_TIMEOUT

      +
      public static final ReadConfiguration READ_WITH_INTERBYTE_TIMEOUT
      +
      +
    • +
    • +
      +

      ERR_INVALID_PORT

      +
      public static final ReadConfiguration ERR_INVALID_PORT
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      values

      +
      public static ReadConfiguration[] values()
      +
      Returns an array containing the constants of this enum class, in +the order they are declared.
      +
      +
      Returns:
      +
      an array containing the constants of this enum class, in the order they are declared
      +
      +
      +
    • +
    • +
      +

      valueOf

      +
      public static ReadConfiguration valueOf(String name)
      +
      Returns the enum constant of this class with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this class. (Extraneous whitespace characters are +not permitted.)
      +
      +
      Parameters:
      +
      name - the name of the enum constant to be returned.
      +
      Returns:
      +
      the enum constant with the specified name
      +
      Throws:
      +
      IllegalArgumentException - if this enum class has no constant with the specified name
      +
      NullPointerException - if the argument is null
      +
      +
      +
    • +
    • +
      +

      getMode

      +
      public int[] getMode()
      +
      +
    • +
    • +
      +

      getDescription

      +
      public String getDescription()
      +
      +
    • +
    • +
      +

      getFromNativeReadConfig

      +
      public static ReadConfiguration getFromNativeReadConfig(int[] nativeReadConfig)
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/SerialPort.html b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/SerialPort.html new file mode 100644 index 00000000..680c1c83 --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/SerialPort.html @@ -0,0 +1,261 @@ + + + + +SerialPort + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class SerialPort

+
+
java.lang.Object +
com.serial4j.core.serial.SerialPort
+
+
+
+
public final class SerialPort +extends Object
+
Represents a Unix terminal device port properties wrapper.
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      SerialPort

      +
      public SerialPort(String path)
      +
      Instantiates a new serial port for a terminal device with a port path. + The rest of the port data is assigned from the jni side after opening the device.
      +
      +
      Parameters:
      +
      path - the port path on the file system.
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getIOFlag

      +
      public int getIOFlag()
      +
      Gets the io flags defined by the Permissions. + The io flags setter is assigned from the jni side by +
      +invalid @link +
      com.serial4j.core.serial.NativeTerminalDevice#openPort(String, int)
      +
      +.
      +
      +
      Returns:
      +
      a number format representing the IO flag for the POSIX base file api.
      +
      +
      +
    • +
    • +
      +

      getPath

      +
      public String getPath()
      +
      Gets the path to this port.
      +
      +
      Returns:
      +
      a String representing the path to this port.
      +
      +
      +
    • +
    • +
      +

      getFd

      +
      public int getFd()
      +
      Gets the virtual file descriptor defining this port. + The fd (file descriptor) setter is assigned from the jni side by +
      +invalid @link +
      com.serial4j.core.serial.NativeTerminalDevice#openPort(String, int)
      +
      +.
      +
      +
      Returns:
      +
      a number format representing the file descriptor for this port.
      +
      +
      +
    • +
    • +
      +

      isPortOpened

      +
      public boolean isPortOpened()
      +
      Tests whether this port is still opened. + This flag setter is assigned from the jni side by +
      +invalid @link +
      com.serial4j.core.serial.NativeTerminalDevice#openPort(String, int)
      +
      + + and +
      +invalid @link +
      com.serial4j.core.serial.NativeTerminalDevice#closePort()
      +
      +.
      +
      +
      Returns:
      +
      true if the port is still alive, false if the port is closed.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/TerminalDevice.html b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/TerminalDevice.html new file mode 100644 index 00000000..a68f75cd --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/TerminalDevice.html @@ -0,0 +1,704 @@ + + + + +TerminalDevice + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class TerminalDevice

+
+
java.lang.Object +
com.serial4j.core.serial.TerminalDevice
+
+
+
+
public final class TerminalDevice +extends Object
+
The main entry class for the native terminal device for Serial4j api.
+
+
+ +
+
+ +
+ +
+
+
+ + diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/control/TerminalControlFlag.html b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/control/TerminalControlFlag.html new file mode 100644 index 00000000..76528de7 --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/control/TerminalControlFlag.html @@ -0,0 +1,299 @@ + + + + +TerminalControlFlag + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class TerminalControlFlag

+
+
java.lang.Object +
com.serial4j.core.serial.control.TerminalFlag +
com.serial4j.core.serial.control.TerminalControlFlag
+
+
+
+
+
public final class TerminalControlFlag +extends TerminalFlag
+
+
+ +
+
+ +
+ +
+
+
+ + diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/control/TerminalFlag.html b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/control/TerminalFlag.html new file mode 100644 index 00000000..80c8e925 --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/control/TerminalFlag.html @@ -0,0 +1,314 @@ + + + + +TerminalFlag + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class TerminalFlag

+
+
java.lang.Object +
com.serial4j.core.serial.control.TerminalFlag
+
+
+
+
Direct Known Subclasses:
+
TerminalControlFlag, TerminalInputFlag, TerminalLocalFlag, TerminalOutputFlag
+
+
+
public abstract class TerminalFlag +extends Object
+
Represents the base implementation for the termios.h terminal flags values.
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      TerminalFlag

      +
      protected TerminalFlag(long value)
      +
      Instantiates a termios flag with a value to be settled from the native side.
      +
      +
      Parameters:
      +
      value - the value of the termios flag.
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      append

      +
      public TerminalFlag append(TerminalFlag flag)
      +
      Appends a flag's value into the current one's value.
      +
      +
      Parameters:
      +
      flag - a flag to append to this instance.
      +
      Returns:
      +
      this flag instance for chained append.
      +
      +
      +
    • +
    • +
      +

      disable

      +
      public TerminalFlag disable(TerminalFlag flag)
      +
      Disables a flag from the current one value.
      +
      +
      Parameters:
      +
      flag - a flag to disable.
      +
      Returns:
      +
      this flag instance for chained call.
      +
      +
      +
    • +
    • +
      +

      append

      +
      public TerminalFlag append(TerminalFlag... flags)
      +
      Appends a list of flags' values into the current one's value.
      +
      +
      Parameters:
      +
      flags - an args representing the flags list to append.
      +
      Returns:
      +
      this flag instance for chained append.
      +
      +
      +
    • +
    • +
      +

      disable

      +
      public TerminalFlag disable(TerminalFlag... flags)
      +
      Disables a list of flags from the current flag instance.
      +
      +
      Parameters:
      +
      flags - flags to disable.
      +
      Returns:
      +
      this flag instance for chained call.
      +
      +
      +
    • +
    • +
      +

      enableAll

      +
      public TerminalFlag enableAll()
      +
      Enables all the terminal flags for this instance.
      +
      +
      Returns:
      +
      this instance for chained call.
      +
      +
      +
    • +
    • +
      +

      disableAll

      +
      public TerminalFlag disableAll()
      +
      Disables all the terminal flags for this instance.
      +
      +
      Returns:
      +
      this instance for chained call.
      +
      +
      +
    • +
    • +
      +

      getValue

      +
      public long getValue()
      +
      Gets the value of the specified termios flag.
      +
      +
      Returns:
      +
      the value of the terminal flag.
      +
      +
      +
    • +
    • +
      +

      setValue

      +
      public void setValue(long value)
      +
      Adjusts the value of the specified termios flag.
      +
      +
      Parameters:
      +
      value - the value of the terminal flag.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/control/TerminalInputFlag.html b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/control/TerminalInputFlag.html new file mode 100644 index 00000000..4fc4bf59 --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/control/TerminalInputFlag.html @@ -0,0 +1,300 @@ + + + + +TerminalInputFlag + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class TerminalInputFlag

+
+
java.lang.Object +
com.serial4j.core.serial.control.TerminalFlag +
com.serial4j.core.serial.control.TerminalInputFlag
+
+
+
+
+
public final class TerminalInputFlag +extends TerminalFlag
+
Provides Unix [c_iflag] termios bits.
+
+
+ +
+
+ +
+ +
+
+
+ + diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/control/TerminalLocalFlag.html b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/control/TerminalLocalFlag.html new file mode 100644 index 00000000..9c05033c --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/control/TerminalLocalFlag.html @@ -0,0 +1,317 @@ + + + + +TerminalLocalFlag + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class TerminalLocalFlag

+
+
java.lang.Object +
com.serial4j.core.serial.control.TerminalFlag +
com.serial4j.core.serial.control.TerminalLocalFlag
+
+
+
+
+
public final class TerminalLocalFlag +extends TerminalFlag
+
+
+ +
+
+ +
+ +
+
+
+ + diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/control/TerminalOutputFlag.html b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/control/TerminalOutputFlag.html new file mode 100644 index 00000000..572725bf --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/control/TerminalOutputFlag.html @@ -0,0 +1,398 @@ + + + + +TerminalOutputFlag + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class TerminalOutputFlag

+
+
java.lang.Object +
com.serial4j.core.serial.control.TerminalFlag +
com.serial4j.core.serial.control.TerminalOutputFlag
+
+
+
+
+
public final class TerminalOutputFlag +extends TerminalFlag
+
+
+ +
+
+ +
+ +
+
+
+ + diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/control/package-summary.html b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/control/package-summary.html new file mode 100644 index 00000000..b9e63ac8 --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/control/package-summary.html @@ -0,0 +1,126 @@ + + + + +com.serial4j.core.serial.control + + + + + + + + + + + + + + + +
+ +
+
+
+

Package com.serial4j.core.serial.control

+
+
+
package com.serial4j.core.serial.control
+
+ +
+
+
+
+ + diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/control/package-tree.html b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/control/package-tree.html new file mode 100644 index 00000000..e393dfa2 --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/control/package-tree.html @@ -0,0 +1,79 @@ + + + + +com.serial4j.core.serial.control Class Hierarchy + + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package com.serial4j.core.serial.control

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+
+
+
+ + diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/entity/EntityStatus.html b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/entity/EntityStatus.html new file mode 100644 index 00000000..f960091d --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/entity/EntityStatus.html @@ -0,0 +1,198 @@ + + + + +EntityStatus + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Interface EntityStatus<T extends SerialMonitorEntity>

+
+
+
+
Type Parameters:
+
T - generic type for the SerialMonitorEntity type, either +
+invalid @link +
serial.entity.impl.SerialWriteEntity
+
+ + or +
+invalid @link +
serial.entity.impl.SerialReadEntity
+
+.
+
+
+
All Known Implementing Classes:
+
HelloSerialMonitor
+
+
+
public interface EntityStatus<T extends SerialMonitorEntity>
+
Represents the serial entity status listener.
+
+
+
    + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    void
    +
    onSerialEntityInitialized(T serialMonitorEntity)
    +
    +
    Fired when the serial entity is initialized on the first monitor update.
    +
    +
    void
    +
    onSerialEntityTerminated(T serialMonitorEntity)
    +
    +
    Fired when the serial entity is terminated on the last monitor update.
    +
    +
    void
    +
    onUpdate(T serialMonitorEntity)
    +
    +
    Fired on each serial monitor update.
    +
    +
    +
    +
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      onSerialEntityInitialized

      +
      void onSerialEntityInitialized(T serialMonitorEntity)
      +
      Fired when the serial entity is initialized on the first monitor update.
      +
      +
      Parameters:
      +
      serialMonitorEntity - the serial entity object.
      +
      +
      +
    • +
    • +
      +

      onSerialEntityTerminated

      +
      void onSerialEntityTerminated(T serialMonitorEntity)
      +
      Fired when the serial entity is terminated on the last monitor update.
      +
      +
      Parameters:
      +
      serialMonitorEntity - the serial entity object.
      +
      +
      +
    • +
    • +
      +

      onUpdate

      +
      void onUpdate(T serialMonitorEntity)
      +
      Fired on each serial monitor update.
      +
      +
      Parameters:
      +
      serialMonitorEntity - the serial entity object.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/entity/SerialMonitorEntity.html b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/entity/SerialMonitorEntity.html new file mode 100644 index 00000000..d9960cef --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/entity/SerialMonitorEntity.html @@ -0,0 +1,484 @@ + + + + +SerialMonitorEntity + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class SerialMonitorEntity

+
+
java.lang.Object +
com.serial4j.core.serial.entity.SerialMonitorEntity
+
+
+
+
All Implemented Interfaces:
+
Runnable
+
+
+
Direct Known Subclasses:
+
SerialReadEntity, SerialWriteEntity
+
+
+
public abstract class SerialMonitorEntity +extends Object +implements Runnable
+
Represents the base implementation for serial monitor Read and Write entities.
+
+
See Also:
+
+
    +
  • +
    +invalid @see +
    serial.entity.impl.SerialWriteEntity
    +
    +
  • +
  • +
    +invalid @see +
    serial.entity.impl.SerialReadEntity
    +
    +
  • +
+
+
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    + +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      SerialMonitorEntity

      +
      public SerialMonitorEntity(SerialMonitor serialMonitor, + String entityName)
      +
      Defines a serial monitor basic entity.
      +
      +
      Parameters:
      +
      serialMonitor - the monitor object.
      +
      entityName - the entity name.
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      run

      +
      public void run()
      +
      +
      Specified by:
      +
      run in interface Runnable
      +
      +
      +
    • +
    • +
      +

      terminate

      +
      protected void terminate()
      +
      Terminates this entity by closing the entity stream and the serial port.
      +
      +
    • +
    • +
      +

      isUsingReturnCarriage

      +
      protected boolean isUsingReturnCarriage()
      +
      Tests whether return carriage [\n\r] and new line is enabled.
      +
      +
      Returns:
      +
      true if [\n\r] check is enabled, default value is [true].
      +
      +
      +
    • +
    • +
      +

      isMonitoringStarted

      +
      protected boolean isMonitoringStarted()
      +
      Tests whether serial data monitoring has started.
      +
      +
      Returns:
      +
      true if data monitor has started, default value is [false].
      +
      +
      +
    • +
    • +
      +

      setMonitoringStarted

      +
      protected void setMonitoringStarted(boolean state)
      +
      Sets the monitor started state.
      +
      +
      Parameters:
      +
      state - true to indicate the monitor has started and to start the data + writing, false otherwise.
      +
      +
      +
    • +
    • +
      +

      getSerialMonitor

      +
      public SerialMonitor getSerialMonitor()
      +
      Retrieves the SerialMonitor instance.
      +
      +
      Returns:
      +
      the serial monitor object that holds this entity.
      +
      +
      +
    • +
    • +
      +

      getTerminalDevice

      +
      protected TerminalDevice getTerminalDevice()
      +
      Retrieves the TerminalDevice instance used for creating the communication.
      +
      +
      Returns:
      +
      a serial port instance.
      +
      +
      +
    • +
    • +
      +

      getSerialDataListeners

      +
      protected ArrayList<SerialDataListener> getSerialDataListeners()
      +
      Retrieves the serial data listeners list.
      +
      +
      Returns:
      +
      a list instance representing the serial data listeners.
      +
      +
      +
    • +
    • +
      +

      isTerminate

      +
      protected boolean isTerminate()
      +
      Tests whether the serial monitor holding this entity terminated.
      +
      +
      Returns:
      +
      true if the serial monitor has been terminated by the user, default value is false.
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      onDataMonitored

      +
      protected abstract void onDataMonitored(SerialMonitor serialMonitor)
      +
      Fired on each update run.
      +
      +
      Parameters:
      +
      serialMonitor - the serial monitor that holds this entity.
      +
      +
      +
    • +
    • +
      +

      getSerialEntityStatusListener

      +
      protected abstract EntityStatus<? extends SerialMonitorEntity> getSerialEntityStatusListener()
      +
      Gets the entity status listener.
      +
      +
      Returns:
      +
      the serial entity status listener.
      +
      +
      +
    • +
    • +
      +

      isSerialEntityInitialized

      +
      protected abstract boolean isSerialEntityInitialized()
      +
      Tests whether the entity is initialized.
      +
      +
      Returns:
      +
      true if the serial entity has been initialized, false otherwise, default value is false.
      +
      +
      +
    • +
    • +
      +

      setSerialEntityInitialized

      +
      protected abstract void setSerialEntityInitialized(boolean state)
      +
      Sets the serial entity initialized status.
      +
      +
      Parameters:
      +
      state - a state to set.
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      getEntityStream

      +
      protected abstract Closeable getEntityStream()
      +
      Gets the entity stream provided by the +
      +invalid @link +
      SerialPort
      +
      +, either OutputStream + or InputStream.
      +
      +
      Returns:
      +
      a stream provided by the SerialPort.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/entity/impl/SerialReadEntity.html b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/entity/impl/SerialReadEntity.html new file mode 100644 index 00000000..dc3c7230 --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/entity/impl/SerialReadEntity.html @@ -0,0 +1,316 @@ + + + + +SerialReadEntity + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class SerialReadEntity

+
+
java.lang.Object +
com.serial4j.core.serial.entity.SerialMonitorEntity +
com.serial4j.core.serial.entity.impl.SerialReadEntity
+
+
+
+
+
All Implemented Interfaces:
+
Runnable
+
+
+
public class SerialReadEntity +extends SerialMonitorEntity
+
Represents a Read entity for the SerialMonitor. + Use +
+invalid @link +
SerialMonitor#startDataMonitoring(String, int)
+
+ to start this entity.
+
+
+ +
+
+ +
+ +
+
+
+ + diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/entity/impl/SerialWriteEntity.html b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/entity/impl/SerialWriteEntity.html new file mode 100644 index 00000000..9a0fddee --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/entity/impl/SerialWriteEntity.html @@ -0,0 +1,353 @@ + + + + +SerialWriteEntity + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class SerialWriteEntity

+
+
java.lang.Object +
com.serial4j.core.serial.entity.SerialMonitorEntity +
com.serial4j.core.serial.entity.impl.SerialWriteEntity
+
+
+
+
+
All Implemented Interfaces:
+
Runnable
+
+
+
public class SerialWriteEntity +extends SerialMonitorEntity
+
Represents a serial write data entity for the SerialMonitor. + Use +
+invalid @link +
SerialMonitor#startDataMonitoring(String, int)
+
+ to start this entity.
+
+
+ +
+
+ +
+ +
+
+
+ + diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/entity/impl/WritableCapsule.html b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/entity/impl/WritableCapsule.html new file mode 100644 index 00000000..3b9cb87f --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/entity/impl/WritableCapsule.html @@ -0,0 +1,238 @@ + + + + +WritableCapsule + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class WritableCapsule

+
+
java.lang.Object +
com.serial4j.core.serial.entity.impl.WritableCapsule
+
+
+
+
All Implemented Interfaces:
+
Cloneable
+
+
+
public final class WritableCapsule +extends Object +implements Cloneable
+
Represents a serial write capsule for the SerialWriteEntity.
+
+
+
    + +
  • +
    +

    Constructor Summary

    +
    Constructors
    +
    +
    Constructor
    +
    Description
    + +
     
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    + + +
    +
    Retrieves the data of the capsule.
    +
    +
    boolean
    + +
    +
    Tests whether data is written to the UART.
    +
    +
    void
    +
    setDataWritten(boolean dataWritten)
    +
    +
    Sets the flag for data write to the serial UART, where; true commands and + stops the data write to the serial UART, false otherwise.
    +
    +
    void
    +
    write(String data)
    +
    +
    Specifies the data to be written on the next update of the + SerialWriteEntity.
    +
    +
    +
    +
    +
    +

    Methods inherited from class java.lang.Object

    +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      WritableCapsule

      +
      public WritableCapsule()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      write

      +
      public void write(String data)
      +
      Specifies the data to be written on the next update of the + SerialWriteEntity.
      +
      +
      Parameters:
      +
      data - the data to be written to the UART.
      +
      +
      +
    • +
    • +
      +

      getData

      +
      public String getData()
      +
      Retrieves the data of the capsule.
      +
      +
      Returns:
      +
      the data in string.
      +
      +
      +
    • +
    • +
      +

      isDataWritten

      +
      public boolean isDataWritten()
      +
      Tests whether data is written to the UART.
      +
      +
      Returns:
      +
      true if the data is written to the UART, false otherwise.
      +
      +
      +
    • +
    • +
      +

      setDataWritten

      +
      public void setDataWritten(boolean dataWritten)
      +
      Sets the flag for data write to the serial UART, where; true commands and + stops the data write to the serial UART, false otherwise.
      +
      +
      Parameters:
      +
      dataWritten - true to keep writing data in the next update, false otherwise.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/entity/impl/package-summary.html b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/entity/impl/package-summary.html new file mode 100644 index 00000000..d6b95230 --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/entity/impl/package-summary.html @@ -0,0 +1,124 @@ + + + + +com.serial4j.core.serial.entity.impl + + + + + + + + + + + + + + + +
+ +
+
+
+

Package com.serial4j.core.serial.entity.impl

+
+
+
package com.serial4j.core.serial.entity.impl
+
+
An implementation code for +
+invalid @link +
serial.entity.SerialMonitorEntity
+
+ providing both read and + write serial monitor entities.
+
+
+ +
+
+
+
+ + diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/entity/impl/package-tree.html b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/entity/impl/package-tree.html new file mode 100644 index 00000000..2490c371 --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/entity/impl/package-tree.html @@ -0,0 +1,78 @@ + + + + +com.serial4j.core.serial.entity.impl Class Hierarchy + + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package com.serial4j.core.serial.entity.impl

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+
+
+
+ + diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/entity/package-summary.html b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/entity/package-summary.html new file mode 100644 index 00000000..e3e25366 --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/entity/package-summary.html @@ -0,0 +1,133 @@ + + + + +com.serial4j.core.serial.entity + + + + + + + + + + + + + + + +
+ +
+
+
+

Package com.serial4j.core.serial.entity

+
+
+
package com.serial4j.core.serial.entity
+
+
Provides R/W serial monitor entities with a subscriber pattern.
+
+
+ +
+
+
+
+ + diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/entity/package-tree.html b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/entity/package-tree.html new file mode 100644 index 00000000..a22357f9 --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/entity/package-tree.html @@ -0,0 +1,78 @@ + + + + +com.serial4j.core.serial.entity Class Hierarchy + + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package com.serial4j.core.serial.entity

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+
+

Interface Hierarchy

+ +
+
+
+
+ + diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/monitor/SerialDataListener.html b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/monitor/SerialDataListener.html new file mode 100644 index 00000000..ffb3c2aa --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/monitor/SerialDataListener.html @@ -0,0 +1,250 @@ + + + + +SerialDataListener + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Interface SerialDataListener

+
+
+
+
All Known Implementing Classes:
+
HelloSerialMonitor
+
+
+
public interface SerialDataListener
+
Listens to Serial Monitor entities +
+invalid @link +
serial.entity.impl.SerialReadEntity
+
+ and +
+invalid @link +
serial.entity.impl.SerialWriteEntity
+
+.
+
+
+
    + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    void
    +
    onDataReceived(int data)
    +
    +
    Dispatched when the data is received at the +
    +invalid @link +
    serial.entity.impl.SerialReadEntity
    +
    + end + on its thread.
    +
    +
    void
    + +
    +
    Dispatched whenever a data frame is completely received at the +
    +invalid @link +
    serial.entity.impl.SerialReadEntity
    +
    + end + when [Return-Carriage/Newline] check is enabled as it specifies a particular data frame.
    +
    +
    void
    + +
    +
    Dispatched when the capsular data is transmitted at the +
    +invalid @link +
    serial.entity.impl.SerialWriteEntity
    +
    + + end on its thread.
    +
    +
    +
    +
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      onDataReceived

      +
      void onDataReceived(int data)
      +
      Dispatched when the data is received at the +
      +invalid @link +
      serial.entity.impl.SerialReadEntity
      +
      + end + on its thread. + + This method is dispatched on the +
      +invalid @link +
      serial.entity.impl.SerialReadEntity
      +
      + thread.
      +
      +
      Parameters:
      +
      data - the data received serially in 8-bit format.
      +
      +
      +
    • +
    • +
      +

      onDataTransmitted

      +
      void onDataTransmitted(int data)
      +
      Dispatched when the capsular data is transmitted at the +
      +invalid @link +
      serial.entity.impl.SerialWriteEntity
      +
      + + end on its thread. + + This method is dispatched on the +
      +invalid @link +
      serial.entity.impl.SerialWriteEntity
      +
      + thread.
      +
      +
      Parameters:
      +
      data - the data transmitted serially in 8-bit format.
      +
      +
      +
    • +
    • +
      +

      onDataReceived

      +
      void onDataReceived(String data)
      +
      Dispatched whenever a data frame is completely received at the +
      +invalid @link +
      serial.entity.impl.SerialReadEntity
      +
      + end + when [Return-Carriage/Newline] check is enabled as it specifies a particular data frame. + + This method is dispatched on the +
      +invalid @link +
      serial.entity.impl.SerialReadEntity
      +
      + thread.
      +
      +
      Parameters:
      +
      data - the data frame.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/monitor/SerialMonitor.html b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/monitor/SerialMonitor.html new file mode 100644 index 00000000..1f60db6e --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/monitor/SerialMonitor.html @@ -0,0 +1,540 @@ + + + + +SerialMonitor + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class SerialMonitor

+
+
java.lang.Object +
com.serial4j.core.serial.monitor.SerialMonitor
+
+
+
+
public final class SerialMonitor +extends Object
+
Monitors the UART Data Port using SerialReadEntity for serial data read and SerialWriteEntity for serial + data write.
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      serialReadEntityEntityStatus

      +
      public volatile EntityStatus<SerialReadEntity> serialReadEntityEntityStatus
      +
      +
    • +
    • +
      +

      serialWriteEntityEntityStatus

      +
      public volatile EntityStatus<SerialWriteEntity> serialWriteEntityEntityStatus
      +
      +
    • +
    • +
      +

      isReadSerialEntityInitialized

      +
      public volatile boolean isReadSerialEntityInitialized
      +
      +
    • +
    • +
      +

      isWriteSerialEntityInitialized

      +
      public volatile boolean isWriteSerialEntityInitialized
      +
      +
    • +
    • +
      +

      isMonitoringStarted

      +
      public volatile boolean isMonitoringStarted
      +
      +
    • +
    • +
      +

      useReturnCarriage

      +
      public volatile boolean useReturnCarriage
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      SerialMonitor

      +
      public SerialMonitor(String monitorName)
      +
      Instantiates a new SerialMonitor with a name. + + Use +
      +invalid @link +
      SerialMonitor#startDataMonitoring(String, int)
      +
      + to initialize and start + data monitoring.
      +
      +
      Parameters:
      +
      monitorName - the name for this monitor.
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      startDataMonitoring

      + +
      Initializes and starts data monitoring on a [port] and with a [baudRate]
      +
      +
      Parameters:
      +
      port - specify the serial port.
      +
      baudRate - specify the baud rate aka bits/seconds based for the connected FOsc.
      +
      Throws:
      +
      NoSuchDeviceException
      +
      PermissionDeniedException
      +
      BrokenPipeException
      +
      InvalidPortException
      +
      OperationFailedException
      +
      NoAvailableTtyDevicesException
      +
      FileNotFoundException
      +
      +
      +
    • +
    • +
      +

      getMonitorName

      +
      public String getMonitorName()
      +
      +
    • +
    • +
      +

      isTerminate

      +
      public boolean isTerminate()
      +
      Tests whether the monitor is terminated by external means.
      +
      +
      Returns:
      +
      true if terminated by the user, false otherwise.
      +
      +
      +
    • +
    • +
      +

      setTerminate

      +
      public void setTerminate()
      +
      Sets the termination flag to trigger termination on the next update.
      +
      +
    • +
    • +
      +

      getReadEntityStream

      +
      public InputStream getReadEntityStream()
      +
      Gets the serial read input stream.
      +
      +
      Returns:
      +
      the serial read input stream instance.
      +
      +
      +
    • +
    • +
      +

      getTerminalDevice

      +
      public TerminalDevice getTerminalDevice()
      +
      Gets the terminal device controlling this monitor.
      +
      +
      Returns:
      +
      the terminal device instance associated with this monitor.
      +
      +
      +
    • +
    • +
      +

      getWriteEntityStream

      +
      public OutputStream getWriteEntityStream()
      +
      Gets the Serial write output stream.
      +
      +
      Returns:
      +
      an output stream representing this.
      +
      +
      +
    • +
    • +
      +

      getSerialReadEntity

      +
      public SerialReadEntity getSerialReadEntity()
      +
      Gets the serial read entity used for reading data from the serial port using + readEntityStream.
      +
      +
      Returns:
      +
      the serial monitor read instance.
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      getSerialWriteEntity

      +
      public SerialWriteEntity getSerialWriteEntity()
      +
      Gets the serial write entity used for writing data to the serial port using + writeEntityStream.
      +
      +
      Returns:
      +
      the serial monitor write instance.
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      addSerialDataListener

      +
      public void addSerialDataListener(SerialDataListener serialDataListener)
      +
      Adds a new serial data listener to the list of the updatable listeners.
      +
      +
      Parameters:
      +
      serialDataListener - the new serial data listener to add.
      +
      +
      +
    • +
    • +
      +

      removeSerialDataListener

      +
      public void removeSerialDataListener(SerialDataListener serialDataListener)
      +
      Removes a serial data listener instance from the list of the list of the updatable listeners.
      +
      +
      Parameters:
      +
      serialDataListener - the serial data listener to remove.
      +
      +
      +
    • +
    • +
      +

      setReadEntityListener

      +
      public void setReadEntityListener(EntityStatus<SerialReadEntity> readThreadEntityStatus)
      +
      Sets the read entity status listener instance to listen for SerialReadEntity lifecycle.
      +
      +
      Parameters:
      +
      readThreadEntityStatus - an instance to set.
      +
      +
      +
    • +
    • +
      +

      setWriteEntityStatus

      +
      public void setWriteEntityStatus(EntityStatus<SerialWriteEntity> writeThreadEntityStatus)
      +
      Sets the write entity status listener instance to listen for SerialWriteEntity lifecycle.
      +
      +
      Parameters:
      +
      writeThreadEntityStatus - an instance to set.
      +
      +
      +
    • +
    • +
      +

      isUsingReturnCarriage

      +
      public boolean isUsingReturnCarriage()
      +
      Tests whether [CR/LF] check is enabled.
      +
      +
      Returns:
      +
      true if [CR/LF] is enabled, false otherwise.
      +
      +
      +
    • +
    • +
      +

      setUseReturnCarriage

      +
      public void setUseReturnCarriage(boolean useReturnCarriage)
      +
      Triggers the [CR/LF] check state flag.
      +
      +
      Parameters:
      +
      useReturnCarriage - true to enable [CR/LF] and return data frames + at SerialDataListener.onDataReceived(String), false to disable + both the [CR/LF] check and disable SerialDataListener.onDataReceived(String).
      +
      +
      +
    • +
    • +
      +

      getSerialDataListeners

      +
      public ArrayList<SerialDataListener> getSerialDataListeners()
      +
      Gets the serial data listeners used for listening to data changes at the + this monitor port.
      +
      +
      Returns:
      +
      a list of serial data listeners for this monitor.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/monitor/SerialMonitorException.html b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/monitor/SerialMonitorException.html new file mode 100644 index 00000000..f713d74c --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/monitor/SerialMonitorException.html @@ -0,0 +1,210 @@ + + + + +SerialMonitorException + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class SerialMonitorException

+
+
java.lang.Object +
java.lang.Throwable +
java.lang.Exception +
java.lang.RuntimeException +
java.lang.IllegalStateException +
com.serial4j.core.serial.monitor.SerialMonitorException
+
+
+
+
+
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public class SerialMonitorException +extends IllegalStateException
+
Raised whenever the user tries to access the serial monitor without opening the port.
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      DEFAULT_MSG

      +
      public static final String DEFAULT_MSG
      +
      Provides a default message for quick usages.
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      SerialMonitorException

      +
      public SerialMonitorException(String msg)
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/monitor/package-summary.html b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/monitor/package-summary.html new file mode 100644 index 00000000..a76795f5 --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/monitor/package-summary.html @@ -0,0 +1,137 @@ + + + + +com.serial4j.core.serial.monitor + + + + + + + + + + + + + + + +
+ +
+
+
+

Package com.serial4j.core.serial.monitor

+
+
+
package com.serial4j.core.serial.monitor
+
+ +
+
+
+
+ + diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/monitor/package-tree.html b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/monitor/package-tree.html new file mode 100644 index 00000000..bc3049ad --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/monitor/package-tree.html @@ -0,0 +1,95 @@ + + + + +com.serial4j.core.serial.monitor Class Hierarchy + + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package com.serial4j.core.serial.monitor

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+
+

Interface Hierarchy

+ +
+
+
+
+ + diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/package-summary.html b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/package-summary.html new file mode 100644 index 00000000..19c2636e --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/package-summary.html @@ -0,0 +1,143 @@ + + + + +com.serial4j.core.serial + + + + + + + + + + + + + + + +
+ +
+
+
+

Package com.serial4j.core.serial

+
+
+
package com.serial4j.core.serial
+
+
Provides a Serial UART Monitor API using Serial4j with 2 monitor entities, SerialReadEntity + and SerialWriteEntity.
+
+
+
    +
  • + +
  • +
  • +
    +
    +
    +
    +
    Class
    +
    Description
    + +
    +
    Represents codes for the POSIX Systems baud rates and their real values + defined from invalid input: '<'./usr/include/x86_64-linux-gnu/bits/termios.h>.
    +
    + +
    +
    Represents the native java binding for Serial4j API, represented by + [com_serial4j_core_serial_NativeTerminalDevice.h] natively.
    +
    + +
    +
    Provides Unix file system permissions for the specified serial port + of the terminal device.
    +
    + +
    +
    Provides a Unix terminal read configuration for the specified serial port of the + terminal device.
    +
    + +
    +
    Represents a Unix terminal device port properties wrapper.
    +
    + +
    +
    The main entry class for the native terminal device for Serial4j api.
    +
    +
    +
    +
    +
  • +
+
+
+
+
+ + diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/package-tree.html b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/package-tree.html new file mode 100644 index 00000000..91f3f2ec --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/package-tree.html @@ -0,0 +1,90 @@ + + + + +com.serial4j.core.serial Class Hierarchy + + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package com.serial4j.core.serial

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+
+

Enum Class Hierarchy

+ +
+
+
+
+ + diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/throwable/BadFileDescriptorException.html b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/throwable/BadFileDescriptorException.html new file mode 100644 index 00000000..487b44b7 --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/throwable/BadFileDescriptorException.html @@ -0,0 +1,196 @@ + + + + +BadFileDescriptorException + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class BadFileDescriptorException

+
+ +
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public final class BadFileDescriptorException +extends SerialThrowable
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      BadFileDescriptorException

      +
      public BadFileDescriptorException(String additionalText)
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getCausingErrno

      +
      public Errno getCausingErrno()
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/throwable/BrokenPipeException.html b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/throwable/BrokenPipeException.html new file mode 100644 index 00000000..8fcef897 --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/throwable/BrokenPipeException.html @@ -0,0 +1,196 @@ + + + + +BrokenPipeException + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class BrokenPipeException

+
+ +
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public final class BrokenPipeException +extends SerialThrowable
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      BrokenPipeException

      +
      public BrokenPipeException(String additionalText)
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getCausingErrno

      +
      public Errno getCausingErrno()
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/throwable/FileAlreadyOpenedException.html b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/throwable/FileAlreadyOpenedException.html new file mode 100644 index 00000000..890f8d00 --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/throwable/FileAlreadyOpenedException.html @@ -0,0 +1,196 @@ + + + + +FileAlreadyOpenedException + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class FileAlreadyOpenedException

+
+ +
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public final class FileAlreadyOpenedException +extends SerialThrowable
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      FileAlreadyOpenedException

      +
      public FileAlreadyOpenedException(String additionalText)
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getCausingErrno

      +
      public Errno getCausingErrno()
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/throwable/FileIsDirectoryException.html b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/throwable/FileIsDirectoryException.html new file mode 100644 index 00000000..f0e26715 --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/throwable/FileIsDirectoryException.html @@ -0,0 +1,196 @@ + + + + +FileIsDirectoryException + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class FileIsDirectoryException

+
+ +
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public final class FileIsDirectoryException +extends SerialThrowable
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      FileIsDirectoryException

      +
      public FileIsDirectoryException(String additionalText)
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getCausingErrno

      +
      public Errno getCausingErrno()
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/throwable/FileTableOverflowException.html b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/throwable/FileTableOverflowException.html new file mode 100644 index 00000000..b40b39c7 --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/throwable/FileTableOverflowException.html @@ -0,0 +1,196 @@ + + + + +FileTableOverflowException + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class FileTableOverflowException

+
+ +
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public final class FileTableOverflowException +extends SerialThrowable
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      FileTableOverflowException

      +
      public FileTableOverflowException(String additionalText)
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getCausingErrno

      +
      public Errno getCausingErrno()
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/throwable/FileTooLargeException.html b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/throwable/FileTooLargeException.html new file mode 100644 index 00000000..41649b77 --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/throwable/FileTooLargeException.html @@ -0,0 +1,196 @@ + + + + +FileTooLargeException + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class FileTooLargeException

+
+ +
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public class FileTooLargeException +extends SerialThrowable
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      FileTooLargeException

      +
      public FileTooLargeException(String additionalText)
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getCausingErrno

      +
      public Errno getCausingErrno()
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/throwable/InputOutputException.html b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/throwable/InputOutputException.html new file mode 100644 index 00000000..0fe6300f --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/throwable/InputOutputException.html @@ -0,0 +1,196 @@ + + + + +InputOutputException + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class InputOutputException

+
+ +
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public class InputOutputException +extends SerialThrowable
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      InputOutputException

      +
      public InputOutputException(String additionalText)
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getCausingErrno

      +
      public Errno getCausingErrno()
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/throwable/InterruptedSystemCallException.html b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/throwable/InterruptedSystemCallException.html new file mode 100644 index 00000000..6de58be9 --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/throwable/InterruptedSystemCallException.html @@ -0,0 +1,196 @@ + + + + +InterruptedSystemCallException + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class InterruptedSystemCallException

+
+ +
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public class InterruptedSystemCallException +extends SerialThrowable
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      InterruptedSystemCallException

      +
      public InterruptedSystemCallException(String additionalText)
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getCausingErrno

      +
      public Errno getCausingErrno()
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/throwable/InvalidArgumentException.html b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/throwable/InvalidArgumentException.html new file mode 100644 index 00000000..db457cd4 --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/throwable/InvalidArgumentException.html @@ -0,0 +1,196 @@ + + + + +InvalidArgumentException + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class InvalidArgumentException

+
+ +
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public class InvalidArgumentException +extends SerialThrowable
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      InvalidArgumentException

      +
      public InvalidArgumentException(String additionalText)
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getCausingErrno

      +
      public Errno getCausingErrno()
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/throwable/InvalidPortException.html b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/throwable/InvalidPortException.html new file mode 100644 index 00000000..3b1961d6 --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/throwable/InvalidPortException.html @@ -0,0 +1,196 @@ + + + + +InvalidPortException + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class InvalidPortException

+
+ +
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public final class InvalidPortException +extends SerialThrowable
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      InvalidPortException

      +
      public InvalidPortException(String portName)
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getCausingErrno

      +
      public Errno getCausingErrno()
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/throwable/NoAvailableTtyDevicesException.html b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/throwable/NoAvailableTtyDevicesException.html new file mode 100644 index 00000000..7ccb5bcf --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/throwable/NoAvailableTtyDevicesException.html @@ -0,0 +1,196 @@ + + + + +NoAvailableTtyDevicesException + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class NoAvailableTtyDevicesException

+
+ +
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public class NoAvailableTtyDevicesException +extends SerialThrowable
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      NoAvailableTtyDevicesException

      +
      public NoAvailableTtyDevicesException(String additionalText)
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getCausingErrno

      +
      public Errno getCausingErrno()
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/throwable/NoSpaceLeftException.html b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/throwable/NoSpaceLeftException.html new file mode 100644 index 00000000..9948197e --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/throwable/NoSpaceLeftException.html @@ -0,0 +1,196 @@ + + + + +NoSpaceLeftException + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class NoSpaceLeftException

+
+ +
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public class NoSpaceLeftException +extends SerialThrowable
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      NoSpaceLeftException

      +
      public NoSpaceLeftException(String additionalText)
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getCausingErrno

      +
      public Errno getCausingErrno()
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/throwable/NoSuchDeviceException.html b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/throwable/NoSuchDeviceException.html new file mode 100644 index 00000000..a25e002c --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/throwable/NoSuchDeviceException.html @@ -0,0 +1,196 @@ + + + + +NoSuchDeviceException + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class NoSuchDeviceException

+
+ +
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public final class NoSuchDeviceException +extends SerialThrowable
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      NoSuchDeviceException

      +
      public NoSuchDeviceException(String additionalText)
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getCausingErrno

      +
      public Errno getCausingErrno()
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/throwable/NoSuchFileException.html b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/throwable/NoSuchFileException.html new file mode 100644 index 00000000..6d2c4278 --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/throwable/NoSuchFileException.html @@ -0,0 +1,196 @@ + + + + +NoSuchFileException + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class NoSuchFileException

+
+ +
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public final class NoSuchFileException +extends SerialThrowable
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      NoSuchFileException

      +
      public NoSuchFileException(String additionalText)
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getCausingErrno

      +
      public Errno getCausingErrno()
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/throwable/NotTtyDeviceException.html b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/throwable/NotTtyDeviceException.html new file mode 100644 index 00000000..6e5055bd --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/throwable/NotTtyDeviceException.html @@ -0,0 +1,196 @@ + + + + +NotTtyDeviceException + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class NotTtyDeviceException

+
+ +
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public final class NotTtyDeviceException +extends SerialThrowable
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      NotTtyDeviceException

      +
      public NotTtyDeviceException(String additionalText)
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getCausingErrno

      +
      public Errno getCausingErrno()
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/throwable/OperationFailedException.html b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/throwable/OperationFailedException.html new file mode 100644 index 00000000..59f30db2 --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/throwable/OperationFailedException.html @@ -0,0 +1,205 @@ + + + + +OperationFailedException + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class OperationFailedException

+
+ +
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public final class OperationFailedException +extends SerialThrowable
+
Implements an operation failed exception with error code [EOPERATION_FAILED] or [-1]. + Possibly thrown from a failed operation, for example trying to open a read-only device.
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      OperationFailedException

      +
      public OperationFailedException(String additionalText)
      +
      Instantiates an operation failed java exceptions with error code (-1).
      +
      +
      Parameters:
      +
      additionalText - additional text to add to the exception message.
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getCausingErrno

      +
      public Errno getCausingErrno()
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/throwable/PermissionDeniedException.html b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/throwable/PermissionDeniedException.html new file mode 100644 index 00000000..8dcf8aa7 --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/throwable/PermissionDeniedException.html @@ -0,0 +1,206 @@ + + + + +PermissionDeniedException + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class PermissionDeniedException

+
+ +
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public class PermissionDeniedException +extends SerialThrowable
+
Implements a permission exception for error code [EACCESS] or [13] as defined by invalid input: '<'errno.h>. + Possibly thrown from non-authorized permissions from a non-root user during an attempt to open + a system resource.
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      PermissionDeniedException

      +
      public PermissionDeniedException(String additionalText)
      +
      Instantiates a permission exception with an additionaltext and error code [13].
      +
      +
      Parameters:
      +
      additionalText - additional text for the permission message.
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getCausingErrno

      +
      public Errno getCausingErrno()
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/throwable/ReadOnlyFileSystemException.html b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/throwable/ReadOnlyFileSystemException.html new file mode 100644 index 00000000..5b359141 --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/throwable/ReadOnlyFileSystemException.html @@ -0,0 +1,196 @@ + + + + +ReadOnlyFileSystemException + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class ReadOnlyFileSystemException

+
+ +
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public final class ReadOnlyFileSystemException +extends SerialThrowable
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      ReadOnlyFileSystemException

      +
      public ReadOnlyFileSystemException(String additionalText)
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getCausingErrno

      +
      public Errno getCausingErrno()
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/throwable/SerialThrowable.html b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/throwable/SerialThrowable.html new file mode 100644 index 00000000..786bead9 --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/throwable/SerialThrowable.html @@ -0,0 +1,172 @@ + + + + +SerialThrowable + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class SerialThrowable

+
+
java.lang.Object +
java.lang.Throwable +
java.lang.Exception +
java.lang.RuntimeException +
com.serial4j.core.serial.throwable.SerialThrowable
+
+
+
+
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
Direct Known Subclasses:
+
BadFileDescriptorException, BrokenPipeException, FileAlreadyOpenedException, FileIsDirectoryException, FileTableOverflowException, FileTooLargeException, InputOutputException, InterruptedSystemCallException, InvalidArgumentException, InvalidPortException, NoAvailableTtyDevicesException, NoSpaceLeftException, NoSuchDeviceException, NoSuchFileException, NotTtyDeviceException, OperationFailedException, PermissionDeniedException, ReadOnlyFileSystemException, TooManyOpenedFilesException, TryAgainException
+
+
+
public abstract class SerialThrowable +extends RuntimeException
+
Defines an abstract entity for the serial throwable exceptions.
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      SerialThrowable

      +
      public SerialThrowable(String message)
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/throwable/TooManyOpenedFilesException.html b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/throwable/TooManyOpenedFilesException.html new file mode 100644 index 00000000..fd6712f8 --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/throwable/TooManyOpenedFilesException.html @@ -0,0 +1,196 @@ + + + + +TooManyOpenedFilesException + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class TooManyOpenedFilesException

+
+ +
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public final class TooManyOpenedFilesException +extends SerialThrowable
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      TooManyOpenedFilesException

      +
      public TooManyOpenedFilesException(String additionalText)
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getCausingErrno

      +
      public Errno getCausingErrno()
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/throwable/TryAgainException.html b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/throwable/TryAgainException.html new file mode 100644 index 00000000..bb2e7c48 --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/throwable/TryAgainException.html @@ -0,0 +1,196 @@ + + + + +TryAgainException + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class TryAgainException

+
+ +
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public final class TryAgainException +extends SerialThrowable
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      TryAgainException

      +
      public TryAgainException(String additionalText)
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getCausingErrno

      +
      public Errno getCausingErrno()
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/throwable/package-summary.html b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/throwable/package-summary.html new file mode 100644 index 00000000..35c315a3 --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/throwable/package-summary.html @@ -0,0 +1,160 @@ + + + + +com.serial4j.core.serial.throwable + + + + + + + + + + + + + + + +
+ +
+
+
+

Package com.serial4j.core.serial.throwable

+
+
+
package com.serial4j.core.serial.throwable
+
+ +
+
+
+
+ + diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/throwable/package-tree.html b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/throwable/package-tree.html new file mode 100644 index 00000000..e70ba0e3 --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/serial/throwable/package-tree.html @@ -0,0 +1,107 @@ + + + + +com.serial4j.core.serial.throwable Class Hierarchy + + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package com.serial4j.core.serial.throwable

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+
+
+
+ + diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/util/natives/NativeImageLoader.NativeImage.html b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/util/natives/NativeImageLoader.NativeImage.html new file mode 100644 index 00000000..e900e603 --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/util/natives/NativeImageLoader.NativeImage.html @@ -0,0 +1,262 @@ + + + + +NativeImageLoader.NativeImage + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Enum Class NativeImageLoader.NativeImage

+
+
java.lang.Object +
java.lang.Enum<NativeImageLoader.NativeImage> +
com.serial4j.core.util.natives.NativeImageLoader.NativeImage
+
+
+
+
+
All Implemented Interfaces:
+
Serializable, Comparable<NativeImageLoader.NativeImage>, Constable
+
+
+
Enclosing class:
+
NativeImageLoader
+
+
+
public static enum NativeImageLoader.NativeImage +extends Enum<NativeImageLoader.NativeImage>
+
Represents an image domain.
+
+
+ +
+
+
    + +
  • +
    +

    Enum Constant Details

    + +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      values

      +
      public static NativeImageLoader.NativeImage[] values()
      +
      Returns an array containing the constants of this enum class, in +the order they are declared.
      +
      +
      Returns:
      +
      an array containing the constants of this enum class, in the order they are declared
      +
      +
      +
    • +
    • +
      +

      valueOf

      +
      public static NativeImageLoader.NativeImage valueOf(String name)
      +
      Returns the enum constant of this class with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this class. (Extraneous whitespace characters are +not permitted.)
      +
      +
      Parameters:
      +
      name - the name of the enum constant to be returned.
      +
      Returns:
      +
      the enum constant with the specified name
      +
      Throws:
      +
      IllegalArgumentException - if this enum class has no constant with the specified name
      +
      NullPointerException - if the argument is null
      +
      +
      +
    • +
    • +
      +

      getImage

      +
      public String getImage()
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/util/natives/NativeImageLoader.State.html b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/util/natives/NativeImageLoader.State.html new file mode 100644 index 00000000..c8081e18 --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/util/natives/NativeImageLoader.State.html @@ -0,0 +1,229 @@ + + + + +NativeImageLoader.State + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Enum Class NativeImageLoader.State

+
+
java.lang.Object +
java.lang.Enum<NativeImageLoader.State> +
com.serial4j.core.util.natives.NativeImageLoader.State
+
+
+
+
+
All Implemented Interfaces:
+
Serializable, Comparable<NativeImageLoader.State>, Constable
+
+
+
Enclosing class:
+
NativeImageLoader
+
+
+
public static enum NativeImageLoader.State +extends Enum<NativeImageLoader.State>
+
A state for a critical section.
+
+
+ +
+
+
    + +
  • +
    +

    Enum Constant Details

    + +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      values

      +
      public static NativeImageLoader.State[] values()
      +
      Returns an array containing the constants of this enum class, in +the order they are declared.
      +
      +
      Returns:
      +
      an array containing the constants of this enum class, in the order they are declared
      +
      +
      +
    • +
    • +
      +

      valueOf

      +
      public static NativeImageLoader.State valueOf(String name)
      +
      Returns the enum constant of this class with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this class. (Extraneous whitespace characters are +not permitted.)
      +
      +
      Parameters:
      +
      name - the name of the enum constant to be returned.
      +
      Returns:
      +
      the enum constant with the specified name
      +
      Throws:
      +
      IllegalArgumentException - if this enum class has no constant with the specified name
      +
      NullPointerException - if the argument is null
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/util/natives/NativeImageLoader.html b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/util/natives/NativeImageLoader.html new file mode 100644 index 00000000..40efe2ec --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/util/natives/NativeImageLoader.html @@ -0,0 +1,207 @@ + + + + +NativeImageLoader + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class NativeImageLoader

+
+
java.lang.Object +
com.serial4j.core.util.natives.NativeImageLoader
+
+
+
+
public final class NativeImageLoader +extends Object
+
Helper utility for loading native images.
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      MUTEX

      +
      protected static final Semaphore.Mutex MUTEX
      +
      +
    • +
    • +
      +

      SEMAPHORE

      +
      protected static final Semaphore SEMAPHORE
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      loadLibrary

      +
      public static void loadLibrary()
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/util/natives/package-summary.html b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/util/natives/package-summary.html new file mode 100644 index 00000000..ad16c70b --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/util/natives/package-summary.html @@ -0,0 +1,104 @@ + + + + +com.serial4j.core.util.natives + + + + + + + + + + + + + + + +
+ +
+
+
+

Package com.serial4j.core.util.natives

+
+
+
package com.serial4j.core.util.natives
+
+ +
+
+
+
+ + diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/util/natives/package-tree.html b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/util/natives/package-tree.html new file mode 100644 index 00000000..0900dc8e --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/util/natives/package-tree.html @@ -0,0 +1,87 @@ + + + + +com.serial4j.core.util.natives Class Hierarchy + + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package com.serial4j.core.util.natives

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+
+

Enum Class Hierarchy

+ +
+
+
+
+ + diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/util/process/Semaphore.Mutex.html b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/util/process/Semaphore.Mutex.html new file mode 100644 index 00000000..00c989ae --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/util/process/Semaphore.Mutex.html @@ -0,0 +1,251 @@ + + + + +Semaphore.Mutex + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class Semaphore.Mutex

+
+
java.lang.Object +
com.serial4j.core.util.process.Semaphore.Mutex
+
+
+
+
Enclosing class:
+
Semaphore
+
+
+
public static final class Semaphore.Mutex +extends Object
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      Mutex

      +
      public Mutex(O monitorObject, + LD lockData, + ULD unlockData)
      +
      +
    • +
    • +
      +

      Mutex

      +
      public Mutex()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      setLockData

      +
      public void setLockData(Object lockData)
      +
      +
    • +
    • +
      +

      setMonitorObject

      +
      public void setMonitorObject(Object monitorObject)
      +
      +
    • +
    • +
      +

      setUnlockData

      +
      protected void setUnlockData(Object unlockData)
      +
      +
    • +
    • +
      +

      getLockData

      +
      public Object getLockData()
      +
      +
    • +
    • +
      +

      getMonitorObject

      +
      public Object getMonitorObject()
      +
      +
    • +
    • +
      +

      getUnlockData

      +
      public Object getUnlockData()
      +
      +
    • +
    • +
      +

      NO_JOB

      +
      protected final Void NO_JOB()
      +
      Creates a 'no job' job to trick the java loop. + (a java loop must have something inside to act upon).
      +
      +
      Returns:
      +
      a null job.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/util/process/Semaphore.html b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/util/process/Semaphore.html new file mode 100644 index 00000000..1af62781 --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/util/process/Semaphore.html @@ -0,0 +1,206 @@ + + + + +Semaphore + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class Semaphore

+
+
java.lang.Object +
com.serial4j.core.util.process.Semaphore
+
+
+
+
public final class Semaphore +extends Object
+
A thread synchronizer utility using mutex data states.
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      build

      +
      public static Semaphore build(Semaphore.Mutex mutex)
      +
      +
    • +
    • +
      +

      lock

      +
      public <MO> void lock(MO monitorObject)
      +
      +
    • +
    • +
      +

      waitForUnlock

      +
      public void waitForUnlock()
      +
      +
    • +
    • +
      +

      unlock

      +
      public <O> void unlock(O locker)
      +
      +
    • +
    • +
      +

      getMutex

      +
      public Semaphore.Mutex getMutex()
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/util/process/package-summary.html b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/util/process/package-summary.html new file mode 100644 index 00000000..9377fca8 --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/util/process/package-summary.html @@ -0,0 +1,96 @@ + + + + +com.serial4j.core.util.process + + + + + + + + + + + + + + + +
+ +
+
+
+

Package com.serial4j.core.util.process

+
+
+
package com.serial4j.core.util.process
+
+
    +
  • +
    +
    Classes
    +
    +
    Class
    +
    Description
    + +
    +
    A thread synchronizer utility using mutex data states.
    +
    + +
     
    +
    +
    +
  • +
+
+
+
+
+ + diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/util/process/package-tree.html b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/util/process/package-tree.html new file mode 100644 index 00000000..03c85475 --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/core/util/process/package-tree.html @@ -0,0 +1,73 @@ + + + + +com.serial4j.core.util.process Class Hierarchy + + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package com.serial4j.core.util.process

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+
+
+
+ + diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/example/Launcher.html b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/example/Launcher.html new file mode 100644 index 00000000..9af05d73 --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/example/Launcher.html @@ -0,0 +1,179 @@ + + + + +Launcher + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class Launcher

+
+
java.lang.Object +
com.serial4j.example.Launcher
+
+
+
+
public final class Launcher +extends Object
+
Starts the applications test cases.
+
+
+ +
+
+ +
+ +
+
+
+ + diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/example/monitor/HelloSerialMonitor.html b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/example/monitor/HelloSerialMonitor.html new file mode 100644 index 00000000..112ccd9c --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/example/monitor/HelloSerialMonitor.html @@ -0,0 +1,354 @@ + + + + +HelloSerialMonitor + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class HelloSerialMonitor

+
+
java.lang.Object +
com.serial4j.example.monitor.HelloSerialMonitor
+
+
+
+
All Implemented Interfaces:
+
EntityStatus<SerialWriteEntity>, SerialDataListener, Runnable
+
+
+
public class HelloSerialMonitor +extends Object +implements SerialDataListener, EntityStatus<SerialWriteEntity>, Runnable
+
Represents an example for UART using jSerialComm.
+
+
+
    + +
  • +
    +

    Constructor Summary

    +
    Constructors
    +
    +
    Constructor
    +
    Description
    + +
     
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    void
    +
    onDataReceived(int data)
    +
    +
    Dispatched when the data is received at the +
    +invalid @link +
    serial.entity.impl.SerialReadEntity
    +
    + end + on its thread.
    +
    +
    void
    + +
    +
    Dispatched whenever a data frame is completely received at the +
    +invalid @link +
    serial.entity.impl.SerialReadEntity
    +
    + end + when [Return-Carriage/Newline] check is enabled as it specifies a particular data frame.
    +
    +
    void
    + +
    +
    Dispatched when the capsular data is transmitted at the +
    +invalid @link +
    serial.entity.impl.SerialWriteEntity
    +
    + + end on its thread.
    +
    +
    void
    + +
    +
    Fired when the serial entity is initialized on the first monitor update.
    +
    +
    void
    + +
    +
    Fired when the serial entity is terminated on the last monitor update.
    +
    +
    void
    +
    onUpdate(SerialWriteEntity serialMonitorEntity)
    +
    +
    Fired on each serial monitor update.
    +
    +
    void
    +
    run()
    +
     
    +
    +
    +
    +
    +

    Methods inherited from class java.lang.Object

    +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      HelloSerialMonitor

      +
      public HelloSerialMonitor()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      run

      +
      public void run()
      +
      +
      Specified by:
      +
      run in interface Runnable
      +
      +
      +
    • +
    • +
      +

      onSerialEntityInitialized

      +
      public void onSerialEntityInitialized(SerialWriteEntity serialMonitorEntity)
      +
      Description copied from interface: EntityStatus
      +
      Fired when the serial entity is initialized on the first monitor update.
      +
      +
      Specified by:
      +
      onSerialEntityInitialized in interface EntityStatus<SerialWriteEntity>
      +
      Parameters:
      +
      serialMonitorEntity - the serial entity object.
      +
      +
      +
    • +
    • +
      +

      onSerialEntityTerminated

      +
      public void onSerialEntityTerminated(SerialWriteEntity serialMonitorEntity)
      +
      Description copied from interface: EntityStatus
      +
      Fired when the serial entity is terminated on the last monitor update.
      +
      +
      Specified by:
      +
      onSerialEntityTerminated in interface EntityStatus<SerialWriteEntity>
      +
      Parameters:
      +
      serialMonitorEntity - the serial entity object.
      +
      +
      +
    • +
    • +
      +

      onUpdate

      +
      public void onUpdate(SerialWriteEntity serialMonitorEntity)
      +
      Description copied from interface: EntityStatus
      +
      Fired on each serial monitor update.
      +
      +
      Specified by:
      +
      onUpdate in interface EntityStatus<SerialWriteEntity>
      +
      Parameters:
      +
      serialMonitorEntity - the serial entity object.
      +
      +
      +
    • +
    • +
      +

      onDataReceived

      +
      public void onDataReceived(int data)
      +
      Description copied from interface: SerialDataListener
      +
      Dispatched when the data is received at the +
      +invalid @link +
      serial.entity.impl.SerialReadEntity
      +
      + end + on its thread. + + This method is dispatched on the +
      +invalid @link +
      serial.entity.impl.SerialReadEntity
      +
      + thread.
      +
      +
      Specified by:
      +
      onDataReceived in interface SerialDataListener
      +
      Parameters:
      +
      data - the data received serially in 8-bit format.
      +
      +
      +
    • +
    • +
      +

      onDataTransmitted

      +
      public void onDataTransmitted(int data)
      +
      Description copied from interface: SerialDataListener
      +
      Dispatched when the capsular data is transmitted at the +
      +invalid @link +
      serial.entity.impl.SerialWriteEntity
      +
      + + end on its thread. + + This method is dispatched on the +
      +invalid @link +
      serial.entity.impl.SerialWriteEntity
      +
      + thread.
      +
      +
      Specified by:
      +
      onDataTransmitted in interface SerialDataListener
      +
      Parameters:
      +
      data - the data transmitted serially in 8-bit format.
      +
      +
      +
    • +
    • +
      +

      onDataReceived

      +
      public void onDataReceived(String data)
      +
      Description copied from interface: SerialDataListener
      +
      Dispatched whenever a data frame is completely received at the +
      +invalid @link +
      serial.entity.impl.SerialReadEntity
      +
      + end + when [Return-Carriage/Newline] check is enabled as it specifies a particular data frame. + + This method is dispatched on the +
      +invalid @link +
      serial.entity.impl.SerialReadEntity
      +
      + thread.
      +
      +
      Specified by:
      +
      onDataReceived in interface SerialDataListener
      +
      Parameters:
      +
      data - the data frame.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/example/monitor/package-summary.html b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/example/monitor/package-summary.html new file mode 100644 index 00000000..b19afd02 --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/example/monitor/package-summary.html @@ -0,0 +1,107 @@ + + + + +com.serial4j.example.monitor + + + + + + + + + + + + + + + +
+ +
+
+
+

Package com.serial4j.example.monitor

+
+
+
package com.serial4j.example.monitor
+
+ +
+
+
+
+ + diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/example/monitor/package-tree.html b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/example/monitor/package-tree.html new file mode 100644 index 00000000..5f60c1f4 --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/example/monitor/package-tree.html @@ -0,0 +1,72 @@ + + + + +com.serial4j.example.monitor Class Hierarchy + + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package com.serial4j.example.monitor

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+
+
+
+ + diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/example/package-summary.html b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/example/package-summary.html new file mode 100644 index 00000000..1ebad979 --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/example/package-summary.html @@ -0,0 +1,107 @@ + + + + +com.serial4j.example + + + + + + + + + + + + + + + +
+ +
+
+
+

Package com.serial4j.example

+
+
+
package com.serial4j.example
+
+ +
+
+
+
+ + diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/example/package-tree.html b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/example/package-tree.html new file mode 100644 index 00000000..d1b2e7b5 --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/example/package-tree.html @@ -0,0 +1,72 @@ + + + + +com.serial4j.example Class Hierarchy + + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package com.serial4j.example

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+
+
+
+ + diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/example/serial4j/HelloNativeSerial4J.html b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/example/serial4j/HelloNativeSerial4J.html new file mode 100644 index 00000000..465eb3ff --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/example/serial4j/HelloNativeSerial4J.html @@ -0,0 +1,225 @@ + + + + +HelloNativeSerial4J + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class HelloNativeSerial4J

+
+
java.lang.Object +
com.serial4j.example.serial4j.HelloNativeSerial4J
+
+
+
+
All Implemented Interfaces:
+
Runnable
+
+
+
public final class HelloNativeSerial4J +extends Object +implements Runnable
+
An example for Serial4j showing Native terminal control and + native file io on a serial port using a java binding to invalid input: '<'fcntl.h> and invalid input: '<'unistd.h> read (...) and write (...).
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      ttyDevice

      +
      protected final TerminalDevice ttyDevice
      +
      Provides a java binding to a native terminal device.
      +
      +
    • +
    • +
      +

      EXAMPLE_LOGGER

      +
      protected static final Logger EXAMPLE_LOGGER
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      HelloNativeSerial4J

      +
      public HelloNativeSerial4J()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      run

      +
      public void run()
      +
      +
      Specified by:
      +
      run in interface Runnable
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/example/serial4j/HelloSerial4jIO.html b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/example/serial4j/HelloSerial4jIO.html new file mode 100644 index 00000000..4de0c865 --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/example/serial4j/HelloSerial4jIO.html @@ -0,0 +1,215 @@ + + + + +HelloSerial4jIO + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class HelloSerial4jIO

+
+
java.lang.Object +
com.serial4j.example.serial4j.HelloSerial4jIO
+
+
+
+
All Implemented Interfaces:
+
Runnable
+
+
+
public final class HelloSerial4jIO +extends Object +implements Runnable
+
An example showing serial and terminal io using java.io API.
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      ttyDevice

      +
      protected final TerminalDevice ttyDevice
      +
      Provides a java binding to the native terminal device.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      HelloSerial4jIO

      +
      public HelloSerial4jIO()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      run

      +
      public void run()
      +
      +
      Specified by:
      +
      run in interface Runnable
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/example/serial4j/package-summary.html b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/example/serial4j/package-summary.html new file mode 100644 index 00000000..f3eaf0f6 --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/example/serial4j/package-summary.html @@ -0,0 +1,112 @@ + + + + +com.serial4j.example.serial4j + + + + + + + + + + + + + + + +
+ +
+
+
+

Package com.serial4j.example.serial4j

+
+
+
package com.serial4j.example.serial4j
+
+
    +
  • + +
  • +
  • +
    +
    Classes
    +
    +
    Class
    +
    Description
    + +
    +
    An example for Serial4j showing Native terminal control and + native file io on a serial port using a java binding to invalid input: '<'fcntl.h> and invalid input: '<'unistd.h> read (...) and write (...).
    +
    + +
    +
    An example showing serial and terminal io using java.io API.
    +
    +
    +
    +
  • +
+
+
+
+
+ + diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/example/serial4j/package-tree.html b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/example/serial4j/package-tree.html new file mode 100644 index 00000000..bf7ad5f9 --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/com/serial4j/example/serial4j/package-tree.html @@ -0,0 +1,73 @@ + + + + +com.serial4j.example.serial4j Class Hierarchy + + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package com.serial4j.example.serial4j

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+
+
+
+ + diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/constant-values.html b/HelloSerial4j/serial4j-0.3A-javadoc/constant-values.html new file mode 100644 index 00000000..aca9fb20 --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/constant-values.html @@ -0,0 +1,80 @@ + + + + +Constant Field Values + + + + + + + + + + + + + + + +
+ +
+
+
+

Constant Field Values

+
+

Contents

+ +
+
+
+

com.serial4j.*

+
    +
  • +
    com.serial4j.core.serial.monitor.SerialMonitorException
    +
    +
    Modifier and Type
    +
    Constant Field
    +
    Value
    +
    public static final String
    + +
    "Cannot Access the monitor without opening the port !"
    +
    +
  • +
+
+
+
+
+ + diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/copy.svg b/HelloSerial4j/serial4j-0.3A-javadoc/copy.svg new file mode 100644 index 00000000..d435f6c3 --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/copy.svg @@ -0,0 +1,33 @@ + + + + + + + + diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/element-list b/HelloSerial4j/serial4j-0.3A-javadoc/element-list new file mode 100644 index 00000000..89f0bd64 --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/element-list @@ -0,0 +1,12 @@ +com.serial4j.core.errno +com.serial4j.core.serial +com.serial4j.core.serial.control +com.serial4j.core.serial.entity +com.serial4j.core.serial.entity.impl +com.serial4j.core.serial.monitor +com.serial4j.core.serial.throwable +com.serial4j.core.util.natives +com.serial4j.core.util.process +com.serial4j.example +com.serial4j.example.monitor +com.serial4j.example.serial4j diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/help-doc.html b/HelloSerial4j/serial4j-0.3A-javadoc/help-doc.html new file mode 100644 index 00000000..d18b8c38 --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/help-doc.html @@ -0,0 +1,194 @@ + + + + +API Help + + + + + + + + + + + + + + + +
+ +
+
+

JavaDoc Help

+ +
+
+

Navigation

+Starting from the Overview page, you can browse the documentation using the links in each page, and in the navigation bar at the top of each page. The Index and Search box allow you to navigate to specific declarations and summary pages, including: All Packages, All Classes and Interfaces + +
+
+
+

Kinds of Pages

+The following sections describe the different kinds of pages in this collection. +
+

Overview

+

The Overview page is the front page of this API document and provides a list of all packages with a summary for each. This page can also contain an overall description of the set of packages.

+
+
+

Package

+

Each package has a page that contains a list of its classes and interfaces, with a summary for each. These pages may contain the following categories:

+
    +
  • Interfaces
  • +
  • Classes
  • +
  • Enum Classes
  • +
  • Exception Classes
  • +
  • Annotation Interfaces
  • +
+
+
+

Class or Interface

+

Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a declaration and description, member summary tables, and detailed member descriptions. Entries in each of these sections are omitted if they are empty or not applicable.

+
    +
  • Class Inheritance Diagram
  • +
  • Direct Subclasses
  • +
  • All Known Subinterfaces
  • +
  • All Known Implementing Classes
  • +
  • Class or Interface Declaration
  • +
  • Class or Interface Description
  • +
+
+
    +
  • Nested Class Summary
  • +
  • Enum Constant Summary
  • +
  • Field Summary
  • +
  • Property Summary
  • +
  • Constructor Summary
  • +
  • Method Summary
  • +
  • Required Element Summary
  • +
  • Optional Element Summary
  • +
+
+
    +
  • Enum Constant Details
  • +
  • Field Details
  • +
  • Property Details
  • +
  • Constructor Details
  • +
  • Method Details
  • +
  • Element Details
  • +
+

Note: Annotation interfaces have required and optional elements, but not methods. Only enum classes have enum constants. The components of a record class are displayed as part of the declaration of the record class. Properties are a feature of JavaFX.

+

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.

+
+
+

Other Files

+

Packages and modules may contain pages with additional information related to the declarations nearby.

+
+
+

Tree (Class Hierarchy)

+

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. Classes are organized by inheritance structure starting with java.lang.Object. Interfaces do not inherit from java.lang.Object.

+
    +
  • When viewing the Overview page, clicking on TREE displays the hierarchy for all packages.
  • +
  • When viewing a particular package, class or interface page, clicking on TREE displays the hierarchy for only that package.
  • +
+
+
+

Constant Field Values

+

The Constant Field Values page lists the static final fields and their values.

+
+
+

Serialized Form

+

Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to those who implement rather than use 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.

+
+
+

All Packages

+

The All Packages page contains an alphabetic index of all packages contained in the documentation.

+
+
+

All Classes and Interfaces

+

The All Classes and Interfaces page contains an alphabetic index of all classes and interfaces contained in the documentation, including annotation interfaces, enum classes, and record classes.

+
+
+

Index

+

The Index contains an alphabetic index of all classes, interfaces, constructors, methods, and fields in the documentation, as well as summary pages such as All Packages, All Classes and Interfaces.

+
+
+
+This help file applies to API documentation generated by the standard doclet.
+
+
+ + diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/index-all.html b/HelloSerial4j/serial4j-0.3A-javadoc/index-all.html new file mode 100644 index 00000000..2de32250 --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/index-all.html @@ -0,0 +1,1433 @@ + + + + +Index + + + + + + + + + + + + + + + +
+ +
+
+
+

Index

+
+A B C D E F G H I L M N O P R S T U V W X 
All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form +

A

+
+
addSerialDataListener(SerialDataListener) - Method in class com.serial4j.core.serial.monitor.SerialMonitor
+
+
Adds a new serial data listener to the list of the updatable listeners.
+
+
addWritableCapsule(WritableCapsule) - Method in class com.serial4j.core.serial.entity.impl.SerialWriteEntity
+
+
Adds a new writable capsule, the data will be extracted during the + next update run.
+
+
append(TerminalFlag) - Method in class com.serial4j.core.serial.control.TerminalFlag
+
+
Appends a flag's value into the current one's value.
+
+
append(TerminalFlag...) - Method in class com.serial4j.core.serial.control.TerminalFlag
+
+
Appends a list of flags' values into the current one's value.
+
+
append(Permissions) - Method in class com.serial4j.core.serial.Permissions
+
+
Appends new permissions to this permissions object.
+
+
append(Permissions...) - Method in class com.serial4j.core.serial.Permissions
+
+
Appends some new permissions to this permissions object.
+
+
+

B

+
+
B0 - Enum constant in enum class com.serial4j.core.serial.BaudRate
+
+
Baudrates for POSIX systems as defined by invalid input: '<'termios.h>
+
+
B1000000 - Enum constant in enum class com.serial4j.core.serial.BaudRate
+
 
+
B110 - Enum constant in enum class com.serial4j.core.serial.BaudRate
+
 
+
B115200 - Enum constant in enum class com.serial4j.core.serial.BaudRate
+
 
+
B1152000 - Enum constant in enum class com.serial4j.core.serial.BaudRate
+
 
+
B1200 - Enum constant in enum class com.serial4j.core.serial.BaudRate
+
 
+
B134 - Enum constant in enum class com.serial4j.core.serial.BaudRate
+
 
+
B150 - Enum constant in enum class com.serial4j.core.serial.BaudRate
+
 
+
B1500000 - Enum constant in enum class com.serial4j.core.serial.BaudRate
+
 
+
B1800 - Enum constant in enum class com.serial4j.core.serial.BaudRate
+
 
+
B19200 - Enum constant in enum class com.serial4j.core.serial.BaudRate
+
 
+
B200 - Enum constant in enum class com.serial4j.core.serial.BaudRate
+
 
+
B2000000 - Enum constant in enum class com.serial4j.core.serial.BaudRate
+
 
+
B230400 - Enum constant in enum class com.serial4j.core.serial.BaudRate
+
 
+
B2400 - Enum constant in enum class com.serial4j.core.serial.BaudRate
+
 
+
B2500000 - Enum constant in enum class com.serial4j.core.serial.BaudRate
+
 
+
B300 - Enum constant in enum class com.serial4j.core.serial.BaudRate
+
 
+
B3000000 - Enum constant in enum class com.serial4j.core.serial.BaudRate
+
 
+
B3500000 - Enum constant in enum class com.serial4j.core.serial.BaudRate
+
 
+
B38400 - Enum constant in enum class com.serial4j.core.serial.BaudRate
+
 
+
B4000000 - Enum constant in enum class com.serial4j.core.serial.BaudRate
+
 
+
B460800 - Enum constant in enum class com.serial4j.core.serial.BaudRate
+
 
+
B4800 - Enum constant in enum class com.serial4j.core.serial.BaudRate
+
 
+
B50 - Enum constant in enum class com.serial4j.core.serial.BaudRate
+
 
+
B500000 - Enum constant in enum class com.serial4j.core.serial.BaudRate
+
 
+
B57600 - Enum constant in enum class com.serial4j.core.serial.BaudRate
+
 
+
B576000 - Enum constant in enum class com.serial4j.core.serial.BaudRate
+
 
+
B600 - Enum constant in enum class com.serial4j.core.serial.BaudRate
+
 
+
B75 - Enum constant in enum class com.serial4j.core.serial.BaudRate
+
 
+
B921600 - Enum constant in enum class com.serial4j.core.serial.BaudRate
+
 
+
B9600 - Enum constant in enum class com.serial4j.core.serial.BaudRate
+
 
+
BadFileDescriptorException - Exception Class in com.serial4j.core.serial.throwable
+
 
+
BadFileDescriptorException(String) - Constructor for exception class com.serial4j.core.serial.throwable.BadFileDescriptorException
+
 
+
BaudRate - Enum Class in com.serial4j.core.serial
+
+
Represents codes for the POSIX Systems baud rates and their real values + defined from invalid input: '<'./usr/include/x86_64-linux-gnu/bits/termios.h>.
+
+
BLOCKING_READ_ONE_CHAR - Enum constant in enum class com.serial4j.core.serial.ReadConfiguration
+
 
+
BRKINT - Static variable in class com.serial4j.core.serial.control.TerminalInputFlag
+
 
+
BrokenPipeException - Exception Class in com.serial4j.core.serial.throwable
+
 
+
BrokenPipeException(String) - Constructor for exception class com.serial4j.core.serial.throwable.BrokenPipeException
+
 
+
BS0 - Static variable in class com.serial4j.core.serial.control.TerminalOutputFlag
+
 
+
BS1 - Static variable in class com.serial4j.core.serial.control.TerminalOutputFlag
+
 
+
build(Semaphore.Mutex) - Static method in class com.serial4j.core.util.process.Semaphore
+
 
+
+

C

+
+
CIBAUD - Static variable in class com.serial4j.core.serial.control.TerminalControlFlag
+
 
+
CLOCAL - Static variable in class com.serial4j.core.serial.control.TerminalControlFlag
+
 
+
closePort() - Method in class com.serial4j.core.serial.TerminalDevice
+
 
+
closePort0() - Method in class com.serial4j.core.serial.NativeTerminalDevice
+
+
Closes the serial port of this terminal device releasing the resources.
+
+
CMSPAR - Static variable in class com.serial4j.core.serial.control.TerminalControlFlag
+
 
+
com.serial4j.core.errno - package com.serial4j.core.errno
+
+
Provides a native errno to java exception converter ErrnoToException and Errno for + native errno interpretation.
+
+
com.serial4j.core.serial - package com.serial4j.core.serial
+
+
Provides a Serial UART Monitor API using Serial4j with 2 monitor entities, SerialReadEntity + and SerialWriteEntity.
+
+
com.serial4j.core.serial.control - package com.serial4j.core.serial.control
+
 
+
com.serial4j.core.serial.entity - package com.serial4j.core.serial.entity
+
+
Provides R/W serial monitor entities with a subscriber pattern.
+
+
com.serial4j.core.serial.entity.impl - package com.serial4j.core.serial.entity.impl
+
+
An implementation code for +
+invalid @link +
serial.entity.SerialMonitorEntity
+
+ providing both read and + write serial monitor entities.
+
+
com.serial4j.core.serial.monitor - package com.serial4j.core.serial.monitor
+
 
+
com.serial4j.core.serial.throwable - package com.serial4j.core.serial.throwable
+
 
+
com.serial4j.core.util.natives - package com.serial4j.core.util.natives
+
 
+
com.serial4j.core.util.process - package com.serial4j.core.util.process
+
 
+
com.serial4j.example - package com.serial4j.example
+
 
+
com.serial4j.example.monitor - package com.serial4j.example.monitor
+
 
+
com.serial4j.example.serial4j - package com.serial4j.example.serial4j
+
 
+
CR0 - Static variable in class com.serial4j.core.serial.control.TerminalOutputFlag
+
 
+
CR1 - Static variable in class com.serial4j.core.serial.control.TerminalOutputFlag
+
 
+
CR2 - Static variable in class com.serial4j.core.serial.control.TerminalOutputFlag
+
 
+
CR3 - Static variable in class com.serial4j.core.serial.control.TerminalOutputFlag
+
 
+
CREAD - Static variable in class com.serial4j.core.serial.control.TerminalControlFlag
+
 
+
createCustomPermissions(int, String) - Static method in class com.serial4j.core.serial.Permissions
+
+
Create a custom permissions object from a source value.
+
+
CRTSCTS - Static variable in class com.serial4j.core.serial.control.TerminalControlFlag
+
 
+
CS5 - Static variable in class com.serial4j.core.serial.control.TerminalControlFlag
+
 
+
CS6 - Static variable in class com.serial4j.core.serial.control.TerminalControlFlag
+
 
+
CS7 - Static variable in class com.serial4j.core.serial.control.TerminalControlFlag
+
 
+
CS8 - Static variable in class com.serial4j.core.serial.control.TerminalControlFlag
+
 
+
CSTOPB - Static variable in class com.serial4j.core.serial.control.TerminalControlFlag
+
 
+
+

D

+
+
DEFAULT_MSG - Static variable in exception class com.serial4j.core.serial.monitor.SerialMonitorException
+
+
Provides a default message for quick usages.
+
+
disable(TerminalFlag) - Method in class com.serial4j.core.serial.control.TerminalFlag
+
+
Disables a flag from the current one value.
+
+
disable(TerminalFlag...) - Method in class com.serial4j.core.serial.control.TerminalFlag
+
+
Disables a list of flags from the current flag instance.
+
+
disableAll() - Method in class com.serial4j.core.serial.control.TerminalFlag
+
+
Disables all the terminal flags for this instance.
+
+
+

E

+
+
EACCES - Enum constant in enum class com.serial4j.core.errno.Errno
+
+
Error codes for open(const char*, int), file names and IO.
+
+
EAGAIN - Enum constant in enum class com.serial4j.core.errno.Errno
+
+
Additional error codes for basic R/W from invalid input: '<'fcntl.h>
+
+
EBADF - Enum constant in enum class com.serial4j.core.errno.Errno
+
+
Error codes for tcgetattr(int, struct termios*) and tcsetattr(int, struct termios*).
+
+
ECHO - Static variable in class com.serial4j.core.serial.control.TerminalLocalFlag
+
 
+
ECHOCTL - Static variable in class com.serial4j.core.serial.control.TerminalLocalFlag
+
 
+
ECHOE - Static variable in class com.serial4j.core.serial.control.TerminalLocalFlag
+
 
+
ECHOK - Static variable in class com.serial4j.core.serial.control.TerminalLocalFlag
+
 
+
ECHOKE - Static variable in class com.serial4j.core.serial.control.TerminalLocalFlag
+
 
+
ECHONL - Static variable in class com.serial4j.core.serial.control.TerminalLocalFlag
+
 
+
ECHOPRT - Static variable in class com.serial4j.core.serial.control.TerminalLocalFlag
+
 
+
EEXIST - Enum constant in enum class com.serial4j.core.errno.Errno
+
 
+
EFBIG - Enum constant in enum class com.serial4j.core.errno.Errno
+
+
For write(int, void*, int); only.
+
+
EINTR - Enum constant in enum class com.serial4j.core.errno.Errno
+
 
+
EINVAL - Enum constant in enum class com.serial4j.core.errno.Errno
+
+
tcsetattr(int, struct termios*) only.
+
+
EIO - Enum constant in enum class com.serial4j.core.errno.Errno
+
 
+
EISDIR - Enum constant in enum class com.serial4j.core.errno.Errno
+
 
+
EMFILE - Enum constant in enum class com.serial4j.core.errno.Errno
+
 
+
EMPTY_INSTANCE - Static variable in class com.serial4j.core.serial.control.TerminalControlFlag
+
 
+
EMPTY_INSTANCE - Static variable in class com.serial4j.core.serial.control.TerminalInputFlag
+
 
+
EMPTY_INSTANCE - Static variable in class com.serial4j.core.serial.control.TerminalLocalFlag
+
 
+
EMPTY_INSTANCE - Static variable in class com.serial4j.core.serial.control.TerminalOutputFlag
+
 
+
enableAll() - Method in class com.serial4j.core.serial.control.TerminalFlag
+
+
Enables all the terminal flags for this instance.
+
+
ENFILE - Enum constant in enum class com.serial4j.core.errno.Errno
+
 
+
ENOENT - Enum constant in enum class com.serial4j.core.errno.Errno
+
 
+
ENOSPC - Enum constant in enum class com.serial4j.core.errno.Errno
+
 
+
ENOTTY - Enum constant in enum class com.serial4j.core.errno.Errno
+
 
+
EntityStatus<T extends SerialMonitorEntity> - Interface in com.serial4j.core.serial.entity
+
+
Represents the serial entity status listener.
+
+
ENXIO - Enum constant in enum class com.serial4j.core.errno.Errno
+
 
+
EPIPE - Enum constant in enum class com.serial4j.core.errno.Errno
+
 
+
EROFS - Enum constant in enum class com.serial4j.core.errno.Errno
+
 
+
ERR_INVALID_PORT - Enum constant in enum class com.serial4j.core.errno.Errno
+
+
Serial4j business errors.
+
+
ERR_INVALID_PORT - Enum constant in enum class com.serial4j.core.serial.ReadConfiguration
+
 
+
ERR_NO_AVAILABLE_TTY_DEVICES - Enum constant in enum class com.serial4j.core.errno.Errno
+
 
+
ERR_OPERATION_FAILED - Enum constant in enum class com.serial4j.core.errno.Errno
+
 
+
Errno - Enum Class in com.serial4j.core.errno
+
+
Interprets the native methods bad return values into error codes, + used by the java ErrnoToException + to throw exceptions against the JRE.
+
+
ErrnoToException - Class in com.serial4j.core.errno
+
+
Reflects C native errnos into real java exceptions.
+
+
EXAMPLE_LOGGER - Static variable in class com.serial4j.example.serial4j.HelloNativeSerial4J
+
 
+
+

F

+
+
fetchSerialPorts0() - Method in class com.serial4j.core.serial.NativeTerminalDevice
+
+
Fetches the available system teletype terminal devices (tty) located within "/dev" directory + and insert the result into NativeTerminalDevice.serialPorts.
+
+
FF0 - Static variable in class com.serial4j.core.serial.control.TerminalOutputFlag
+
 
+
FF1 - Static variable in class com.serial4j.core.serial.control.TerminalOutputFlag
+
 
+
FileAlreadyOpenedException - Exception Class in com.serial4j.core.serial.throwable
+
 
+
FileAlreadyOpenedException(String) - Constructor for exception class com.serial4j.core.serial.throwable.FileAlreadyOpenedException
+
 
+
FileIsDirectoryException - Exception Class in com.serial4j.core.serial.throwable
+
 
+
FileIsDirectoryException(String) - Constructor for exception class com.serial4j.core.serial.throwable.FileIsDirectoryException
+
 
+
FileTableOverflowException - Exception Class in com.serial4j.core.serial.throwable
+
 
+
FileTableOverflowException(String) - Constructor for exception class com.serial4j.core.serial.throwable.FileTableOverflowException
+
 
+
FileTooLargeException - Exception Class in com.serial4j.core.serial.throwable
+
 
+
FileTooLargeException(String) - Constructor for exception class com.serial4j.core.serial.throwable.FileTooLargeException
+
 
+
FLUSHO - Static variable in class com.serial4j.core.serial.control.TerminalLocalFlag
+
 
+
+

G

+
+
getBadFileDescriptorErrno() - Static method in class com.serial4j.core.errno.NativeErrno
+
 
+
getBaudRate() - Method in enum class com.serial4j.core.serial.BaudRate
+
+
Retrieves the baud rate code defined from invalid input: '<'termios.h> for + POSIX systems.
+
+
getBaudRate() - Method in class com.serial4j.core.serial.TerminalDevice
+
 
+
getBaudRate0() - Method in class com.serial4j.core.serial.NativeTerminalDevice
+
+
Retrieves the baud rate POSIX code for this terminal process, find more at invalid input: '<'./usr/include/x86_64-linux-gnu/bits/termios.h>.
+
+
getBrokenPipeErrno() - Static method in class com.serial4j.core.errno.NativeErrno
+
 
+
getCausingErrno() - Method in exception class com.serial4j.core.serial.throwable.BadFileDescriptorException
+
 
+
getCausingErrno() - Method in exception class com.serial4j.core.serial.throwable.BrokenPipeException
+
 
+
getCausingErrno() - Method in exception class com.serial4j.core.serial.throwable.FileAlreadyOpenedException
+
 
+
getCausingErrno() - Method in exception class com.serial4j.core.serial.throwable.FileIsDirectoryException
+
 
+
getCausingErrno() - Method in exception class com.serial4j.core.serial.throwable.FileTableOverflowException
+
 
+
getCausingErrno() - Method in exception class com.serial4j.core.serial.throwable.FileTooLargeException
+
 
+
getCausingErrno() - Method in exception class com.serial4j.core.serial.throwable.InputOutputException
+
 
+
getCausingErrno() - Method in exception class com.serial4j.core.serial.throwable.InterruptedSystemCallException
+
 
+
getCausingErrno() - Method in exception class com.serial4j.core.serial.throwable.InvalidArgumentException
+
 
+
getCausingErrno() - Method in exception class com.serial4j.core.serial.throwable.InvalidPortException
+
 
+
getCausingErrno() - Method in exception class com.serial4j.core.serial.throwable.NoAvailableTtyDevicesException
+
 
+
getCausingErrno() - Method in exception class com.serial4j.core.serial.throwable.NoSpaceLeftException
+
 
+
getCausingErrno() - Method in exception class com.serial4j.core.serial.throwable.NoSuchDeviceException
+
 
+
getCausingErrno() - Method in exception class com.serial4j.core.serial.throwable.NoSuchFileException
+
 
+
getCausingErrno() - Method in exception class com.serial4j.core.serial.throwable.NotTtyDeviceException
+
 
+
getCausingErrno() - Method in exception class com.serial4j.core.serial.throwable.OperationFailedException
+
 
+
getCausingErrno() - Method in exception class com.serial4j.core.serial.throwable.PermissionDeniedException
+
 
+
getCausingErrno() - Method in exception class com.serial4j.core.serial.throwable.ReadOnlyFileSystemException
+
 
+
getCausingErrno() - Method in exception class com.serial4j.core.serial.throwable.TooManyOpenedFilesException
+
 
+
getCausingErrno() - Method in exception class com.serial4j.core.serial.throwable.TryAgainException
+
 
+
getData() - Method in class com.serial4j.core.serial.entity.impl.WritableCapsule
+
+
Retrieves the data of the capsule.
+
+
getDescription() - Method in enum class com.serial4j.core.errno.Errno
+
+
Gets the native error code descritption.
+
+
getDescription() - Method in class com.serial4j.core.serial.Permissions
+
+
Retrieves the description of this permissions object.
+
+
getDescription() - Method in enum class com.serial4j.core.serial.ReadConfiguration
+
 
+
getEntityStream() - Method in class com.serial4j.core.serial.entity.impl.SerialReadEntity
+
 
+
getEntityStream() - Method in class com.serial4j.core.serial.entity.impl.SerialWriteEntity
+
 
+
getEntityStream() - Method in class com.serial4j.core.serial.entity.SerialMonitorEntity
+
+
Gets the entity stream provided by the +
+invalid @link +
SerialPort
+
+, either OutputStream + or InputStream.
+
+
getErrno0() - Method in class com.serial4j.core.serial.NativeTerminalDevice
+
+
Retrieves the last error encountered by the native code,
+
+
getFd() - Method in class com.serial4j.core.serial.SerialPort
+
+
Gets the virtual file descriptor defining this port.
+
+
getFileAlreadyOpenedErrno() - Static method in class com.serial4j.core.errno.NativeErrno
+
 
+
getFileIsDirectoryErrno() - Static method in class com.serial4j.core.errno.NativeErrno
+
 
+
getFileTableOverflowErrno() - Static method in class com.serial4j.core.errno.NativeErrno
+
 
+
getFileTooLargeErrno() - Static method in class com.serial4j.core.errno.NativeErrno
+
 
+
getFromNativeReadConfig(int[]) - Static method in enum class com.serial4j.core.serial.ReadConfiguration
+
 
+
getImage() - Method in enum class com.serial4j.core.util.natives.NativeImageLoader.NativeImage
+
 
+
getInputOutputErrno() - Static method in class com.serial4j.core.errno.NativeErrno
+
 
+
getInputStream() - Method in class com.serial4j.core.serial.TerminalDevice
+
 
+
getInterruptedSystemCallErrno() - Static method in class com.serial4j.core.errno.NativeErrno
+
 
+
getInvalidArgumentErrno() - Static method in class com.serial4j.core.errno.NativeErrno
+
 
+
getInvalidPortErrno() - Static method in class com.serial4j.core.errno.NativeErrno
+
 
+
getIOFlag() - Method in class com.serial4j.core.serial.SerialPort
+
+
Gets the io flags defined by the Permissions.
+
+
getLockData() - Method in class com.serial4j.core.util.process.Semaphore.Mutex
+
 
+
getMode() - Method in enum class com.serial4j.core.serial.ReadConfiguration
+
 
+
getMonitorName() - Method in class com.serial4j.core.serial.monitor.SerialMonitor
+
 
+
getMonitorObject() - Method in class com.serial4j.core.util.process.Semaphore.Mutex
+
 
+
getMutex() - Method in class com.serial4j.core.util.process.Semaphore
+
 
+
getNoAvailableTtyDevicesErrno() - Static method in class com.serial4j.core.errno.NativeErrno
+
 
+
getNoSpaceLeftErrno() - Static method in class com.serial4j.core.errno.NativeErrno
+
 
+
getNoSuchDeviceErrno() - Static method in class com.serial4j.core.errno.NativeErrno
+
 
+
getNoSuchFileErrno() - Static method in class com.serial4j.core.errno.NativeErrno
+
 
+
getNotTtyDeviceErrno() - Static method in class com.serial4j.core.errno.NativeErrno
+
 
+
getOperationFailedErrno() - Static method in class com.serial4j.core.errno.NativeErrno
+
 
+
getOutputStream() - Method in class com.serial4j.core.serial.TerminalDevice
+
 
+
getPath() - Method in class com.serial4j.core.serial.SerialPort
+
+
Gets the path to this port.
+
+
getPermissionDeniedErrno() - Static method in class com.serial4j.core.errno.NativeErrno
+
 
+
getPermissions() - Method in class com.serial4j.core.serial.TerminalDevice
+
 
+
getReadBuffer() - Method in class com.serial4j.core.serial.NativeTerminalDevice
+
 
+
getReadBuffer() - Method in class com.serial4j.core.serial.TerminalDevice
+
 
+
getReadConfigurationMode() - Method in class com.serial4j.core.serial.TerminalDevice
+
 
+
getReadConfigurationMode0() - Method in class com.serial4j.core.serial.NativeTerminalDevice
+
+
Gets the read configuration for this terminal device defining the timeout value as the first index and + the minimum number of read byte in this timeout as the second index.
+
+
getReadData() - Method in class com.serial4j.core.serial.NativeTerminalDevice
+
+
Gets the read data in an up-to 32-bit integer format resulting from using the native method NativeTerminalDevice.readData0().
+
+
getReadData() - Method in class com.serial4j.core.serial.TerminalDevice
+
 
+
getReadEntityStream() - Method in class com.serial4j.core.serial.monitor.SerialMonitor
+
+
Gets the serial read input stream.
+
+
getReadOnlyFileSystemErrno() - Static method in class com.serial4j.core.errno.NativeErrno
+
 
+
getRealBaud() - Method in enum class com.serial4j.core.serial.BaudRate
+
+
Retrieves the real baud rate value from the baud + rate structure defined by the POSIX code.
+
+
getSerialDataListeners() - Method in class com.serial4j.core.serial.entity.SerialMonitorEntity
+
+
Retrieves the serial data listeners list.
+
+
getSerialDataListeners() - Method in class com.serial4j.core.serial.monitor.SerialMonitor
+
+
Gets the serial data listeners used for listening to data changes at the + this monitor port.
+
+
getSerialEntityStatusListener() - Method in class com.serial4j.core.serial.entity.impl.SerialReadEntity
+
 
+
getSerialEntityStatusListener() - Method in class com.serial4j.core.serial.entity.impl.SerialWriteEntity
+
 
+
getSerialEntityStatusListener() - Method in class com.serial4j.core.serial.entity.SerialMonitorEntity
+
+
Gets the entity status listener.
+
+
getSerialMonitor() - Method in class com.serial4j.core.serial.entity.SerialMonitorEntity
+
+
Retrieves the SerialMonitor instance.
+
+
getSerialPort() - Method in class com.serial4j.core.serial.NativeTerminalDevice
+
+
Retrieves the serial port associated with this terminal device.
+
+
getSerialPort() - Method in class com.serial4j.core.serial.TerminalDevice
+
 
+
getSerialPorts() - Method in class com.serial4j.core.serial.NativeTerminalDevice
+
+
Retrieves all the available teletype terminal (tty) devices from the filesystem "/dev".
+
+
getSerialPorts() - Method in class com.serial4j.core.serial.TerminalDevice
+
 
+
getSerialReadEntity() - Method in class com.serial4j.core.serial.monitor.SerialMonitor
+
+
Gets the serial read entity used for reading data from the serial port using + SerialMonitor.readEntityStream.
+
+
getSerialWriteCapsules() - Method in class com.serial4j.core.serial.entity.impl.SerialWriteEntity
+
+
Gets the Serial writable Capsules holding the writable data.
+
+
getSerialWriteEntity() - Method in class com.serial4j.core.serial.monitor.SerialMonitor
+
+
Gets the serial write entity used for writing data to the serial port using + SerialMonitor.writeEntityStream.
+
+
getTerminalControlFlag() - Method in class com.serial4j.core.serial.NativeTerminalDevice
+
+
Retrieves the terminal control flag from this terminal device port descriptor in 64-bit format.
+
+
getTerminalControlFlag() - Method in class com.serial4j.core.serial.TerminalDevice
+
 
+
getTerminalDevice() - Method in class com.serial4j.core.serial.entity.SerialMonitorEntity
+
+
Retrieves the TerminalDevice instance used for creating the communication.
+
+
getTerminalDevice() - Method in class com.serial4j.core.serial.monitor.SerialMonitor
+
+
Gets the terminal device controlling this monitor.
+
+
getTerminalInputFlag() - Method in class com.serial4j.core.serial.NativeTerminalDevice
+
+
Retrieves the terminal input flag from this terminal device port descriptor in 64-bit format.
+
+
getTerminalInputFlag() - Method in class com.serial4j.core.serial.TerminalDevice
+
 
+
getTerminalLocalFlag() - Method in class com.serial4j.core.serial.NativeTerminalDevice
+
+
Retrieves the terminal local flag from this terminal device port descriptor in 64-bit format.
+
+
getTerminalLocalFlag() - Method in class com.serial4j.core.serial.TerminalDevice
+
 
+
getTerminalOutputFlag() - Method in class com.serial4j.core.serial.NativeTerminalDevice
+
+
Retrieves the terminal output flag from this terminal device port descriptor in 64-bit format.
+
+
getTerminalOutputFlag() - Method in class com.serial4j.core.serial.TerminalDevice
+
 
+
getTooManyOpenedFilesErrno() - Static method in class com.serial4j.core.errno.NativeErrno
+
 
+
getTryAgainErrno() - Static method in class com.serial4j.core.errno.NativeErrno
+
 
+
getUnlockData() - Method in class com.serial4j.core.util.process.Semaphore.Mutex
+
 
+
getValue() - Method in enum class com.serial4j.core.errno.Errno
+
+
Gets the native error code of the Err.
+
+
getValue() - Method in class com.serial4j.core.serial.control.TerminalFlag
+
+
Gets the value of the specified termios flag.
+
+
getValue() - Method in class com.serial4j.core.serial.Permissions
+
+
Retrieves the value of this permissions object.
+
+
getWriteEntityStream() - Method in class com.serial4j.core.serial.monitor.SerialMonitor
+
+
Gets the Serial write output stream.
+
+
+

H

+
+
HelloNativeSerial4J - Class in com.serial4j.example.serial4j
+
+
An example for Serial4j showing Native terminal control and + native file io on a serial port using a java binding to invalid input: '<'fcntl.h> and invalid input: '<'unistd.h> read (...) and write (...).
+
+
HelloNativeSerial4J() - Constructor for class com.serial4j.example.serial4j.HelloNativeSerial4J
+
 
+
HelloSerial4jIO - Class in com.serial4j.example.serial4j
+
+
An example showing serial and terminal io using java.io API.
+
+
HelloSerial4jIO() - Constructor for class com.serial4j.example.serial4j.HelloSerial4jIO
+
 
+
HelloSerialMonitor - Class in com.serial4j.example.monitor
+
+
Represents an example for UART using jSerialComm.
+
+
HelloSerialMonitor() - Constructor for class com.serial4j.example.monitor.HelloSerialMonitor
+
 
+
HUPCL - Static variable in class com.serial4j.core.serial.control.TerminalControlFlag
+
 
+
+

I

+
+
ICANON - Static variable in class com.serial4j.core.serial.control.TerminalLocalFlag
+
 
+
ICRNL - Static variable in class com.serial4j.core.serial.control.TerminalInputFlag
+
 
+
IEXTEN - Static variable in class com.serial4j.core.serial.control.TerminalLocalFlag
+
 
+
IGNBRK - Static variable in class com.serial4j.core.serial.control.TerminalInputFlag
+
 
+
IGNCR - Static variable in class com.serial4j.core.serial.control.TerminalInputFlag
+
 
+
IMAXBEL - Static variable in class com.serial4j.core.serial.control.TerminalInputFlag
+
 
+
initTermios() - Method in class com.serial4j.core.serial.TerminalDevice
+
+
Initializes this terminal device with the default flags and the default + read timeout configuration.
+
+
initTermios0() - Method in class com.serial4j.core.serial.NativeTerminalDevice
+
+
Initializes this terminal device with the default terminal flags and read timeout properties: + ----------- + # c_cflag: for control mode flags.
+
+
INLCR - Static variable in class com.serial4j.core.serial.control.TerminalInputFlag
+
 
+
INPCK - Static variable in class com.serial4j.core.serial.control.TerminalInputFlag
+
 
+
InputOutputException - Exception Class in com.serial4j.core.serial.throwable
+
 
+
InputOutputException(String) - Constructor for exception class com.serial4j.core.serial.throwable.InputOutputException
+
 
+
InterruptedSystemCallException - Exception Class in com.serial4j.core.serial.throwable
+
 
+
InterruptedSystemCallException(String) - Constructor for exception class com.serial4j.core.serial.throwable.InterruptedSystemCallException
+
 
+
InvalidArgumentException - Exception Class in com.serial4j.core.serial.throwable
+
 
+
InvalidArgumentException(String) - Constructor for exception class com.serial4j.core.serial.throwable.InvalidArgumentException
+
 
+
InvalidPortException - Exception Class in com.serial4j.core.serial.throwable
+
 
+
InvalidPortException(String) - Constructor for exception class com.serial4j.core.serial.throwable.InvalidPortException
+
 
+
isDataWritten() - Method in class com.serial4j.core.serial.entity.impl.WritableCapsule
+
+
Tests whether data is written to the UART.
+
+
ISIG - Static variable in class com.serial4j.core.serial.control.TerminalLocalFlag
+
 
+
isMonitoringStarted - Variable in class com.serial4j.core.serial.monitor.SerialMonitor
+
 
+
isMonitoringStarted() - Method in class com.serial4j.core.serial.entity.SerialMonitorEntity
+
+
Tests whether serial data monitoring has started.
+
+
isPortOpened() - Method in class com.serial4j.core.serial.SerialPort
+
+
Tests whether this port is still opened.
+
+
isReadSerialEntityInitialized - Variable in class com.serial4j.core.serial.monitor.SerialMonitor
+
 
+
isSerial4jLoggingEnabled() - Method in class com.serial4j.core.serial.TerminalDevice
+
 
+
isSerialEntityInitialized() - Method in class com.serial4j.core.serial.entity.impl.SerialReadEntity
+
 
+
isSerialEntityInitialized() - Method in class com.serial4j.core.serial.entity.impl.SerialWriteEntity
+
 
+
isSerialEntityInitialized() - Method in class com.serial4j.core.serial.entity.SerialMonitorEntity
+
+
Tests whether the entity is initialized.
+
+
isTerminate() - Method in class com.serial4j.core.serial.entity.SerialMonitorEntity
+
+
Tests whether the serial monitor holding this entity terminated.
+
+
isTerminate() - Method in class com.serial4j.core.serial.monitor.SerialMonitor
+
+
Tests whether the monitor is terminated by external means.
+
+
ISTRIP - Static variable in class com.serial4j.core.serial.control.TerminalInputFlag
+
 
+
isUsingReturnCarriage() - Method in class com.serial4j.core.serial.entity.SerialMonitorEntity
+
+
Tests whether return carriage [\n\r] and new line is enabled.
+
+
isUsingReturnCarriage() - Method in class com.serial4j.core.serial.monitor.SerialMonitor
+
+
Tests whether [CR/LF] check is enabled.
+
+
isWriteSerialEntityInitialized - Variable in class com.serial4j.core.serial.monitor.SerialMonitor
+
 
+
IUTF8 - Static variable in class com.serial4j.core.serial.control.TerminalInputFlag
+
 
+
IXANY - Static variable in class com.serial4j.core.serial.control.TerminalInputFlag
+
 
+
IXOFF - Static variable in class com.serial4j.core.serial.control.TerminalInputFlag
+
 
+
IXON - Static variable in class com.serial4j.core.serial.control.TerminalInputFlag
+
 
+
+

L

+
+
Launcher - Class in com.serial4j.example
+
+
Starts the applications test cases.
+
+
Launcher() - Constructor for class com.serial4j.example.Launcher
+
 
+
LINUX_x86_x64 - Enum constant in enum class com.serial4j.core.util.natives.NativeImageLoader.NativeImage
+
 
+
LINUX_x86_x86 - Enum constant in enum class com.serial4j.core.util.natives.NativeImageLoader.NativeImage
+
 
+
loadLibrary() - Static method in class com.serial4j.core.util.natives.NativeImageLoader
+
 
+
lock(MO) - Method in class com.serial4j.core.util.process.Semaphore
+
 
+
+

M

+
+
MAC_x86_x64 - Enum constant in enum class com.serial4j.core.util.natives.NativeImageLoader.NativeImage
+
 
+
main(String[]) - Static method in class com.serial4j.example.Launcher
+
 
+
MAX_BAUD - Enum constant in enum class com.serial4j.core.serial.BaudRate
+
 
+
Mutex() - Constructor for class com.serial4j.core.util.process.Semaphore.Mutex
+
 
+
Mutex(O, LD, ULD) - Constructor for class com.serial4j.core.util.process.Semaphore.Mutex
+
 
+
MUTEX - Variable in class com.serial4j.core.serial.entity.SerialMonitorEntity
+
 
+
MUTEX - Static variable in class com.serial4j.core.util.natives.NativeImageLoader
+
 
+
+

N

+
+
NativeErrno - Class in com.serial4j.core.errno
+
 
+
NativeImageLoader - Class in com.serial4j.core.util.natives
+
+
Helper utility for loading native images.
+
+
NativeImageLoader.NativeImage - Enum Class in com.serial4j.core.util.natives
+
+
Represents an image domain.
+
+
NativeImageLoader.State - Enum Class in com.serial4j.core.util.natives
+
+
A state for a critical section.
+
+
NativeTerminalDevice - Class in com.serial4j.core.serial
+
+
Represents the native java binding for Serial4j API, represented by + [com_serial4j_core_serial_NativeTerminalDevice.h] natively.
+
+
NativeTerminalDevice() - Constructor for class com.serial4j.core.serial.NativeTerminalDevice
+
 
+
NL0 - Static variable in class com.serial4j.core.serial.control.TerminalOutputFlag
+
 
+
NL1 - Static variable in class com.serial4j.core.serial.control.TerminalOutputFlag
+
 
+
NO_JOB() - Method in class com.serial4j.core.util.process.Semaphore.Mutex
+
+
Creates a 'no job' job to trick the java loop.
+
+
NoAvailableTtyDevicesException - Exception Class in com.serial4j.core.serial.throwable
+
 
+
NoAvailableTtyDevicesException(String) - Constructor for exception class com.serial4j.core.serial.throwable.NoAvailableTtyDevicesException
+
 
+
NOFLSH - Static variable in class com.serial4j.core.serial.control.TerminalLocalFlag
+
 
+
NoSpaceLeftException - Exception Class in com.serial4j.core.serial.throwable
+
 
+
NoSpaceLeftException(String) - Constructor for exception class com.serial4j.core.serial.throwable.NoSpaceLeftException
+
 
+
NoSuchDeviceException - Exception Class in com.serial4j.core.serial.throwable
+
 
+
NoSuchDeviceException(String) - Constructor for exception class com.serial4j.core.serial.throwable.NoSuchDeviceException
+
 
+
NoSuchFileException - Exception Class in com.serial4j.core.serial.throwable
+
 
+
NoSuchFileException(String) - Constructor for exception class com.serial4j.core.serial.throwable.NoSuchFileException
+
 
+
NotTtyDeviceException - Exception Class in com.serial4j.core.serial.throwable
+
 
+
NotTtyDeviceException(String) - Constructor for exception class com.serial4j.core.serial.throwable.NotTtyDeviceException
+
 
+
+

O

+
+
O_NOCTTY - Static variable in class com.serial4j.core.serial.Permissions
+
 
+
O_NONBLOCK - Static variable in class com.serial4j.core.serial.Permissions
+
 
+
O_RDONLY - Static variable in class com.serial4j.core.serial.Permissions
+
 
+
O_RDWR - Static variable in class com.serial4j.core.serial.Permissions
+
 
+
O_WRONLY - Static variable in class com.serial4j.core.serial.Permissions
+
 
+
OCRNL - Static variable in class com.serial4j.core.serial.control.TerminalOutputFlag
+
 
+
OFDEL - Static variable in class com.serial4j.core.serial.control.TerminalOutputFlag
+
 
+
OFILL - Static variable in class com.serial4j.core.serial.control.TerminalOutputFlag
+
 
+
OLCUC - Static variable in class com.serial4j.core.serial.control.TerminalOutputFlag
+
 
+
onDataMonitored(SerialMonitor) - Method in class com.serial4j.core.serial.entity.impl.SerialReadEntity
+
 
+
onDataMonitored(SerialMonitor) - Method in class com.serial4j.core.serial.entity.impl.SerialWriteEntity
+
 
+
onDataMonitored(SerialMonitor) - Method in class com.serial4j.core.serial.entity.SerialMonitorEntity
+
+
Fired on each update run.
+
+
onDataReceived(int) - Method in interface com.serial4j.core.serial.monitor.SerialDataListener
+
+
Dispatched when the data is received at the +
+invalid @link +
serial.entity.impl.SerialReadEntity
+
+ end + on its thread.
+
+
onDataReceived(int) - Method in class com.serial4j.example.monitor.HelloSerialMonitor
+
 
+
onDataReceived(String) - Method in interface com.serial4j.core.serial.monitor.SerialDataListener
+
+
Dispatched whenever a data frame is completely received at the +
+invalid @link +
serial.entity.impl.SerialReadEntity
+
+ end + when [Return-Carriage/Newline] check is enabled as it specifies a particular data frame.
+
+
onDataReceived(String) - Method in class com.serial4j.example.monitor.HelloSerialMonitor
+
 
+
onDataTransmitted(int) - Method in interface com.serial4j.core.serial.monitor.SerialDataListener
+
+
Dispatched when the capsular data is transmitted at the +
+invalid @link +
serial.entity.impl.SerialWriteEntity
+
+ + end on its thread.
+
+
onDataTransmitted(int) - Method in class com.serial4j.example.monitor.HelloSerialMonitor
+
 
+
ONLCR - Static variable in class com.serial4j.core.serial.control.TerminalOutputFlag
+
 
+
ONLRET - Static variable in class com.serial4j.core.serial.control.TerminalOutputFlag
+
 
+
ONOCR - Static variable in class com.serial4j.core.serial.control.TerminalOutputFlag
+
 
+
onSerialEntityInitialized(SerialWriteEntity) - Method in class com.serial4j.example.monitor.HelloSerialMonitor
+
 
+
onSerialEntityInitialized(T) - Method in interface com.serial4j.core.serial.entity.EntityStatus
+
+
Fired when the serial entity is initialized on the first monitor update.
+
+
onSerialEntityTerminated(SerialWriteEntity) - Method in class com.serial4j.example.monitor.HelloSerialMonitor
+
 
+
onSerialEntityTerminated(T) - Method in interface com.serial4j.core.serial.entity.EntityStatus
+
+
Fired when the serial entity is terminated on the last monitor update.
+
+
onUpdate(SerialWriteEntity) - Method in class com.serial4j.example.monitor.HelloSerialMonitor
+
 
+
onUpdate(T) - Method in interface com.serial4j.core.serial.entity.EntityStatus
+
+
Fired on each serial monitor update.
+
+
openPort(SerialPort) - Method in class com.serial4j.core.serial.TerminalDevice
+
+
Opens this device's serial port using the path from [serialPort] instance.
+
+
openPort0(String, int) - Method in class com.serial4j.core.serial.NativeTerminalDevice
+
+
Opens this terminal device using the path to the port [port] in strings and the port permissions [flag] in integers.
+
+
OperationFailedException - Exception Class in com.serial4j.core.serial.throwable
+
+
Implements an operation failed exception with error code [EOPERATION_FAILED] or [-1].
+
+
OperationFailedException(String) - Constructor for exception class com.serial4j.core.serial.throwable.OperationFailedException
+
+
Instantiates an operation failed java exceptions with error code (-1).
+
+
OPOST - Static variable in class com.serial4j.core.serial.control.TerminalOutputFlag
+
 
+
+

P

+
+
PARENB - Static variable in class com.serial4j.core.serial.control.TerminalControlFlag
+
 
+
PARMRK - Static variable in class com.serial4j.core.serial.control.TerminalInputFlag
+
 
+
PARODD - Static variable in class com.serial4j.core.serial.control.TerminalControlFlag
+
 
+
PENDIN - Static variable in class com.serial4j.core.serial.control.TerminalLocalFlag
+
 
+
PermissionDeniedException - Exception Class in com.serial4j.core.serial.throwable
+
+
Implements a permission exception for error code [EACCESS] or [13] as defined by invalid input: '<'errno.h>.
+
+
PermissionDeniedException(String) - Constructor for exception class com.serial4j.core.serial.throwable.PermissionDeniedException
+
+
Instantiates a permission exception with an additionaltext and error code [13].
+
+
Permissions - Class in com.serial4j.core.serial
+
+
Provides Unix file system permissions for the specified serial port + of the terminal device.
+
+
Permissions(int, String) - Constructor for class com.serial4j.core.serial.Permissions
+
+
Wraps a POSIX IO flag using an integer value.
+
+
POLLING_READ - Enum constant in enum class com.serial4j.core.serial.ReadConfiguration
+
 
+
+

R

+
+
READ_WITH_INTERBYTE_TIMEOUT - Enum constant in enum class com.serial4j.core.serial.ReadConfiguration
+
 
+
READ_WITH_TIMEOUT - Enum constant in enum class com.serial4j.core.serial.ReadConfiguration
+
 
+
readBuffer() - Method in class com.serial4j.core.serial.TerminalDevice
+
 
+
readBuffer0() - Method in class com.serial4j.core.serial.NativeTerminalDevice
+
+
Reads the data from this terminal device and insert the result into the NativeTerminalDevice.readBuffer + string buffer.
+
+
ReadConfiguration - Enum Class in com.serial4j.core.serial
+
+
Provides a Unix terminal read configuration for the specified serial port of the + terminal device.
+
+
readData() - Method in class com.serial4j.core.serial.TerminalDevice
+
 
+
readData0() - Method in class com.serial4j.core.serial.NativeTerminalDevice
+
+
Reads the data from the terminal device and inserts the result into an integer buffer + NativeTerminalDevice.readData.
+
+
ReadOnlyFileSystemException - Exception Class in com.serial4j.core.serial.throwable
+
 
+
ReadOnlyFileSystemException(String) - Constructor for exception class com.serial4j.core.serial.throwable.ReadOnlyFileSystemException
+
 
+
removeSerialDataListener(SerialDataListener) - Method in class com.serial4j.core.serial.monitor.SerialMonitor
+
+
Removes a serial data listener instance from the list of the list of the updatable listeners.
+
+
removeWritableCapsule(WritableCapsule) - Method in class com.serial4j.core.serial.entity.impl.SerialWriteEntity
+
+
Removes a writable capsule from the list of serial data capsules.
+
+
run() - Method in class com.serial4j.core.serial.entity.SerialMonitorEntity
+
 
+
run() - Method in class com.serial4j.example.monitor.HelloSerialMonitor
+
 
+
run() - Method in class com.serial4j.example.serial4j.HelloNativeSerial4J
+
 
+
run() - Method in class com.serial4j.example.serial4j.HelloSerial4jIO
+
 
+
+

S

+
+
Semaphore - Class in com.serial4j.core.util.process
+
+
A thread synchronizer utility using mutex data states.
+
+
SEMAPHORE - Variable in class com.serial4j.core.serial.entity.SerialMonitorEntity
+
 
+
SEMAPHORE - Static variable in class com.serial4j.core.util.natives.NativeImageLoader
+
 
+
Semaphore.Mutex - Class in com.serial4j.core.util.process
+
 
+
SerialDataListener - Interface in com.serial4j.core.serial.monitor
+
+
Listens to Serial Monitor entities +
+invalid @link +
serial.entity.impl.SerialReadEntity
+
+ and +
+invalid @link +
serial.entity.impl.SerialWriteEntity
+
+.
+
+
SerialMonitor - Class in com.serial4j.core.serial.monitor
+
+
Monitors the UART Data Port using SerialReadEntity for serial data read and SerialWriteEntity for serial + data write.
+
+
SerialMonitor(String) - Constructor for class com.serial4j.core.serial.monitor.SerialMonitor
+
+
Instantiates a new SerialMonitor with a name.
+
+
SerialMonitorEntity - Class in com.serial4j.core.serial.entity
+
+
Represents the base implementation for serial monitor Read and Write entities.
+
+
SerialMonitorEntity(SerialMonitor, String) - Constructor for class com.serial4j.core.serial.entity.SerialMonitorEntity
+
+
Defines a serial monitor basic entity.
+
+
SerialMonitorException - Exception Class in com.serial4j.core.serial.monitor
+
+
Raised whenever the user tries to access the serial monitor without opening the port.
+
+
SerialMonitorException(String) - Constructor for exception class com.serial4j.core.serial.monitor.SerialMonitorException
+
 
+
SerialPort - Class in com.serial4j.core.serial
+
+
Represents a Unix terminal device port properties wrapper.
+
+
SerialPort(String) - Constructor for class com.serial4j.core.serial.SerialPort
+
+
Instantiates a new serial port for a terminal device with a port path.
+
+
SerialReadEntity - Class in com.serial4j.core.serial.entity.impl
+
+
Represents a Read entity for the SerialMonitor.
+
+
SerialReadEntity(SerialMonitor) - Constructor for class com.serial4j.core.serial.entity.impl.SerialReadEntity
+
+
Defines a read entity instance to read serial data from UART.
+
+
serialReadEntityEntityStatus - Variable in class com.serial4j.core.serial.monitor.SerialMonitor
+
 
+
SerialThrowable - Exception Class in com.serial4j.core.serial.throwable
+
+
Defines an abstract entity for the serial throwable exceptions.
+
+
SerialThrowable(String) - Constructor for exception class com.serial4j.core.serial.throwable.SerialThrowable
+
 
+
SerialWriteEntity - Class in com.serial4j.core.serial.entity.impl
+
+
Represents a serial write data entity for the SerialMonitor.
+
+
SerialWriteEntity(SerialMonitor) - Constructor for class com.serial4j.core.serial.entity.impl.SerialWriteEntity
+
 
+
serialWriteEntityEntityStatus - Variable in class com.serial4j.core.serial.monitor.SerialMonitor
+
 
+
setBaudRate(BaudRate) - Method in class com.serial4j.core.serial.TerminalDevice
+
 
+
setBaudRate0(int) - Method in class com.serial4j.core.serial.NativeTerminalDevice
+
+
Adjusts the baud rate aka.
+
+
setDataWritten(boolean) - Method in class com.serial4j.core.serial.entity.impl.WritableCapsule
+
+
Sets the flag for data write to the serial UART, where; true commands and + stops the data write to the serial UART, false otherwise.
+
+
setLockData(Object) - Method in class com.serial4j.core.util.process.Semaphore.Mutex
+
 
+
setMonitoringStarted(boolean) - Method in class com.serial4j.core.serial.entity.SerialMonitorEntity
+
+
Sets the monitor started state.
+
+
setMonitorObject(Object) - Method in class com.serial4j.core.util.process.Semaphore.Mutex
+
 
+
setPermissions(Permissions) - Method in class com.serial4j.core.serial.TerminalDevice
+
 
+
setReadConfigurationMode(ReadConfiguration, int, int) - Method in class com.serial4j.core.serial.TerminalDevice
+
 
+
setReadConfigurationMode0(int, int) - Method in class com.serial4j.core.serial.NativeTerminalDevice
+
+
Adjusts the read mode for this terminal device, the read mode is defined by the read timeout value and the minimum + number of bytes to read at that time.
+
+
setReadEntityListener(EntityStatus<SerialReadEntity>) - Method in class com.serial4j.core.serial.monitor.SerialMonitor
+
+
Sets the read entity status listener instance to listen for SerialReadEntity lifecycle.
+
+
setSerial4jLoggingEnabled(boolean) - Method in class com.serial4j.core.serial.TerminalDevice
+
 
+
setSerialEntityInitialized(boolean) - Method in class com.serial4j.core.serial.entity.impl.SerialReadEntity
+
 
+
setSerialEntityInitialized(boolean) - Method in class com.serial4j.core.serial.entity.impl.SerialWriteEntity
+
 
+
setSerialEntityInitialized(boolean) - Method in class com.serial4j.core.serial.entity.SerialMonitorEntity
+
+
Sets the serial entity initialized status.
+
+
setSerialPort(SerialPort) - Method in class com.serial4j.core.serial.NativeTerminalDevice
+
+
Initializes the serial port path of the native terminal device before opening the terminal device port.
+
+
setTerminalControlFlag(long) - Method in class com.serial4j.core.serial.NativeTerminalDevice
+
+
Adjusts the native terminal control [c_cflag] of the [termios] structure variable for this terminal device.
+
+
setTerminalControlFlag(TerminalControlFlag) - Method in class com.serial4j.core.serial.TerminalDevice
+
 
+
setTerminalInputFlag(long) - Method in class com.serial4j.core.serial.NativeTerminalDevice
+
+
Adjusts the native terminal input [c_iflag] of the [termios] structure variable for this terminal device.
+
+
setTerminalInputFlag(TerminalInputFlag) - Method in class com.serial4j.core.serial.TerminalDevice
+
 
+
setTerminalLocalFlag(long) - Method in class com.serial4j.core.serial.NativeTerminalDevice
+
+
Adjusts the native terminal local [c_lflag] of the [termios] structure variable for this terminal device.
+
+
setTerminalLocalFlag(TerminalLocalFlag) - Method in class com.serial4j.core.serial.TerminalDevice
+
 
+
setTerminalOutputFlag(long) - Method in class com.serial4j.core.serial.NativeTerminalDevice
+
+
Adjusts the native terminal output [c_oflag] of the [termios] structure variable for this terminal device.
+
+
setTerminalOutputFlag(TerminalOutputFlag) - Method in class com.serial4j.core.serial.TerminalDevice
+
 
+
setTerminate() - Method in class com.serial4j.core.serial.monitor.SerialMonitor
+
+
Sets the termination flag to trigger termination on the next update.
+
+
setUnlockData(Object) - Method in class com.serial4j.core.util.process.Semaphore.Mutex
+
 
+
setupJniEnvironment0() - Static method in class com.serial4j.core.serial.NativeTerminalDevice
+
+
Sets up the native environment for this terminal device.
+
+
setUseReturnCarriage(boolean) - Method in class com.serial4j.core.serial.monitor.SerialMonitor
+
+
Triggers the [CR/LF] check state flag.
+
+
setValue(long) - Method in class com.serial4j.core.serial.control.TerminalFlag
+
+
Adjusts the value of the specified termios flag.
+
+
setWriteEntityStatus(EntityStatus<SerialWriteEntity>) - Method in class com.serial4j.core.serial.monitor.SerialMonitor
+
+
Sets the write entity status listener instance to listen for SerialWriteEntity lifecycle.
+
+
startDataMonitoring(String, BaudRate, Permissions) - Method in class com.serial4j.core.serial.monitor.SerialMonitor
+
+
Initializes and starts data monitoring on a [port] and with a [baudRate]
+
+
+

T

+
+
TAB0 - Static variable in class com.serial4j.core.serial.control.TerminalOutputFlag
+
 
+
TAB1 - Static variable in class com.serial4j.core.serial.control.TerminalOutputFlag
+
 
+
TAB2 - Static variable in class com.serial4j.core.serial.control.TerminalOutputFlag
+
 
+
TAB3 - Static variable in class com.serial4j.core.serial.control.TerminalOutputFlag
+
 
+
TerminalControlFlag - Class in com.serial4j.core.serial.control
+
 
+
TerminalControlFlag(long) - Constructor for class com.serial4j.core.serial.control.TerminalControlFlag
+
 
+
TerminalDevice - Class in com.serial4j.core.serial
+
+
The main entry class for the native terminal device for Serial4j api.
+
+
TerminalDevice() - Constructor for class com.serial4j.core.serial.TerminalDevice
+
+
Instantiates a Unix terminal device object.
+
+
TerminalFlag - Class in com.serial4j.core.serial.control
+
+
Represents the base implementation for the termios.h terminal flags values.
+
+
TerminalFlag(long) - Constructor for class com.serial4j.core.serial.control.TerminalFlag
+
+
Instantiates a termios flag with a value to be settled from the native side.
+
+
TerminalInputFlag - Class in com.serial4j.core.serial.control
+
+
Provides Unix [c_iflag] termios bits.
+
+
TerminalInputFlag(long) - Constructor for class com.serial4j.core.serial.control.TerminalInputFlag
+
 
+
TerminalLocalFlag - Class in com.serial4j.core.serial.control
+
 
+
TerminalLocalFlag(long) - Constructor for class com.serial4j.core.serial.control.TerminalLocalFlag
+
 
+
TerminalOutputFlag - Class in com.serial4j.core.serial.control
+
 
+
TerminalOutputFlag(long) - Constructor for class com.serial4j.core.serial.control.TerminalOutputFlag
+
 
+
terminate() - Method in class com.serial4j.core.serial.entity.SerialMonitorEntity
+
+
Terminates this entity by closing the entity stream and the serial port.
+
+
throwExceptionFromNativeErrno() - Method in class com.serial4j.core.serial.TerminalDevice
+
 
+
throwFromErrno(int, String) - Static method in class com.serial4j.core.errno.ErrnoToException
+
+
Throws a java exception from a native errno.
+
+
TOGGLED - Enum constant in enum class com.serial4j.core.util.natives.NativeImageLoader.State
+
 
+
TooManyOpenedFilesException - Exception Class in com.serial4j.core.serial.throwable
+
 
+
TooManyOpenedFilesException(String) - Constructor for exception class com.serial4j.core.serial.throwable.TooManyOpenedFilesException
+
 
+
TOSTOP - Static variable in class com.serial4j.core.serial.control.TerminalLocalFlag
+
 
+
TryAgainException - Exception Class in com.serial4j.core.serial.throwable
+
 
+
TryAgainException(String) - Constructor for exception class com.serial4j.core.serial.throwable.TryAgainException
+
 
+
ttyDevice - Variable in class com.serial4j.example.serial4j.HelloNativeSerial4J
+
+
Provides a java binding to a native terminal device.
+
+
ttyDevice - Variable in class com.serial4j.example.serial4j.HelloSerial4jIO
+
+
Provides a java binding to the native terminal device.
+
+
+

U

+
+
unlock(O) - Method in class com.serial4j.core.util.process.Semaphore
+
 
+
useReturnCarriage - Variable in class com.serial4j.core.serial.monitor.SerialMonitor
+
 
+
+

V

+
+
valueOf(String) - Static method in enum class com.serial4j.core.errno.Errno
+
+
Returns the enum constant of this class with the specified name.
+
+
valueOf(String) - Static method in enum class com.serial4j.core.serial.BaudRate
+
+
Returns the enum constant of this class with the specified name.
+
+
valueOf(String) - Static method in enum class com.serial4j.core.serial.ReadConfiguration
+
+
Returns the enum constant of this class with the specified name.
+
+
valueOf(String) - Static method in enum class com.serial4j.core.util.natives.NativeImageLoader.NativeImage
+
+
Returns the enum constant of this class with the specified name.
+
+
valueOf(String) - Static method in enum class com.serial4j.core.util.natives.NativeImageLoader.State
+
+
Returns the enum constant of this class with the specified name.
+
+
values() - Static method in enum class com.serial4j.core.errno.Errno
+
+
Returns an array containing the constants of this enum class, in +the order they are declared.
+
+
values() - Static method in enum class com.serial4j.core.serial.BaudRate
+
+
Returns an array containing the constants of this enum class, in +the order they are declared.
+
+
values() - Static method in enum class com.serial4j.core.serial.ReadConfiguration
+
+
Returns an array containing the constants of this enum class, in +the order they are declared.
+
+
values() - Static method in enum class com.serial4j.core.util.natives.NativeImageLoader.NativeImage
+
+
Returns an array containing the constants of this enum class, in +the order they are declared.
+
+
values() - Static method in enum class com.serial4j.core.util.natives.NativeImageLoader.State
+
+
Returns an array containing the constants of this enum class, in +the order they are declared.
+
+
VT0 - Static variable in class com.serial4j.core.serial.control.TerminalOutputFlag
+
 
+
VT1 - Static variable in class com.serial4j.core.serial.control.TerminalOutputFlag
+
 
+
+

W

+
+
waitForUnlock() - Method in class com.serial4j.core.util.process.Semaphore
+
 
+
WIN_x86_x64 - Enum constant in enum class com.serial4j.core.util.natives.NativeImageLoader.NativeImage
+
 
+
WritableCapsule - Class in com.serial4j.core.serial.entity.impl
+
+
Represents a serial write capsule for the SerialWriteEntity.
+
+
WritableCapsule() - Constructor for class com.serial4j.core.serial.entity.impl.WritableCapsule
+
 
+
write(String) - Method in class com.serial4j.core.serial.entity.impl.WritableCapsule
+
+
Specifies the data to be written on the next update of the + SerialWriteEntity.
+
+
writeBuffer(String) - Method in class com.serial4j.core.serial.TerminalDevice
+
 
+
writeBuffer0(String, int) - Method in class com.serial4j.core.serial.NativeTerminalDevice
+
+
Writes a string buffer (const char*) with a length to this terminal device.
+
+
writeData(int) - Method in class com.serial4j.core.serial.TerminalDevice
+
 
+
writeData(int[]) - Method in class com.serial4j.core.serial.TerminalDevice
+
 
+
writeData0(int) - Method in class com.serial4j.core.serial.NativeTerminalDevice
+
+
Writes an integer buffer to this terminal device.
+
+
+

X

+
+
XCASE - Static variable in class com.serial4j.core.serial.control.TerminalLocalFlag
+
 
+
+A B C D E F G H I L M N O P R S T U V W X 
All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form
+
+
+ + diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/index.html b/HelloSerial4j/serial4j-0.3A-javadoc/index.html new file mode 100644 index 00000000..88f27063 --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/index.html @@ -0,0 +1,102 @@ + + + + +Overview + + + + + + + + + + + + + + + +
+ +
+
+
+
Packages
+
+
Package
+
Description
+ +
+
Provides a native errno to java exception converter ErrnoToException and Errno for + native errno interpretation.
+
+ +
+
Provides a Serial UART Monitor API using Serial4j with 2 monitor entities, SerialReadEntity + and SerialWriteEntity.
+
+ +
 
+ +
+
Provides R/W serial monitor entities with a subscriber pattern.
+
+ +
+
An implementation code for +
+invalid @link +
serial.entity.SerialMonitorEntity
+
+ providing both read and + write serial monitor entities.
+
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+
+
+
+
+
+ + diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/jquery-ui.overrides.css b/HelloSerial4j/serial4j-0.3A-javadoc/jquery-ui.overrides.css new file mode 100644 index 00000000..03c010ba --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/jquery-ui.overrides.css @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved. + * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + */ + +.ui-state-active, +.ui-widget-content .ui-state-active, +.ui-widget-header .ui-state-active, +a.ui-button:active, +.ui-button:active, +.ui-button.ui-state-active:hover { + /* Overrides the color of selection used in jQuery UI */ + background: #F8981D; + border: 1px solid #F8981D; +} diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/legal/COPYRIGHT b/HelloSerial4j/serial4j-0.3A-javadoc/legal/COPYRIGHT new file mode 100644 index 00000000..945e19c1 --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/legal/COPYRIGHT @@ -0,0 +1,69 @@ +Copyright © 1993, 2018, Oracle and/or its affiliates. +All rights reserved. + +This software and related documentation are provided under a +license agreement containing restrictions on use and +disclosure and are protected by intellectual property laws. +Except as expressly permitted in your license agreement or +allowed by law, you may not use, copy, reproduce, translate, +broadcast, modify, license, transmit, distribute, exhibit, +perform, publish, or display any part, in any form, or by +any means. Reverse engineering, disassembly, or +decompilation of this software, unless required by law for +interoperability, is prohibited. + +The information contained herein is subject to change +without notice and is not warranted to be error-free. If you +find any errors, please report them to us in writing. + +If this is software or related documentation that is +delivered to the U.S. Government or anyone licensing it on +behalf of the U.S. Government, the following notice is +applicable: + +U.S. GOVERNMENT END USERS: Oracle programs, including any +operating system, integrated software, any programs +installed on the hardware, and/or documentation, delivered +to U.S. Government end users are "commercial computer +software" pursuant to the applicable Federal Acquisition +Regulation and agency-specific supplemental regulations. As +such, use, duplication, disclosure, modification, and +adaptation of the programs, including any operating system, +integrated software, any programs installed on the hardware, +and/or documentation, shall be subject to license terms and +license restrictions applicable to the programs. No other +rights are granted to the U.S. Government. + +This software or hardware is developed for general use in a +variety of information management applications. It is not +developed or intended for use in any inherently dangerous +applications, including applications that may create a risk +of personal injury. If you use this software or hardware in +dangerous applications, then you shall be responsible to +take all appropriate fail-safe, backup, redundancy, and +other measures to ensure its safe use. Oracle Corporation +and its affiliates disclaim any liability for any damages +caused by use of this software or hardware in dangerous +applications. + +Oracle and Java are registered trademarks of Oracle and/or +its affiliates. Other names may be trademarks of their +respective owners. + +Intel and Intel Xeon are trademarks or registered trademarks +of Intel Corporation. All SPARC trademarks are used under +license and are trademarks or registered trademarks of SPARC +International, Inc. AMD, Opteron, the AMD logo, and the AMD +Opteron logo are trademarks or registered trademarks of +Advanced Micro Devices. UNIX is a registered trademark of +The Open Group. + +This software or hardware and documentation may provide +access to or information on content, products, and services +from third parties. Oracle Corporation and its affiliates +are not responsible for and expressly disclaim all +warranties of any kind with respect to third-party content, +products, and services. Oracle Corporation and its +affiliates will not be responsible for any loss, costs, or +damages incurred due to your access to or use of third-party +content, products, or services. diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/legal/LICENSE b/HelloSerial4j/serial4j-0.3A-javadoc/legal/LICENSE new file mode 100644 index 00000000..ee860d38 --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/legal/LICENSE @@ -0,0 +1,118 @@ +Your use of this Program is governed by the No-Fee Terms and Conditions set +forth below, unless you have received this Program (alone or as part of another +Oracle product) under an Oracle license agreement (including but not limited to +the Oracle Master Agreement), in which case your use of this Program is governed +solely by such license agreement with Oracle. + +Oracle No-Fee Terms and Conditions (NFTC) + +Definitions + +"Oracle" refers to Oracle America, Inc. "You" and "Your" refers to (a) a company +or organization (each an "Entity") accessing the Programs, if use of the +Programs will be on behalf of such Entity; or (b) an individual accessing the +Programs, if use of the Programs will not be on behalf of an Entity. +"Program(s)" refers to Oracle software provided by Oracle pursuant to the +following terms and any updates, error corrections, and/or Program Documentation +provided by Oracle. "Program Documentation" refers to Program user manuals and +Program installation manuals, if any. If available, Program Documentation may be +delivered with the Programs and/or may be accessed from +www.oracle.com/documentation. "Separate Terms" refers to separate license terms +that are specified in the Program Documentation, readmes or notice files and +that apply to Separately Licensed Technology. "Separately Licensed Technology" +refers to Oracle or third party technology that is licensed under Separate Terms +and not under the terms of this license. + +Separately Licensed Technology + +Oracle may provide certain notices to You in Program Documentation, readmes or +notice files in connection with Oracle or third party technology provided as or +with the Programs. If specified in the Program Documentation, readmes or notice +files, such technology will be licensed to You under Separate Terms. Your rights +to use Separately Licensed Technology under Separate Terms are not restricted in +any way by the terms herein. For clarity, notwithstanding the existence of a +notice, third party technology that is not Separately Licensed Technology shall +be deemed part of the Programs licensed to You under the terms of this license. + +Source Code for Open Source Software + +For software that You receive from Oracle in binary form that is licensed under +an open source license that gives You the right to receive the source code for +that binary, You can obtain a copy of the applicable source code from +https://oss.oracle.com/sources/ or http://www.oracle.com/goto/opensourcecode. If +the source code for such software was not provided to You with the binary, You +can also receive a copy of the source code on physical media by submitting a +written request pursuant to the instructions in the "Written Offer for Source +Code" section of the latter website. + +------------------------------------------------------------------------------- + +The following license terms apply to those Programs that are not provided to You +under Separate Terms. + +License Rights and Restrictions + +Oracle grants to You, as a recipient of this Program, subject to the conditions +stated herein, a nonexclusive, nontransferable, limited license to: + +(a) internally use the unmodified Programs for the purposes of developing, +testing, prototyping and demonstrating your applications, and running the +Program for Your own personal use or internal business operations; and + +(b) redistribute the unmodified Program and Program Documentation, under the +terms of this License, provided that You do not charge Your licensees any fees +associated with such distribution or use of the Program, including, without +limitation, fees for products that include or are bundled with a copy of the +Program or for services that involve the use of the distributed Program. + +You may make copies of the Programs to the extent reasonably necessary for +exercising the license rights granted herein and for backup purposes. You are +granted the right to use the Programs to provide third party training in the use +of the Programs and associated Separately Licensed Technology only if there is +express authorization of such use by Oracle on the Program's download page or in +the Program Documentation. + +Your license is contingent on compliance with the following conditions: + +- You do not remove markings or notices of either Oracle's or a licensor's + proprietary rights from the Programs or Program Documentation; + +- You comply with all U.S. and applicable export control and economic sanctions + laws and regulations that govern Your use of the Programs (including technical + data); + +- You do not cause or permit reverse engineering, disassembly or decompilation + of the Programs (except as allowed by law) by You nor allow an associated + party to do so. + +For clarity, any source code that may be included in the distribution with the +Programs is provided solely for reference purposes and may not be modified, +unless such source code is under Separate Terms permitting modification. + +Ownership + +Oracle or its licensors retain all ownership and intellectual property rights to +the Programs. + +Information Collection + +The Programs' installation and/or auto-update processes, if any, may transmit a +limited amount of data to Oracle or its service provider about those processes +to help Oracle understand and optimize them. Oracle does not associate the data +with personally identifiable information. Refer to Oracle's Privacy Policy at +www.oracle.com/privacy. + +Disclaimer of Warranties; Limitation of Liability + +THE PROGRAMS ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. ORACLE FURTHER +DISCLAIMS ALL WARRANTIES, EXPRESS AND IMPLIED, INCLUDING WITHOUT LIMITATION, ANY +IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR +NONINFRINGEMENT. + +IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW WILL ORACLE BE LIABLE TO YOU FOR +DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES +ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT +LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/legal/jquery.md b/HelloSerial4j/serial4j-0.3A-javadoc/legal/jquery.md new file mode 100644 index 00000000..f7b72e3f --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/legal/jquery.md @@ -0,0 +1,72 @@ +## jQuery v3.6.0 + +### jQuery License +``` +jQuery v 3.6.0 +Copyright OpenJS Foundation and other contributors, https://openjsf.org/ + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +****************************************** + +The jQuery JavaScript Library v3.6.0 also includes Sizzle.js + +Sizzle.js includes the following license: + +Copyright JS Foundation and other contributors, https://js.foundation/ + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/jquery/sizzle + +The following license applies to all parts of this software except as +documented below: + +==== + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +==== + +All files located in the node_modules and external directories are +externally maintained libraries used by this software which have their +own licenses; we recommend you read them, as their terms may differ from +the terms above. + +********************* + +``` diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/legal/jqueryUI.md b/HelloSerial4j/serial4j-0.3A-javadoc/legal/jqueryUI.md new file mode 100644 index 00000000..8031bdb5 --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/legal/jqueryUI.md @@ -0,0 +1,49 @@ +## jQuery UI v1.12.1 + +### jQuery UI License +``` +Copyright jQuery Foundation and other contributors, https://jquery.org/ + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/jquery/jquery-ui + +The following license applies to all parts of this software except as +documented below: + +==== + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +==== + +Copyright and related rights for sample code are waived via CC0. Sample +code is defined as all source code contained within the demos directory. + +CC0: http://creativecommons.org/publicdomain/zero/1.0/ + +==== + +All files located in the node_modules and external directories are +externally maintained libraries used by this software which have their +own licenses; we recommend you read them, as their terms may differ from +the terms above. + +``` diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/member-search-index.js b/HelloSerial4j/serial4j-0.3A-javadoc/member-search-index.js new file mode 100644 index 00000000..681414c6 --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/member-search-index.js @@ -0,0 +1 @@ +memberSearchIndex = [{"p":"com.serial4j.core.serial.monitor","c":"SerialMonitor","l":"addSerialDataListener(SerialDataListener)","u":"addSerialDataListener(com.serial4j.core.serial.monitor.SerialDataListener)"},{"p":"com.serial4j.core.serial.entity.impl","c":"SerialWriteEntity","l":"addWritableCapsule(WritableCapsule)","u":"addWritableCapsule(com.serial4j.core.serial.entity.impl.WritableCapsule)"},{"p":"com.serial4j.core.serial","c":"Permissions","l":"append(Permissions)","u":"append(com.serial4j.core.serial.Permissions)"},{"p":"com.serial4j.core.serial","c":"Permissions","l":"append(Permissions...)","u":"append(com.serial4j.core.serial.Permissions...)"},{"p":"com.serial4j.core.serial.control","c":"TerminalFlag","l":"append(TerminalFlag)","u":"append(com.serial4j.core.serial.control.TerminalFlag)"},{"p":"com.serial4j.core.serial.control","c":"TerminalFlag","l":"append(TerminalFlag...)","u":"append(com.serial4j.core.serial.control.TerminalFlag...)"},{"p":"com.serial4j.core.serial","c":"BaudRate","l":"B0"},{"p":"com.serial4j.core.serial","c":"BaudRate","l":"B1000000"},{"p":"com.serial4j.core.serial","c":"BaudRate","l":"B110"},{"p":"com.serial4j.core.serial","c":"BaudRate","l":"B115200"},{"p":"com.serial4j.core.serial","c":"BaudRate","l":"B1152000"},{"p":"com.serial4j.core.serial","c":"BaudRate","l":"B1200"},{"p":"com.serial4j.core.serial","c":"BaudRate","l":"B134"},{"p":"com.serial4j.core.serial","c":"BaudRate","l":"B150"},{"p":"com.serial4j.core.serial","c":"BaudRate","l":"B1500000"},{"p":"com.serial4j.core.serial","c":"BaudRate","l":"B1800"},{"p":"com.serial4j.core.serial","c":"BaudRate","l":"B19200"},{"p":"com.serial4j.core.serial","c":"BaudRate","l":"B200"},{"p":"com.serial4j.core.serial","c":"BaudRate","l":"B2000000"},{"p":"com.serial4j.core.serial","c":"BaudRate","l":"B230400"},{"p":"com.serial4j.core.serial","c":"BaudRate","l":"B2400"},{"p":"com.serial4j.core.serial","c":"BaudRate","l":"B2500000"},{"p":"com.serial4j.core.serial","c":"BaudRate","l":"B300"},{"p":"com.serial4j.core.serial","c":"BaudRate","l":"B3000000"},{"p":"com.serial4j.core.serial","c":"BaudRate","l":"B3500000"},{"p":"com.serial4j.core.serial","c":"BaudRate","l":"B38400"},{"p":"com.serial4j.core.serial","c":"BaudRate","l":"B4000000"},{"p":"com.serial4j.core.serial","c":"BaudRate","l":"B460800"},{"p":"com.serial4j.core.serial","c":"BaudRate","l":"B4800"},{"p":"com.serial4j.core.serial","c":"BaudRate","l":"B50"},{"p":"com.serial4j.core.serial","c":"BaudRate","l":"B500000"},{"p":"com.serial4j.core.serial","c":"BaudRate","l":"B57600"},{"p":"com.serial4j.core.serial","c":"BaudRate","l":"B576000"},{"p":"com.serial4j.core.serial","c":"BaudRate","l":"B600"},{"p":"com.serial4j.core.serial","c":"BaudRate","l":"B75"},{"p":"com.serial4j.core.serial","c":"BaudRate","l":"B921600"},{"p":"com.serial4j.core.serial","c":"BaudRate","l":"B9600"},{"p":"com.serial4j.core.serial.throwable","c":"BadFileDescriptorException","l":"BadFileDescriptorException(String)","u":"%3Cinit%3E(java.lang.String)"},{"p":"com.serial4j.core.serial","c":"ReadConfiguration","l":"BLOCKING_READ_ONE_CHAR"},{"p":"com.serial4j.core.serial.control","c":"TerminalInputFlag","l":"BRKINT"},{"p":"com.serial4j.core.serial.throwable","c":"BrokenPipeException","l":"BrokenPipeException(String)","u":"%3Cinit%3E(java.lang.String)"},{"p":"com.serial4j.core.serial.control","c":"TerminalOutputFlag","l":"BS0"},{"p":"com.serial4j.core.serial.control","c":"TerminalOutputFlag","l":"BS1"},{"p":"com.serial4j.core.util.process","c":"Semaphore","l":"build(Semaphore.Mutex)","u":"build(com.serial4j.core.util.process.Semaphore.Mutex)"},{"p":"com.serial4j.core.serial.control","c":"TerminalControlFlag","l":"CIBAUD"},{"p":"com.serial4j.core.serial.control","c":"TerminalControlFlag","l":"CLOCAL"},{"p":"com.serial4j.core.serial","c":"TerminalDevice","l":"closePort()"},{"p":"com.serial4j.core.serial","c":"NativeTerminalDevice","l":"closePort0()"},{"p":"com.serial4j.core.serial.control","c":"TerminalControlFlag","l":"CMSPAR"},{"p":"com.serial4j.core.serial.control","c":"TerminalOutputFlag","l":"CR0"},{"p":"com.serial4j.core.serial.control","c":"TerminalOutputFlag","l":"CR1"},{"p":"com.serial4j.core.serial.control","c":"TerminalOutputFlag","l":"CR2"},{"p":"com.serial4j.core.serial.control","c":"TerminalOutputFlag","l":"CR3"},{"p":"com.serial4j.core.serial.control","c":"TerminalControlFlag","l":"CREAD"},{"p":"com.serial4j.core.serial","c":"Permissions","l":"createCustomPermissions(int, String)","u":"createCustomPermissions(int,java.lang.String)"},{"p":"com.serial4j.core.serial.control","c":"TerminalControlFlag","l":"CRTSCTS"},{"p":"com.serial4j.core.serial.control","c":"TerminalControlFlag","l":"CS5"},{"p":"com.serial4j.core.serial.control","c":"TerminalControlFlag","l":"CS6"},{"p":"com.serial4j.core.serial.control","c":"TerminalControlFlag","l":"CS7"},{"p":"com.serial4j.core.serial.control","c":"TerminalControlFlag","l":"CS8"},{"p":"com.serial4j.core.serial.control","c":"TerminalControlFlag","l":"CSTOPB"},{"p":"com.serial4j.core.serial.monitor","c":"SerialMonitorException","l":"DEFAULT_MSG"},{"p":"com.serial4j.core.serial.control","c":"TerminalFlag","l":"disable(TerminalFlag)","u":"disable(com.serial4j.core.serial.control.TerminalFlag)"},{"p":"com.serial4j.core.serial.control","c":"TerminalFlag","l":"disable(TerminalFlag...)","u":"disable(com.serial4j.core.serial.control.TerminalFlag...)"},{"p":"com.serial4j.core.serial.control","c":"TerminalFlag","l":"disableAll()"},{"p":"com.serial4j.core.errno","c":"Errno","l":"EACCES"},{"p":"com.serial4j.core.errno","c":"Errno","l":"EAGAIN"},{"p":"com.serial4j.core.errno","c":"Errno","l":"EBADF"},{"p":"com.serial4j.core.serial.control","c":"TerminalLocalFlag","l":"ECHO"},{"p":"com.serial4j.core.serial.control","c":"TerminalLocalFlag","l":"ECHOCTL"},{"p":"com.serial4j.core.serial.control","c":"TerminalLocalFlag","l":"ECHOE"},{"p":"com.serial4j.core.serial.control","c":"TerminalLocalFlag","l":"ECHOK"},{"p":"com.serial4j.core.serial.control","c":"TerminalLocalFlag","l":"ECHOKE"},{"p":"com.serial4j.core.serial.control","c":"TerminalLocalFlag","l":"ECHONL"},{"p":"com.serial4j.core.serial.control","c":"TerminalLocalFlag","l":"ECHOPRT"},{"p":"com.serial4j.core.errno","c":"Errno","l":"EEXIST"},{"p":"com.serial4j.core.errno","c":"Errno","l":"EFBIG"},{"p":"com.serial4j.core.errno","c":"Errno","l":"EINTR"},{"p":"com.serial4j.core.errno","c":"Errno","l":"EINVAL"},{"p":"com.serial4j.core.errno","c":"Errno","l":"EIO"},{"p":"com.serial4j.core.errno","c":"Errno","l":"EISDIR"},{"p":"com.serial4j.core.errno","c":"Errno","l":"EMFILE"},{"p":"com.serial4j.core.serial.control","c":"TerminalControlFlag","l":"EMPTY_INSTANCE"},{"p":"com.serial4j.core.serial.control","c":"TerminalInputFlag","l":"EMPTY_INSTANCE"},{"p":"com.serial4j.core.serial.control","c":"TerminalLocalFlag","l":"EMPTY_INSTANCE"},{"p":"com.serial4j.core.serial.control","c":"TerminalOutputFlag","l":"EMPTY_INSTANCE"},{"p":"com.serial4j.core.serial.control","c":"TerminalFlag","l":"enableAll()"},{"p":"com.serial4j.core.errno","c":"Errno","l":"ENFILE"},{"p":"com.serial4j.core.errno","c":"Errno","l":"ENOENT"},{"p":"com.serial4j.core.errno","c":"Errno","l":"ENOSPC"},{"p":"com.serial4j.core.errno","c":"Errno","l":"ENOTTY"},{"p":"com.serial4j.core.errno","c":"Errno","l":"ENXIO"},{"p":"com.serial4j.core.errno","c":"Errno","l":"EPIPE"},{"p":"com.serial4j.core.errno","c":"Errno","l":"EROFS"},{"p":"com.serial4j.core.errno","c":"Errno","l":"ERR_INVALID_PORT"},{"p":"com.serial4j.core.serial","c":"ReadConfiguration","l":"ERR_INVALID_PORT"},{"p":"com.serial4j.core.errno","c":"Errno","l":"ERR_NO_AVAILABLE_TTY_DEVICES"},{"p":"com.serial4j.core.errno","c":"Errno","l":"ERR_OPERATION_FAILED"},{"p":"com.serial4j.example.serial4j","c":"HelloNativeSerial4J","l":"EXAMPLE_LOGGER"},{"p":"com.serial4j.core.serial","c":"NativeTerminalDevice","l":"fetchSerialPorts0()"},{"p":"com.serial4j.core.serial.control","c":"TerminalOutputFlag","l":"FF0"},{"p":"com.serial4j.core.serial.control","c":"TerminalOutputFlag","l":"FF1"},{"p":"com.serial4j.core.serial.throwable","c":"FileAlreadyOpenedException","l":"FileAlreadyOpenedException(String)","u":"%3Cinit%3E(java.lang.String)"},{"p":"com.serial4j.core.serial.throwable","c":"FileIsDirectoryException","l":"FileIsDirectoryException(String)","u":"%3Cinit%3E(java.lang.String)"},{"p":"com.serial4j.core.serial.throwable","c":"FileTableOverflowException","l":"FileTableOverflowException(String)","u":"%3Cinit%3E(java.lang.String)"},{"p":"com.serial4j.core.serial.throwable","c":"FileTooLargeException","l":"FileTooLargeException(String)","u":"%3Cinit%3E(java.lang.String)"},{"p":"com.serial4j.core.serial.control","c":"TerminalLocalFlag","l":"FLUSHO"},{"p":"com.serial4j.core.errno","c":"NativeErrno","l":"getBadFileDescriptorErrno()"},{"p":"com.serial4j.core.serial","c":"BaudRate","l":"getBaudRate()"},{"p":"com.serial4j.core.serial","c":"TerminalDevice","l":"getBaudRate()"},{"p":"com.serial4j.core.serial","c":"NativeTerminalDevice","l":"getBaudRate0()"},{"p":"com.serial4j.core.errno","c":"NativeErrno","l":"getBrokenPipeErrno()"},{"p":"com.serial4j.core.serial.throwable","c":"BadFileDescriptorException","l":"getCausingErrno()"},{"p":"com.serial4j.core.serial.throwable","c":"BrokenPipeException","l":"getCausingErrno()"},{"p":"com.serial4j.core.serial.throwable","c":"FileAlreadyOpenedException","l":"getCausingErrno()"},{"p":"com.serial4j.core.serial.throwable","c":"FileIsDirectoryException","l":"getCausingErrno()"},{"p":"com.serial4j.core.serial.throwable","c":"FileTableOverflowException","l":"getCausingErrno()"},{"p":"com.serial4j.core.serial.throwable","c":"FileTooLargeException","l":"getCausingErrno()"},{"p":"com.serial4j.core.serial.throwable","c":"InputOutputException","l":"getCausingErrno()"},{"p":"com.serial4j.core.serial.throwable","c":"InterruptedSystemCallException","l":"getCausingErrno()"},{"p":"com.serial4j.core.serial.throwable","c":"InvalidArgumentException","l":"getCausingErrno()"},{"p":"com.serial4j.core.serial.throwable","c":"InvalidPortException","l":"getCausingErrno()"},{"p":"com.serial4j.core.serial.throwable","c":"NoAvailableTtyDevicesException","l":"getCausingErrno()"},{"p":"com.serial4j.core.serial.throwable","c":"NoSpaceLeftException","l":"getCausingErrno()"},{"p":"com.serial4j.core.serial.throwable","c":"NoSuchDeviceException","l":"getCausingErrno()"},{"p":"com.serial4j.core.serial.throwable","c":"NoSuchFileException","l":"getCausingErrno()"},{"p":"com.serial4j.core.serial.throwable","c":"NotTtyDeviceException","l":"getCausingErrno()"},{"p":"com.serial4j.core.serial.throwable","c":"OperationFailedException","l":"getCausingErrno()"},{"p":"com.serial4j.core.serial.throwable","c":"PermissionDeniedException","l":"getCausingErrno()"},{"p":"com.serial4j.core.serial.throwable","c":"ReadOnlyFileSystemException","l":"getCausingErrno()"},{"p":"com.serial4j.core.serial.throwable","c":"TooManyOpenedFilesException","l":"getCausingErrno()"},{"p":"com.serial4j.core.serial.throwable","c":"TryAgainException","l":"getCausingErrno()"},{"p":"com.serial4j.core.serial.entity.impl","c":"WritableCapsule","l":"getData()"},{"p":"com.serial4j.core.errno","c":"Errno","l":"getDescription()"},{"p":"com.serial4j.core.serial","c":"Permissions","l":"getDescription()"},{"p":"com.serial4j.core.serial","c":"ReadConfiguration","l":"getDescription()"},{"p":"com.serial4j.core.serial.entity.impl","c":"SerialReadEntity","l":"getEntityStream()"},{"p":"com.serial4j.core.serial.entity.impl","c":"SerialWriteEntity","l":"getEntityStream()"},{"p":"com.serial4j.core.serial.entity","c":"SerialMonitorEntity","l":"getEntityStream()"},{"p":"com.serial4j.core.serial","c":"NativeTerminalDevice","l":"getErrno0()"},{"p":"com.serial4j.core.serial","c":"SerialPort","l":"getFd()"},{"p":"com.serial4j.core.errno","c":"NativeErrno","l":"getFileAlreadyOpenedErrno()"},{"p":"com.serial4j.core.errno","c":"NativeErrno","l":"getFileIsDirectoryErrno()"},{"p":"com.serial4j.core.errno","c":"NativeErrno","l":"getFileTableOverflowErrno()"},{"p":"com.serial4j.core.errno","c":"NativeErrno","l":"getFileTooLargeErrno()"},{"p":"com.serial4j.core.serial","c":"ReadConfiguration","l":"getFromNativeReadConfig(int[])"},{"p":"com.serial4j.core.util.natives","c":"NativeImageLoader.NativeImage","l":"getImage()"},{"p":"com.serial4j.core.errno","c":"NativeErrno","l":"getInputOutputErrno()"},{"p":"com.serial4j.core.serial","c":"TerminalDevice","l":"getInputStream()"},{"p":"com.serial4j.core.errno","c":"NativeErrno","l":"getInterruptedSystemCallErrno()"},{"p":"com.serial4j.core.errno","c":"NativeErrno","l":"getInvalidArgumentErrno()"},{"p":"com.serial4j.core.errno","c":"NativeErrno","l":"getInvalidPortErrno()"},{"p":"com.serial4j.core.serial","c":"SerialPort","l":"getIOFlag()"},{"p":"com.serial4j.core.util.process","c":"Semaphore.Mutex","l":"getLockData()"},{"p":"com.serial4j.core.serial","c":"ReadConfiguration","l":"getMode()"},{"p":"com.serial4j.core.serial.monitor","c":"SerialMonitor","l":"getMonitorName()"},{"p":"com.serial4j.core.util.process","c":"Semaphore.Mutex","l":"getMonitorObject()"},{"p":"com.serial4j.core.util.process","c":"Semaphore","l":"getMutex()"},{"p":"com.serial4j.core.errno","c":"NativeErrno","l":"getNoAvailableTtyDevicesErrno()"},{"p":"com.serial4j.core.errno","c":"NativeErrno","l":"getNoSpaceLeftErrno()"},{"p":"com.serial4j.core.errno","c":"NativeErrno","l":"getNoSuchDeviceErrno()"},{"p":"com.serial4j.core.errno","c":"NativeErrno","l":"getNoSuchFileErrno()"},{"p":"com.serial4j.core.errno","c":"NativeErrno","l":"getNotTtyDeviceErrno()"},{"p":"com.serial4j.core.errno","c":"NativeErrno","l":"getOperationFailedErrno()"},{"p":"com.serial4j.core.serial","c":"TerminalDevice","l":"getOutputStream()"},{"p":"com.serial4j.core.serial","c":"SerialPort","l":"getPath()"},{"p":"com.serial4j.core.errno","c":"NativeErrno","l":"getPermissionDeniedErrno()"},{"p":"com.serial4j.core.serial","c":"TerminalDevice","l":"getPermissions()"},{"p":"com.serial4j.core.serial","c":"NativeTerminalDevice","l":"getReadBuffer()"},{"p":"com.serial4j.core.serial","c":"TerminalDevice","l":"getReadBuffer()"},{"p":"com.serial4j.core.serial","c":"TerminalDevice","l":"getReadConfigurationMode()"},{"p":"com.serial4j.core.serial","c":"NativeTerminalDevice","l":"getReadConfigurationMode0()"},{"p":"com.serial4j.core.serial","c":"NativeTerminalDevice","l":"getReadData()"},{"p":"com.serial4j.core.serial","c":"TerminalDevice","l":"getReadData()"},{"p":"com.serial4j.core.serial.monitor","c":"SerialMonitor","l":"getReadEntityStream()"},{"p":"com.serial4j.core.errno","c":"NativeErrno","l":"getReadOnlyFileSystemErrno()"},{"p":"com.serial4j.core.serial","c":"BaudRate","l":"getRealBaud()"},{"p":"com.serial4j.core.serial.entity","c":"SerialMonitorEntity","l":"getSerialDataListeners()"},{"p":"com.serial4j.core.serial.monitor","c":"SerialMonitor","l":"getSerialDataListeners()"},{"p":"com.serial4j.core.serial.entity.impl","c":"SerialReadEntity","l":"getSerialEntityStatusListener()"},{"p":"com.serial4j.core.serial.entity.impl","c":"SerialWriteEntity","l":"getSerialEntityStatusListener()"},{"p":"com.serial4j.core.serial.entity","c":"SerialMonitorEntity","l":"getSerialEntityStatusListener()"},{"p":"com.serial4j.core.serial.entity","c":"SerialMonitorEntity","l":"getSerialMonitor()"},{"p":"com.serial4j.core.serial","c":"NativeTerminalDevice","l":"getSerialPort()"},{"p":"com.serial4j.core.serial","c":"TerminalDevice","l":"getSerialPort()"},{"p":"com.serial4j.core.serial","c":"NativeTerminalDevice","l":"getSerialPorts()"},{"p":"com.serial4j.core.serial","c":"TerminalDevice","l":"getSerialPorts()"},{"p":"com.serial4j.core.serial.monitor","c":"SerialMonitor","l":"getSerialReadEntity()"},{"p":"com.serial4j.core.serial.entity.impl","c":"SerialWriteEntity","l":"getSerialWriteCapsules()"},{"p":"com.serial4j.core.serial.monitor","c":"SerialMonitor","l":"getSerialWriteEntity()"},{"p":"com.serial4j.core.serial","c":"NativeTerminalDevice","l":"getTerminalControlFlag()"},{"p":"com.serial4j.core.serial","c":"TerminalDevice","l":"getTerminalControlFlag()"},{"p":"com.serial4j.core.serial.entity","c":"SerialMonitorEntity","l":"getTerminalDevice()"},{"p":"com.serial4j.core.serial.monitor","c":"SerialMonitor","l":"getTerminalDevice()"},{"p":"com.serial4j.core.serial","c":"NativeTerminalDevice","l":"getTerminalInputFlag()"},{"p":"com.serial4j.core.serial","c":"TerminalDevice","l":"getTerminalInputFlag()"},{"p":"com.serial4j.core.serial","c":"NativeTerminalDevice","l":"getTerminalLocalFlag()"},{"p":"com.serial4j.core.serial","c":"TerminalDevice","l":"getTerminalLocalFlag()"},{"p":"com.serial4j.core.serial","c":"NativeTerminalDevice","l":"getTerminalOutputFlag()"},{"p":"com.serial4j.core.serial","c":"TerminalDevice","l":"getTerminalOutputFlag()"},{"p":"com.serial4j.core.errno","c":"NativeErrno","l":"getTooManyOpenedFilesErrno()"},{"p":"com.serial4j.core.errno","c":"NativeErrno","l":"getTryAgainErrno()"},{"p":"com.serial4j.core.util.process","c":"Semaphore.Mutex","l":"getUnlockData()"},{"p":"com.serial4j.core.errno","c":"Errno","l":"getValue()"},{"p":"com.serial4j.core.serial.control","c":"TerminalFlag","l":"getValue()"},{"p":"com.serial4j.core.serial","c":"Permissions","l":"getValue()"},{"p":"com.serial4j.core.serial.monitor","c":"SerialMonitor","l":"getWriteEntityStream()"},{"p":"com.serial4j.example.serial4j","c":"HelloNativeSerial4J","l":"HelloNativeSerial4J()","u":"%3Cinit%3E()"},{"p":"com.serial4j.example.serial4j","c":"HelloSerial4jIO","l":"HelloSerial4jIO()","u":"%3Cinit%3E()"},{"p":"com.serial4j.example.monitor","c":"HelloSerialMonitor","l":"HelloSerialMonitor()","u":"%3Cinit%3E()"},{"p":"com.serial4j.core.serial.control","c":"TerminalControlFlag","l":"HUPCL"},{"p":"com.serial4j.core.serial.control","c":"TerminalLocalFlag","l":"ICANON"},{"p":"com.serial4j.core.serial.control","c":"TerminalInputFlag","l":"ICRNL"},{"p":"com.serial4j.core.serial.control","c":"TerminalLocalFlag","l":"IEXTEN"},{"p":"com.serial4j.core.serial.control","c":"TerminalInputFlag","l":"IGNBRK"},{"p":"com.serial4j.core.serial.control","c":"TerminalInputFlag","l":"IGNCR"},{"p":"com.serial4j.core.serial.control","c":"TerminalInputFlag","l":"IMAXBEL"},{"p":"com.serial4j.core.serial","c":"TerminalDevice","l":"initTermios()"},{"p":"com.serial4j.core.serial","c":"NativeTerminalDevice","l":"initTermios0()"},{"p":"com.serial4j.core.serial.control","c":"TerminalInputFlag","l":"INLCR"},{"p":"com.serial4j.core.serial.control","c":"TerminalInputFlag","l":"INPCK"},{"p":"com.serial4j.core.serial.throwable","c":"InputOutputException","l":"InputOutputException(String)","u":"%3Cinit%3E(java.lang.String)"},{"p":"com.serial4j.core.serial.throwable","c":"InterruptedSystemCallException","l":"InterruptedSystemCallException(String)","u":"%3Cinit%3E(java.lang.String)"},{"p":"com.serial4j.core.serial.throwable","c":"InvalidArgumentException","l":"InvalidArgumentException(String)","u":"%3Cinit%3E(java.lang.String)"},{"p":"com.serial4j.core.serial.throwable","c":"InvalidPortException","l":"InvalidPortException(String)","u":"%3Cinit%3E(java.lang.String)"},{"p":"com.serial4j.core.serial.entity.impl","c":"WritableCapsule","l":"isDataWritten()"},{"p":"com.serial4j.core.serial.control","c":"TerminalLocalFlag","l":"ISIG"},{"p":"com.serial4j.core.serial.monitor","c":"SerialMonitor","l":"isMonitoringStarted"},{"p":"com.serial4j.core.serial.entity","c":"SerialMonitorEntity","l":"isMonitoringStarted()"},{"p":"com.serial4j.core.serial","c":"SerialPort","l":"isPortOpened()"},{"p":"com.serial4j.core.serial.monitor","c":"SerialMonitor","l":"isReadSerialEntityInitialized"},{"p":"com.serial4j.core.serial","c":"TerminalDevice","l":"isSerial4jLoggingEnabled()"},{"p":"com.serial4j.core.serial.entity.impl","c":"SerialReadEntity","l":"isSerialEntityInitialized()"},{"p":"com.serial4j.core.serial.entity.impl","c":"SerialWriteEntity","l":"isSerialEntityInitialized()"},{"p":"com.serial4j.core.serial.entity","c":"SerialMonitorEntity","l":"isSerialEntityInitialized()"},{"p":"com.serial4j.core.serial.entity","c":"SerialMonitorEntity","l":"isTerminate()"},{"p":"com.serial4j.core.serial.monitor","c":"SerialMonitor","l":"isTerminate()"},{"p":"com.serial4j.core.serial.control","c":"TerminalInputFlag","l":"ISTRIP"},{"p":"com.serial4j.core.serial.entity","c":"SerialMonitorEntity","l":"isUsingReturnCarriage()"},{"p":"com.serial4j.core.serial.monitor","c":"SerialMonitor","l":"isUsingReturnCarriage()"},{"p":"com.serial4j.core.serial.monitor","c":"SerialMonitor","l":"isWriteSerialEntityInitialized"},{"p":"com.serial4j.core.serial.control","c":"TerminalInputFlag","l":"IUTF8"},{"p":"com.serial4j.core.serial.control","c":"TerminalInputFlag","l":"IXANY"},{"p":"com.serial4j.core.serial.control","c":"TerminalInputFlag","l":"IXOFF"},{"p":"com.serial4j.core.serial.control","c":"TerminalInputFlag","l":"IXON"},{"p":"com.serial4j.example","c":"Launcher","l":"Launcher()","u":"%3Cinit%3E()"},{"p":"com.serial4j.core.util.natives","c":"NativeImageLoader.NativeImage","l":"LINUX_x86_x64"},{"p":"com.serial4j.core.util.natives","c":"NativeImageLoader.NativeImage","l":"LINUX_x86_x86"},{"p":"com.serial4j.core.util.natives","c":"NativeImageLoader","l":"loadLibrary()"},{"p":"com.serial4j.core.util.process","c":"Semaphore","l":"lock(MO)"},{"p":"com.serial4j.core.util.natives","c":"NativeImageLoader.NativeImage","l":"MAC_x86_x64"},{"p":"com.serial4j.example","c":"Launcher","l":"main(String[])","u":"main(java.lang.String[])"},{"p":"com.serial4j.core.serial","c":"BaudRate","l":"MAX_BAUD"},{"p":"com.serial4j.core.serial.entity","c":"SerialMonitorEntity","l":"MUTEX"},{"p":"com.serial4j.core.util.natives","c":"NativeImageLoader","l":"MUTEX"},{"p":"com.serial4j.core.util.process","c":"Semaphore.Mutex","l":"Mutex()","u":"%3Cinit%3E()"},{"p":"com.serial4j.core.util.process","c":"Semaphore.Mutex","l":"Mutex(O, LD, ULD)","u":"%3Cinit%3E(O,LD,ULD)"},{"p":"com.serial4j.core.serial","c":"NativeTerminalDevice","l":"NativeTerminalDevice()","u":"%3Cinit%3E()"},{"p":"com.serial4j.core.serial.control","c":"TerminalOutputFlag","l":"NL0"},{"p":"com.serial4j.core.serial.control","c":"TerminalOutputFlag","l":"NL1"},{"p":"com.serial4j.core.util.process","c":"Semaphore.Mutex","l":"NO_JOB()"},{"p":"com.serial4j.core.serial.throwable","c":"NoAvailableTtyDevicesException","l":"NoAvailableTtyDevicesException(String)","u":"%3Cinit%3E(java.lang.String)"},{"p":"com.serial4j.core.serial.control","c":"TerminalLocalFlag","l":"NOFLSH"},{"p":"com.serial4j.core.serial.throwable","c":"NoSpaceLeftException","l":"NoSpaceLeftException(String)","u":"%3Cinit%3E(java.lang.String)"},{"p":"com.serial4j.core.serial.throwable","c":"NoSuchDeviceException","l":"NoSuchDeviceException(String)","u":"%3Cinit%3E(java.lang.String)"},{"p":"com.serial4j.core.serial.throwable","c":"NoSuchFileException","l":"NoSuchFileException(String)","u":"%3Cinit%3E(java.lang.String)"},{"p":"com.serial4j.core.serial.throwable","c":"NotTtyDeviceException","l":"NotTtyDeviceException(String)","u":"%3Cinit%3E(java.lang.String)"},{"p":"com.serial4j.core.serial","c":"Permissions","l":"O_NOCTTY"},{"p":"com.serial4j.core.serial","c":"Permissions","l":"O_NONBLOCK"},{"p":"com.serial4j.core.serial","c":"Permissions","l":"O_RDONLY"},{"p":"com.serial4j.core.serial","c":"Permissions","l":"O_RDWR"},{"p":"com.serial4j.core.serial","c":"Permissions","l":"O_WRONLY"},{"p":"com.serial4j.core.serial.control","c":"TerminalOutputFlag","l":"OCRNL"},{"p":"com.serial4j.core.serial.control","c":"TerminalOutputFlag","l":"OFDEL"},{"p":"com.serial4j.core.serial.control","c":"TerminalOutputFlag","l":"OFILL"},{"p":"com.serial4j.core.serial.control","c":"TerminalOutputFlag","l":"OLCUC"},{"p":"com.serial4j.core.serial.entity.impl","c":"SerialReadEntity","l":"onDataMonitored(SerialMonitor)","u":"onDataMonitored(com.serial4j.core.serial.monitor.SerialMonitor)"},{"p":"com.serial4j.core.serial.entity.impl","c":"SerialWriteEntity","l":"onDataMonitored(SerialMonitor)","u":"onDataMonitored(com.serial4j.core.serial.monitor.SerialMonitor)"},{"p":"com.serial4j.core.serial.entity","c":"SerialMonitorEntity","l":"onDataMonitored(SerialMonitor)","u":"onDataMonitored(com.serial4j.core.serial.monitor.SerialMonitor)"},{"p":"com.serial4j.core.serial.monitor","c":"SerialDataListener","l":"onDataReceived(int)"},{"p":"com.serial4j.example.monitor","c":"HelloSerialMonitor","l":"onDataReceived(int)"},{"p":"com.serial4j.core.serial.monitor","c":"SerialDataListener","l":"onDataReceived(String)","u":"onDataReceived(java.lang.String)"},{"p":"com.serial4j.example.monitor","c":"HelloSerialMonitor","l":"onDataReceived(String)","u":"onDataReceived(java.lang.String)"},{"p":"com.serial4j.core.serial.monitor","c":"SerialDataListener","l":"onDataTransmitted(int)"},{"p":"com.serial4j.example.monitor","c":"HelloSerialMonitor","l":"onDataTransmitted(int)"},{"p":"com.serial4j.core.serial.control","c":"TerminalOutputFlag","l":"ONLCR"},{"p":"com.serial4j.core.serial.control","c":"TerminalOutputFlag","l":"ONLRET"},{"p":"com.serial4j.core.serial.control","c":"TerminalOutputFlag","l":"ONOCR"},{"p":"com.serial4j.example.monitor","c":"HelloSerialMonitor","l":"onSerialEntityInitialized(SerialWriteEntity)","u":"onSerialEntityInitialized(com.serial4j.core.serial.entity.impl.SerialWriteEntity)"},{"p":"com.serial4j.core.serial.entity","c":"EntityStatus","l":"onSerialEntityInitialized(T)"},{"p":"com.serial4j.example.monitor","c":"HelloSerialMonitor","l":"onSerialEntityTerminated(SerialWriteEntity)","u":"onSerialEntityTerminated(com.serial4j.core.serial.entity.impl.SerialWriteEntity)"},{"p":"com.serial4j.core.serial.entity","c":"EntityStatus","l":"onSerialEntityTerminated(T)"},{"p":"com.serial4j.example.monitor","c":"HelloSerialMonitor","l":"onUpdate(SerialWriteEntity)","u":"onUpdate(com.serial4j.core.serial.entity.impl.SerialWriteEntity)"},{"p":"com.serial4j.core.serial.entity","c":"EntityStatus","l":"onUpdate(T)"},{"p":"com.serial4j.core.serial","c":"TerminalDevice","l":"openPort(SerialPort)","u":"openPort(com.serial4j.core.serial.SerialPort)"},{"p":"com.serial4j.core.serial","c":"NativeTerminalDevice","l":"openPort0(String, int)","u":"openPort0(java.lang.String,int)"},{"p":"com.serial4j.core.serial.throwable","c":"OperationFailedException","l":"OperationFailedException(String)","u":"%3Cinit%3E(java.lang.String)"},{"p":"com.serial4j.core.serial.control","c":"TerminalOutputFlag","l":"OPOST"},{"p":"com.serial4j.core.serial.control","c":"TerminalControlFlag","l":"PARENB"},{"p":"com.serial4j.core.serial.control","c":"TerminalInputFlag","l":"PARMRK"},{"p":"com.serial4j.core.serial.control","c":"TerminalControlFlag","l":"PARODD"},{"p":"com.serial4j.core.serial.control","c":"TerminalLocalFlag","l":"PENDIN"},{"p":"com.serial4j.core.serial.throwable","c":"PermissionDeniedException","l":"PermissionDeniedException(String)","u":"%3Cinit%3E(java.lang.String)"},{"p":"com.serial4j.core.serial","c":"Permissions","l":"Permissions(int, String)","u":"%3Cinit%3E(int,java.lang.String)"},{"p":"com.serial4j.core.serial","c":"ReadConfiguration","l":"POLLING_READ"},{"p":"com.serial4j.core.serial","c":"ReadConfiguration","l":"READ_WITH_INTERBYTE_TIMEOUT"},{"p":"com.serial4j.core.serial","c":"ReadConfiguration","l":"READ_WITH_TIMEOUT"},{"p":"com.serial4j.core.serial","c":"TerminalDevice","l":"readBuffer()"},{"p":"com.serial4j.core.serial","c":"NativeTerminalDevice","l":"readBuffer0()"},{"p":"com.serial4j.core.serial","c":"TerminalDevice","l":"readData()"},{"p":"com.serial4j.core.serial","c":"NativeTerminalDevice","l":"readData0()"},{"p":"com.serial4j.core.serial.throwable","c":"ReadOnlyFileSystemException","l":"ReadOnlyFileSystemException(String)","u":"%3Cinit%3E(java.lang.String)"},{"p":"com.serial4j.core.serial.monitor","c":"SerialMonitor","l":"removeSerialDataListener(SerialDataListener)","u":"removeSerialDataListener(com.serial4j.core.serial.monitor.SerialDataListener)"},{"p":"com.serial4j.core.serial.entity.impl","c":"SerialWriteEntity","l":"removeWritableCapsule(WritableCapsule)","u":"removeWritableCapsule(com.serial4j.core.serial.entity.impl.WritableCapsule)"},{"p":"com.serial4j.core.serial.entity","c":"SerialMonitorEntity","l":"run()"},{"p":"com.serial4j.example.monitor","c":"HelloSerialMonitor","l":"run()"},{"p":"com.serial4j.example.serial4j","c":"HelloNativeSerial4J","l":"run()"},{"p":"com.serial4j.example.serial4j","c":"HelloSerial4jIO","l":"run()"},{"p":"com.serial4j.core.serial.entity","c":"SerialMonitorEntity","l":"SEMAPHORE"},{"p":"com.serial4j.core.util.natives","c":"NativeImageLoader","l":"SEMAPHORE"},{"p":"com.serial4j.core.serial.monitor","c":"SerialMonitor","l":"SerialMonitor(String)","u":"%3Cinit%3E(java.lang.String)"},{"p":"com.serial4j.core.serial.entity","c":"SerialMonitorEntity","l":"SerialMonitorEntity(SerialMonitor, String)","u":"%3Cinit%3E(com.serial4j.core.serial.monitor.SerialMonitor,java.lang.String)"},{"p":"com.serial4j.core.serial.monitor","c":"SerialMonitorException","l":"SerialMonitorException(String)","u":"%3Cinit%3E(java.lang.String)"},{"p":"com.serial4j.core.serial","c":"SerialPort","l":"SerialPort(String)","u":"%3Cinit%3E(java.lang.String)"},{"p":"com.serial4j.core.serial.entity.impl","c":"SerialReadEntity","l":"SerialReadEntity(SerialMonitor)","u":"%3Cinit%3E(com.serial4j.core.serial.monitor.SerialMonitor)"},{"p":"com.serial4j.core.serial.monitor","c":"SerialMonitor","l":"serialReadEntityEntityStatus"},{"p":"com.serial4j.core.serial.throwable","c":"SerialThrowable","l":"SerialThrowable(String)","u":"%3Cinit%3E(java.lang.String)"},{"p":"com.serial4j.core.serial.entity.impl","c":"SerialWriteEntity","l":"SerialWriteEntity(SerialMonitor)","u":"%3Cinit%3E(com.serial4j.core.serial.monitor.SerialMonitor)"},{"p":"com.serial4j.core.serial.monitor","c":"SerialMonitor","l":"serialWriteEntityEntityStatus"},{"p":"com.serial4j.core.serial","c":"TerminalDevice","l":"setBaudRate(BaudRate)","u":"setBaudRate(com.serial4j.core.serial.BaudRate)"},{"p":"com.serial4j.core.serial","c":"NativeTerminalDevice","l":"setBaudRate0(int)"},{"p":"com.serial4j.core.serial.entity.impl","c":"WritableCapsule","l":"setDataWritten(boolean)"},{"p":"com.serial4j.core.util.process","c":"Semaphore.Mutex","l":"setLockData(Object)","u":"setLockData(java.lang.Object)"},{"p":"com.serial4j.core.serial.entity","c":"SerialMonitorEntity","l":"setMonitoringStarted(boolean)"},{"p":"com.serial4j.core.util.process","c":"Semaphore.Mutex","l":"setMonitorObject(Object)","u":"setMonitorObject(java.lang.Object)"},{"p":"com.serial4j.core.serial","c":"TerminalDevice","l":"setPermissions(Permissions)","u":"setPermissions(com.serial4j.core.serial.Permissions)"},{"p":"com.serial4j.core.serial","c":"TerminalDevice","l":"setReadConfigurationMode(ReadConfiguration, int, int)","u":"setReadConfigurationMode(com.serial4j.core.serial.ReadConfiguration,int,int)"},{"p":"com.serial4j.core.serial","c":"NativeTerminalDevice","l":"setReadConfigurationMode0(int, int)","u":"setReadConfigurationMode0(int,int)"},{"p":"com.serial4j.core.serial.monitor","c":"SerialMonitor","l":"setReadEntityListener(EntityStatus)","u":"setReadEntityListener(com.serial4j.core.serial.entity.EntityStatus)"},{"p":"com.serial4j.core.serial","c":"TerminalDevice","l":"setSerial4jLoggingEnabled(boolean)"},{"p":"com.serial4j.core.serial.entity.impl","c":"SerialReadEntity","l":"setSerialEntityInitialized(boolean)"},{"p":"com.serial4j.core.serial.entity.impl","c":"SerialWriteEntity","l":"setSerialEntityInitialized(boolean)"},{"p":"com.serial4j.core.serial.entity","c":"SerialMonitorEntity","l":"setSerialEntityInitialized(boolean)"},{"p":"com.serial4j.core.serial","c":"NativeTerminalDevice","l":"setSerialPort(SerialPort)","u":"setSerialPort(com.serial4j.core.serial.SerialPort)"},{"p":"com.serial4j.core.serial","c":"NativeTerminalDevice","l":"setTerminalControlFlag(long)"},{"p":"com.serial4j.core.serial","c":"TerminalDevice","l":"setTerminalControlFlag(TerminalControlFlag)","u":"setTerminalControlFlag(com.serial4j.core.serial.control.TerminalControlFlag)"},{"p":"com.serial4j.core.serial","c":"NativeTerminalDevice","l":"setTerminalInputFlag(long)"},{"p":"com.serial4j.core.serial","c":"TerminalDevice","l":"setTerminalInputFlag(TerminalInputFlag)","u":"setTerminalInputFlag(com.serial4j.core.serial.control.TerminalInputFlag)"},{"p":"com.serial4j.core.serial","c":"NativeTerminalDevice","l":"setTerminalLocalFlag(long)"},{"p":"com.serial4j.core.serial","c":"TerminalDevice","l":"setTerminalLocalFlag(TerminalLocalFlag)","u":"setTerminalLocalFlag(com.serial4j.core.serial.control.TerminalLocalFlag)"},{"p":"com.serial4j.core.serial","c":"NativeTerminalDevice","l":"setTerminalOutputFlag(long)"},{"p":"com.serial4j.core.serial","c":"TerminalDevice","l":"setTerminalOutputFlag(TerminalOutputFlag)","u":"setTerminalOutputFlag(com.serial4j.core.serial.control.TerminalOutputFlag)"},{"p":"com.serial4j.core.serial.monitor","c":"SerialMonitor","l":"setTerminate()"},{"p":"com.serial4j.core.util.process","c":"Semaphore.Mutex","l":"setUnlockData(Object)","u":"setUnlockData(java.lang.Object)"},{"p":"com.serial4j.core.serial","c":"NativeTerminalDevice","l":"setupJniEnvironment0()"},{"p":"com.serial4j.core.serial.monitor","c":"SerialMonitor","l":"setUseReturnCarriage(boolean)"},{"p":"com.serial4j.core.serial.control","c":"TerminalFlag","l":"setValue(long)"},{"p":"com.serial4j.core.serial.monitor","c":"SerialMonitor","l":"setWriteEntityStatus(EntityStatus)","u":"setWriteEntityStatus(com.serial4j.core.serial.entity.EntityStatus)"},{"p":"com.serial4j.core.serial.monitor","c":"SerialMonitor","l":"startDataMonitoring(String, BaudRate, Permissions)","u":"startDataMonitoring(java.lang.String,com.serial4j.core.serial.BaudRate,com.serial4j.core.serial.Permissions)"},{"p":"com.serial4j.core.serial.control","c":"TerminalOutputFlag","l":"TAB0"},{"p":"com.serial4j.core.serial.control","c":"TerminalOutputFlag","l":"TAB1"},{"p":"com.serial4j.core.serial.control","c":"TerminalOutputFlag","l":"TAB2"},{"p":"com.serial4j.core.serial.control","c":"TerminalOutputFlag","l":"TAB3"},{"p":"com.serial4j.core.serial.control","c":"TerminalControlFlag","l":"TerminalControlFlag(long)","u":"%3Cinit%3E(long)"},{"p":"com.serial4j.core.serial","c":"TerminalDevice","l":"TerminalDevice()","u":"%3Cinit%3E()"},{"p":"com.serial4j.core.serial.control","c":"TerminalFlag","l":"TerminalFlag(long)","u":"%3Cinit%3E(long)"},{"p":"com.serial4j.core.serial.control","c":"TerminalInputFlag","l":"TerminalInputFlag(long)","u":"%3Cinit%3E(long)"},{"p":"com.serial4j.core.serial.control","c":"TerminalLocalFlag","l":"TerminalLocalFlag(long)","u":"%3Cinit%3E(long)"},{"p":"com.serial4j.core.serial.control","c":"TerminalOutputFlag","l":"TerminalOutputFlag(long)","u":"%3Cinit%3E(long)"},{"p":"com.serial4j.core.serial.entity","c":"SerialMonitorEntity","l":"terminate()"},{"p":"com.serial4j.core.serial","c":"TerminalDevice","l":"throwExceptionFromNativeErrno()"},{"p":"com.serial4j.core.errno","c":"ErrnoToException","l":"throwFromErrno(int, String)","u":"throwFromErrno(int,java.lang.String)"},{"p":"com.serial4j.core.util.natives","c":"NativeImageLoader.State","l":"TOGGLED"},{"p":"com.serial4j.core.serial.throwable","c":"TooManyOpenedFilesException","l":"TooManyOpenedFilesException(String)","u":"%3Cinit%3E(java.lang.String)"},{"p":"com.serial4j.core.serial.control","c":"TerminalLocalFlag","l":"TOSTOP"},{"p":"com.serial4j.core.serial.throwable","c":"TryAgainException","l":"TryAgainException(String)","u":"%3Cinit%3E(java.lang.String)"},{"p":"com.serial4j.example.serial4j","c":"HelloNativeSerial4J","l":"ttyDevice"},{"p":"com.serial4j.example.serial4j","c":"HelloSerial4jIO","l":"ttyDevice"},{"p":"com.serial4j.core.util.process","c":"Semaphore","l":"unlock(O)"},{"p":"com.serial4j.core.serial.monitor","c":"SerialMonitor","l":"useReturnCarriage"},{"p":"com.serial4j.core.errno","c":"Errno","l":"valueOf(String)","u":"valueOf(java.lang.String)"},{"p":"com.serial4j.core.serial","c":"BaudRate","l":"valueOf(String)","u":"valueOf(java.lang.String)"},{"p":"com.serial4j.core.serial","c":"ReadConfiguration","l":"valueOf(String)","u":"valueOf(java.lang.String)"},{"p":"com.serial4j.core.util.natives","c":"NativeImageLoader.NativeImage","l":"valueOf(String)","u":"valueOf(java.lang.String)"},{"p":"com.serial4j.core.util.natives","c":"NativeImageLoader.State","l":"valueOf(String)","u":"valueOf(java.lang.String)"},{"p":"com.serial4j.core.errno","c":"Errno","l":"values()"},{"p":"com.serial4j.core.serial","c":"BaudRate","l":"values()"},{"p":"com.serial4j.core.serial","c":"ReadConfiguration","l":"values()"},{"p":"com.serial4j.core.util.natives","c":"NativeImageLoader.NativeImage","l":"values()"},{"p":"com.serial4j.core.util.natives","c":"NativeImageLoader.State","l":"values()"},{"p":"com.serial4j.core.serial.control","c":"TerminalOutputFlag","l":"VT0"},{"p":"com.serial4j.core.serial.control","c":"TerminalOutputFlag","l":"VT1"},{"p":"com.serial4j.core.util.process","c":"Semaphore","l":"waitForUnlock()"},{"p":"com.serial4j.core.util.natives","c":"NativeImageLoader.NativeImage","l":"WIN_x86_x64"},{"p":"com.serial4j.core.serial.entity.impl","c":"WritableCapsule","l":"WritableCapsule()","u":"%3Cinit%3E()"},{"p":"com.serial4j.core.serial.entity.impl","c":"WritableCapsule","l":"write(String)","u":"write(java.lang.String)"},{"p":"com.serial4j.core.serial","c":"TerminalDevice","l":"writeBuffer(String)","u":"writeBuffer(java.lang.String)"},{"p":"com.serial4j.core.serial","c":"NativeTerminalDevice","l":"writeBuffer0(String, int)","u":"writeBuffer0(java.lang.String,int)"},{"p":"com.serial4j.core.serial","c":"TerminalDevice","l":"writeData(int)"},{"p":"com.serial4j.core.serial","c":"TerminalDevice","l":"writeData(int[])"},{"p":"com.serial4j.core.serial","c":"NativeTerminalDevice","l":"writeData0(int)"},{"p":"com.serial4j.core.serial.control","c":"TerminalLocalFlag","l":"XCASE"}];updateSearchResults(); \ No newline at end of file diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/module-search-index.js b/HelloSerial4j/serial4j-0.3A-javadoc/module-search-index.js new file mode 100644 index 00000000..0d59754f --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/module-search-index.js @@ -0,0 +1 @@ +moduleSearchIndex = [];updateSearchResults(); \ No newline at end of file diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/overview-summary.html b/HelloSerial4j/serial4j-0.3A-javadoc/overview-summary.html new file mode 100644 index 00000000..9c77362b --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/overview-summary.html @@ -0,0 +1,26 @@ + + + + +Generated Documentation (Untitled) + + + + + + + + + + + +
+ +

index.html

+
+ + diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/overview-tree.html b/HelloSerial4j/serial4j-0.3A-javadoc/overview-tree.html new file mode 100644 index 00000000..9c563b17 --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/overview-tree.html @@ -0,0 +1,177 @@ + + + + +Class Hierarchy + + + + + + + + + + + + + + + +
+ +
+
+ +
+

Class Hierarchy

+ +
+
+

Interface Hierarchy

+ +
+
+

Enum Class Hierarchy

+ +
+
+
+
+ + diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/package-search-index.js b/HelloSerial4j/serial4j-0.3A-javadoc/package-search-index.js new file mode 100644 index 00000000..18535fc1 --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/package-search-index.js @@ -0,0 +1 @@ +packageSearchIndex = [{"l":"All Packages","u":"allpackages-index.html"},{"l":"com.serial4j.core.errno"},{"l":"com.serial4j.core.serial"},{"l":"com.serial4j.core.serial.control"},{"l":"com.serial4j.core.serial.entity"},{"l":"com.serial4j.core.serial.entity.impl"},{"l":"com.serial4j.core.serial.monitor"},{"l":"com.serial4j.core.serial.throwable"},{"l":"com.serial4j.core.util.natives"},{"l":"com.serial4j.core.util.process"},{"l":"com.serial4j.example"},{"l":"com.serial4j.example.monitor"},{"l":"com.serial4j.example.serial4j"}];updateSearchResults(); \ No newline at end of file diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/resources/glass.png b/HelloSerial4j/serial4j-0.3A-javadoc/resources/glass.png new file mode 100644 index 00000000..a7f591f4 Binary files /dev/null and b/HelloSerial4j/serial4j-0.3A-javadoc/resources/glass.png differ diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/resources/x.png b/HelloSerial4j/serial4j-0.3A-javadoc/resources/x.png new file mode 100644 index 00000000..30548a75 Binary files /dev/null and b/HelloSerial4j/serial4j-0.3A-javadoc/resources/x.png differ diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/script-dir/jquery-3.6.0.min.js b/HelloSerial4j/serial4j-0.3A-javadoc/script-dir/jquery-3.6.0.min.js new file mode 100644 index 00000000..c4c6022f --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/script-dir/jquery-3.6.0.min.js @@ -0,0 +1,2 @@ +/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.org/license */ +!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.6.0",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},j=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||D,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,D=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",y.option=!!ce.lastChild;var ge={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function je(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Le(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var _t,zt=[],Ut=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=zt.pop()||S.expando+"_"+wt.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Ut.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ut.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Ut,"$1"+r):!1!==e.jsonp&&(e.url+=(Tt.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,zt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((_t=E.implementation.createHTMLDocument("").body).innerHTML="
",2===_t.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=Fe(y.pixelPosition,function(e,t){if(t)return t=We(e,n),Pe.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0",options:{classes:{},disabled:!1,create:null},_createWidget:function(t,e){e=x(e||this.defaultElement||this)[0],this.element=x(e),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=x(),this.hoverable=x(),this.focusable=x(),this.classesElementLookup={},e!==this&&(x.data(e,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===e&&this.destroy()}}),this.document=x(e.style?e.ownerDocument:e.document||e),this.window=x(this.document[0].defaultView||this.document[0].parentWindow)),this.options=x.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:x.noop,_create:x.noop,_init:x.noop,destroy:function(){var i=this;this._destroy(),x.each(this.classesElementLookup,function(t,e){i._removeClass(e,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:x.noop,widget:function(){return this.element},option:function(t,e){var i,s,n,o=t;if(0===arguments.length)return x.widget.extend({},this.options);if("string"==typeof t)if(o={},t=(i=t.split(".")).shift(),i.length){for(s=o[t]=x.widget.extend({},this.options[t]),n=0;n
"),i=e.children()[0];return x("body").append(e),t=i.offsetWidth,e.css("overflow","scroll"),t===(i=i.offsetWidth)&&(i=e[0].clientWidth),e.remove(),s=t-i},getScrollInfo:function(t){var e=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),i=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),e="scroll"===e||"auto"===e&&t.widthC(E(s),E(n))?o.important="horizontal":o.important="vertical",c.using.call(this,t,o)}),l.offset(x.extend(u,{using:t}))})},x.ui.position={fit:{left:function(t,e){var i=e.within,s=i.isWindow?i.scrollLeft:i.offset.left,n=i.width,o=t.left-e.collisionPosition.marginLeft,l=s-o,a=o+e.collisionWidth-n-s;e.collisionWidth>n?0n?0",delay:300,options:{icons:{submenu:"ui-icon-caret-1-e"},items:"> *",menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.lastMousePosition={x:null,y:null},this.element.uniqueId().attr({role:this.options.role,tabIndex:0}),this._addClass("ui-menu","ui-widget ui-widget-content"),this._on({"mousedown .ui-menu-item":function(t){t.preventDefault(),this._activateItem(t)},"click .ui-menu-item":function(t){var e=x(t.target),i=x(x.ui.safeActiveElement(this.document[0]));!this.mouseHandled&&e.not(".ui-state-disabled").length&&(this.select(t),t.isPropagationStopped()||(this.mouseHandled=!0),e.has(".ui-menu").length?this.expand(t):!this.element.is(":focus")&&i.closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":"_activateItem","mousemove .ui-menu-item":"_activateItem",mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var i=this.active||this._menuItems().first();e||this.focus(t,i)},blur:function(t){this._delay(function(){x.contains(this.element[0],x.ui.safeActiveElement(this.document[0]))||this.collapseAll(t)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(t){this._closeOnDocumentClick(t)&&this.collapseAll(t,!0),this.mouseHandled=!1}})},_activateItem:function(t){var e,i;this.previousFilter||t.clientX===this.lastMousePosition.x&&t.clientY===this.lastMousePosition.y||(this.lastMousePosition={x:t.clientX,y:t.clientY},e=x(t.target).closest(".ui-menu-item"),i=x(t.currentTarget),e[0]===i[0]&&(i.is(".ui-state-active")||(this._removeClass(i.siblings().children(".ui-state-active"),null,"ui-state-active"),this.focus(t,i))))},_destroy:function(){var t=this.element.find(".ui-menu-item").removeAttr("role aria-disabled").children(".ui-menu-item-wrapper").removeUniqueId().removeAttr("tabIndex role aria-haspopup");this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeAttr("role aria-labelledby aria-expanded aria-hidden aria-disabled tabIndex").removeUniqueId().show(),t.children().each(function(){var t=x(this);t.data("ui-menu-submenu-caret")&&t.remove()})},_keydown:function(t){var e,i,s,n=!0;switch(t.keyCode){case x.ui.keyCode.PAGE_UP:this.previousPage(t);break;case x.ui.keyCode.PAGE_DOWN:this.nextPage(t);break;case x.ui.keyCode.HOME:this._move("first","first",t);break;case x.ui.keyCode.END:this._move("last","last",t);break;case x.ui.keyCode.UP:this.previous(t);break;case x.ui.keyCode.DOWN:this.next(t);break;case x.ui.keyCode.LEFT:this.collapse(t);break;case x.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(t);break;case x.ui.keyCode.ENTER:case x.ui.keyCode.SPACE:this._activate(t);break;case x.ui.keyCode.ESCAPE:this.collapse(t);break;default:e=this.previousFilter||"",s=n=!1,i=96<=t.keyCode&&t.keyCode<=105?(t.keyCode-96).toString():String.fromCharCode(t.keyCode),clearTimeout(this.filterTimer),i===e?s=!0:i=e+i,e=this._filterMenuItems(i),(e=s&&-1!==e.index(this.active.next())?this.active.nextAll(".ui-menu-item"):e).length||(i=String.fromCharCode(t.keyCode),e=this._filterMenuItems(i)),e.length?(this.focus(t,e),this.previousFilter=i,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}n&&t.preventDefault()},_activate:function(t){this.active&&!this.active.is(".ui-state-disabled")&&(this.active.children("[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var t,e,s=this,n=this.options.icons.submenu,i=this.element.find(this.options.menus);this._toggleClass("ui-menu-icons",null,!!this.element.find(".ui-icon").length),e=i.filter(":not(.ui-menu)").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var t=x(this),e=t.prev(),i=x("").data("ui-menu-submenu-caret",!0);s._addClass(i,"ui-menu-icon","ui-icon "+n),e.attr("aria-haspopup","true").prepend(i),t.attr("aria-labelledby",e.attr("id"))}),this._addClass(e,"ui-menu","ui-widget ui-widget-content ui-front"),(t=i.add(this.element).find(this.options.items)).not(".ui-menu-item").each(function(){var t=x(this);s._isDivider(t)&&s._addClass(t,"ui-menu-divider","ui-widget-content")}),i=(e=t.not(".ui-menu-item, .ui-menu-divider")).children().not(".ui-menu").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),this._addClass(e,"ui-menu-item")._addClass(i,"ui-menu-item-wrapper"),t.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!x.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){var i;"icons"===t&&(i=this.element.find(".ui-menu-icon"),this._removeClass(i,null,this.options.icons.submenu)._addClass(i,null,e.submenu)),this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",String(t)),this._toggleClass(null,"ui-state-disabled",!!t)},focus:function(t,e){var i;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),i=this.active.children(".ui-menu-item-wrapper"),this._addClass(i,null,"ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",i.attr("id")),i=this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper"),this._addClass(i,null,"ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),(i=e.children(".ui-menu")).length&&t&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(t){var e,i,s;this._hasScroll()&&(i=parseFloat(x.css(this.activeMenu[0],"borderTopWidth"))||0,s=parseFloat(x.css(this.activeMenu[0],"paddingTop"))||0,e=t.offset().top-this.activeMenu.offset().top-i-s,i=this.activeMenu.scrollTop(),s=this.activeMenu.height(),t=t.outerHeight(),e<0?this.activeMenu.scrollTop(i+e):s",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,liveRegionTimer:null,_create:function(){var i,s,n,t=this.element[0].nodeName.toLowerCase(),e="textarea"===t,t="input"===t;this.isMultiLine=e||!t&&this._isContentEditable(this.element),this.valueMethod=this.element[e||t?"val":"text"],this.isNewMenu=!0,this._addClass("ui-autocomplete-input"),this.element.attr("autocomplete","off"),this._on(this.element,{keydown:function(t){if(this.element.prop("readOnly"))s=n=i=!0;else{s=n=i=!1;var e=x.ui.keyCode;switch(t.keyCode){case e.PAGE_UP:i=!0,this._move("previousPage",t);break;case e.PAGE_DOWN:i=!0,this._move("nextPage",t);break;case e.UP:i=!0,this._keyEvent("previous",t);break;case e.DOWN:i=!0,this._keyEvent("next",t);break;case e.ENTER:this.menu.active&&(i=!0,t.preventDefault(),this.menu.select(t));break;case e.TAB:this.menu.active&&this.menu.select(t);break;case e.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(t),t.preventDefault());break;default:s=!0,this._searchTimeout(t)}}},keypress:function(t){if(i)return i=!1,void(this.isMultiLine&&!this.menu.element.is(":visible")||t.preventDefault());if(!s){var e=x.ui.keyCode;switch(t.keyCode){case e.PAGE_UP:this._move("previousPage",t);break;case e.PAGE_DOWN:this._move("nextPage",t);break;case e.UP:this._keyEvent("previous",t);break;case e.DOWN:this._keyEvent("next",t)}}},input:function(t){if(n)return n=!1,void t.preventDefault();this._searchTimeout(t)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){clearTimeout(this.searching),this.close(t),this._change(t)}}),this._initSource(),this.menu=x("
    ").appendTo(this._appendTo()).menu({role:null}).hide().attr({unselectable:"on"}).menu("instance"),this._addClass(this.menu.element,"ui-autocomplete","ui-front"),this._on(this.menu.element,{mousedown:function(t){t.preventDefault()},menufocus:function(t,e){var i,s;if(this.isNewMenu&&(this.isNewMenu=!1,t.originalEvent&&/^mouse/.test(t.originalEvent.type)))return this.menu.blur(),void this.document.one("mousemove",function(){x(t.target).trigger(t.originalEvent)});s=e.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",t,{item:s})&&t.originalEvent&&/^key/.test(t.originalEvent.type)&&this._value(s.value),(i=e.item.attr("aria-label")||s.value)&&String.prototype.trim.call(i).length&&(clearTimeout(this.liveRegionTimer),this.liveRegionTimer=this._delay(function(){this.liveRegion.html(x("
    ").text(i))},100))},menuselect:function(t,e){var i=e.item.data("ui-autocomplete-item"),s=this.previous;this.element[0]!==x.ui.safeActiveElement(this.document[0])&&(this.element.trigger("focus"),this.previous=s,this._delay(function(){this.previous=s,this.selectedItem=i})),!1!==this._trigger("select",t,{item:i})&&this._value(i.value),this.term=this._value(),this.close(t),this.selectedItem=i}}),this.liveRegion=x("
    ",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(t,e){this._super(t,e),"source"===t&&this._initSource(),"appendTo"===t&&this.menu.element.appendTo(this._appendTo()),"disabled"===t&&e&&this.xhr&&this.xhr.abort()},_isEventTargetInWidget:function(t){var e=this.menu.element[0];return t.target===this.element[0]||t.target===e||x.contains(e,t.target)},_closeOnClickOutside:function(t){this._isEventTargetInWidget(t)||this.close()},_appendTo:function(){var t=this.options.appendTo;return t=!(t=!(t=t&&(t.jquery||t.nodeType?x(t):this.document.find(t).eq(0)))||!t[0]?this.element.closest(".ui-front, dialog"):t).length?this.document[0].body:t},_initSource:function(){var i,s,n=this;Array.isArray(this.options.source)?(i=this.options.source,this.source=function(t,e){e(x.ui.autocomplete.filter(i,t.term))}):"string"==typeof this.options.source?(s=this.options.source,this.source=function(t,e){n.xhr&&n.xhr.abort(),n.xhr=x.ajax({url:s,data:t,dataType:"json",success:function(t){e(t)},error:function(){e([])}})}):this.source=this.options.source},_searchTimeout:function(s){clearTimeout(this.searching),this.searching=this._delay(function(){var t=this.term===this._value(),e=this.menu.element.is(":visible"),i=s.altKey||s.ctrlKey||s.metaKey||s.shiftKey;t&&(e||i)||(this.selectedItem=null,this.search(null,s))},this.options.delay)},search:function(t,e){return t=null!=t?t:this._value(),this.term=this._value(),t.length").append(x("
    ").text(e.label)).appendTo(t)},_move:function(t,e){if(this.menu.element.is(":visible"))return this.menu.isFirstItem()&&/^previous/.test(t)||this.menu.isLastItem()&&/^next/.test(t)?(this.isMultiLine||this._value(this.term),void this.menu.blur()):void this.menu[t](e);this.search(null,e)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(t,e){this.isMultiLine&&!this.menu.element.is(":visible")||(this._move(t,e),e.preventDefault())},_isContentEditable:function(t){if(!t.length)return!1;var e=t.prop("contentEditable");return"inherit"===e?this._isContentEditable(t.parent()):"true"===e}}),x.extend(x.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(t,e){var i=new RegExp(x.ui.autocomplete.escapeRegex(e),"i");return x.grep(t,function(t){return i.test(t.label||t.value||t)})}}),x.widget("ui.autocomplete",x.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(t){return t+(1").text(e))},100))}});x.ui.autocomplete}); \ No newline at end of file diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/script.js b/HelloSerial4j/serial4j-0.3A-javadoc/script.js new file mode 100644 index 00000000..51c5d3de --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/script.js @@ -0,0 +1,266 @@ +/* + * Copyright (c) 2013, 2022, Oracle and/or its affiliates. All rights reserved. + * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + */ + +var moduleSearchIndex; +var packageSearchIndex; +var typeSearchIndex; +var memberSearchIndex; +var tagSearchIndex; + +var oddRowColor = "odd-row-color"; +var evenRowColor = "even-row-color"; +var sortAsc = "sort-asc"; +var sortDesc = "sort-desc"; +var tableTab = "table-tab"; +var activeTableTab = "active-table-tab"; + +function loadScripts(doc, tag) { + createElem(doc, tag, 'search.js'); + + createElem(doc, tag, 'module-search-index.js'); + createElem(doc, tag, 'package-search-index.js'); + createElem(doc, tag, 'type-search-index.js'); + createElem(doc, tag, 'member-search-index.js'); + createElem(doc, tag, 'tag-search-index.js'); +} + +function createElem(doc, tag, path) { + var script = doc.createElement(tag); + var scriptElement = doc.getElementsByTagName(tag)[0]; + script.src = pathtoroot + path; + scriptElement.parentNode.insertBefore(script, scriptElement); +} + +// Helper for making content containing release names comparable lexicographically +function makeComparable(s) { + return s.toLowerCase().replace(/(\d+)/g, + function(n, m) { + return ("000" + m).slice(-4); + }); +} + +// Switches between two styles depending on a condition +function toggleStyle(classList, condition, trueStyle, falseStyle) { + if (condition) { + classList.remove(falseStyle); + classList.add(trueStyle); + } else { + classList.remove(trueStyle); + classList.add(falseStyle); + } +} + +// Sorts the rows in a table lexicographically by the content of a specific column +function sortTable(header, columnIndex, columns) { + var container = header.parentElement; + var descending = header.classList.contains(sortAsc); + container.querySelectorAll("div.table-header").forEach( + function(header) { + header.classList.remove(sortAsc); + header.classList.remove(sortDesc); + } + ) + var cells = container.children; + var rows = []; + for (var i = columns; i < cells.length; i += columns) { + rows.push(Array.prototype.slice.call(cells, i, i + columns)); + } + var comparator = function(a, b) { + var ka = makeComparable(a[columnIndex].textContent); + var kb = makeComparable(b[columnIndex].textContent); + if (ka < kb) + return descending ? 1 : -1; + if (ka > kb) + return descending ? -1 : 1; + return 0; + }; + var sorted = rows.sort(comparator); + var visible = 0; + sorted.forEach(function(row) { + if (row[0].style.display !== 'none') { + var isEvenRow = visible++ % 2 === 0; + } + row.forEach(function(cell) { + toggleStyle(cell.classList, isEvenRow, evenRowColor, oddRowColor); + container.appendChild(cell); + }) + }); + toggleStyle(header.classList, descending, sortDesc, sortAsc); +} + +// Toggles the visibility of a table category in all tables in a page +function toggleGlobal(checkbox, selected, columns) { + var display = checkbox.checked ? '' : 'none'; + document.querySelectorAll("div.table-tabs").forEach(function(t) { + var id = t.parentElement.getAttribute("id"); + var selectedClass = id + "-tab" + selected; + // if selected is empty string it selects all uncategorized entries + var selectUncategorized = !Boolean(selected); + var visible = 0; + document.querySelectorAll('div.' + id) + .forEach(function(elem) { + if (selectUncategorized) { + if (elem.className.indexOf(selectedClass) === -1) { + elem.style.display = display; + } + } else if (elem.classList.contains(selectedClass)) { + elem.style.display = display; + } + if (elem.style.display === '') { + var isEvenRow = visible++ % (columns * 2) < columns; + toggleStyle(elem.classList, isEvenRow, evenRowColor, oddRowColor); + } + }); + t.parentElement.style.display = visible === 0 ? 'none' : ''; + }) +} + +// Shows the elements of a table belonging to a specific category +function show(tableId, selected, columns) { + if (tableId !== selected) { + document.querySelectorAll('div.' + tableId + ':not(.' + selected + ')') + .forEach(function(elem) { + elem.style.display = 'none'; + }); + } + document.querySelectorAll('div.' + selected) + .forEach(function(elem, index) { + elem.style.display = ''; + var isEvenRow = index % (columns * 2) < columns; + toggleStyle(elem.classList, isEvenRow, evenRowColor, oddRowColor); + }); + updateTabs(tableId, selected); +} + +function updateTabs(tableId, selected) { + document.querySelector('div#' + tableId +' .summary-table') + .setAttribute('aria-labelledby', selected); + document.querySelectorAll('button[id^="' + tableId + '"]') + .forEach(function(tab, index) { + if (selected === tab.id || (tableId === selected && index === 0)) { + tab.className = activeTableTab; + tab.setAttribute('aria-selected', true); + tab.setAttribute('tabindex',0); + } else { + tab.className = tableTab; + tab.setAttribute('aria-selected', false); + tab.setAttribute('tabindex',-1); + } + }); +} + +function switchTab(e) { + var selected = document.querySelector('[aria-selected=true]'); + if (selected) { + if ((e.keyCode === 37 || e.keyCode === 38) && selected.previousSibling) { + // left or up arrow key pressed: move focus to previous tab + selected.previousSibling.click(); + selected.previousSibling.focus(); + e.preventDefault(); + } else if ((e.keyCode === 39 || e.keyCode === 40) && selected.nextSibling) { + // right or down arrow key pressed: move focus to next tab + selected.nextSibling.click(); + selected.nextSibling.focus(); + e.preventDefault(); + } + } +} + +var updateSearchResults = function() {}; + +function indexFilesLoaded() { + return moduleSearchIndex + && packageSearchIndex + && typeSearchIndex + && memberSearchIndex + && tagSearchIndex; +} +// Copy the contents of the local snippet to the clipboard +function copySnippet(button) { + copyToClipboard(button.nextElementSibling.innerText); + switchCopyLabel(button.firstElementChild, button.parentElement); +} +// Copy the link to the adjacent header to the clipboard +function copyUrl(button) { + var id; + var header = button.parentElement; + if (header.hasAttribute("id")) { + id = header.getAttribute("id"); + } else if (header.parentElement.tagName === 'SECTION' && header.parentElement.hasAttribute("id")) { + id = header.parentElement.getAttribute("id"); + } else if (header.firstElementChild && header.firstElementChild.tagName === "A" + && header.firstElementChild.hasAttribute("id")) { + id = header.firstElementChild.getAttribute("id"); + } + var url = document.location.href; + if (url.indexOf("#") > -1) { + url = url.substring(0, url.indexOf("#")); + } + copyToClipboard(url + "#" + id); + switchCopyLabel(button.lastElementChild, button.parentElement); +} +function copyToClipboard(content) { + var textarea = document.createElement("textarea"); + textarea.style.height = 0; + document.body.appendChild(textarea); + textarea.value = content; + textarea.select(); + document.execCommand("copy"); + document.body.removeChild(textarea); +} +function switchCopyLabel(span, parent) { + var copied = span.getAttribute("data-copied"); + if (span.innerHTML !== copied) { + var initialLabel = span.innerHTML; + span.innerHTML = copied; + parent.onmouseleave = parent.ontouchend = function() { + span.innerHTML = initialLabel; + }; + } +} +// Workaround for scroll position not being included in browser history (8249133) +document.addEventListener("DOMContentLoaded", function(e) { + var contentDiv = document.querySelector("div.flex-content"); + window.addEventListener("popstate", function(e) { + if (e.state !== null) { + contentDiv.scrollTop = e.state; + } + }); + window.addEventListener("hashchange", function(e) { + history.replaceState(contentDiv.scrollTop, document.title); + }); + var timeoutId; + contentDiv.addEventListener("scroll", function(e) { + if (timeoutId) { + clearTimeout(timeoutId); + } + timeoutId = setTimeout(function() { + history.replaceState(contentDiv.scrollTop, document.title); + }, 100); + }); + if (!location.hash) { + history.replaceState(contentDiv.scrollTop, document.title); + } +}); diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/search-page.js b/HelloSerial4j/serial4j-0.3A-javadoc/search-page.js new file mode 100644 index 00000000..a7d29d89 --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/search-page.js @@ -0,0 +1,299 @@ +/* + * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + */ + +"use strict"; +$(function() { + var copy = $("#page-search-copy"); + var expand = $("#page-search-expand"); + var searchLink = $("span#page-search-link"); + var redirect = $("input#search-redirect"); + function setSearchUrlTemplate() { + var href = document.location.href.split(/[#?]/)[0]; + href += "?q=" + "%s"; + if (redirect.is(":checked")) { + href += "&r=1"; + } + searchLink.html(href); + copy[0].onmouseenter(); + } + function copyLink(e) { + var textarea = document.createElement("textarea"); + textarea.style.height = 0; + document.body.appendChild(textarea); + textarea.value = this.previousSibling.innerText; + textarea.select(); + document.execCommand("copy"); + document.body.removeChild(textarea); + var span = this.lastElementChild; + var copied = span.getAttribute("data-copied"); + if (span.innerHTML !== copied) { + var initialLabel = span.innerHTML; + span.innerHTML = copied; + var parent = this.parentElement.parentElement; + parent.onmouseleave = parent.ontouchend = copy[0].onmouseenter = function() { + span.innerHTML = initialLabel; + }; + } + } + copy.click(copyLink); + copy[0].onmouseenter = function() {}; + redirect.click(setSearchUrlTemplate); + setSearchUrlTemplate(); + copy.prop("disabled", false); + redirect.prop("disabled", false); + expand.click(function (e) { + var searchInfo = $("div.page-search-info"); + if(this.parentElement.hasAttribute("open")) { + searchInfo.attr("style", "border-width: 0;"); + } else { + searchInfo.attr("style", "border-width: 1px;").height(searchInfo.prop("scrollHeight")); + } + }); +}); +$(window).on("load", function() { + var input = $("#page-search-input"); + var reset = $("#page-search-reset"); + var notify = $("#page-search-notify"); + var resultSection = $("div#result-section"); + var resultContainer = $("div#result-container"); + var searchTerm = ""; + var activeTab = ""; + var fixedTab = false; + var visibleTabs = []; + var feelingLucky = false; + function renderResults(result) { + if (!result.length) { + notify.html(messages.noResult); + } else if (result.length === 1) { + notify.html(messages.oneResult); + } else { + notify.html(messages.manyResults.replace("{0}", result.length)); + } + resultContainer.empty(); + var r = { + "types": [], + "members": [], + "packages": [], + "modules": [], + "searchTags": [] + }; + for (var i in result) { + var item = result[i]; + var arr = r[item.category]; + arr.push(item); + } + if (!activeTab || r[activeTab].length === 0 || !fixedTab) { + Object.keys(r).reduce(function(prev, curr) { + if (r[curr].length > 0 && r[curr][0].score > prev) { + activeTab = curr; + return r[curr][0].score; + } + return prev; + }, 0); + } + if (feelingLucky && activeTab) { + notify.html(messages.redirecting) + var firstItem = r[activeTab][0]; + window.location = getURL(firstItem.indexItem, firstItem.category); + return; + } + if (result.length > 20) { + if (searchTerm[searchTerm.length - 1] === ".") { + if (activeTab === "types" && r["members"].length > r["types"].length) { + activeTab = "members"; + } else if (activeTab === "packages" && r["types"].length > r["packages"].length) { + activeTab = "types"; + } + } + } + var categoryCount = Object.keys(r).reduce(function(prev, curr) { + return prev + (r[curr].length > 0 ? 1 : 0); + }, 0); + visibleTabs = []; + var tabContainer = $("
    ").appendTo(resultContainer); + for (var key in r) { + var id = "#result-tab-" + key.replace("searchTags", "search_tags"); + if (r[key].length) { + var count = r[key].length >= 1000 ? "999+" : r[key].length; + if (result.length > 20 && categoryCount > 1) { + var button = $("").appendTo(tabContainer); + button.click(key, function(e) { + fixedTab = true; + renderResult(e.data, $(this)); + }); + visibleTabs.push(key); + } else { + $("" + categories[key] + + " (" + count + ")").appendTo(tabContainer); + renderTable(key, r[key]).appendTo(resultContainer); + tabContainer = $("
    ").appendTo(resultContainer); + + } + } + } + if (activeTab && result.length > 20 && categoryCount > 1) { + $("button#result-tab-" + activeTab).addClass("active-table-tab"); + renderTable(activeTab, r[activeTab]).appendTo(resultContainer); + } + resultSection.show(); + function renderResult(category, button) { + activeTab = category; + setSearchUrl(); + resultContainer.find("div.summary-table").remove(); + renderTable(activeTab, r[activeTab]).appendTo(resultContainer); + button.siblings().removeClass("active-table-tab"); + button.addClass("active-table-tab"); + } + } + function selectTab(category) { + $("button#result-tab-" + category).click(); + } + function renderTable(category, items) { + var table = $("
    ") + .addClass(category === "modules" + ? "one-column-search-results" + : "two-column-search-results"); + var col1, col2; + if (category === "modules") { + col1 = "Module"; + } else if (category === "packages") { + col1 = "Module"; + col2 = "Package"; + } else if (category === "types") { + col1 = "Package"; + col2 = "Class" + } else if (category === "members") { + col1 = "Class"; + col2 = "Member"; + } else if (category === "searchTags") { + col1 = "Location"; + col2 = "Name"; + } + $("
    " + col1 + "
    ").appendTo(table); + if (category !== "modules") { + $("
    " + col2 + "
    ").appendTo(table); + } + $.each(items, function(index, item) { + var rowColor = index % 2 ? "odd-row-color" : "even-row-color"; + renderItem(item, table, rowColor); + }); + return table; + } + function renderItem(item, table, rowColor) { + var label = getHighlightedText(item.input, item.boundaries, item.prefix.length, item.input.length); + var link = $("") + .attr("href", getURL(item.indexItem, item.category)) + .attr("tabindex", "0") + .addClass("search-result-link") + .html(label); + var container = getHighlightedText(item.input, item.boundaries, 0, item.prefix.length - 1); + if (item.category === "searchTags") { + container = item.indexItem.h || ""; + } + if (item.category !== "modules") { + $("
    ").html(container).addClass("col-plain").addClass(rowColor).appendTo(table); + } + $("
    ").html(link).addClass("col-last").addClass(rowColor).appendTo(table); + } + var timeout; + function schedulePageSearch() { + if (timeout) { + clearTimeout(timeout); + } + timeout = setTimeout(function () { + doPageSearch() + }, 100); + } + function doPageSearch() { + setSearchUrl(); + var term = searchTerm = input.val().trim(); + if (term === "") { + notify.html(messages.enterTerm); + activeTab = ""; + fixedTab = false; + resultContainer.empty(); + resultSection.hide(); + } else { + notify.html(messages.searching); + doSearch({ term: term, maxResults: 1200 }, renderResults); + } + } + function setSearchUrl() { + var query = input.val().trim(); + var url = document.location.pathname; + if (query) { + url += "?q=" + encodeURI(query); + if (activeTab && fixedTab) { + url += "&c=" + activeTab; + } + } + history.replaceState({query: query}, "", url); + } + input.on("input", function(e) { + feelingLucky = false; + schedulePageSearch(); + }); + $(document).keydown(function(e) { + if ((e.ctrlKey || e.metaKey) && (e.key === "ArrowLeft" || e.key === "ArrowRight")) { + if (activeTab && visibleTabs.length > 1) { + var idx = visibleTabs.indexOf(activeTab); + idx += e.key === "ArrowLeft" ? visibleTabs.length - 1 : 1; + selectTab(visibleTabs[idx % visibleTabs.length]); + return false; + } + } + }); + reset.click(function() { + notify.html(messages.enterTerm); + resultSection.hide(); + activeTab = ""; + fixedTab = false; + resultContainer.empty(); + input.val('').focus(); + setSearchUrl(); + }); + input.prop("disabled", false); + reset.prop("disabled", false); + + var urlParams = new URLSearchParams(window.location.search); + if (urlParams.has("q")) { + input.val(urlParams.get("q")) + } + if (urlParams.has("c")) { + activeTab = urlParams.get("c"); + fixedTab = true; + } + if (urlParams.get("r")) { + feelingLucky = true; + } + if (input.val()) { + doPageSearch(); + } else { + notify.html(messages.enterTerm); + } + input.select().focus(); +}); diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/search.html b/HelloSerial4j/serial4j-0.3A-javadoc/search.html new file mode 100644 index 00000000..d9f16600 --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/search.html @@ -0,0 +1,73 @@ + + + + +Search + + + + + + + + + + + + + + + +
    + +
    +
    +

    Search

    +
    + + +
    +Additional resources +
    +
    +
    +

    The help page provides an introduction to the scope and syntax of JavaDoc search.

    +

    You can use the <ctrl> or <cmd> keys in combination with the left and right arrow keys to switch between result tabs in this page.

    +

    The URL template below may be used to configure this page as a search engine in browsers that support this feature. It has been tested to work in Google Chrome and Mozilla Firefox. Note that other browsers may not support this feature or require a different URL format.

    +link +

    + +

    +
    +

    Loading search index...

    + +
    +
    +
    + + diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/search.js b/HelloSerial4j/serial4j-0.3A-javadoc/search.js new file mode 100644 index 00000000..985016db --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/search.js @@ -0,0 +1,465 @@ +/* + * Copyright (c) 2015, 2022, Oracle and/or its affiliates. All rights reserved. + * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + */ +"use strict"; +const messages = { + enterTerm: "Enter a search term", + noResult: "No results found", + oneResult: "Found one result", + manyResults: "Found {0} results", + loading: "Loading search index...", + searching: "Searching...", + redirecting: "Redirecting to first result...", + copyUrl: "Copy URL", + urlCopied: "Copied!" +} +const categories = { + modules: "Modules", + packages: "Packages", + types: "Classes and Interfaces", + members: "Members", + searchTags: "Search Tags" +}; +const highlight = "$&"; +const NO_MATCH = {}; +const MAX_RESULTS = 500; +function checkUnnamed(name, separator) { + return name === "" || !name ? "" : name + separator; +} +function escapeHtml(str) { + return str.replace(//g, ">"); +} +function getHighlightedText(str, boundaries, from, to) { + var start = from; + var text = ""; + for (var i = 0; i < boundaries.length; i += 2) { + var b0 = boundaries[i]; + var b1 = boundaries[i + 1]; + if (b0 >= to || b1 <= from) { + continue; + } + text += escapeHtml(str.slice(start, Math.max(start, b0))); + text += ""; + text += escapeHtml(str.slice(Math.max(start, b0), Math.min(to, b1))); + text += ""; + start = Math.min(to, b1); + } + text += escapeHtml(str.slice(start, to)); + return text; +} +function getURLPrefix(item, category) { + var urlPrefix = ""; + var slash = "/"; + if (category === "modules") { + return item.l + slash; + } else if (category === "packages" && item.m) { + return item.m + slash; + } else if (category === "types" || category === "members") { + if (item.m) { + urlPrefix = item.m + slash; + } else { + $.each(packageSearchIndex, function(index, it) { + if (it.m && item.p === it.l) { + urlPrefix = it.m + slash; + } + }); + } + } + return urlPrefix; +} +function getURL(item, category) { + if (item.url) { + return item.url; + } + var url = getURLPrefix(item, category); + if (category === "modules") { + url += "module-summary.html"; + } else if (category === "packages") { + if (item.u) { + url = item.u; + } else { + url += item.l.replace(/\./g, '/') + "/package-summary.html"; + } + } else if (category === "types") { + if (item.u) { + url = item.u; + } else { + url += checkUnnamed(item.p, "/").replace(/\./g, '/') + item.l + ".html"; + } + } else if (category === "members") { + url += checkUnnamed(item.p, "/").replace(/\./g, '/') + item.c + ".html" + "#"; + if (item.u) { + url += item.u; + } else { + url += item.l; + } + } else if (category === "searchTags") { + url += item.u; + } + item.url = url; + return url; +} +function createMatcher(term, camelCase) { + if (camelCase && !isUpperCase(term)) { + return null; // no need for camel-case matcher for lower case query + } + var pattern = ""; + var upperCase = []; + term.trim().split(/\s+/).forEach(function(w, index, array) { + var tokens = w.split(/(?=[A-Z,.()<>?[\/])/); + for (var i = 0; i < tokens.length; i++) { + var s = tokens[i]; + // ',' and '?' are the only delimiters commonly followed by space in java signatures + pattern += "(" + $.ui.autocomplete.escapeRegex(s).replace(/[,?]/g, "$&\\s*?") + ")"; + upperCase.push(false); + var isWordToken = /\w$/.test(s); + if (isWordToken) { + if (i === tokens.length - 1 && index < array.length - 1) { + // space in query string matches all delimiters + pattern += "(.*?)"; + upperCase.push(isUpperCase(s[0])); + } else { + if (!camelCase && isUpperCase(s) && s.length === 1) { + pattern += "()"; + } else { + pattern += "([a-z0-9$<>?[\\]]*?)"; + } + upperCase.push(isUpperCase(s[0])); + } + } else { + pattern += "()"; + upperCase.push(false); + } + } + }); + var re = new RegExp(pattern, "gi"); + re.upperCase = upperCase; + return re; +} +function analyzeMatch(matcher, input, startOfName, category) { + var from = startOfName; + matcher.lastIndex = from; + var match = matcher.exec(input); + while (!match && from > 1) { + from = input.lastIndexOf(".", from - 2) + 1; + matcher.lastIndex = from; + match = matcher.exec(input); + } + if (!match) { + return NO_MATCH; + } + var boundaries = []; + var matchEnd = match.index + match[0].length; + var leftParen = input.indexOf("("); + // exclude peripheral matches + if (category !== "modules" && category !== "searchTags") { + if (leftParen > -1 && leftParen < match.index) { + return NO_MATCH; + } else if (startOfName - 1 >= matchEnd) { + return NO_MATCH; + } + } + var endOfName = leftParen > -1 ? leftParen : input.length; + var score = 5; + var start = match.index; + var prevEnd = -1; + for (var i = 1; i < match.length; i += 2) { + var isUpper = isUpperCase(input[start]); + var isMatcherUpper = matcher.upperCase[i]; + // capturing groups come in pairs, match and non-match + boundaries.push(start, start + match[i].length); + // make sure groups are anchored on a left word boundary + var prevChar = input[start - 1] || ""; + var nextChar = input[start + 1] || ""; + if (start !== 0 && !/[\W_]/.test(prevChar) && !/[\W_]/.test(input[start])) { + if (isUpper && (isLowerCase(prevChar) || isLowerCase(nextChar))) { + score -= 0.1; + } else if (isMatcherUpper && start === prevEnd) { + score -= isUpper ? 0.1 : 1.0; + } else { + return NO_MATCH; + } + } + prevEnd = start + match[i].length; + start += match[i].length + match[i + 1].length; + + // lower score for parts of the name that are missing + if (match[i + 1] && prevEnd < endOfName) { + score -= rateNoise(match[i + 1]); + } + } + // lower score if a type name contains unmatched camel-case parts + if (input[matchEnd - 1] !== "." && endOfName > matchEnd) + score -= rateNoise(input.slice(matchEnd, endOfName)); + score -= rateNoise(input.slice(0, Math.max(startOfName, match.index))); + + if (score <= 0) { + return NO_MATCH; + } + return { + input: input, + score: score, + category: category, + boundaries: boundaries + }; +} +function isUpperCase(s) { + return s !== s.toLowerCase(); +} +function isLowerCase(s) { + return s !== s.toUpperCase(); +} +function rateNoise(str) { + return (str.match(/([.(])/g) || []).length / 5 + + (str.match(/([A-Z]+)/g) || []).length / 10 + + str.length / 20; +} +function doSearch(request, response) { + var term = request.term.trim(); + var maxResults = request.maxResults || MAX_RESULTS; + if (term.length === 0) { + return this.close(); + } + var matcher = { + plainMatcher: createMatcher(term, false), + camelCaseMatcher: createMatcher(term, true) + } + var indexLoaded = indexFilesLoaded(); + + function getPrefix(item, category) { + switch (category) { + case "packages": + return checkUnnamed(item.m, "/"); + case "types": + return checkUnnamed(item.p, "."); + case "members": + return checkUnnamed(item.p, ".") + item.c + "."; + default: + return ""; + } + } + function useQualifiedName(category) { + switch (category) { + case "packages": + return /[\s/]/.test(term); + case "types": + case "members": + return /[\s.]/.test(term); + default: + return false; + } + } + function searchIndex(indexArray, category) { + var matches = []; + if (!indexArray) { + if (!indexLoaded) { + matches.push({ l: messages.loading, category: category }); + } + return matches; + } + $.each(indexArray, function (i, item) { + var prefix = getPrefix(item, category); + var simpleName = item.l; + var qualifiedName = prefix + simpleName; + var useQualified = useQualifiedName(category); + var input = useQualified ? qualifiedName : simpleName; + var startOfName = useQualified ? prefix.length : 0; + var m = analyzeMatch(matcher.plainMatcher, input, startOfName, category); + if (m === NO_MATCH && matcher.camelCaseMatcher) { + m = analyzeMatch(matcher.camelCaseMatcher, input, startOfName, category); + } + if (m !== NO_MATCH) { + m.indexItem = item; + m.prefix = prefix; + if (!useQualified) { + m.input = qualifiedName; + m.boundaries = m.boundaries.map(function(b) { + return b + prefix.length; + }); + } + matches.push(m); + } + return matches.length < maxResults; + }); + return matches.sort(function(e1, e2) { + return e2.score - e1.score; + }); + } + + var result = searchIndex(moduleSearchIndex, "modules") + .concat(searchIndex(packageSearchIndex, "packages")) + .concat(searchIndex(typeSearchIndex, "types")) + .concat(searchIndex(memberSearchIndex, "members")) + .concat(searchIndex(tagSearchIndex, "searchTags")); + + if (!indexLoaded) { + updateSearchResults = function() { + doSearch(request, response); + } + } else { + updateSearchResults = function() {}; + } + response(result); +} +// JQuery search menu implementation +$.widget("custom.catcomplete", $.ui.autocomplete, { + _create: function() { + this._super(); + this.widget().menu("option", "items", "> .result-item"); + // workaround for search result scrolling + this.menu._scrollIntoView = function _scrollIntoView( item ) { + var borderTop, paddingTop, offset, scroll, elementHeight, itemHeight; + if ( this._hasScroll() ) { + borderTop = parseFloat( $.css( this.activeMenu[ 0 ], "borderTopWidth" ) ) || 0; + paddingTop = parseFloat( $.css( this.activeMenu[ 0 ], "paddingTop" ) ) || 0; + offset = item.offset().top - this.activeMenu.offset().top - borderTop - paddingTop; + scroll = this.activeMenu.scrollTop(); + elementHeight = this.activeMenu.height() - 26; + itemHeight = item.outerHeight(); + + if ( offset < 0 ) { + this.activeMenu.scrollTop( scroll + offset ); + } else if ( offset + itemHeight > elementHeight ) { + this.activeMenu.scrollTop( scroll + offset - elementHeight + itemHeight ); + } + } + }; + }, + _renderMenu: function(ul, items) { + var currentCategory = ""; + var widget = this; + widget.menu.bindings = $(); + $.each(items, function(index, item) { + if (item.category && item.category !== currentCategory) { + ul.append("
  • " + categories[item.category] + "
  • "); + currentCategory = item.category; + } + var li = widget._renderItemData(ul, item); + if (item.category) { + li.attr("aria-label", categories[item.category] + " : " + item.l); + } else { + li.attr("aria-label", item.l); + } + li.attr("class", "result-item"); + }); + ul.append(""); + }, + _renderItem: function(ul, item) { + var li = $("
  • ").appendTo(ul); + var div = $("
    ").appendTo(li); + var label = item.l + ? item.l + : getHighlightedText(item.input, item.boundaries, 0, item.input.length); + var idx = item.indexItem; + if (item.category === "searchTags" && idx.h) { + if (idx.d) { + div.html(label + " (" + idx.h + ")
    " + + idx.d + "
    "); + } else { + div.html(label + " (" + idx.h + ")"); + } + } else { + div.html(label); + } + return li; + } +}); +$(function() { + var expanded = false; + var windowWidth; + function collapse() { + if (expanded) { + $("div#navbar-top").removeAttr("style"); + $("button#navbar-toggle-button") + .removeClass("expanded") + .attr("aria-expanded", "false"); + expanded = false; + } + } + $("button#navbar-toggle-button").click(function (e) { + if (expanded) { + collapse(); + } else { + var navbar = $("div#navbar-top"); + navbar.height(navbar.prop("scrollHeight")); + $("button#navbar-toggle-button") + .addClass("expanded") + .attr("aria-expanded", "true"); + expanded = true; + windowWidth = window.innerWidth; + } + }); + $("ul.sub-nav-list-small li a").click(collapse); + $("input#search-input").focus(collapse); + $("main").click(collapse); + $("section[id] > :header, :header[id], :header:has(a[id])").hover( + function () { + $(this).append($("")); + }, + function () { + $(this).find("button:last").remove(); + } + ); + $(window).on("orientationchange", collapse).on("resize", function(e) { + if (expanded && windowWidth !== window.innerWidth) collapse(); + }); + var search = $("#search-input"); + var reset = $("#reset-button"); + search.catcomplete({ + minLength: 1, + delay: 200, + source: doSearch, + response: function(event, ui) { + if (!ui.content.length) { + ui.content.push({ l: messages.noResult }); + } else { + $("#search-input").empty(); + } + }, + autoFocus: true, + focus: function(event, ui) { + return false; + }, + position: { + collision: "flip" + }, + select: function(event, ui) { + if (ui.item.indexItem) { + var url = getURL(ui.item.indexItem, ui.item.category); + window.location.href = pathtoroot + url; + $("#search-input").focus(); + } + } + }); + search.val(''); + search.prop("disabled", false); + reset.prop("disabled", false); + reset.click(function() { + search.val('').focus(); + }); + search.focus(); +}); diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/serialized-form.html b/HelloSerial4j/serial4j-0.3A-javadoc/serialized-form.html new file mode 100644 index 00000000..ea5b3a8d --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/serialized-form.html @@ -0,0 +1,206 @@ + + + + +Serialized Form + + + + + + + + + + + + + + + +
    + +
    +
    +
    +

    Serialized Form

    +
    + +
    +
    +
    + + diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/stylesheet.css b/HelloSerial4j/serial4j-0.3A-javadoc/stylesheet.css new file mode 100644 index 00000000..d3309916 --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/stylesheet.css @@ -0,0 +1,1204 @@ +/* + * Javadoc style sheet + */ + +@import url('resources/fonts/dejavu.css'); + +/* + * Styles for individual HTML elements. + * + * These are styles that are specific to individual HTML elements. Changing them affects the style of a particular + * HTML element throughout the page. + */ + +body { + background-color:#ffffff; + color:#353833; + font-family:'DejaVu Sans', Arial, Helvetica, sans-serif; + font-size:14px; + margin:0; + padding:0; + height:100%; + width:100%; +} +iframe { + margin:0; + padding:0; + height:100%; + width:100%; + overflow-y:scroll; + border:none; +} +a:link, a:visited { + text-decoration:none; + color:#4A6782; +} +a[href]:hover, a[href]:focus { + text-decoration:none; + color:#bb7a2a; +} +a[name] { + color:#353833; +} +pre { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; +} +h1 { + font-size:20px; +} +h2 { + font-size:18px; +} +h3 { + font-size:16px; +} +h4 { + font-size:15px; +} +h5 { + font-size:14px; +} +h6 { + font-size:13px; +} +/* Disable font boosting for selected elements */ +h1, h2, h3, h4, h5, h6, div.member-signature { + max-height: 1000em; +} +ul { + list-style-type:disc; +} +code, tt { + font-family:'DejaVu Sans Mono', monospace; +} +:not(h1, h2, h3, h4, h5, h6) > code, +:not(h1, h2, h3, h4, h5, h6) > tt { + font-size:14px; + padding-top:4px; + margin-top:8px; + line-height:1.4em; +} +dt code { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + padding-top:4px; +} +.summary-table dt code { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + vertical-align:top; + padding-top:4px; +} +sup { + font-size:8px; +} +button { + font-family: 'DejaVu Sans', Arial, Helvetica, sans-serif; + font-size: 14px; +} +/* + * Styles for HTML generated by javadoc. + * + * These are style classes that are used by the standard doclet to generate HTML documentation. + */ + +/* + * Styles for document title and copyright. + */ +.about-language { + float:right; + padding:0 21px 8px 8px; + font-size:11px; + margin-top:-9px; + height:2.9em; +} +.legal-copy { + margin-left:.5em; +} +/* + * Styles for navigation bar. + */ +@media screen { + div.flex-box { + position:fixed; + display:flex; + flex-direction:column; + height: 100%; + width: 100%; + } + header.flex-header { + flex: 0 0 auto; + } + div.flex-content { + flex: 1 1 auto; + overflow-y: auto; + } +} +.top-nav { + background-color:#4D7A97; + color:#FFFFFF; + float:left; + padding:0; + width:100%; + clear:right; + min-height:2.8em; + padding-top:10px; + overflow:hidden; + font-size:12px; +} +button#navbar-toggle-button { + display:none; +} +ul.sub-nav-list-small { + display: none; +} +.sub-nav { + background-color:#dee3e9; + float:left; + width:100%; + overflow:hidden; + font-size:12px; +} +.sub-nav div { + clear:left; + float:left; + padding:6px; + text-transform:uppercase; +} +.sub-nav .sub-nav-list { + padding-top:4px; +} +ul.nav-list { + display:block; + margin:0 25px 0 0; + padding:0; +} +ul.sub-nav-list { + float:left; + margin:0 25px 0 0; + padding:0; +} +ul.nav-list li { + list-style:none; + float:left; + padding: 5px 6px; + text-transform:uppercase; +} +.sub-nav .nav-list-search { + float:right; + margin:0; + padding:6px; + clear:none; + text-align:right; + position:relative; +} +ul.sub-nav-list li { + list-style:none; + float:left; +} +.top-nav a:link, .top-nav a:active, .top-nav a:visited { + color:#ffffff; + text-decoration:none; + text-transform:uppercase; +} +.top-nav a:hover { + color:#bb7a2a; +} +.nav-bar-cell1-rev { + background-color:#F8981D; + color:#253441; + margin: auto 5px; +} +.skip-nav { + position:absolute; + top:auto; + left:-9999px; + overflow:hidden; +} +/* + * Hide navigation links and search box in print layout + */ +@media print { + ul.nav-list, div.sub-nav { + display:none; + } +} +/* + * Styles for page header. + */ +.title { + color:#2c4557; + margin:10px 0; +} +.sub-title { + margin:5px 0 0 0; +} +.header ul { + margin:0 0 15px 0; + padding:0; +} +.header ul li { + list-style:none; + font-size:13px; +} +/* + * Styles for headings. + */ +body.class-declaration-page .summary h2, +body.class-declaration-page .details h2, +body.class-use-page h2, +body.module-declaration-page .block-list h2 { + font-style: italic; + padding:0; + margin:15px 0; +} +body.class-declaration-page .summary h3, +body.class-declaration-page .details h3, +body.class-declaration-page .summary .inherited-list h2 { + background-color:#dee3e9; + border:1px solid #d0d9e0; + margin:0 0 6px -8px; + padding:7px 5px; +} +/* + * Styles for page layout containers. + */ +main { + clear:both; + padding:10px 20px; + position:relative; +} +dl.notes > dt { + font-family: 'DejaVu Sans', Arial, Helvetica, sans-serif; + font-size:12px; + font-weight:bold; + margin:10px 0 0 0; + color:#4E4E4E; +} +dl.notes > dd { + margin:5px 10px 10px 0; + font-size:14px; + font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif; +} +dl.name-value > dt { + margin-left:1px; + font-size:1.1em; + display:inline; + font-weight:bold; +} +dl.name-value > dd { + margin:0 0 0 1px; + font-size:1.1em; + display:inline; +} +/* + * Styles for lists. + */ +li.circle { + list-style:circle; +} +ul.horizontal li { + display:inline; + font-size:0.9em; +} +div.inheritance { + margin:0; + padding:0; +} +div.inheritance div.inheritance { + margin-left:2em; +} +ul.block-list, +ul.details-list, +ul.member-list, +ul.summary-list { + margin:10px 0 10px 0; + padding:0; +} +ul.block-list > li, +ul.details-list > li, +ul.member-list > li, +ul.summary-list > li { + list-style:none; + margin-bottom:15px; + line-height:1.4; +} +.summary-table dl, .summary-table dl dt, .summary-table dl dd { + margin-top:0; + margin-bottom:1px; +} +ul.see-list, ul.see-list-long { + padding-left: 0; + list-style: none; +} +ul.see-list li { + display: inline; +} +ul.see-list li:not(:last-child):after, +ul.see-list-long li:not(:last-child):after { + content: ", "; + white-space: pre-wrap; +} +/* + * Styles for tables. + */ +.summary-table, .details-table { + width:100%; + border-spacing:0; + border-left:1px solid #EEE; + border-right:1px solid #EEE; + border-bottom:1px solid #EEE; + padding:0; +} +.caption { + position:relative; + text-align:left; + background-repeat:no-repeat; + color:#253441; + clear:none; + overflow:hidden; + padding:0; + padding-top:10px; + padding-left:1px; + margin:0; +} +.caption a:link, .caption a:visited { + color:#1f389c; +} +.caption a:hover, +.caption a:active { + color:#FFFFFF; +} +.caption span { + font-weight:bold; + white-space:nowrap; + padding:5px 12px 7px 12px; + display:inline-block; + float:left; + background-color:#F8981D; + border: none; + height:16px; +} +div.table-tabs { + padding:10px 0 0 1px; + margin:10px 0 0 0; +} +div.table-tabs > span { + background-color: #EEE; + color: #000; + border: none; + padding: 5px 12px 8px 12px; +} +div.table-tabs > button { + border: none; + cursor: pointer; + padding: 5px 12px 7px 12px; + font-weight: bold; + margin-right: 8px; +} +div.table-tabs > .active-table-tab { + background: #F8981D; + color: #253441; +} +div.table-tabs > button.table-tab { + background: #4D7A97; + color: #FFFFFF; +} +.two-column-search-results { + display: grid; + grid-template-columns: minmax(400px, max-content) minmax(400px, auto); +} +div.checkboxes { + line-height: 2em; +} +div.checkboxes > span { + margin-left: 10px; +} +div.checkboxes > label { + margin-left: 8px; + white-space: nowrap; +} +div.checkboxes > label > input { + margin: 0 2px; +} +.two-column-summary { + display: grid; + grid-template-columns: minmax(25%, max-content) minmax(25%, auto); +} +.three-column-summary { + display: grid; + grid-template-columns: minmax(15%, max-content) minmax(20%, max-content) minmax(20%, auto); +} +.three-column-release-summary { + display: grid; + grid-template-columns: minmax(40%, max-content) minmax(10%, max-content) minmax(40%, auto); +} +.four-column-summary { + display: grid; + grid-template-columns: minmax(10%, max-content) minmax(15%, max-content) minmax(15%, max-content) minmax(15%, auto); +} +@media screen and (max-width: 1000px) { + .four-column-summary { + display: grid; + grid-template-columns: minmax(15%, max-content) minmax(15%, auto); + } +} +@media screen and (max-width: 800px) { + .two-column-search-results { + display: grid; + grid-template-columns: minmax(40%, max-content) minmax(40%, auto); + } + .three-column-summary { + display: grid; + grid-template-columns: minmax(10%, max-content) minmax(25%, auto); + } + .three-column-release-summary { + display: grid; + grid-template-columns: minmax(70%, max-content) minmax(30%, max-content) + } + .three-column-summary .col-last, + .three-column-release-summary .col-last{ + grid-column-end: span 2; + } +} +@media screen and (max-width: 600px) { + .two-column-summary { + display: grid; + grid-template-columns: 1fr; + } +} +.summary-table > div, .details-table > div { + text-align:left; + padding: 8px 3px 3px 7px; + overflow-x: auto; + scrollbar-width: thin; +} +.col-first, .col-second, .col-last, .col-constructor-name, .col-summary-item-name { + vertical-align:top; + padding-right:0; + padding-top:8px; + padding-bottom:3px; +} +.table-header { + background:#dee3e9; + font-weight: bold; +} +/* Sortable table columns */ +.table-header[onclick] { + cursor: pointer; +} +.table-header[onclick]::after { + content:""; + display:inline-block; + background-image:url('data:image/svg+xml; utf8, \ + \ + '); + background-size:100% 100%; + width:9px; + height:14px; + margin-left:4px; + margin-bottom:-3px; +} +.table-header[onclick].sort-asc::after { + background-image:url('data:image/svg+xml; utf8, \ + \ + \ + '); + +} +.table-header[onclick].sort-desc::after { + background-image:url('data:image/svg+xml; utf8, \ + \ + \ + '); +} +.col-first, .col-first { + font-size:13px; +} +.col-second, .col-second, .col-last, .col-constructor-name, .col-summary-item-name, .col-last { + font-size:13px; +} +.col-first, .col-second, .col-constructor-name { + vertical-align:top; + overflow: auto; +} +.col-last { + white-space:normal; +} +.col-first a:link, .col-first a:visited, +.col-second a:link, .col-second a:visited, +.col-first a:link, .col-first a:visited, +.col-second a:link, .col-second a:visited, +.col-constructor-name a:link, .col-constructor-name a:visited, +.col-summary-item-name a:link, .col-summary-item-name a:visited { + font-weight:bold; +} +.even-row-color, .even-row-color .table-header { + background-color:#FFFFFF; +} +.odd-row-color, .odd-row-color .table-header { + background-color:#EEEEEF; +} +/* + * Styles for contents. + */ +div.block { + font-size:14px; + font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif; +} +.col-last div { + padding-top:0; +} +.col-last a { + padding-bottom:3px; +} +.module-signature, +.package-signature, +.type-signature, +.member-signature { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + margin:14px 0; + white-space: pre-wrap; +} +.module-signature, +.package-signature, +.type-signature { + margin-top: 0; +} +.member-signature .type-parameters-long, +.member-signature .parameters, +.member-signature .exceptions { + display: inline-block; + vertical-align: top; + white-space: pre; +} +.member-signature .type-parameters { + white-space: normal; +} +/* + * Styles for formatting effect. + */ +.source-line-no { + color:green; + padding:0 30px 0 0; +} +.block { + display:block; + margin:0 10px 5px 0; + color:#474747; +} +.deprecated-label, .description-from-type-label, .implementation-label, .member-name-link, +.module-label-in-package, .module-label-in-type, .package-label-in-type, +.package-hierarchy-label, .type-name-label, .type-name-link, .search-tag-link, .preview-label { + font-weight:bold; +} +.deprecation-comment, .help-footnote, .preview-comment { + font-style:italic; +} +.deprecation-block { + font-size:14px; + font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif; + border-style:solid; + border-width:thin; + border-radius:10px; + padding:10px; + margin-bottom:10px; + margin-right:10px; + display:inline-block; +} +.preview-block { + font-size:14px; + font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif; + border-style:solid; + border-width:thin; + border-radius:10px; + padding:10px; + margin-bottom:10px; + margin-right:10px; + display:inline-block; +} +div.block div.deprecation-comment { + font-style:normal; +} +details.invalid-tag, span.invalid-tag { + font-size:14px; + font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif; + background: #ffe6e6; + border: thin solid #000000; + border-radius:2px; + padding: 2px 4px; + display:inline-block; +} +details summary { + cursor: pointer; +} +/* + * Styles specific to HTML5 elements. + */ +main, nav, header, footer, section { + display:block; +} +/* + * Styles for javadoc search. + */ +.ui-autocomplete-category { + font-weight:bold; + font-size:15px; + padding:7px 0 7px 3px; + background-color:#4D7A97; + color:#FFFFFF; +} +.ui-autocomplete { + max-height:85%; + max-width:65%; + overflow-y:auto; + overflow-x:auto; + scrollbar-width: thin; + white-space:nowrap; + box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23); +} +ul.ui-autocomplete { + position:fixed; + z-index:1; + background-color: #FFFFFF; +} +ul.ui-autocomplete li { + float:left; + clear:both; + min-width:100%; +} +ul.ui-autocomplete li.ui-static-link { + position:sticky; + bottom:0; + left:0; + background: #dee3e9; + padding: 5px 0; + font-family: 'DejaVu Sans', Arial, Helvetica, sans-serif; + font-size: 13px; + font-weight: bolder; + z-index: 2; +} +li.ui-static-link a, li.ui-static-link a:visited { + text-decoration:none; + color:#4A6782; + float:right; + margin-right:20px; +} +.ui-autocomplete .result-item { + font-size: inherit; +} +.ui-autocomplete .result-highlight { + font-weight:bold; +} +#search-input, #page-search-input { + background-image:url('resources/glass.png'); + background-size:13px; + background-repeat:no-repeat; + background-position:2px 3px; + padding-left:20px; + width: 250px; + margin: 0; +} +#search-input { + margin-left: 4px; +} +#reset-button { + background-color: transparent; + background-image:url('resources/x.png'); + background-repeat:no-repeat; + background-size:contain; + border:0; + border-radius:0; + width:12px; + height:12px; + position:absolute; + right:12px; + top:10px; + font-size:0; +} +::placeholder { + color:#909090; + opacity: 1; +} +.search-tag-desc-result { + font-style:italic; + font-size:11px; +} +.search-tag-holder-result { + font-style:italic; + font-size:12px; +} +.search-tag-result:target { + background-color:yellow; +} +details.page-search-details { + display: inline-block; +} +div#result-container { + font-size: 14px; +} +div#result-container a.search-result-link { + padding: 0; + margin: 4px 0; + width: 100%; +} +#result-container .result-highlight { + font-weight:bolder; +} +.page-search-info { + background-color: #f5f8ff; + border-radius: 3px; + border: 0 solid #b9c8d3; + padding: 0 8px; + overflow: hidden; + height: 0; + transition: all 0.2s ease; +} +div.table-tabs > button.table-tab { + background: #4D7A97; + color: #FFFFFF; +} +.page-search-header { + padding: 5px 12px 7px 12px; + font-weight: bold; + margin-right: 3px; + background-color:#4D7A97; + color:#ffffff; + display: inline-block; +} +button.page-search-header { + border: none; + cursor: pointer; +} +span#page-search-link { + text-decoration: underline; +} +.module-graph span { + display:none; + position:absolute; +} +.module-graph:hover span { + display:block; + margin: -100px 0 0 100px; + z-index: 1; +} +.inherited-list { + margin: 10px 0 10px 0; +} +section.class-description { + line-height: 1.4; +} +.summary section[class$="-summary"], .details section[class$="-details"], +.class-uses .detail, .serialized-class-details { + padding: 0px 20px 5px 10px; + border: 1px solid #ededed; + background-color: #f8f8f8; +} +.inherited-list, section[class$="-details"] .detail { + padding:0 0 5px 8px; + background-color:#ffffff; + border:none; +} +.vertical-separator { + padding: 0 5px; +} +ul.help-section-list { + margin: 0; +} +ul.help-subtoc > li { + display: inline-block; + padding-right: 5px; + font-size: smaller; +} +ul.help-subtoc > li::before { + content: "\2022" ; + padding-right:2px; +} +.help-note { + font-style: italic; +} +/* + * Indicator icon for external links. + */ +main a[href*="://"]::after { + content:""; + display:inline-block; + background-image:url('data:image/svg+xml; utf8, \ + \ + \ + '); + background-size:100% 100%; + width:7px; + height:7px; + margin-left:2px; + margin-bottom:4px; +} +main a[href*="://"]:hover::after, +main a[href*="://"]:focus::after { + background-image:url('data:image/svg+xml; utf8, \ + \ + \ + '); +} +/* + * Styles for copy-to-clipboard buttons + */ +button.copy { + opacity: 80%; + border: none; + border-radius: 3px; + position: relative; + background:none; + transition: opacity 0.2s; + cursor: pointer; +} +button.copy:hover, +button.copy:active { + opacity: 100%; +} +button.copy img { + position: relative; + background: none; +} +button.copy span { + color: #303030; + position: relative; + top: -0.1em; + transition: all 0.1s; + font-size: 85%; + line-height: 1.2em; +} +/* header/section copy button */ +button.copy-header { + margin: 0 0.2em; + padding: 0 4px; + height: 1.35em; +} +button.copy-header img { + height: 1em; + top: 0.1em; +} +button.copy-header:active { + background-color: rgba(128, 128, 160, 0.2); +} +/* search page copy button */ +button#page-search-copy { + margin-left: 0.4em; + padding:0.3em; + top:0.13em; +} +button#page-search-copy img { + width: 1.2em; + height: 1.2em; + padding: 0.01em 0; + top: 0.15em; +} +button#page-search-copy span { + color: #000000; + content: attr(aria-label); + line-height: 1.2em; + padding: 0.2em; + top: -0.18em; + opacity: 0; +} +div.page-search-info:hover button#page-search-copy, +div.page-search-info:hover button#page-search-copy span { + opacity: 90%; +} +div.page-search-info button#page-search-copy:hover { + background-color: #dfe6f1; +} +div.page-search-info button#page-search-copy:active { + background-color: #cfdbee; +} +/* snippet copy button */ +button.snippet-copy { + position: absolute; + top: 6px; + right: 6px; + height: 1.7em; + opacity: 50%; + padding: 2px; +} +button.snippet-copy img { + width: 18px; + height: 18px; + padding: 0.05em 0; +} +button.snippet-copy span { + content: attr(aria-label); + line-height: 1.2em; + padding: 0.2em; + position: relative; + top: -0.5em; + display: none; +} +div.snippet-container:hover button.snippet-copy span { + display: inline; +} +div.snippet-container:hover button.snippet-copy { + opacity: 80%; +} +div.snippet-container button.snippet-copy:hover { + opacity: 100%; +} +button.snippet-copy:active { + background: #d3d3d3; +} +/* + * Styles for user-provided tables. + * + * borderless: + * No borders, vertical margins, styled caption. + * This style is provided for use with existing doc comments. + * In general, borderless tables should not be used for layout purposes. + * + * plain: + * Plain borders around table and cells, vertical margins, styled caption. + * Best for small tables or for complex tables for tables with cells that span + * rows and columns, when the "striped" style does not work well. + * + * striped: + * Borders around the table and vertical borders between cells, striped rows, + * vertical margins, styled caption. + * Best for tables that have a header row, and a body containing a series of simple rows. + */ + +table.borderless, +table.plain, +table.striped { + margin-top: 10px; + margin-bottom: 10px; +} +table.borderless > caption, +table.plain > caption, +table.striped > caption { + font-weight: bold; + font-size: smaller; +} +table.borderless th, table.borderless td, +table.plain th, table.plain td, +table.striped th, table.striped td { + padding: 2px 5px; +} +table.borderless, +table.borderless > thead > tr > th, table.borderless > tbody > tr > th, table.borderless > tr > th, +table.borderless > thead > tr > td, table.borderless > tbody > tr > td, table.borderless > tr > td { + border: none; +} +table.borderless > thead > tr, table.borderless > tbody > tr, table.borderless > tr { + background-color: transparent; +} +table.plain { + border-collapse: collapse; + border: 1px solid black; +} +table.plain > thead > tr, table.plain > tbody tr, table.plain > tr { + background-color: transparent; +} +table.plain > thead > tr > th, table.plain > tbody > tr > th, table.plain > tr > th, +table.plain > thead > tr > td, table.plain > tbody > tr > td, table.plain > tr > td { + border: 1px solid black; +} +table.striped { + border-collapse: collapse; + border: 1px solid black; +} +table.striped > thead { + background-color: #E3E3E3; +} +table.striped > thead > tr > th, table.striped > thead > tr > td { + border: 1px solid black; +} +table.striped > tbody > tr:nth-child(even) { + background-color: #EEE +} +table.striped > tbody > tr:nth-child(odd) { + background-color: #FFF +} +table.striped > tbody > tr > th, table.striped > tbody > tr > td { + border-left: 1px solid black; + border-right: 1px solid black; +} +table.striped > tbody > tr > th { + font-weight: normal; +} +/** + * Tweak style for small screens. + */ +@media screen and (max-width: 920px) { + header.flex-header { + max-height: 100vh; + overflow-y: auto; + } + div#navbar-top { + height: 2.8em; + transition: height 0.35s ease; + } + ul.nav-list { + display: block; + width: 40%; + float:left; + clear: left; + margin: 10px 0 0 0; + padding: 0; + } + ul.nav-list li { + float: none; + padding: 6px; + margin-left: 10px; + margin-top: 2px; + } + ul.sub-nav-list-small { + display:block; + height: 100%; + width: 50%; + float: right; + clear: right; + background-color: #dee3e9; + color: #353833; + margin: 6px 0 0 0; + padding: 0; + } + ul.sub-nav-list-small ul { + padding-left: 20px; + } + ul.sub-nav-list-small a:link, ul.sub-nav-list-small a:visited { + color:#4A6782; + } + ul.sub-nav-list-small a:hover { + color:#bb7a2a; + } + ul.sub-nav-list-small li { + list-style:none; + float:none; + padding: 6px; + margin-top: 1px; + text-transform:uppercase; + } + ul.sub-nav-list-small > li { + margin-left: 10px; + } + ul.sub-nav-list-small li p { + margin: 5px 0; + } + div#navbar-sub-list { + display: none; + } + .top-nav a:link, .top-nav a:active, .top-nav a:visited { + display: block; + } + button#navbar-toggle-button { + width: 3.4em; + height: 2.8em; + background-color: transparent; + display: block; + float: left; + border: 0; + margin: 0 10px; + cursor: pointer; + font-size: 10px; + } + button#navbar-toggle-button .nav-bar-toggle-icon { + display: block; + width: 24px; + height: 3px; + margin: 1px 0 4px 0; + border-radius: 2px; + transition: all 0.1s; + background-color: #ffffff; + } + button#navbar-toggle-button.expanded span.nav-bar-toggle-icon:nth-child(1) { + transform: rotate(45deg); + transform-origin: 10% 10%; + width: 26px; + } + button#navbar-toggle-button.expanded span.nav-bar-toggle-icon:nth-child(2) { + opacity: 0; + } + button#navbar-toggle-button.expanded span.nav-bar-toggle-icon:nth-child(3) { + transform: rotate(-45deg); + transform-origin: 10% 90%; + width: 26px; + } +} +@media screen and (max-width: 800px) { + .about-language { + padding-right: 16px; + } + ul.nav-list li { + margin-left: 5px; + } + ul.sub-nav-list-small > li { + margin-left: 5px; + } + main { + padding: 10px; + } + .summary section[class$="-summary"], .details section[class$="-details"], + .class-uses .detail, .serialized-class-details { + padding: 0 8px 5px 8px; + } + body { + -webkit-text-size-adjust: none; + } +} +@media screen and (max-width: 400px) { + .about-language { + font-size: 10px; + padding-right: 12px; + } +} +@media screen and (max-width: 400px) { + .nav-list-search { + width: 94%; + } + #search-input, #page-search-input { + width: 70%; + } +} +@media screen and (max-width: 320px) { + .nav-list-search > label { + display: none; + } + .nav-list-search { + width: 90%; + } + #search-input, #page-search-input { + width: 80%; + } +} + +pre.snippet { + background-color: #ebecee; + padding: 10px; + margin: 12px 0; + overflow: auto; + white-space: pre; +} +div.snippet-container { + position: relative; +} +@media screen and (max-width: 800px) { + pre.snippet { + padding-top: 26px; + } + button.snippet-copy { + top: 4px; + right: 4px; + } +} +pre.snippet .italic { + font-style: italic; +} +pre.snippet .bold { + font-weight: bold; +} +pre.snippet .highlighted { + background-color: #f7c590; + border-radius: 10%; +} diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/tag-search-index.js b/HelloSerial4j/serial4j-0.3A-javadoc/tag-search-index.js new file mode 100644 index 00000000..bf10aaf6 --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/tag-search-index.js @@ -0,0 +1 @@ +tagSearchIndex = [{"l":"Constant Field Values","h":"","u":"constant-values.html"},{"l":"Serialized Form","h":"","u":"serialized-form.html"}];updateSearchResults(); \ No newline at end of file diff --git a/HelloSerial4j/serial4j-0.3A-javadoc/type-search-index.js b/HelloSerial4j/serial4j-0.3A-javadoc/type-search-index.js new file mode 100644 index 00000000..59e931a6 --- /dev/null +++ b/HelloSerial4j/serial4j-0.3A-javadoc/type-search-index.js @@ -0,0 +1 @@ +typeSearchIndex = [{"l":"All Classes and Interfaces","u":"allclasses-index.html"},{"p":"com.serial4j.core.serial.throwable","l":"BadFileDescriptorException"},{"p":"com.serial4j.core.serial","l":"BaudRate"},{"p":"com.serial4j.core.serial.throwable","l":"BrokenPipeException"},{"p":"com.serial4j.core.serial.entity","l":"EntityStatus"},{"p":"com.serial4j.core.errno","l":"Errno"},{"p":"com.serial4j.core.errno","l":"ErrnoToException"},{"p":"com.serial4j.core.serial.throwable","l":"FileAlreadyOpenedException"},{"p":"com.serial4j.core.serial.throwable","l":"FileIsDirectoryException"},{"p":"com.serial4j.core.serial.throwable","l":"FileTableOverflowException"},{"p":"com.serial4j.core.serial.throwable","l":"FileTooLargeException"},{"p":"com.serial4j.example.serial4j","l":"HelloNativeSerial4J"},{"p":"com.serial4j.example.serial4j","l":"HelloSerial4jIO"},{"p":"com.serial4j.example.monitor","l":"HelloSerialMonitor"},{"p":"com.serial4j.core.serial.throwable","l":"InputOutputException"},{"p":"com.serial4j.core.serial.throwable","l":"InterruptedSystemCallException"},{"p":"com.serial4j.core.serial.throwable","l":"InvalidArgumentException"},{"p":"com.serial4j.core.serial.throwable","l":"InvalidPortException"},{"p":"com.serial4j.example","l":"Launcher"},{"p":"com.serial4j.core.util.process","l":"Semaphore.Mutex"},{"p":"com.serial4j.core.errno","l":"NativeErrno"},{"p":"com.serial4j.core.util.natives","l":"NativeImageLoader.NativeImage"},{"p":"com.serial4j.core.util.natives","l":"NativeImageLoader"},{"p":"com.serial4j.core.serial","l":"NativeTerminalDevice"},{"p":"com.serial4j.core.serial.throwable","l":"NoAvailableTtyDevicesException"},{"p":"com.serial4j.core.serial.throwable","l":"NoSpaceLeftException"},{"p":"com.serial4j.core.serial.throwable","l":"NoSuchDeviceException"},{"p":"com.serial4j.core.serial.throwable","l":"NoSuchFileException"},{"p":"com.serial4j.core.serial.throwable","l":"NotTtyDeviceException"},{"p":"com.serial4j.core.serial.throwable","l":"OperationFailedException"},{"p":"com.serial4j.core.serial.throwable","l":"PermissionDeniedException"},{"p":"com.serial4j.core.serial","l":"Permissions"},{"p":"com.serial4j.core.serial","l":"ReadConfiguration"},{"p":"com.serial4j.core.serial.throwable","l":"ReadOnlyFileSystemException"},{"p":"com.serial4j.core.util.process","l":"Semaphore"},{"p":"com.serial4j.core.serial.monitor","l":"SerialDataListener"},{"p":"com.serial4j.core.serial.monitor","l":"SerialMonitor"},{"p":"com.serial4j.core.serial.entity","l":"SerialMonitorEntity"},{"p":"com.serial4j.core.serial.monitor","l":"SerialMonitorException"},{"p":"com.serial4j.core.serial","l":"SerialPort"},{"p":"com.serial4j.core.serial.entity.impl","l":"SerialReadEntity"},{"p":"com.serial4j.core.serial.throwable","l":"SerialThrowable"},{"p":"com.serial4j.core.serial.entity.impl","l":"SerialWriteEntity"},{"p":"com.serial4j.core.util.natives","l":"NativeImageLoader.State"},{"p":"com.serial4j.core.serial.control","l":"TerminalControlFlag"},{"p":"com.serial4j.core.serial","l":"TerminalDevice"},{"p":"com.serial4j.core.serial.control","l":"TerminalFlag"},{"p":"com.serial4j.core.serial.control","l":"TerminalInputFlag"},{"p":"com.serial4j.core.serial.control","l":"TerminalLocalFlag"},{"p":"com.serial4j.core.serial.control","l":"TerminalOutputFlag"},{"p":"com.serial4j.core.serial.throwable","l":"TooManyOpenedFilesException"},{"p":"com.serial4j.core.serial.throwable","l":"TryAgainException"},{"p":"com.serial4j.core.serial.entity.impl","l":"WritableCapsule"}];updateSearchResults(); \ No newline at end of file diff --git a/HelloSerial4j/shared/native/Linux/linux-x86-x64/libserial4j.so b/HelloSerial4j/shared/native/Linux/linux-x86-x64/libserial4j.so new file mode 100755 index 00000000..f5aa3d1b Binary files /dev/null and b/HelloSerial4j/shared/native/Linux/linux-x86-x64/libserial4j.so differ diff --git a/HelloSerial4j/src/main/java/com/serial4j/core/errno/Errno.java b/HelloSerial4j/src/main/java/com/serial4j/core/errno/Errno.java new file mode 100644 index 00000000..7f3e6133 --- /dev/null +++ b/HelloSerial4j/src/main/java/com/serial4j/core/errno/Errno.java @@ -0,0 +1,119 @@ +/* + * BSD 3-Clause License + * + * Copyright (c) 2022, Scrappers Team, The AVR-Sandbox Project, Serial4j API. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package com.serial4j.core.errno; + +import com.serial4j.core.serial.NativeTerminalDevice; + +/** + * Interprets the native methods bad return values into error codes, + * used by the java {@link com.serial4j.core.errno.ErrnoToException} + * to throw exceptions against the JRE. + * + * @author pavl_g. + */ +public enum Errno { + /** + * Serial4j business errors. + */ + ERR_INVALID_PORT(NativeErrno.getInvalidPortErrno(), "Invalid Port"), + ERR_OPERATION_FAILED(NativeErrno.getOperationFailedErrno(), "Operation Failed"), + ERR_NO_AVAILABLE_TTY_DEVICES(NativeErrno.getNoAvailableTtyDevicesErrno(), "No available teletype devices"), + + /** + * Error codes for open(const char*, int), file names and IO. + */ + EACCES(NativeErrno.getPermissionDeniedErrno(), "Permission denied"), + EEXIST(NativeErrno.getFileAlreadyOpenedErrno(), "File exists"), + EINTR(NativeErrno.getInterruptedSystemCallErrno(), "Interrupted system call"), + EISDIR(NativeErrno.getFileIsDirectoryErrno(), "Is a directory"), + EMFILE(NativeErrno.getTooManyOpenedFilesErrno(), "Too many open files"), + ENFILE(NativeErrno.getFileTableOverflowErrno(), "File table overflow"), + ENOENT(NativeErrno.getNoSuchFileErrno(), "No Such file or directory"), + ENOSPC(NativeErrno.getNoSpaceLeftErrno(), "No space left on device"), + ENXIO(NativeErrno.getNoSuchDeviceErrno(), "No such device or address"), + EROFS(NativeErrno.getReadOnlyFileSystemErrno(), "Read-only file system"), + EPIPE(NativeErrno.getBrokenPipeErrno(), "Broken pipe"), + + /** + * Error codes for tcgetattr(int, struct termios*) and tcsetattr(int, struct termios*). + */ + EBADF(NativeErrno.getBadFileDescriptorErrno(), "File descriptor in bad state"), + ENOTTY(NativeErrno.getNotTtyDeviceErrno(), "Not a typewriter device"), + + /** + * tcsetattr(int, struct termios*) only. + */ + EINVAL(NativeErrno.getInvalidArgumentErrno(), "Invalid argumnet"), + + /** + * Additional error codes for basic R/W from + */ + EAGAIN(NativeErrno.getTryAgainErrno(), "Try again"), + EIO(NativeErrno.getInputOutputErrno(), "I/O Error"), + + /** + * For write(int, void*, int); only. + */ + EFBIG(NativeErrno.getFileTooLargeErrno(), "File too large"); + + private final int value; + private final String description; + + /** + * Creates an error code constant with a value and a description. + * + * @param value the errno value. + * @param description the errno description. + */ + Errno(final int value, final String description) { + this.value = value; + this.description = description; + } + + /** + * Gets the native error code of the Err. + * + * @return an integer reference to the error code. + */ + public int getValue() { + return value; + } + + /** + * Gets the native error code descritption. + * + * @return the error code description in String format. + */ + public String getDescription() { + return description; + } +} diff --git a/HelloSerial4j/src/main/java/com/serial4j/core/errno/ErrnoToException.java b/HelloSerial4j/src/main/java/com/serial4j/core/errno/ErrnoToException.java new file mode 100644 index 00000000..6163ef85 --- /dev/null +++ b/HelloSerial4j/src/main/java/com/serial4j/core/errno/ErrnoToException.java @@ -0,0 +1,124 @@ +/* + * BSD 3-Clause License + * + * Copyright (c) 2022, Scrappers Team, The AVR-Sandbox Project, Serial4j API. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package com.serial4j.core.errno; + +import com.serial4j.core.serial.throwable.PermissionDeniedException; +import com.serial4j.core.serial.throwable.BadFileDescriptorException; +import com.serial4j.core.serial.throwable.FileAlreadyOpenedException; +import com.serial4j.core.serial.throwable.FileIsDirectoryException; +import com.serial4j.core.serial.throwable.FileTableOverflowException; +import com.serial4j.core.serial.throwable.FileTooLargeException; +import com.serial4j.core.serial.throwable.InputOutputException; +import com.serial4j.core.serial.throwable.InterruptedSystemCallException; +import com.serial4j.core.serial.throwable.ErrnoNotFoundError; +import com.serial4j.core.serial.throwable.NoSuchFileException; +import com.serial4j.core.serial.throwable.InvalidArgumentException; +import com.serial4j.core.serial.throwable.NoSpaceLeftException; +import com.serial4j.core.serial.throwable.ReadOnlyFileSystemException; +import com.serial4j.core.serial.throwable.NotTtyDeviceException; +import com.serial4j.core.serial.throwable.TooManyOpenedFilesException; +import com.serial4j.core.serial.throwable.TryAgainException; +import com.serial4j.core.serial.throwable.BrokenPipeException; +import com.serial4j.core.serial.throwable.NoSuchDeviceException; +import com.serial4j.core.serial.throwable.InvalidPortException; +import com.serial4j.core.serial.throwable.OperationFailedException; +import com.serial4j.core.serial.throwable.NoAvailableTtyDevicesException; +import com.serial4j.core.errno.Errno; + +/** + * Reflects C native errnos into real java exceptions. + * + * @author pavl_g. + */ +public final class ErrnoToException { + + private ErrnoToException() { + } + + /** + * Throws a java exception from a native errno. + * + * @param errno the native error code to which the exception will be thrown against. + * @param additionalText additional text in string format to be displayed within the throwable message. + * + * @throws NoSuchDeviceException in case of errno(2). + * @throws PermissionDeniedException in case of errno(13). + * @throws BrokenPipeException in case of errno(32). + * @throws InvalidPortException in case of errno(-2). + * @throws OperationFailedException in case of errno(-1). + * @throws NoAvailableTtyDevicesException in case of errno(-4). + */ + public static void throwFromErrno(final int errno, final String additionalText) { + if (errno == Errno.ENOENT.getValue()) { + throw new NoSuchFileException(additionalText); + } else if (errno == Errno.EACCES.getValue()) { + throw new PermissionDeniedException(additionalText); + } else if (errno == Errno.EPIPE.getValue()) { + throw new BrokenPipeException(additionalText); + } else if (errno == Errno.ERR_INVALID_PORT.getValue()) { + throw new InvalidPortException(additionalText); + } else if (errno == Errno.ERR_NO_AVAILABLE_TTY_DEVICES.getValue()) { + throw new NoAvailableTtyDevicesException(additionalText); + } else if (errno == Errno.EBADF.getValue()) { + throw new BadFileDescriptorException(additionalText); + } else if (errno == Errno.EEXIST.getValue()) { + throw new FileAlreadyOpenedException(additionalText); + } else if (errno == Errno.EISDIR.getValue()) { + throw new FileIsDirectoryException(additionalText); + } else if (errno == Errno.ENFILE.getValue()) { + throw new FileTableOverflowException(additionalText); + } else if (errno == Errno.EFBIG.getValue()) { + throw new FileTooLargeException(additionalText); + } else if (errno == Errno.EIO.getValue()) { + throw new InputOutputException(additionalText); + } else if (errno == Errno.EINTR.getValue()) { + throw new InterruptedSystemCallException(additionalText); + } else if (errno == Errno.EINVAL.getValue()) { + throw new InvalidArgumentException(additionalText); + } else if (errno == Errno.ENOSPC.getValue()) { + throw new NoSpaceLeftException(additionalText); + } else if (errno == Errno.ENXIO.getValue()) { + throw new NoSuchDeviceException(additionalText); + } else if (errno == Errno.EROFS.getValue()) { + throw new ReadOnlyFileSystemException(additionalText); + } else if (errno == Errno.ENOTTY.getValue()) { + throw new NotTtyDeviceException(additionalText); + } else if (errno == Errno.EMFILE.getValue()) { + throw new TooManyOpenedFilesException(additionalText); + } else if (errno == Errno.EAGAIN.getValue()) { + throw new TryAgainException(additionalText); + } else { + throw new ErrnoNotFoundError("Cannot interpret this error code !"); + } + } + +} diff --git a/HelloSerial4j/src/main/java/com/serial4j/core/errno/NativeErrno.java b/HelloSerial4j/src/main/java/com/serial4j/core/errno/NativeErrno.java new file mode 100644 index 00000000..259cea3a --- /dev/null +++ b/HelloSerial4j/src/main/java/com/serial4j/core/errno/NativeErrno.java @@ -0,0 +1,47 @@ +package com.serial4j.core.errno; + +public final class NativeErrno { + + private NativeErrno() { + } + + protected static native int getBadFileDescriptorErrno(); + + protected static native int getBrokenPipeErrno(); + + protected static native int getFileAlreadyOpenedErrno(); + + protected static native int getFileIsDirectoryErrno(); + + protected static native int getFileTableOverflowErrno(); + + protected static native int getFileTooLargeErrno(); + + protected static native int getInputOutputErrno(); + + protected static native int getInterruptedSystemCallErrno(); + + protected static native int getInvalidArgumentErrno(); + + protected static native int getInvalidPortErrno(); + + protected static native int getNoAvailableTtyDevicesErrno(); + + protected static native int getNoSpaceLeftErrno(); + + protected static native int getNoSuchDeviceErrno(); + + protected static native int getNoSuchFileErrno(); + + protected static native int getNotTtyDeviceErrno(); + + protected static native int getOperationFailedErrno(); + + protected static native int getPermissionDeniedErrno(); + + protected static native int getReadOnlyFileSystemErrno(); + + protected static native int getTooManyOpenedFilesErrno(); + + protected static native int getTryAgainErrno(); +} \ No newline at end of file diff --git a/HelloSerial4j/src/main/java/com/serial4j/core/errno/package-info.java b/HelloSerial4j/src/main/java/com/serial4j/core/errno/package-info.java new file mode 100644 index 00000000..47bec615 --- /dev/null +++ b/HelloSerial4j/src/main/java/com/serial4j/core/errno/package-info.java @@ -0,0 +1,37 @@ +/* + * BSD 3-Clause License + * + * Copyright (c) 2022, Scrappers Team, The AVR-Sandbox Project, Serial4j API. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * Provides a native errno to java exception converter {@link ErrnoToException} and {@link Errno} for + * native errno interpretation. + */ +package com.serial4j.core.errno; \ No newline at end of file diff --git a/HelloSerial4j/src/main/java/com/serial4j/core/serial/BaudRate.java b/HelloSerial4j/src/main/java/com/serial4j/core/serial/BaudRate.java new file mode 100644 index 00000000..36bfdea3 --- /dev/null +++ b/HelloSerial4j/src/main/java/com/serial4j/core/serial/BaudRate.java @@ -0,0 +1,129 @@ +/* + * termios type and macro definitions. Linux version. + * Copyright (C) 1993-2019 Free Software Foundation, Inc. + * This file is part of the GNU C Library. + * + * The GNU C Library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * The GNU C Library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with the GNU C Library; if not, see + * . + * + * ----------------------------------------------------------------------- + * + * BSD 3-Clause License for Serial4j from the AVR-Sandbox Project. + * + * Copyright (c) 2022, Scrappers Team, The AVR-Sandbox Project, Serial4j API. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package com.serial4j.core.serial; + +/** + * Represents codes for the POSIX Systems baud rates and their real values + * defined from <./usr/include/x86_64-linux-gnu/bits/termios.h>. + * + * @author pavl_g. + */ +public enum BaudRate { + + /** Baudrates for POSIX systems as defined by */ + B0(0000000, 0), + B50(0000001, 50), + B75(0000002, 75), + B110(0000003, 110), + B134(0000004, 134), + B150(0000005, 150), + B200(0000006, 200), + B300(0000007, 300), + B600(0000010, 600), + B1200(0000011, 1200), + B1800(0000012, 1800), + B2400(0000013, 2400), + B4800(0000014, 4800), + B9600(0000015, 9600), + B19200(0000016, 19200), + B38400(0000017, 38400), + B57600(0010001, 57600), + B115200(0010002, 115200), + B230400(0010003, 230400), + B460800(0010004, 460800), + B500000(0010005, 500000), + B576000(0010006, 576000), + B921600(0010007, 921600), + B1000000(0010010, 1000000), + B1152000(0010011, 1152000), + B1500000(0010012, 1500000), + B2000000(0010013, 2000000), + B2500000(0010014, 2500000), + B3000000(0010015, 3000000), + B3500000(0010016, 3500000), + B4000000(0010017, 4000000), + MAX_BAUD(B4000000.getBaudRate(), B4000000.getRealBaud()); + + private final int baudRate; + private final long realBaud; + + /** + * Defines a basic structure for POSIX baud rates. + * + * @param baudRate the baud rate representative POSIX code. + * @param realBaud the real baud value. + */ + BaudRate(final int baudRate, final long realBaud) { + this.baudRate = baudRate; + this.realBaud = realBaud; + } + + /** + * Retrieves the real baud rate value from the baud + * rate structure defined by the POSIX code. + * + * @return the real baud rate. + */ + public long getRealBaud() { + return realBaud; + } + + /** + * Retrieves the baud rate code defined from for + * POSIX systems. + * + * @return the code for this baud rate. + */ + public int getBaudRate() { + return baudRate; + } +} diff --git a/HelloSerial4j/src/main/java/com/serial4j/core/serial/NativeTerminalDevice.java b/HelloSerial4j/src/main/java/com/serial4j/core/serial/NativeTerminalDevice.java new file mode 100644 index 00000000..1f140a28 --- /dev/null +++ b/HelloSerial4j/src/main/java/com/serial4j/core/serial/NativeTerminalDevice.java @@ -0,0 +1,334 @@ +/* + * BSD 3-Clause License + * + * Copyright (c) 2022, Scrappers Team, The AVR-Sandbox Project, Serial4j API. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package com.serial4j.core.serial; + +import com.serial4j.core.serial.SerialPort; +import com.serial4j.core.util.natives.NativeImageLoader; + +/** + * Represents the native java binding for Serial4j API, represented by + * [com_serial4j_core_serial_NativeTerminalDevice.h] natively. + * + * @author pavl_g. + */ +public final class NativeTerminalDevice { + + /** + * Static initializer: Loads the native image when this object is created or referenced. + */ + static { + NativeImageLoader.loadLibrary(); + } + + private SerialPort serialPort; + private String[] serialPorts; + private char[] readData; + private String readBuffer = new String(); + + protected NativeTerminalDevice() { + } + + /** + * Initializes the serial port path of the native terminal device before opening the terminal device port. + * + * @param serialPort the object to initialize the serial port with. + */ + protected void setSerialPort(final SerialPort serialPort) { + this.serialPort = serialPort; + } + + /** + * Retrieves the serial port associated with this terminal device. + * + * @return the serial port object associated with this terminal device. + */ + public SerialPort getSerialPort() { + return this.serialPort; + } + + /** + * Retrieves all the available teletype terminal (tty) devices from the filesystem "/dev". + * + * @return the available tty devices in an array of strings format. + */ + public String[] getSerialPorts() { + return this.serialPorts; + } + + /** + * Gets the read data in an up-to 32-bit integer format resulting from using the native method {@link NativeTerminalDevice#readData0()}. + * + * @return the read data from this terminal device in an up-to 32-bit integer format. + */ + public char[] getReadData() { + return this.readData; + } + + public String getReadBuffer() { + return this.readBuffer; + } + + /** + * Sets up the native environment for this terminal device. + * + * @return (-1) if the jni env pointer is NULL, (1) for successful initialization. + */ + protected static native int setupJniEnvironment0(); + + /** + * Adjusts the native terminal control [c_cflag] of the [termios] structure variable for this terminal device. + * @apiNote The terminal control flag controls the way the terminal device r/w the charachters on the console. + * For more, refer to the POSIX terminal control guide. + * + * Default value = tty->c_cflag |= (CREAD | CS8 | CLOCAL); defined by {@link NativeTerminalDevice#initTermios0()}. + * + * @param flag the flag to set the [c_cflag] to. + * @return errno(-1) for failure, errno(-2) for invalid port, errno(1) for success. + * @see com.serial4j.core.serial.control.TerminalControlFlag + */ + protected native int setTerminalControlFlag(final long flag); + + /** + * Adjusts the native terminal local [c_lflag] of the [termios] structure variable for this terminal device. + * @apiNote The terminal local flag controls the way the terminal device interprets and displays the charachters on the console (i.e local console). + * For more, refer to the POSIX terminal control guide. + * + * Default value = tty->c_lflag &= ~(ICANON | ECHO | ECHOE | ECHOK | ECHOKE | ECHONL | ECHOPRT | ECHOCTL | ISIG | IEXTEN); + * defined by {@link NativeTerminalDevice#initTermios0()}. + * + * @param flag the flag to set the [c_lflag] to. + * @return errno(-1) for failure, errno(-2) for invalid port, errno(1) for success. + * @see com.serial4j.core.serial.control.TerminalLocalFlag + */ + protected native int setTerminalLocalFlag(final long flag); + + /** + * Adjusts the native terminal input [c_iflag] of the [termios] structure variable for this terminal device. + * @apiNote The terminal input flag controls the way the terminal device receives and interprets the charachters on input. + * For more, refer to the POSIX terminal control guide. + * + * Default value = tty->c_iflag = 0x00; defined by {@link NativeTerminalDevice#initTermios0()}. + * + * @param flag the flag to set the [c_iflag] to. + * @return errno(-1) for failure, errno(-2) for invalid port, errno(1) for success. + * @see com.serial4j.core.serial.control.TerminalInputFlag + */ + protected native int setTerminalInputFlag(final long flag); + + /** + * Adjusts the native terminal output [c_oflag] of the [termios] structure variable for this terminal device. + * @apiNote The terminal output flag controls the way the terminal device transmits and interprets the charachters on output. + * For more, refer to the POSIX terminal control guide. + * + * Default value = tty->c_oflag &= ~(OPOST | ONLCR); defined by {@link NativeTerminalDevice#initTermios0()}. + * + * @param flag the flag to set the [c_oflag] to. + * @return errno(-1) for failure, errno(-2) for invalid port, errno(1) for success. + * @see com.serial4j.core.serial.control.TerminalOutputFlag + */ + protected native int setTerminalOutputFlag(final long flag); + + /** + * Retrieves the terminal control flag from this terminal device port descriptor in 64-bit format. + * + * @return the [c_cflag] value in longs. + */ + protected native long getTerminalControlFlag(); + + /** + * Retrieves the terminal local flag from this terminal device port descriptor in 64-bit format. + * + * @return the [c_lflag] value in longs. + */ + protected native long getTerminalLocalFlag(); + + /** + * Retrieves the terminal input flag from this terminal device port descriptor in 64-bit format. + * + * @return the [c_iflag] value in longs. + */ + protected native long getTerminalInputFlag(); + + /** + * Retrieves the terminal output flag from this terminal device port descriptor in 64-bit format. + * + * @return the [c_oflag] value in longs. + */ + protected native long getTerminalOutputFlag(); + + /** + * Adjusts the read mode for this terminal device, the read mode is defined by the read timeout value and the minimum + * number of bytes to read at that time. + * + * Default value = BLOCKING_READ_ONE_CHAR {0, 1}; defined by {@link NativeTerminalDevice#initTermios0()}. + * + * @param mode the read mode in a 2 lengthed array format, where first index refers to the timeout config and second index + * refers to the bytes config. + * @param VTIME_VALUE the value of the read timeout, applied only when the first index of [mode] is 1 (aka read timeout is activated). + * @param VMIN_VALUE the value of the minimum byte to read in this time. + * @return errno(-1) for failure, errno(-2) for invalid port, errno(1) for success. + * @see com.serial4j.core.serial.ReadConfiguration + */ + protected native int setReadConfigurationMode0(final int VTIME_VALUE, final int VMIN_VALUE); + + /** + * Gets the read configuration for this terminal device defining the timeout value as the first index and + * the minimum number of read byte in this timeout as the second index. + * + * Default value = BLOCKING_READ_ONE_CHAR {0, 1}; defined by {@link NativeTerminalDevice#initTermios0()}. + * + * @return an array refering to the read mode, where index [0] represents the read timeout, index [1] represents + * the minimum bytes to read. + */ + protected native int[] getReadConfigurationMode0(); + + /** + * Retrieves the last error encountered by the native code, + * + * @return the last error code from the native . + */ + protected native int getErrno0(); + + /** + * Fetches the available system teletype terminal devices (tty) located within "/dev" directory + * and insert the result into {@link NativeTerminalDevice#serialPorts}. + * + * @return errno(-1) for failure, errno(-2) for invalid port, errno(1) for success. + */ + protected native int fetchSerialPorts0(); + + /** + * Retrieves the baud rate POSIX code for this terminal process, find more at <./usr/include/x86_64-linux-gnu/bits/termios.h>. + * + * @return the baud rate code in integers. + */ + protected native int getBaudRate0(); + + /** + * Writes an integer buffer to this terminal device. + * + * @param data an integer data buffer to write up-to 32-bit. + * @return the number of written bytes in long format. + */ + protected native long writeData0(final int data); + + /** + * Reads the data from the terminal device and inserts the result into an integer buffer + * {@link NativeTerminalDevice#readData}. + * + * @return the number of read bytes. + */ + protected native long readData0(); + + /** + * Writes a string buffer (const char*) with a length to this terminal device. + * + * @param buffer a string buffer to write to this terminal device. + * @param length the string buffer length in integers, this minimizes the jni native calls. + * @return the number of written bytes to this terminal device. + */ + protected native long writeBuffer0(final String buffer, final int length); + + /** + * Reads the data from this terminal device and insert the result into the {@link NativeTerminalDevice#readBuffer} + * string buffer. + * + * @return the number of read bytes from this terminal device. + */ + protected native long readBuffer0(); + + /** + * Opens this terminal device using the path to the port [port] in strings and the port permissions [flag] in integers. + * + * @param port the port path in strings. + * @param int the flag for the base file control native api [fcntl]. + * @return errno(-1) for failure, errno(1) for success. + */ + protected native int openPort0(final String port, final int flag); + + /** + * Initializes this terminal device with the default terminal flags and read timeout properties: + * ----------- + * # c_cflag: for control mode flags. + * *** Enable these bits: + * - [CREAD]: Allow input to be received. + * - [CS8]: For charachter size 8-bit, you can use the bit mask CSIZE to read this value. + * - [CLOCAL]: Ignore modem status lines (donÂ’t check carrier signal). + * ----------- + * # c_lflag: for local mode flags. + * ***Disable these bits: + * - [ICANON]: Canonical mode (line-by-line) input. + * - [ECHO]: Echo input characters. + * - [ECHOE]: Perform ERASE visually. + * - [ECHOK]: Echo KILL visually. + * - [ECHOKE]: DonÂ’t output a newline after echoed KILL. + * - [ECHONL]: Echo NL (in canonical mode) even if echoing is disabled. + * - [ECHOPRT]: Echo deleted characters backward (between \ and / ). + * - [ECHOCTL]: Echo control characters visually (e.g., ^L ). + * - [ISIG]: Enable signal-generating characters (INTR, QUIT, SUSP). + * - [IEXTEN]: Enable extended processing of input characters. + * ----------- + * # c_oflag: for output mode flags. + * ***Disable these bits: + * - [OPOST]: Perform output postprocessing. + * - [ONLCR]: Map NL to CR-NL on output. + * ----------- + * # c_iflag: for input mode flags. + * ***Disable all input bit masks. + * ----------- + * # c_cc: For control characters. + * ***Sets to BLOCKING READ ONE CHAR AT A TIME MODE. + * ----------- + * + * @apiNote This should be called right after {@link NativeTerminalDevice#openPort0(String, int)}. + * + * @return errno(-1) for failure, errno(-2) for invalid port, errno(1) for success. + */ + protected native int initTermios0(); + + /** + * Adjusts the baud rate aka. the speed of data transmission in bits/seconds for this bus. + * + * @param baudRate the baud rate POSIX native code, find more about baud rate codes at <./usr/include/x86_64-linux-gnu/bits/termios.h>. + * @return errno(-1) for failure, errno(-2) for invalid port, errno(1) for success. + */ + protected native int setBaudRate0(int baudRate); + + /** + * Closes the serial port of this terminal device releasing the resources. + * @apiNote This call triggers {@link NativeTerminalDevice#serialPort#portOpened} to 0, + * the port descriptor {@link NativeTerminalDevice#serialPort#fd} to 0 and the port path {@link NativeTerminalDevice#serialPort#fd} to "". + * + * @return errno(-1) for failure, errno(-2) for invalid port, errno(1) for success. + */ + protected native int closePort0(); +} \ No newline at end of file diff --git a/HelloSerial4j/src/main/java/com/serial4j/core/serial/Permissions.java b/HelloSerial4j/src/main/java/com/serial4j/core/serial/Permissions.java new file mode 100644 index 00000000..9558f7c6 --- /dev/null +++ b/HelloSerial4j/src/main/java/com/serial4j/core/serial/Permissions.java @@ -0,0 +1,135 @@ +/* + * From POSIX Standard: 6.5 File Control Operations. + * Copyright (C) 1993-2019 Free Software Foundation, Inc. + * This file is part of the GNU C Library. + * + * The GNU C Library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * The GNU C Library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with the GNU C Library; if not, see + * . + * + * ----------------------------------------------------------------------- + * + * BSD 3-Clause License for Serial4j from the AVR-Sandbox Project. + * + * Copyright (c) 2022, Scrappers Team, The AVR-Sandbox Project, Serial4j API. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package com.serial4j.core.serial; + +/** + * Provides Unix file system permissions for the specified serial port + * of the terminal device. + * + * @author pavl_g. + */ +public final class Permissions { + + public static final Permissions O_RDONLY = new Permissions(00, "Read Only"); + public static final Permissions O_WRONLY = new Permissions(01, "Write Only"); + public static final Permissions O_RDWR = new Permissions(02, "Read/Write"); + public static final Permissions O_NOCTTY = new Permissions(0400, "No Control terminal device"); + public static final Permissions O_NONBLOCK = new Permissions(04000, "Terminal non block"); + + private int value; + private String description; + + /** + * Wraps a POSIX IO flag using an integer value. + * + * @param value the value of the permission flag. + * @param description the description of the flag. + */ + protected Permissions(final int value, final String description) { + this.value = value; + this.description = description; + } + + /** + * Create a custom permissions object from a source value. + * + * @param value the value of the permission flag. + * @param description the description for this flag. + * @return a new Permissions object wrapping the POSIX IO flag. + */ + public static final Permissions createCustomPermissions(final int value, final String description) { + return new Permissions(value, description); + } + + /** + * Appends new permissions to this permissions object. + * + * @param permissions the new permissions to append. + * @return this permissions object with the new appended value. + */ + public Permissions append(final Permissions permissions) { + this.value |= permissions.getValue(); + this.description += "-" + permissions.getDescription(); + return this; + } + + /** + * Appends some new permissions to this permissions object. + * + * @param permissions an array args of the new permissions to append. + * @return this permissions object with the new appended value. + */ + public Permissions append(final Permissions...permissions) { + for (int i = 0; i < permissions.length; i++) { + append(permissions[i]); + } + return this; + } + + /** + * Retrieves the value of this permissions object. + * + * @return the value of this permissions object. + */ + public int getValue() { + return value; + } + + /** + * Retrieves the description of this permissions object. + * + * @return the description of this permissions object. + */ + public String getDescription() { + return description; + } +} diff --git a/HelloSerial4j/src/main/java/com/serial4j/core/serial/ReadConfiguration.java b/HelloSerial4j/src/main/java/com/serial4j/core/serial/ReadConfiguration.java new file mode 100644 index 00000000..e159ecbb --- /dev/null +++ b/HelloSerial4j/src/main/java/com/serial4j/core/serial/ReadConfiguration.java @@ -0,0 +1,84 @@ +/* + * BSD 3-Clause License + * + * Copyright (c) 2022, Scrappers Team, The AVR-Sandbox Project, Serial4j API. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package com.serial4j.core.serial; + +import java.util.Arrays; +import com.serial4j.core.errno.Errno; +import com.serial4j.core.serial.throwable.InvalidPortException; + +/** + * Provides a Unix terminal read configuration for the specified serial port of the + * terminal device. + * + * @author pavl_g. + */ +public enum ReadConfiguration { + POLLING_READ(new int[] {0, 0}, "Polling Read"), + BLOCKING_READ_ONE_CHAR(new int[] {0, 1}, "Blocking read one charachter at a time"), + READ_WITH_TIMEOUT(new int[] {1, 0}, "Polling Read with timeout"), + READ_WITH_INTERBYTE_TIMEOUT(new int[] {1, 1}, "Blocking read with timeout"), + ERR_INVALID_PORT(new int[] {(int) Errno.ERR_INVALID_PORT.getValue(), (int) Errno.ERR_INVALID_PORT.getValue()}, "Error invalid port"); + + private int[] mode; + private final String description; + + ReadConfiguration(final int[] mode, final String description) { + this.mode = mode; + this.description = description; + } + + public int[] getMode() { + return mode; + } + + public String getDescription() { + return description; + } + + public static ReadConfiguration getFromNativeReadConfig(final int[] nativeReadConfig) { + ReadConfiguration readConfiguration; + if (nativeReadConfig[0] < 1 && nativeReadConfig[1] >= 1) { + readConfiguration = ReadConfiguration.BLOCKING_READ_ONE_CHAR; + } else if ((nativeReadConfig[0] | nativeReadConfig[1]) == 0) { + readConfiguration = ReadConfiguration.POLLING_READ; + } else if (nativeReadConfig[0] >= 1 && nativeReadConfig[1] >= 1) { + readConfiguration = ReadConfiguration.READ_WITH_INTERBYTE_TIMEOUT; + } else if ((nativeReadConfig[0] & nativeReadConfig[1]) == Errno.ERR_INVALID_PORT.getValue()) { + throw new InvalidPortException("Cannot get read configuration for an invalid port !"); + } else { + readConfiguration = ReadConfiguration.READ_WITH_TIMEOUT; + } + /* update the mode value with the native readConfig value */ + readConfiguration.mode = nativeReadConfig; + return readConfiguration; + } +} diff --git a/HelloSerial4j/src/main/java/com/serial4j/core/serial/SerialPort.java b/HelloSerial4j/src/main/java/com/serial4j/core/serial/SerialPort.java new file mode 100644 index 00000000..2d9bdd50 --- /dev/null +++ b/HelloSerial4j/src/main/java/com/serial4j/core/serial/SerialPort.java @@ -0,0 +1,95 @@ +/* + * BSD 3-Clause License + * + * Copyright (c) 2022, Scrappers Team, The AVR-Sandbox Project, Serial4j API. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package com.serial4j.core.serial; + +/** + * Represents a Unix terminal device port properties wrapper. + * + * @author pavl_g. + */ +public final class SerialPort { + + private String path; + private int portOpened; + private int fd; + private int ioFlag; + + /** + * Instantiates a new serial port for a terminal device with a port path. + * The rest of the port data is assigned from the jni side after opening the device. + * + * @param path the port path on the file system. + */ + public SerialPort(final String path) { + this.path = path; + } + + /** + * Gets the io flags defined by the {@link com.serial4j.core.serial.Permissions}. + * The io flags setter is assigned from the jni side by {@link com.serial4j.core.serial.NativeTerminalDevice#openPort(String, int)}. + * + * @return a number format representing the IO flag for the POSIX base file api. + */ + public int getIOFlag() { + return ioFlag; + } + + /** + * Gets the path to this port. + * + * @return a String representing the path to this port. + */ + public String getPath() { + return path; + } + + /** + * Gets the virtual file descriptor defining this port. + * The fd (file descriptor) setter is assigned from the jni side by {@link com.serial4j.core.serial.NativeTerminalDevice#openPort(String, int)}. + * + * @return a number format representing the file descriptor for this port. + */ + public int getFd() { + return fd; + } + + /** + * Tests whether this port is still opened. + * This flag setter is assigned from the jni side by {@link com.serial4j.core.serial.NativeTerminalDevice#openPort(String, int)} + * and {@link com.serial4j.core.serial.NativeTerminalDevice#closePort()}. + * + * @return true if the port is still alive, false if the port is closed. + */ + public boolean isPortOpened() { + return this.portOpened == 1; + } +} \ No newline at end of file diff --git a/HelloSerial4j/src/main/java/com/serial4j/core/serial/TerminalDevice.java b/HelloSerial4j/src/main/java/com/serial4j/core/serial/TerminalDevice.java new file mode 100644 index 00000000..28bf8d45 --- /dev/null +++ b/HelloSerial4j/src/main/java/com/serial4j/core/serial/TerminalDevice.java @@ -0,0 +1,499 @@ +/* + * BSD 3-Clause License + * + * Copyright (c) 2022, Scrappers Team, The AVR-Sandbox Project, Serial4j API. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package com.serial4j.core.serial; + +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.InputStream; +import java.io.OutputStream; +import java.util.logging.Level; +import java.util.logging.Logger; +import com.serial4j.core.errno.Errno; +import com.serial4j.core.util.natives.NativeImageLoader; +import com.serial4j.core.serial.Permissions; +import com.serial4j.core.errno.ErrnoToException; +import com.serial4j.core.serial.SerialPort; +import com.serial4j.core.serial.NativeTerminalDevice; +import com.serial4j.core.serial.ReadConfiguration; +import com.serial4j.core.serial.control.TerminalControlFlag; +import com.serial4j.core.serial.control.TerminalLocalFlag; +import com.serial4j.core.serial.control.TerminalInputFlag; +import com.serial4j.core.serial.control.TerminalOutputFlag; +import com.serial4j.core.serial.throwable.PermissionDeniedException; +import com.serial4j.core.serial.throwable.BrokenPipeException; +import com.serial4j.core.serial.throwable.NoSuchDeviceException; +import com.serial4j.core.serial.throwable.TooManyOpenedFilesException; +import com.serial4j.core.serial.throwable.ReadOnlyFileSystemException; +import com.serial4j.core.serial.throwable.FileAlreadyOpenedException; +import com.serial4j.core.serial.throwable.BadFileDescriptorException; +import com.serial4j.core.serial.throwable.NotTtyDeviceException; +import com.serial4j.core.serial.throwable.InvalidArgumentException; +import com.serial4j.core.serial.throwable.FileIsDirectoryException; +import com.serial4j.core.serial.throwable.InterruptedSystemCallException; +import com.serial4j.core.serial.throwable.FileTableOverflowException; +import com.serial4j.core.serial.throwable.NoSuchFileException; +import com.serial4j.core.serial.throwable.NoSpaceLeftException; +import com.serial4j.core.serial.throwable.InvalidPortException; +import com.serial4j.core.serial.throwable.NoAvailableTtyDevicesException; + +/** + * The main entry class for the native terminal device for Serial4j api. + * + * @author pavl_g. + */ +public final class TerminalDevice { + + /** + * Static initializer for loading and setting up the native image. + * This initializer has a static context and therefore it runs only one + * time when creating the first object. + */ + static { + NativeImageLoader.loadLibrary(); + TerminalDevice.setupJniEnvironment(); + } + + private static final Logger LOGGER = Logger.getLogger(TerminalDevice.class.getName()); + private final NativeTerminalDevice nativeTerminalDevice = new NativeTerminalDevice(); + + private Permissions permissions = Permissions.O_RDWR.append(Permissions.O_NOCTTY) + .append(Permissions.O_NONBLOCK); + private ReadConfiguration readConfiguration; + private String permissionsDescription; + private boolean loggingEnabled; + private InputStream inputStream; + private OutputStream outputStream; + + /** + * Instantiates a Unix terminal device object. + */ + public TerminalDevice() { + + } + + /** + * Sets up the jvm pointer from jni environment pointer on the heap for the global + * multithreaded reference. + * + * @apiNote Native and jvm threads can access the jni pointer from the global jvm pointer without + * referencing one of the local jni env pointers stored on another thread stack (as this leads to a thread-transition error). + */ + private static void setupJniEnvironment() { + final int errno = NativeTerminalDevice.setupJniEnvironment0(); + ErrnoToException.throwFromErrno(errno, "Jni Environment passed is invalid !"); + } + + /** + * Opens this device's serial port using the path from [serialPort] instance. + * + * @param serialPort the serial port instance to open. + * + * @throws NoSuchDeviceException if an attempt is made to open a non-device file. + * @throws NoSuchFileException if an attempt is made to access a file that doesn't exist. + * @throws FileAlreadyOpenedException if an attempt is made to open an already opened terminal device. + * @throws InterruptedSystemCallException if there is a process interruption while opening the port. + * @throws FileIsDirectoryException if an attempt is made to open a directory instead of a device. + * @throws TooManyOpenedFilesException if an attempt is made to open too many devices exceeding the system limit. + * @throws FileTableOverflowException if an attempt is made to open a device while system io is halt. + * @throws NoSpaceLeftException if an attempt is made to open a device while there is no space left. + * @throws ReadOnlyFileSystemException if an attempt is made to open a read-only device. + * @throws PermissionDeniedException if an unauthorized user attempts to open this device. + */ + public void openPort(final SerialPort serialPort) throws NoSuchDeviceException, + NoSuchFileException, + FileAlreadyOpenedException, + InterruptedSystemCallException, + FileIsDirectoryException, + TooManyOpenedFilesException, + FileTableOverflowException, + NoSpaceLeftException, + ReadOnlyFileSystemException, + PermissionDeniedException { + if (isSerial4jLoggingEnabled()) { + LOGGER.log(Level.INFO, "Opening serial device " + serialPort.getPath()); + } + this.nativeTerminalDevice.setSerialPort(serialPort); + final int returnValue = nativeTerminalDevice.openPort0(serialPort.getPath(), permissions.getValue()); + if (isOperationFailed(returnValue)) { + ErrnoToException.throwFromErrno(nativeTerminalDevice.getErrno0(), serialPort.getPath()); + } + /* update port data natively */ + /* ... */ + } + + /** + * Initializes this terminal device with the default flags and the default + * read timeout configuration. + * + * @throws InvalidPortException if an attempt is made to initialize an invalid port (non-opened/still-closed device). + * @throws FileNotFoundException if the device opened before has been ejected. + * @throws NoAvailableTtyDevicesException if the port is closed while performing the initialization operation. + */ + public void initTermios() throws InvalidPortException, + FileNotFoundException, + NoAvailableTtyDevicesException { + if (isSerial4jLoggingEnabled()) { + LOGGER.log(Level.INFO, "Initializing serial device " + getSerialPort().getPath()); + } + int returnValue = nativeTerminalDevice.initTermios0(); + if (isOperationFailed(returnValue)) { + returnValue = nativeTerminalDevice.getErrno0(); + } + ErrnoToException.throwFromErrno(returnValue, getSerialPort().getPath()); + /* get the java streams from the port after initializing it with the native terminal */ + inputStream = new FileInputStream(getSerialPort().getPath()); + outputStream = new FileOutputStream(getSerialPort().getPath()); + } + + /** + * Adjusts the terminal control flag of the termios, the terminal control flag controls the + * characters behavior in the local terminal. + * + * @param flag the terminal control flag to adjust. + * @throws BadFileDescriptorException if the filedes is not a valid file descriptor. + * @throws InvalidPortException if the port is null or has not been initialized yet. + * @throws NotTtyDeviceException if the filedes is not associated with a terminal device. + * @throws InvalidArgumentException if the value of the when argument is not valid, + * or there is something wrong with the data in the termios-p argument. + */ + public void setTerminalControlFlag(final TerminalControlFlag flag) throws BadFileDescriptorException, + InvalidPortException, + NotTtyDeviceException, + InvalidArgumentException { + + int returnValue = nativeTerminalDevice.setTerminalControlFlag(flag.getValue()); + if (isOperationFailed(returnValue)) { + returnValue = nativeTerminalDevice.getErrno0(); + } + ErrnoToException.throwFromErrno(returnValue, getSerialPort().getPath()); + } + + /** + * Adjusts the terminal local flag of the termios, the terminal local flag controls how the + * terminal interprets the characters on the local console. + * + * @param flag the local flag to adjust. + * @throws BadFileDescriptorException if the filedes is not a valid file descriptor. + * @throws InvalidPortException if the port is null or has not been initialized yet. + * @throws NotTtyDeviceException if the filedes is not associated with a terminal device. + * @throws InvalidArgumentException if the value of the when argument is not valid, + * or there is something wrong with the data in the termios-p argument. + */ + public void setTerminalLocalFlag(final TerminalLocalFlag flag) throws BadFileDescriptorException, + InvalidPortException, + NotTtyDeviceException, + InvalidArgumentException { + int returnValue = nativeTerminalDevice.setTerminalLocalFlag(flag.getValue()); + if (isOperationFailed(returnValue)) { + returnValue = nativeTerminalDevice.getErrno0(); + } + ErrnoToException.throwFromErrno(returnValue, getSerialPort().getPath()); + } + + /** + * Adjusts the terminal input flag for the termios, the terminal input flag controls how + * the terminal interpret the characters at the input from the terminal device. + * + * @param flag the terminal input flag to adjust. + * @throws BadFileDescriptorException if the filedes is not a valid file descriptor. + * @throws InvalidPortException if the port is null or has not been initialized yet. + * @throws NotTtyDeviceException if the filedes is not associated with a terminal device. + * @throws InvalidArgumentException if the value of the when argument is not valid, + * or there is something wrong with the data in the termios-p argument. + */ + public void setTerminalInputFlag(final TerminalInputFlag flag) throws BadFileDescriptorException, + InvalidPortException, + NotTtyDeviceException, + InvalidArgumentException { + int returnValue = nativeTerminalDevice.setTerminalInputFlag(flag.getValue()); + if (isOperationFailed(returnValue)) { + returnValue = nativeTerminalDevice.getErrno0(); + } + ErrnoToException.throwFromErrno(returnValue, getSerialPort().getPath()); + } + + /** + * Adjusts the terminal output flag for this terminal device, the terminal output flag controls + * how the terminal interpret the charachters at the output to the terminal device. + * + * @throws BadFileDescriptorException if the filedes is not a valid file descriptor. + * @throws InvalidPortException if the port is null or has not been initialized yet. + * @throws NotTtyDeviceException if the filedes is not associated with a terminal device. + * @throws InvalidArgumentException if the value of the when argument is not valid, + * or there is something wrong with the data in the termios-p argument. + */ + public void setTerminalOutputFlag(final TerminalOutputFlag flag) throws BadFileDescriptorException, + InvalidPortException, + NotTtyDeviceException, + InvalidArgumentException { + int returnValue = nativeTerminalDevice.setTerminalOutputFlag(flag.getValue()); + if (isOperationFailed(returnValue)) { + returnValue = nativeTerminalDevice.getErrno0(); + } + ErrnoToException.throwFromErrno(returnValue, getSerialPort().getPath()); + } + + public TerminalControlFlag getTerminalControlFlag() throws BadFileDescriptorException, + InvalidPortException, + NotTtyDeviceException { + final TerminalControlFlag TCF = TerminalControlFlag.EMPTY_INSTANCE; + final long returnValue = nativeTerminalDevice.getTerminalControlFlag(); + /* Warning: Force cast the errno to (int) */ + ErrnoToException.throwFromErrno((int) returnValue, getSerialPort().getPath()); + TCF.setValue(returnValue); + return TCF; + } + + public TerminalLocalFlag getTerminalLocalFlag() throws BadFileDescriptorException, + InvalidPortException, + NotTtyDeviceException { + final TerminalLocalFlag TLF = TerminalLocalFlag.EMPTY_INSTANCE; + final long returnValue = nativeTerminalDevice.getTerminalLocalFlag(); + /* Warning: Force cast the errno to (int) */ + ErrnoToException.throwFromErrno((int) returnValue, getSerialPort().getPath()); + TLF.setValue(returnValue); + return TLF; + } + + public TerminalInputFlag getTerminalInputFlag() throws BadFileDescriptorException, + InvalidPortException, + NotTtyDeviceException { + final TerminalInputFlag TIF = TerminalInputFlag.EMPTY_INSTANCE; + final long returnValue = nativeTerminalDevice.getTerminalInputFlag(); + /* Warning: Force cast the errno to (int) */ + ErrnoToException.throwFromErrno((int) returnValue, getSerialPort().getPath()); + TIF.setValue(returnValue); + return TIF; + } + + public TerminalOutputFlag getTerminalOutputFlag() throws BadFileDescriptorException, + InvalidPortException, + NotTtyDeviceException { + final TerminalOutputFlag TOF = TerminalOutputFlag.EMPTY_INSTANCE; + final long returnValue = nativeTerminalDevice.getTerminalOutputFlag(); + /* Warning: Force cast the errno to (int) */ + ErrnoToException.throwFromErrno((int) returnValue, getSerialPort().getPath()); + TOF.setValue(returnValue); + return TOF; + } + + public void setPermissions(final Permissions permissions) { + this.permissions = permissions; + } + + public final Permissions getPermissions() { + return permissions; + } + + public void setBaudRate(final BaudRate baudRate) throws BadFileDescriptorException, + InvalidPortException, + NotTtyDeviceException { + if (isSerial4jLoggingEnabled()) { + LOGGER.log(Level.INFO, "Setting device baud rate to " + baudRate.getRealBaud()); + } + int returnValue = nativeTerminalDevice.setBaudRate0(baudRate.getBaudRate()); + if (isOperationFailed(returnValue)) { + returnValue = nativeTerminalDevice.getErrno0(); + } + ErrnoToException.throwFromErrno(returnValue, getSerialPort().getPath()); + } + + public void setReadConfigurationMode(final ReadConfiguration readConfiguration, final int timeoutValue, final int minimumBytes) throws NoSuchDeviceException, + PermissionDeniedException, + BrokenPipeException, + InvalidPortException, + NoAvailableTtyDevicesException { + + if (isSerial4jLoggingEnabled()) { + LOGGER.log(Level.INFO, "Setting reading config to " + readConfiguration.getDescription()); + } + final int timoutByteValue = readConfiguration.getMode()[0] * timeoutValue; + final int minimumBytesValue = readConfiguration.getMode()[1] * minimumBytes; + final int errno = nativeTerminalDevice.setReadConfigurationMode0(Math.min(255, timoutByteValue), Math.min(255, minimumBytesValue)); + ErrnoToException.throwFromErrno(errno, "port is not invalid."); + } + + public final ReadConfiguration getReadConfigurationMode() { + return ReadConfiguration.getFromNativeReadConfig(nativeTerminalDevice.getReadConfigurationMode0()); + } + + public final long writeBuffer(final String buffer) throws NoSuchDeviceException, + PermissionDeniedException, + BrokenPipeException, + InvalidPortException, + NoAvailableTtyDevicesException { + final long numberOfWrittenBytes = nativeTerminalDevice.writeBuffer0(buffer, buffer.length()); + String message; + if (numberOfWrittenBytes == -1) { + message = "Write Permission [O_WRONLY] isnot granted, [Permissions: " + permissionsDescription + "]"; + } else { + message = "Invalid Port " + nativeTerminalDevice.getSerialPort().getPath(); + } + if (numberOfWrittenBytes < 1) { + ErrnoToException.throwFromErrno(nativeTerminalDevice.getErrno0(), message); + } + return numberOfWrittenBytes; + } + + public long writeData(final int data) throws NoSuchDeviceException, + PermissionDeniedException, + BrokenPipeException, + InvalidPortException, + NoAvailableTtyDevicesException { + final long numberOfWrittenBytes = nativeTerminalDevice.writeData0(data); + String message; + if (numberOfWrittenBytes == -1) { + message = "Write Permission [O_WRONLY] isnot granted."; + } else { + message = "Invalid Port " + nativeTerminalDevice.getSerialPort().getPath(); + } + if (numberOfWrittenBytes < 0) { + ErrnoToException.throwFromErrno(nativeTerminalDevice.getErrno0(), message); + } + return numberOfWrittenBytes; + } + + public long writeData(final int[] data) throws NoSuchDeviceException, + PermissionDeniedException, + BrokenPipeException, + InvalidPortException, + NoAvailableTtyDevicesException { + long numberOfWrittenBytes = 0; + for (int i = 0; i < data.length; i++) { + numberOfWrittenBytes += this.writeData(data[i]); + if (numberOfWrittenBytes < 0) { + break; + } + } + return numberOfWrittenBytes; + } + + public final long readData() { + return nativeTerminalDevice.readData0(); + } + + public final long readBuffer() { + return nativeTerminalDevice.readBuffer0(); + } + + public final String getReadBuffer() { + return nativeTerminalDevice.getReadBuffer(); + } + + public final int getBaudRate() throws NoSuchDeviceException, + PermissionDeniedException, + BrokenPipeException, + InvalidPortException, + NoAvailableTtyDevicesException { + if (isSerial4jLoggingEnabled()) { + LOGGER.log(Level.INFO, "Getting device baud"); + } + final int errno = nativeTerminalDevice.getBaudRate0(); + ErrnoToException.throwFromErrno(errno, getSerialPort().getPath()); + return errno; + } + + public final String[] getSerialPorts() throws NoSuchDeviceException, + PermissionDeniedException, + BrokenPipeException, + InvalidPortException, + NoAvailableTtyDevicesException { + fetchSerialPorts(); + return nativeTerminalDevice.getSerialPorts(); + } + + public void throwExceptionFromNativeErrno() throws NoSuchDeviceException, + PermissionDeniedException, + BrokenPipeException, + InvalidPortException, + NoAvailableTtyDevicesException { + final int errno = nativeTerminalDevice.getErrno0(); + ErrnoToException.throwFromErrno(errno, "Native Errno: " + errno); + } + + public void closePort() throws NoSuchDeviceException, + PermissionDeniedException, + BrokenPipeException, + InvalidPortException, + NoAvailableTtyDevicesException { + if (isSerial4jLoggingEnabled()) { + LOGGER.log(Level.INFO, "Closing port: " + getSerialPort().getPath()); + } + final int errno = nativeTerminalDevice.closePort0(); + ErrnoToException.throwFromErrno(errno, getSerialPort().getPath()); + } + + public void setSerial4jLoggingEnabled(final boolean loggingEnabled) { + this.loggingEnabled = loggingEnabled; + } + + public final boolean isSerial4jLoggingEnabled() { + return loggingEnabled; + } + + public final char[] getReadData() { + return nativeTerminalDevice.getReadData(); + } + + public final InputStream getInputStream() { + return inputStream; + } + + public final OutputStream getOutputStream() { + return outputStream; + } + + public final SerialPort getSerialPort() { + return nativeTerminalDevice.getSerialPort(); + } + + private void fetchSerialPorts() throws NoSuchDeviceException, + PermissionDeniedException, + BrokenPipeException, + InvalidPortException, + NoAvailableTtyDevicesException { + if (isSerial4jLoggingEnabled()) { + LOGGER.log(Level.INFO, "Fetching Serial ports."); + } + final int errno = nativeTerminalDevice.fetchSerialPorts0(); + ErrnoToException.throwFromErrno(errno, "No available devices !"); + } + + private boolean isOperationFailed(final int returnValue) { + return returnValue == Errno.ERR_OPERATION_FAILED.getValue(); + } + + private boolean isErrnoAvailable(final int errno) { + return errno > 0; + } +} \ No newline at end of file diff --git a/HelloSerial4j/src/main/java/com/serial4j/core/serial/control/TerminalControlFlag.java b/HelloSerial4j/src/main/java/com/serial4j/core/serial/control/TerminalControlFlag.java new file mode 100644 index 00000000..e0865989 --- /dev/null +++ b/HelloSerial4j/src/main/java/com/serial4j/core/serial/control/TerminalControlFlag.java @@ -0,0 +1,54 @@ +/* + * BSD 3-Clause License + * + * Copyright (c) 2022, Scrappers Team, The AVR-Sandbox Project, Serial4j API. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package com.serial4j.core.serial.control; + +public final class TerminalControlFlag extends TerminalFlag { + + public static final TerminalControlFlag EMPTY_INSTANCE = new TerminalControlFlag(0); + public static final TerminalControlFlag CIBAUD = new TerminalControlFlag(002003600000); + public static final TerminalControlFlag CS5 = new TerminalControlFlag(0000000); + public static final TerminalControlFlag CS6 = new TerminalControlFlag(0000020); + public static final TerminalControlFlag CS7 = new TerminalControlFlag(0000040); + public static final TerminalControlFlag CS8 = new TerminalControlFlag(0000060); + public static final TerminalControlFlag CLOCAL = new TerminalControlFlag(0004000); + public static final TerminalControlFlag CREAD = new TerminalControlFlag(0000200); + public static final TerminalControlFlag CMSPAR = new TerminalControlFlag(010000000000); + public static final TerminalControlFlag CRTSCTS = new TerminalControlFlag(020000000000); + public static final TerminalControlFlag CSTOPB = new TerminalControlFlag(0000100); + public static final TerminalControlFlag HUPCL = new TerminalControlFlag(0002000); + public static final TerminalControlFlag PARENB = new TerminalControlFlag(0000400); + public static final TerminalControlFlag PARODD = new TerminalControlFlag(0001000); + + protected TerminalControlFlag(final long value) { + super(value); + } +} diff --git a/HelloSerial4j/src/main/java/com/serial4j/core/serial/control/TerminalFlag.java b/HelloSerial4j/src/main/java/com/serial4j/core/serial/control/TerminalFlag.java new file mode 100644 index 00000000..a1104961 --- /dev/null +++ b/HelloSerial4j/src/main/java/com/serial4j/core/serial/control/TerminalFlag.java @@ -0,0 +1,138 @@ +/* + * BSD 3-Clause License + * + * Copyright (c) 2022, Scrappers Team, The AVR-Sandbox Project, Serial4j API. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package com.serial4j.core.serial.control; + +import java.lang.Long; + +/** + * Represents the base implementation for the termios.h terminal flags values. + * + * @author pavl_g. + */ +public abstract class TerminalFlag { + + private long value; + + /** + * Instantiates a termios flag with a value to be settled from the native side. + * @param value the value of the termios flag. + */ + protected TerminalFlag(final long value) { + this.value = value; + } + + /** + * Appends a flag's value into the current one's value. + * + * @param flag a flag to append to this instance. + * @return this flag instance for chained append. + */ + public TerminalFlag append(final TerminalFlag flag) { + this.value |= flag.getValue(); + return this; + } + + /** + * Disables a flag from the current one value. + * + * @param flag a flag to disable. + * @return this flag instance for chained call. + */ + public TerminalFlag disable(final TerminalFlag flag) { + this.value &= ~flag.getValue(); + return this; + } + + /** + * Appends a list of flags' values into the current one's value. + * + * @param flags an args representing the flags list to append. + * @return this flag instance for chained append. + */ + public TerminalFlag append(final TerminalFlag...flags) { + for (int i = 0; i < flags.length; i++) { + append(flags[i]); + } + return this; + } + + /** + * Disables a list of flags from the current flag instance. + * + * @param flags flags to disable. + * @return this flag instance for chained call. + */ + public TerminalFlag disable(final TerminalFlag...flags) { + for (int i = 0; i < flags.length; i++) { + disable(flags[i]); + } + return this; + } + + /** + * Enables all the terminal flags for this instance. + * + * @return this instance for chained call. + */ + public TerminalFlag enableAll() { + this.value = Long.MAX_VALUE; + return this; + } + + /** + * Disables all the terminal flags for this instance. + * + * @return this instance for chained call. + */ + public TerminalFlag disableAll() { + this.value = 0; + return this; + } + + /** + * Gets the value of the specified termios flag. + * + * @return the value of the terminal flag. + */ + public long getValue() { + return value; + } + + /** + * Adjusts the value of the specified termios flag. + * + * @param value the value of the terminal flag. + */ + public void setValue(final long value) { + this.value = value; + } +} \ No newline at end of file diff --git a/HelloSerial4j/src/main/java/com/serial4j/core/serial/control/TerminalInputFlag.java b/HelloSerial4j/src/main/java/com/serial4j/core/serial/control/TerminalInputFlag.java new file mode 100644 index 00000000..85203de0 --- /dev/null +++ b/HelloSerial4j/src/main/java/com/serial4j/core/serial/control/TerminalInputFlag.java @@ -0,0 +1,59 @@ +/* + * BSD 3-Clause License + * + * Copyright (c) 2022, Scrappers Team, The AVR-Sandbox Project, Serial4j API. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package com.serial4j.core.serial.control; + +/** + * Provides Unix [c_iflag] termios bits. + * + * @author pavl_g. + */ +public final class TerminalInputFlag extends TerminalFlag { + + public static final TerminalInputFlag EMPTY_INSTANCE = new TerminalInputFlag(0); + public static final TerminalInputFlag BRKINT = new TerminalInputFlag(0000002); + public static final TerminalInputFlag ICRNL = new TerminalInputFlag(0000400); + public static final TerminalInputFlag IGNBRK = new TerminalInputFlag(0000001); + public static final TerminalInputFlag IGNCR = new TerminalInputFlag(0000200); + public static final TerminalInputFlag IMAXBEL = new TerminalInputFlag(0020000); + public static final TerminalInputFlag INLCR = new TerminalInputFlag(0000100); + public static final TerminalInputFlag INPCK = new TerminalInputFlag(0000020); + public static final TerminalInputFlag ISTRIP = new TerminalInputFlag(0000040); + public static final TerminalInputFlag IUTF8 = new TerminalInputFlag(0040000); + public static final TerminalInputFlag IXANY = new TerminalInputFlag(0004000); + public static final TerminalInputFlag IXOFF = new TerminalInputFlag(0010000); + public static final TerminalInputFlag IXON = new TerminalInputFlag(0002000); + public static final TerminalInputFlag PARMRK = new TerminalInputFlag(0000010); + + protected TerminalInputFlag(final long value) { + super(value); + } +} diff --git a/HelloSerial4j/src/main/java/com/serial4j/core/serial/control/TerminalLocalFlag.java b/HelloSerial4j/src/main/java/com/serial4j/core/serial/control/TerminalLocalFlag.java new file mode 100644 index 00000000..3542addd --- /dev/null +++ b/HelloSerial4j/src/main/java/com/serial4j/core/serial/control/TerminalLocalFlag.java @@ -0,0 +1,56 @@ +/* + * BSD 3-Clause License + * + * Copyright (c) 2022, Scrappers Team, The AVR-Sandbox Project, Serial4j API. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package com.serial4j.core.serial.control; + +public final class TerminalLocalFlag extends TerminalFlag { + + public static final TerminalLocalFlag EMPTY_INSTANCE = new TerminalLocalFlag(0); + public static final TerminalLocalFlag ECHO = new TerminalLocalFlag(0000010); + public static final TerminalLocalFlag ECHOCTL = new TerminalLocalFlag(0001000); + public static final TerminalLocalFlag ECHOE = new TerminalLocalFlag(0000020); + public static final TerminalLocalFlag ECHOK = new TerminalLocalFlag(0000040); + public static final TerminalLocalFlag ECHOKE = new TerminalLocalFlag(0004000); + public static final TerminalLocalFlag ECHONL = new TerminalLocalFlag(0000100); + public static final TerminalLocalFlag ECHOPRT = new TerminalLocalFlag(0002000); + public static final TerminalLocalFlag FLUSHO = new TerminalLocalFlag(0010000); + public static final TerminalLocalFlag ICANON = new TerminalLocalFlag(0000002); + public static final TerminalLocalFlag IEXTEN = new TerminalLocalFlag(0100000); + public static final TerminalLocalFlag ISIG = new TerminalLocalFlag(0000001); + public static final TerminalLocalFlag NOFLSH = new TerminalLocalFlag(0000200); + public static final TerminalLocalFlag PENDIN = new TerminalLocalFlag(0040000); + public static final TerminalLocalFlag TOSTOP = new TerminalLocalFlag(0000400); + public static final TerminalLocalFlag XCASE = new TerminalLocalFlag(0000004); + + protected TerminalLocalFlag(final long value) { + super(value); + } +} diff --git a/HelloSerial4j/src/main/java/com/serial4j/core/serial/control/TerminalOutputFlag.java b/HelloSerial4j/src/main/java/com/serial4j/core/serial/control/TerminalOutputFlag.java new file mode 100644 index 00000000..79c9c65d --- /dev/null +++ b/HelloSerial4j/src/main/java/com/serial4j/core/serial/control/TerminalOutputFlag.java @@ -0,0 +1,65 @@ +/* + * BSD 3-Clause License + * + * Copyright (c) 2022, Scrappers Team, The AVR-Sandbox Project, Serial4j API. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package com.serial4j.core.serial.control; + +public final class TerminalOutputFlag extends TerminalFlag { + + public static final TerminalOutputFlag EMPTY_INSTANCE = new TerminalOutputFlag(0); + public static final TerminalOutputFlag BS0 = new TerminalOutputFlag(0000000); + public static final TerminalOutputFlag BS1 = new TerminalOutputFlag(0020000); + public static final TerminalOutputFlag CR0 = new TerminalOutputFlag(0000000); + public static final TerminalOutputFlag CR1 = new TerminalOutputFlag(0001000); + public static final TerminalOutputFlag CR2 = new TerminalOutputFlag(0002000); + public static final TerminalOutputFlag CR3 = new TerminalOutputFlag(0003000); + public static final TerminalOutputFlag FF0 = new TerminalOutputFlag(0000000); + public static final TerminalOutputFlag FF1 = new TerminalOutputFlag(0100000); + public static final TerminalOutputFlag NL0 = new TerminalOutputFlag(0000000); + public static final TerminalOutputFlag NL1 = new TerminalOutputFlag(0000400); + public static final TerminalOutputFlag OCRNL = new TerminalOutputFlag(0000010); + public static final TerminalOutputFlag OFDEL = new TerminalOutputFlag(0000200); + public static final TerminalOutputFlag OFILL = new TerminalOutputFlag(0000100); + public static final TerminalOutputFlag OLCUC = new TerminalOutputFlag(0000002); + public static final TerminalOutputFlag ONLCR = new TerminalOutputFlag(0000004); + public static final TerminalOutputFlag ONLRET = new TerminalOutputFlag(0000040); + public static final TerminalOutputFlag ONOCR = new TerminalOutputFlag(0000020); + public static final TerminalOutputFlag OPOST = new TerminalOutputFlag(0000001); + public static final TerminalOutputFlag TAB0 = new TerminalOutputFlag(0000000); + public static final TerminalOutputFlag TAB1 = new TerminalOutputFlag(0004000); + public static final TerminalOutputFlag TAB2 = new TerminalOutputFlag(0010000); + public static final TerminalOutputFlag TAB3 = new TerminalOutputFlag(0014000); + public static final TerminalOutputFlag VT0 = new TerminalOutputFlag(0000000); + public static final TerminalOutputFlag VT1 = new TerminalOutputFlag(0040000); + + protected TerminalOutputFlag(final long value) { + super(value); + } +} diff --git a/HelloSerial4j/src/main/java/com/serial4j/core/serial/entity/EntityStatus.java b/HelloSerial4j/src/main/java/com/serial4j/core/serial/entity/EntityStatus.java new file mode 100644 index 00000000..8743000e --- /dev/null +++ b/HelloSerial4j/src/main/java/com/serial4j/core/serial/entity/EntityStatus.java @@ -0,0 +1,64 @@ +/* + * BSD 3-Clause License + * + * Copyright (c) 2022, Scrappers Team, The AVR-Sandbox Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package com.serial4j.core.serial.entity; + +/** + * Represents the serial entity status listener. + * + * @param generic type for the {@link SerialMonitorEntity} type, either {@link serial.entity.impl.SerialWriteEntity} + * or {@link serial.entity.impl.SerialReadEntity}. + * + * @author pavl_g. + */ +public interface EntityStatus { + + /** + * Fired when the serial entity is initialized on the first monitor update. + * + * @param serialMonitorEntity the serial entity object. + */ + void onSerialEntityInitialized(final T serialMonitorEntity); + + /** + * Fired when the serial entity is terminated on the last monitor update. + * + * @param serialMonitorEntity the serial entity object. + */ + void onSerialEntityTerminated(final T serialMonitorEntity); + + /** + * Fired on each serial monitor update. + * + * @param serialMonitorEntity the serial entity object. + */ + void onUpdate(final T serialMonitorEntity); +} diff --git a/HelloSerial4j/src/main/java/com/serial4j/core/serial/entity/SerialMonitorEntity.java b/HelloSerial4j/src/main/java/com/serial4j/core/serial/entity/SerialMonitorEntity.java new file mode 100644 index 00000000..22b3af27 --- /dev/null +++ b/HelloSerial4j/src/main/java/com/serial4j/core/serial/entity/SerialMonitorEntity.java @@ -0,0 +1,216 @@ +/* + * BSD 3-Clause License + * + * Copyright (c) 2022, Scrappers Team, The AVR-Sandbox Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package com.serial4j.core.serial.entity; + +import com.serial4j.core.serial.TerminalDevice; +import com.serial4j.core.serial.monitor.SerialDataListener; +import com.serial4j.core.serial.monitor.SerialMonitor; +import com.serial4j.core.util.process.Semaphore; +import java.util.logging.Logger; +import java.util.logging.Level; +import java.io.Closeable; +import java.io.IOException; +import java.util.ArrayList; + +/** + * Represents the base implementation for serial monitor Read and Write entities. + * @see serial.entity.impl.SerialWriteEntity + * @see serial.entity.impl.SerialReadEntity + * + * @author pavl_g. + */ +public abstract class SerialMonitorEntity implements Runnable { + + protected final Semaphore.Mutex MUTEX = new Semaphore.Mutex(); + protected final Semaphore SEMAPHORE = Semaphore.build(MUTEX); + + private final Logger entityLogger; + private boolean hasLoggedMonitor; + private final SerialMonitor serialMonitor; + private final String entityName; + + /** + * Defines a serial monitor basic entity. + * + * @param serialMonitor the monitor object. + * @param entityName the entity name. + */ + public SerialMonitorEntity(SerialMonitor serialMonitor, String entityName) { + this.serialMonitor = serialMonitor; + this.entityName = entityName; + + entityLogger = Logger.getLogger(entityName); + initMutexWithLockData(); + } + + @Override + public void run() { + /* using re-entrant block to be optimized by the new vthreads system */ + SEMAPHORE.lock(this); + if (!hasLoggedMonitor) { + entityLogger.log(Level.INFO, "Started data monitoring for " + entityName + " thread " + Thread.currentThread()); + } + onDataMonitored(getSerialMonitor()); + SEMAPHORE.unlock(this); + } + + /** + * Terminates this entity by closing the entity stream and the serial port. + */ + protected void terminate() { + try { + getEntityStream().close(); + hasLoggedMonitor = false; + entityLogger.log(Level.WARNING, "Terminated data monitoring for " + entityName + " thread " + Thread.currentThread()); + } catch (IOException e) { + e.printStackTrace(); + } + synchronized (SerialMonitorEntity.class) { + if (getTerminalDevice().getSerialPort().isPortOpened()) { + try { + getTerminalDevice().closePort(); + } catch (Exception e) { + e.printStackTrace(); + } + } + } + } + + /** + * Tests whether return carriage [\n\r] and new line is enabled. + * + * @return true if [\n\r] check is enabled, default value is [true]. + */ + protected boolean isUsingReturnCarriage() { + return getSerialMonitor().isUsingReturnCarriage(); + } + + /** + * Tests whether serial data monitoring has started. + * + * @return true if data monitor has started, default value is [false]. + */ + protected boolean isMonitoringStarted() { + return getSerialMonitor().isMonitoringStarted; + } + + /** + * Sets the monitor started state. + * + * @param state true to indicate the monitor has started and to start the data + * writing, false otherwise. + */ + protected void setMonitoringStarted(boolean state) { + getSerialMonitor().isMonitoringStarted = state; + } + + /** + * Retrieves the {@link SerialMonitor} instance. + * + * @return the serial monitor object that holds this entity. + */ + public SerialMonitor getSerialMonitor() { + return serialMonitor; + } + + /** + * Retrieves the {@link TerminalDevice} instance used for creating the communication. + * + * @return a serial port instance. + */ + protected TerminalDevice getTerminalDevice() { + return getSerialMonitor().getTerminalDevice(); + } + + /** + * Retrieves the serial data listeners list. + * + * @return a list instance representing the serial data listeners. + */ + protected ArrayList getSerialDataListeners() { + return getSerialMonitor().getSerialDataListeners(); + } + + /** + * Tests whether the serial monitor holding this entity terminated. + * @see SerialMonitor#setTerminate() + * + * @return true if the serial monitor has been terminated by the user, default value is false. + */ + protected boolean isTerminate() { + return getSerialMonitor().isTerminate(); + } + + /** + * Fired on each update run. + * + * @param serialMonitor the serial monitor that holds this entity. + */ + protected abstract void onDataMonitored(final SerialMonitor serialMonitor); + + /** + * Gets the entity status listener. + * + * @return the serial entity status listener. + */ + protected abstract EntityStatus getSerialEntityStatusListener(); + + /** + * Tests whether the entity is initialized. + * + * @return true if the serial entity has been initialized, false otherwise, default value is false. + */ + protected abstract boolean isSerialEntityInitialized(); + + /** + * Sets the serial entity initialized status. + * + * @see SerialMonitor#isReadSerialEntityInitialized + * @see SerialMonitor#isWriteSerialEntityInitialized + * + * @param state a state to set. + */ + protected abstract void setSerialEntityInitialized(boolean state); + + /** + * Gets the entity stream provided by the {@link SerialPort}, either {@link java.io.OutputStream} + * or {@link java.io.InputStream}. + * + * @return a stream provided by the SerialPort. + */ + protected abstract Closeable getEntityStream(); + + private void initMutexWithLockData() { + MUTEX.setLockData(this); + MUTEX.setMonitorObject(this); + } +} diff --git a/HelloSerial4j/src/main/java/com/serial4j/core/serial/entity/impl/SerialReadEntity.java b/HelloSerial4j/src/main/java/com/serial4j/core/serial/entity/impl/SerialReadEntity.java new file mode 100644 index 00000000..3743258c --- /dev/null +++ b/HelloSerial4j/src/main/java/com/serial4j/core/serial/entity/impl/SerialReadEntity.java @@ -0,0 +1,143 @@ +/* + * BSD 3-Clause License + * + * Copyright (c) 2022, Scrappers Team, The AVR-Sandbox Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package com.serial4j.core.serial.entity.impl; + +import com.serial4j.core.serial.entity.EntityStatus; +import com.serial4j.core.serial.entity.SerialMonitorEntity; +import com.serial4j.core.serial.monitor.SerialMonitor; +import com.serial4j.core.serial.monitor.SerialMonitorException; +import java.io.IOException; +import java.io.InputStream; + +/** + * Represents a Read entity for the {@link SerialMonitor}. + * Use {@link SerialMonitor#startDataMonitoring(String, int)} to start this entity. + * + * @author pavl_g. + */ +public class SerialReadEntity extends SerialMonitorEntity { + + private StringBuffer stringBuffer = new StringBuffer(); + + /** + * Defines a read entity instance to read serial data from UART. + * Use {@link SerialMonitor#startDataMonitoring(String, int)} to start this entity. + * + * @param serialMonitor the head serial monitor object. + */ + public SerialReadEntity(final SerialMonitor serialMonitor) { + super(serialMonitor, SerialReadEntity.class.getName()); + } + + @Override + protected void onDataMonitored(SerialMonitor serialMonitor) { + for (; ; ) { + /* throws if not initialized yet */ + if (getTerminalDevice() == null) { + throw new SerialMonitorException(SerialMonitorException.DEFAULT_MSG); + } + + /* sanity check [terminate] flag */ + if (isTerminate()) { + terminate(); + if (getSerialEntityStatusListener() != null) { + getSerialEntityStatusListener().onSerialEntityTerminated(this); + } + return; + } + + if (!isSerialEntityInitialized()) { + if (getSerialEntityStatusListener() != null) { + getSerialEntityStatusListener().onSerialEntityInitialized(this); + } + setSerialEntityInitialized(true); + } + + if (getSerialEntityStatusListener() != null) { + getSerialEntityStatusListener().onUpdate(this); + } + + /* execute serial data tasks */ + for (int i = 0; i < getSerialDataListeners().size(); i++) { + try { + final int count = getEntityStream().available(); + if (count != 0) { + final char data = (char) getEntityStream().read(); + + /* send characters serially */ + getSerialDataListeners().get(i).onDataReceived(data); + + /* get a string buffer from a data frame */ + /* send data frames separated by [\n\r] the return carriage/newline */ + stringBuffer.append(data); + + if (isUsingReturnCarriage()) { + if (stringBuffer.toString().contains("\n\r")) { + getSerialDataListeners().get(i).onDataReceived(stringBuffer.toString()); + stringBuffer = new StringBuffer(); + } + } else { + getSerialDataListeners().get(i).onDataReceived(stringBuffer.toString()); + stringBuffer = new StringBuffer(); + } + } + } catch (IOException e) { + e.printStackTrace(); + } + } + + if (!isMonitoringStarted()) { + setMonitoringStarted(true); + } + } + } + + @Override + protected InputStream getEntityStream() { + return getSerialMonitor().getReadEntityStream(); + } + + @Override + protected boolean isSerialEntityInitialized() { + return getSerialMonitor().isReadSerialEntityInitialized; + } + + @Override + protected void setSerialEntityInitialized(final boolean state) { + getSerialMonitor().isReadSerialEntityInitialized = state; + } + + @Override + protected EntityStatus getSerialEntityStatusListener() { + return getSerialMonitor().serialReadEntityEntityStatus; + } +} diff --git a/HelloSerial4j/src/main/java/com/serial4j/core/serial/entity/impl/SerialWriteEntity.java b/HelloSerial4j/src/main/java/com/serial4j/core/serial/entity/impl/SerialWriteEntity.java new file mode 100644 index 00000000..9dcce97b --- /dev/null +++ b/HelloSerial4j/src/main/java/com/serial4j/core/serial/entity/impl/SerialWriteEntity.java @@ -0,0 +1,177 @@ +/* + * BSD 3-Clause License + * + * Copyright (c) 2022, Scrappers Team, The AVR-Sandbox Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package com.serial4j.core.serial.entity.impl; + +import com.serial4j.core.serial.entity.EntityStatus; +import com.serial4j.core.serial.entity.SerialMonitorEntity; +import com.serial4j.core.serial.monitor.SerialMonitor; +import com.serial4j.core.serial.monitor.SerialMonitorException; +import java.io.IOException; +import java.io.OutputStream; +import java.util.ArrayList; + +/** + * Represents a serial write data entity for the {@link SerialMonitor}. + * Use {@link SerialMonitor#startDataMonitoring(String, int)} to start this entity. + * + * @author pavl_g. + */ +public class SerialWriteEntity extends SerialMonitorEntity { + + private final ArrayList writableCapsules = new ArrayList<>(); + + public SerialWriteEntity(final SerialMonitor serialMonitor) { + super(serialMonitor, SerialWriteEntity.class.getName()); + } + + @Override + protected void onDataMonitored(SerialMonitor serialMonitor) { + for (; ; ) { + /* throws if not initialized yet */ + if (getTerminalDevice() == null) { + throw new SerialMonitorException(SerialMonitorException.DEFAULT_MSG); + } + + /* sanity check [terminate] flag */ + if (isTerminate()) { + terminate(); + if (getSerialEntityStatusListener() != null) { + getSerialEntityStatusListener().onSerialEntityTerminated(this); + } + return; + } + + /* sanity check data monitoring status */ + if (!isMonitoringStarted()) { + continue; + } + + /* initialize and update serial entity */ + if (!isSerialEntityInitialized()) { + if (getSerialEntityStatusListener() != null) { + getSerialEntityStatusListener().onSerialEntityInitialized(this); + } + setSerialEntityInitialized(true); + } + + if (getSerialEntityStatusListener() != null) { + getSerialEntityStatusListener().onUpdate(this); + } + + /* write required data */ + for (WritableCapsule capsule : writableCapsules) { + /* skip capsules with written data */ + if (capsule.isDataWritten()) { + continue; + } + /* send capsule data to the UART */ + final String data = capsule.getData(); + for (int j = 0; j < data.length(); j++) { + sendToUART(data.charAt(j)); + for (int k = 0; k < getSerialDataListeners().size(); k++) { + getSerialDataListeners().get(k).onDataTransmitted(data.charAt(j)); + } + } + capsule.setDataWritten(true); + } + } + } + + @Override + protected OutputStream getEntityStream() { + return getSerialMonitor().getWriteEntityStream(); + } + + @Override + protected boolean isSerialEntityInitialized() { + return getSerialMonitor().isWriteSerialEntityInitialized; + } + + @Override + protected void setSerialEntityInitialized(boolean state) { + getSerialMonitor().isWriteSerialEntityInitialized = state; + } + + @Override + protected EntityStatus getSerialEntityStatusListener() { + return getSerialMonitor().serialWriteEntityEntityStatus; + } + + /** + * Gets the Serial writable Capsules holding the writable data. + * + * @return an array list of the writable capsules. + */ + public ArrayList getSerialWriteCapsules() { + return writableCapsules; + } + + /** + * Adds a new writable capsule, the data will be extracted during the + * next update run. + * + * @param writableCapsule a new {@link WritableCapsule} to add. + */ + public synchronized void addWritableCapsule(final WritableCapsule writableCapsule) { + if (writableCapsules.contains(writableCapsule)) { + return; + } + writableCapsules.add(writableCapsule); + } + + /** + * Removes a writable capsule from the list of serial data capsules. + * + * @param writableCapsule an instance of the {@link WritableCapsule}. + */ + public void removeWritableCapsule(final WritableCapsule writableCapsule) { + if (!writableCapsules.contains(writableCapsule)) { + return; + } + writableCapsules.remove(writableCapsule); + } + + /** + * Internal-Use-Only. + * + * Sends data to the {@link OutputStream} of {@link com.fazecast.jSerialComm.SerialPort}. + * + * @param data the data to send in integers. + */ + private void sendToUART(final int data) { + try { + getEntityStream().write(data); + } catch (IOException e) { + e.printStackTrace(); + } + } +} diff --git a/HelloSerial4j/src/main/java/com/serial4j/core/serial/entity/impl/WritableCapsule.java b/HelloSerial4j/src/main/java/com/serial4j/core/serial/entity/impl/WritableCapsule.java new file mode 100644 index 00000000..778bd5c9 --- /dev/null +++ b/HelloSerial4j/src/main/java/com/serial4j/core/serial/entity/impl/WritableCapsule.java @@ -0,0 +1,81 @@ +/* + * BSD 3-Clause License + * + * Copyright (c) 2022, Scrappers Team, The AVR-Sandbox Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package com.serial4j.core.serial.entity.impl; + +/** + * Represents a serial write capsule for the {@link SerialWriteEntity}. + * + * @author pavl_g. + */ +public final class WritableCapsule implements Cloneable { + + private String data; + private boolean dataWritten; + + /** + * Specifies the data to be written on the next update of the + * SerialWriteEntity. + * + * @param data the data to be written to the UART. + */ + public void write(final String data) { + this.data = data; + } + + /** + * Retrieves the data of the capsule. + * + * @return the data in string. + */ + public String getData() { + return data; + } + + /** + * Tests whether data is written to the UART. + * + * @return true if the data is written to the UART, false otherwise. + */ + public boolean isDataWritten() { + return dataWritten; + } + + /** + * Sets the flag for data write to the serial UART, where; true commands and + * stops the data write to the serial UART, false otherwise. + * + * @param dataWritten true to keep writing data in the next update, false otherwise. + */ + public void setDataWritten(boolean dataWritten) { + this.dataWritten = dataWritten; + } +} diff --git a/HelloSerial4j/src/main/java/com/serial4j/core/serial/entity/impl/package-info.java b/HelloSerial4j/src/main/java/com/serial4j/core/serial/entity/impl/package-info.java new file mode 100644 index 00000000..97c74d89 --- /dev/null +++ b/HelloSerial4j/src/main/java/com/serial4j/core/serial/entity/impl/package-info.java @@ -0,0 +1,39 @@ +/* + * BSD 3-Clause License + * + * Copyright (c) 2022, Scrappers Team, The AVR-Sandbox Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * An implementation code for {@link serial.entity.SerialMonitorEntity} providing both read and + * write serial monitor entities. + * + * @author pavl_g. + */ +package com.serial4j.core.serial.entity.impl; \ No newline at end of file diff --git a/HelloSerial4j/src/main/java/com/serial4j/core/serial/entity/package-info.java b/HelloSerial4j/src/main/java/com/serial4j/core/serial/entity/package-info.java new file mode 100644 index 00000000..259b49bf --- /dev/null +++ b/HelloSerial4j/src/main/java/com/serial4j/core/serial/entity/package-info.java @@ -0,0 +1,38 @@ +/* + * BSD 3-Clause License + * + * Copyright (c) 2022, Scrappers Team, The AVR-Sandbox Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * Provides R/W serial monitor entities with a subscriber pattern. + * + * @author pavl_g. + */ +package com.serial4j.core.serial.entity; \ No newline at end of file diff --git a/HelloSerial4j/src/main/java/com/serial4j/core/serial/monitor/SerialDataListener.java b/HelloSerial4j/src/main/java/com/serial4j/core/serial/monitor/SerialDataListener.java new file mode 100644 index 00000000..d6c4d1d3 --- /dev/null +++ b/HelloSerial4j/src/main/java/com/serial4j/core/serial/monitor/SerialDataListener.java @@ -0,0 +1,70 @@ +/* + * BSD 3-Clause License + * + * Copyright (c) 2022, Scrappers Team, The AVR-Sandbox Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package com.serial4j.core.serial.monitor; + +/** + * Listens to Serial Monitor entities {@link serial.entity.impl.SerialReadEntity} and {@link serial.entity.impl.SerialWriteEntity}. + * + * @author pavl_g. + */ +public interface SerialDataListener { + + /** + * Dispatched when the data is received at the {@link serial.entity.impl.SerialReadEntity} end + * on its thread. + * + * This method is dispatched on the {@link serial.entity.impl.SerialReadEntity} thread. + * + * @param data the data received serially in 8-bit format. + */ + void onDataReceived(final int data); + + /** + * Dispatched when the capsular data is transmitted at the {@link serial.entity.impl.SerialWriteEntity} + * end on its thread. + * + * This method is dispatched on the {@link serial.entity.impl.SerialWriteEntity} thread. + * + * @param data the data transmitted serially in 8-bit format. + */ + void onDataTransmitted(final int data); + + /** + * Dispatched whenever a data frame is completely received at the {@link serial.entity.impl.SerialReadEntity} end + * when [Return-Carriage/Newline] check is enabled as it specifies a particular data frame. + * + * This method is dispatched on the {@link serial.entity.impl.SerialReadEntity} thread. + * + * @param data the data frame. + */ + void onDataReceived(final String data); +} diff --git a/HelloSerial4j/src/main/java/com/serial4j/core/serial/monitor/SerialMonitor.java b/HelloSerial4j/src/main/java/com/serial4j/core/serial/monitor/SerialMonitor.java new file mode 100644 index 00000000..533ff021 --- /dev/null +++ b/HelloSerial4j/src/main/java/com/serial4j/core/serial/monitor/SerialMonitor.java @@ -0,0 +1,291 @@ +/* + * BSD 3-Clause License + * + * Copyright (c) 2022, Scrappers Team, The AVR-Sandbox Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package com.serial4j.core.serial.monitor; + +import com.serial4j.core.serial.control.TerminalControlFlag; +import com.serial4j.core.serial.control.TerminalLocalFlag; +import com.serial4j.core.serial.control.TerminalOutputFlag; +import com.serial4j.core.serial.control.TerminalInputFlag; +import com.serial4j.core.serial.ReadConfiguration; +import com.serial4j.core.serial.Permissions; +import com.serial4j.core.serial.BaudRate; +import com.serial4j.core.serial.SerialPort; +import com.serial4j.core.serial.TerminalDevice; +import com.serial4j.core.serial.throwable.PermissionDeniedException; +import com.serial4j.core.serial.throwable.NoAvailableTtyDevicesException; +import com.serial4j.core.serial.throwable.BrokenPipeException; +import com.serial4j.core.serial.throwable.NoSuchDeviceException; +import com.serial4j.core.serial.throwable.InvalidPortException; +import com.serial4j.core.serial.throwable.OperationFailedException; +import com.serial4j.core.serial.entity.impl.SerialReadEntity; +import com.serial4j.core.serial.entity.impl.SerialWriteEntity; +import com.serial4j.core.serial.entity.EntityStatus; +import java.io.FileNotFoundException; +import java.io.InputStream; +import java.io.OutputStream; +import java.util.ArrayList; + +/** + * Monitors the UART Data Port using {@link SerialReadEntity} for serial data read and {@link SerialWriteEntity} for serial + * data write. + * + * @author pavl_g. + */ +public final class SerialMonitor { + + private final ArrayList serialDataListeners = new ArrayList<>(); + private final String monitorName; + + public volatile EntityStatus serialReadEntityEntityStatus; + public volatile EntityStatus serialWriteEntityEntityStatus; + public volatile boolean isReadSerialEntityInitialized; + public volatile boolean isWriteSerialEntityInitialized; + public volatile boolean isMonitoringStarted; + public volatile boolean useReturnCarriage = true; + + private volatile InputStream readEntityStream; + private volatile OutputStream writeEntityStream; + private volatile TerminalDevice terminalDevice; + private volatile boolean terminate = false; + private volatile SerialReadEntity serialReadEntity; + private volatile SerialWriteEntity serialWriteEntity; + + /** + * Instantiates a new SerialMonitor with a name. + * + * Use {@link SerialMonitor#startDataMonitoring(String, int)} to initialize and start + * data monitoring. + * + * @param monitorName the name for this monitor. + */ + public SerialMonitor(final String monitorName) { + this.monitorName = monitorName; + } + + /** + * Initializes and starts data monitoring on a [port] and with a [baudRate] + * + * @param port specify the serial port. + * @param baudRate specify the baud rate aka bits/seconds based for the connected FOsc. + */ + public void startDataMonitoring(final String port, final BaudRate baudRate, final Permissions permissions) throws NoSuchDeviceException, + PermissionDeniedException, + BrokenPipeException, + InvalidPortException, + OperationFailedException, + NoAvailableTtyDevicesException, + FileNotFoundException { + /* ignore timeout strategy */ + terminalDevice = new TerminalDevice(); + terminalDevice.setSerial4jLoggingEnabled(true); + if (permissions != null) { + terminalDevice.setPermissions(permissions); + } + terminalDevice.openPort(new SerialPort(port)); + terminalDevice.setBaudRate(baudRate); + terminalDevice.initTermios(); + /* define terminal flags */ + final TerminalControlFlag TCF_VALUE = (TerminalControlFlag) TerminalControlFlag.CLOCAL + .append(TerminalControlFlag.CS8, TerminalControlFlag.CREAD); + final TerminalLocalFlag TLF_VALUE = (TerminalLocalFlag) TerminalLocalFlag.EMPTY_INSTANCE + .disable(TerminalLocalFlag.ECHO, TerminalLocalFlag.ECHOK, + TerminalLocalFlag.ECHOE, TerminalLocalFlag.ECHOKE, + TerminalLocalFlag.ECHONL, TerminalLocalFlag.ECHOPRT, + TerminalLocalFlag.ECHOCTL, TerminalLocalFlag.ISIG, + TerminalLocalFlag.IEXTEN, TerminalLocalFlag.ICANON); + final TerminalOutputFlag TOF_VALUE = (TerminalOutputFlag) TerminalOutputFlag.EMPTY_INSTANCE + .disable(TerminalOutputFlag.OPOST, TerminalOutputFlag.ONLCR); + final TerminalInputFlag TIF_VALUE = (TerminalInputFlag) TerminalInputFlag.EMPTY_INSTANCE.disableAll(); + + terminalDevice.setTerminalControlFlag(TCF_VALUE); + terminalDevice.setTerminalLocalFlag(TLF_VALUE); + terminalDevice.setTerminalOutputFlag(TOF_VALUE); + terminalDevice.setTerminalInputFlag(TIF_VALUE); + + readEntityStream = terminalDevice.getInputStream(); + writeEntityStream = terminalDevice.getOutputStream(); + + serialWriteEntity = new SerialWriteEntity(this); + Thread.ofPlatform().start(serialWriteEntity); + + serialReadEntity = new SerialReadEntity(this); + Thread.ofPlatform().start(serialReadEntity); + + } + + public String getMonitorName() { + return monitorName; + } + + /** + * Tests whether the monitor is terminated by external means. + * + * @return true if terminated by the user, false otherwise. + */ + public boolean isTerminate() { + return terminate; + } + + /** + * Sets the termination flag to trigger termination on the next update. + */ + public void setTerminate() { + this.terminate = true; + } + + /** + * Gets the serial read input stream. + * + * @return the serial read input stream instance. + */ + public InputStream getReadEntityStream() { + return readEntityStream; + } + + /** + * Gets the terminal device controlling this monitor. + * + * @return the terminal device instance associated with this monitor. + */ + public TerminalDevice getTerminalDevice() { + return terminalDevice; + } + + /** + * Gets the Serial write output stream. + * + * @return an output stream representing this. + */ + public OutputStream getWriteEntityStream() { + return writeEntityStream; + } + + /** + * Gets the serial read entity used for reading data from the serial port using + * {@link SerialMonitor#readEntityStream}. + * + * @see SerialReadEntity + * + * @return the serial monitor read instance. + */ + public SerialReadEntity getSerialReadEntity() { + return serialReadEntity; + } + + /** + * Gets the serial write entity used for writing data to the serial port using + * {@link SerialMonitor#writeEntityStream}. + * + * @see SerialWriteEntity + * + * @return the serial monitor write instance. + */ + public SerialWriteEntity getSerialWriteEntity() { + return serialWriteEntity; + } + + /** + * Adds a new serial data listener to the list of the updatable listeners. + * + * @param serialDataListener the new serial data listener to add. + */ + public void addSerialDataListener(final SerialDataListener serialDataListener) { + if (serialDataListeners.contains(serialDataListener)) { + return; + } + serialDataListeners.add(serialDataListener); + } + + /** + * Removes a serial data listener instance from the list of the list of the updatable listeners. + * + * @param serialDataListener the serial data listener to remove. + */ + public void removeSerialDataListener(final SerialDataListener serialDataListener) { + if (!serialDataListeners.contains(serialDataListener)) { + return; + } + serialDataListeners.remove(serialDataListener); + } + + /** + * Sets the read entity status listener instance to listen for {@link SerialReadEntity} lifecycle. + * + * @param readThreadEntityStatus an instance to set. + */ + public void setReadEntityListener(EntityStatus readThreadEntityStatus) { + this.serialReadEntityEntityStatus = readThreadEntityStatus; + } + + /** + * Sets the write entity status listener instance to listen for {@link SerialWriteEntity} lifecycle. + * + * @param writeThreadEntityStatus an instance to set. + */ + public void setWriteEntityStatus(EntityStatus writeThreadEntityStatus) { + this.serialWriteEntityEntityStatus = writeThreadEntityStatus; + } + + /** + * Tests whether [CR/LF] check is enabled. + * + * @apiNote + * CR: Carriage return, defined by '\r' + * LF: Line Feed, defined by '\n' + * + * @return true if [CR/LF] is enabled, false otherwise. + */ + public boolean isUsingReturnCarriage() { + return useReturnCarriage; + } + + /** + * Triggers the [CR/LF] check state flag. + * + * @param useReturnCarriage true to enable [CR/LF] and return data frames + * at {@link SerialDataListener#onDataReceived(String)}, false to disable + * both the [CR/LF] check and disable {@link SerialDataListener#onDataReceived(String)}. + */ + public void setUseReturnCarriage(boolean useReturnCarriage) { + this.useReturnCarriage = useReturnCarriage; + } + + /** + * Gets the serial data listeners used for listening to data changes at the + * this monitor port. + * + * @return a list of serial data listeners for this monitor. + */ + public ArrayList getSerialDataListeners() { + return serialDataListeners; + } +} diff --git a/HelloSerial4j/src/main/java/com/serial4j/core/serial/monitor/SerialMonitorException.java b/HelloSerial4j/src/main/java/com/serial4j/core/serial/monitor/SerialMonitorException.java new file mode 100644 index 00000000..0cd87c9d --- /dev/null +++ b/HelloSerial4j/src/main/java/com/serial4j/core/serial/monitor/SerialMonitorException.java @@ -0,0 +1,49 @@ +/* + * BSD 3-Clause License + * + * Copyright (c) 2022, Scrappers Team, The AVR-Sandbox Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package com.serial4j.core.serial.monitor; + +/** + * Raised whenever the user tries to access the serial monitor without opening the port. + * + * @author pavl_g. + */ +public class SerialMonitorException extends IllegalStateException { + + /** + * Provides a default message for quick usages. + */ + public static final String DEFAULT_MSG = "Cannot Access the monitor without opening the port !"; + + public SerialMonitorException(String msg) { + super(msg); + } +} diff --git a/HelloSerial4j/src/main/java/com/serial4j/core/serial/monitor/package-info.java b/HelloSerial4j/src/main/java/com/serial4j/core/serial/monitor/package-info.java new file mode 100644 index 00000000..8a3dab6f --- /dev/null +++ b/HelloSerial4j/src/main/java/com/serial4j/core/serial/monitor/package-info.java @@ -0,0 +1,32 @@ +/* + * BSD 3-Clause License + * + * Copyright (c) 2022, Scrappers Team, The AVR-Sandbox Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package com.serial4j.core.serial.monitor; \ No newline at end of file diff --git a/HelloSerial4j/src/main/java/com/serial4j/core/serial/package-info.java b/HelloSerial4j/src/main/java/com/serial4j/core/serial/package-info.java new file mode 100644 index 00000000..3a006311 --- /dev/null +++ b/HelloSerial4j/src/main/java/com/serial4j/core/serial/package-info.java @@ -0,0 +1,39 @@ +/* + * BSD 3-Clause License + * + * Copyright (c) 2022, Scrappers Team, The AVR-Sandbox Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * Provides a Serial UART Monitor API using Serial4j with 2 monitor entities, SerialReadEntity + * and SerialWriteEntity. + * + * @author pavl_g. + */ +package com.serial4j.core.serial; \ No newline at end of file diff --git a/HelloSerial4j/src/main/java/com/serial4j/core/serial/throwable/BadFileDescriptorException.java b/HelloSerial4j/src/main/java/com/serial4j/core/serial/throwable/BadFileDescriptorException.java new file mode 100644 index 00000000..05f5a546 --- /dev/null +++ b/HelloSerial4j/src/main/java/com/serial4j/core/serial/throwable/BadFileDescriptorException.java @@ -0,0 +1,47 @@ +/* + * BSD 3-Clause License + * + * Copyright (c) 2022, Scrappers Team, The AVR-Sandbox Project, Serial4j API. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package com.serial4j.core.serial.throwable; + +import com.serial4j.core.errno.Errno; + +public final class BadFileDescriptorException extends SerialThrowable { + + public BadFileDescriptorException(final String additionalText) { + super(Errno.EBADF.getDescription() + "\n" + additionalText); + } + + @Override + public Errno getCausingErrno() { + return Errno.EBADF; + } + +} \ No newline at end of file diff --git a/HelloSerial4j/src/main/java/com/serial4j/core/serial/throwable/BrokenPipeException.java b/HelloSerial4j/src/main/java/com/serial4j/core/serial/throwable/BrokenPipeException.java new file mode 100644 index 00000000..53450a0e --- /dev/null +++ b/HelloSerial4j/src/main/java/com/serial4j/core/serial/throwable/BrokenPipeException.java @@ -0,0 +1,49 @@ +/* + * BSD 3-Clause License + * + * Copyright (c) 2022, Scrappers Team, The AVR-Sandbox Project, Serial4j API. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package com.serial4j.core.serial.throwable; + +import java.io.IOException; +import com.serial4j.core.errno.Errno; +import com.serial4j.core.serial.throwable.SerialThrowable; + +public final class BrokenPipeException extends SerialThrowable { + + public BrokenPipeException(final String additionalText) { + super(Errno.EPIPE.getDescription() + "\n" + additionalText); + } + + @Override + public Errno getCausingErrno() { + return Errno.EPIPE; + } + +} \ No newline at end of file diff --git a/HelloSerial4j/src/main/java/com/serial4j/core/serial/throwable/ErrnoNotFoundError.java b/HelloSerial4j/src/main/java/com/serial4j/core/serial/throwable/ErrnoNotFoundError.java new file mode 100644 index 00000000..69eff18b --- /dev/null +++ b/HelloSerial4j/src/main/java/com/serial4j/core/serial/throwable/ErrnoNotFoundError.java @@ -0,0 +1,51 @@ +/* + * BSD 3-Clause License + * + * Copyright (c) 2022, Scrappers Team, The AVR-Sandbox Project, Serial4j API. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package com.serial4j.core.serial.throwable; + +import java.lang.Error; + +/** + * Throwed when the API sends an undefined errno from the native side. + * + * @author pavl_g. + */ +public class ErrnoNotFoundError extends Error { + + /** + * Constructs a new instance of this error. + * + * @param message a message to the java error object. + */ + public ErrnoNotFoundError(final String message) { + super(message); + } +} \ No newline at end of file diff --git a/HelloSerial4j/src/main/java/com/serial4j/core/serial/throwable/FileAlreadyOpenedException.java b/HelloSerial4j/src/main/java/com/serial4j/core/serial/throwable/FileAlreadyOpenedException.java new file mode 100644 index 00000000..c3e1fff0 --- /dev/null +++ b/HelloSerial4j/src/main/java/com/serial4j/core/serial/throwable/FileAlreadyOpenedException.java @@ -0,0 +1,47 @@ +/* + * BSD 3-Clause License + * + * Copyright (c) 2022, Scrappers Team, The AVR-Sandbox Project, Serial4j API. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package com.serial4j.core.serial.throwable; + +import com.serial4j.core.errno.Errno; + +public final class FileAlreadyOpenedException extends SerialThrowable { + + public FileAlreadyOpenedException(final String additionalText) { + super(Errno.EEXIST.getDescription() + "\n" + additionalText); + } + + @Override + public Errno getCausingErrno() { + return Errno.EEXIST; + } + +} \ No newline at end of file diff --git a/HelloSerial4j/src/main/java/com/serial4j/core/serial/throwable/FileIsDirectoryException.java b/HelloSerial4j/src/main/java/com/serial4j/core/serial/throwable/FileIsDirectoryException.java new file mode 100644 index 00000000..6d05da05 --- /dev/null +++ b/HelloSerial4j/src/main/java/com/serial4j/core/serial/throwable/FileIsDirectoryException.java @@ -0,0 +1,47 @@ +/* + * BSD 3-Clause License + * + * Copyright (c) 2022, Scrappers Team, The AVR-Sandbox Project, Serial4j API. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package com.serial4j.core.serial.throwable; + +import com.serial4j.core.errno.Errno; + +public final class FileIsDirectoryException extends SerialThrowable { + + public FileIsDirectoryException(final String additionalText) { + super(Errno.EISDIR.getDescription() + "\n" + additionalText); + } + + @Override + public Errno getCausingErrno() { + return Errno.EISDIR; + } + +} \ No newline at end of file diff --git a/HelloSerial4j/src/main/java/com/serial4j/core/serial/throwable/FileTableOverflowException.java b/HelloSerial4j/src/main/java/com/serial4j/core/serial/throwable/FileTableOverflowException.java new file mode 100644 index 00000000..6af3a2fd --- /dev/null +++ b/HelloSerial4j/src/main/java/com/serial4j/core/serial/throwable/FileTableOverflowException.java @@ -0,0 +1,47 @@ +/* + * BSD 3-Clause License + * + * Copyright (c) 2022, Scrappers Team, The AVR-Sandbox Project, Serial4j API. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package com.serial4j.core.serial.throwable; + +import com.serial4j.core.errno.Errno; + +public final class FileTableOverflowException extends SerialThrowable { + + public FileTableOverflowException(final String additionalText) { + super(Errno.ENFILE.getDescription() + "\n" + additionalText); + } + + @Override + public Errno getCausingErrno() { + return Errno.ENFILE; + } + +} \ No newline at end of file diff --git a/HelloSerial4j/src/main/java/com/serial4j/core/serial/throwable/FileTooLargeException.java b/HelloSerial4j/src/main/java/com/serial4j/core/serial/throwable/FileTooLargeException.java new file mode 100644 index 00000000..4005a1a5 --- /dev/null +++ b/HelloSerial4j/src/main/java/com/serial4j/core/serial/throwable/FileTooLargeException.java @@ -0,0 +1,15 @@ +package com.serial4j.core.serial.throwable; + +import com.serial4j.core.errno.Errno; + +public class FileTooLargeException extends SerialThrowable { + + public FileTooLargeException(final String additionalText) { + super(Errno.EFBIG.getDescription() + "\n" + additionalText); + } + + @Override + public Errno getCausingErrno() { + return Errno.EFBIG; + } +} \ No newline at end of file diff --git a/HelloSerial4j/src/main/java/com/serial4j/core/serial/throwable/InputOutputException.java b/HelloSerial4j/src/main/java/com/serial4j/core/serial/throwable/InputOutputException.java new file mode 100644 index 00000000..abc58bf7 --- /dev/null +++ b/HelloSerial4j/src/main/java/com/serial4j/core/serial/throwable/InputOutputException.java @@ -0,0 +1,15 @@ +package com.serial4j.core.serial.throwable; + +import com.serial4j.core.errno.Errno; + +public class InputOutputException extends SerialThrowable { + + public InputOutputException(final String additionalText) { + super(Errno.EIO.getDescription() + "\n" + additionalText); + } + + @Override + public Errno getCausingErrno() { + return Errno.EIO; + } +} \ No newline at end of file diff --git a/HelloSerial4j/src/main/java/com/serial4j/core/serial/throwable/InterruptedSystemCallException.java b/HelloSerial4j/src/main/java/com/serial4j/core/serial/throwable/InterruptedSystemCallException.java new file mode 100644 index 00000000..cfe3f705 --- /dev/null +++ b/HelloSerial4j/src/main/java/com/serial4j/core/serial/throwable/InterruptedSystemCallException.java @@ -0,0 +1,15 @@ +package com.serial4j.core.serial.throwable; + +import com.serial4j.core.errno.Errno; + +public class InterruptedSystemCallException extends SerialThrowable { + + public InterruptedSystemCallException(final String additionalText) { + super(Errno.EINTR.getDescription() + "\n" + additionalText); + } + + @Override + public Errno getCausingErrno() { + return Errno.EINTR; + } +} \ No newline at end of file diff --git a/HelloSerial4j/src/main/java/com/serial4j/core/serial/throwable/InvalidArgumentException.java b/HelloSerial4j/src/main/java/com/serial4j/core/serial/throwable/InvalidArgumentException.java new file mode 100644 index 00000000..420787ea --- /dev/null +++ b/HelloSerial4j/src/main/java/com/serial4j/core/serial/throwable/InvalidArgumentException.java @@ -0,0 +1,15 @@ +package com.serial4j.core.serial.throwable; + +import com.serial4j.core.errno.Errno; + +public class InvalidArgumentException extends SerialThrowable { + + public InvalidArgumentException(final String additionalText) { + super(Errno.EINVAL.getDescription() + "\n" + additionalText); + } + + @Override + public Errno getCausingErrno() { + return Errno.EINVAL; + } +} \ No newline at end of file diff --git a/HelloSerial4j/src/main/java/com/serial4j/core/serial/throwable/InvalidPortException.java b/HelloSerial4j/src/main/java/com/serial4j/core/serial/throwable/InvalidPortException.java new file mode 100644 index 00000000..a408450e --- /dev/null +++ b/HelloSerial4j/src/main/java/com/serial4j/core/serial/throwable/InvalidPortException.java @@ -0,0 +1,49 @@ +/* + * BSD 3-Clause License + * + * Copyright (c) 2022, Scrappers Team, The AVR-Sandbox Project, Serial4j API. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package com.serial4j.core.serial.throwable; + +import java.lang.RuntimeException; +import com.serial4j.core.serial.throwable.SerialThrowable; +import com.serial4j.core.errno.Errno; + +public final class InvalidPortException extends SerialThrowable { + + public InvalidPortException(final String portName) { + super(Errno.ERR_INVALID_PORT.getDescription() + "\n" + portName); + } + + @Override + public Errno getCausingErrno() { + return Errno.ERR_INVALID_PORT; + } + +} \ No newline at end of file diff --git a/HelloSerial4j/src/main/java/com/serial4j/core/serial/throwable/NoAvailableTtyDevicesException.java b/HelloSerial4j/src/main/java/com/serial4j/core/serial/throwable/NoAvailableTtyDevicesException.java new file mode 100644 index 00000000..66c88334 --- /dev/null +++ b/HelloSerial4j/src/main/java/com/serial4j/core/serial/throwable/NoAvailableTtyDevicesException.java @@ -0,0 +1,46 @@ +/* + * BSD 3-Clause License + * + * Copyright (c) 2022, Scrappers Team, The AVR-Sandbox Project, Serial4j API. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package com.serial4j.core.serial.throwable; + +import com.serial4j.core.errno.Errno; + +public class NoAvailableTtyDevicesException extends SerialThrowable { + + public NoAvailableTtyDevicesException(final String additionalText) { + super(Errno.ERR_NO_AVAILABLE_TTY_DEVICES.getDescription() + "\n" + additionalText); + } + + @Override + public Errno getCausingErrno() { + return Errno.ERR_NO_AVAILABLE_TTY_DEVICES; + } +} diff --git a/HelloSerial4j/src/main/java/com/serial4j/core/serial/throwable/NoSpaceLeftException.java b/HelloSerial4j/src/main/java/com/serial4j/core/serial/throwable/NoSpaceLeftException.java new file mode 100644 index 00000000..ce5f53b2 --- /dev/null +++ b/HelloSerial4j/src/main/java/com/serial4j/core/serial/throwable/NoSpaceLeftException.java @@ -0,0 +1,46 @@ +/* + * BSD 3-Clause License + * + * Copyright (c) 2022, Scrappers Team, The AVR-Sandbox Project, Serial4j API. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package com.serial4j.core.serial.throwable; + +import com.serial4j.core.errno.Errno; + +public class NoSpaceLeftException extends SerialThrowable { + + public NoSpaceLeftException(final String additionalText) { + super(Errno.ENOSPC.getDescription() + "\n" + additionalText); + } + + @Override + public Errno getCausingErrno() { + return Errno.ENOSPC; + } +} diff --git a/HelloSerial4j/src/main/java/com/serial4j/core/serial/throwable/NoSuchDeviceException.java b/HelloSerial4j/src/main/java/com/serial4j/core/serial/throwable/NoSuchDeviceException.java new file mode 100644 index 00000000..444edf2b --- /dev/null +++ b/HelloSerial4j/src/main/java/com/serial4j/core/serial/throwable/NoSuchDeviceException.java @@ -0,0 +1,46 @@ +/* + * BSD 3-Clause License + * + * Copyright (c) 2022, Scrappers Team, The AVR-Sandbox Project, Serial4j API. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package com.serial4j.core.serial.throwable; + +import com.serial4j.core.errno.Errno; + +public final class NoSuchDeviceException extends SerialThrowable { + + public NoSuchDeviceException(final String additionalText) { + super(Errno.ENXIO.getDescription() + "\n" + additionalText); + } + + @Override + public Errno getCausingErrno() { + return Errno.ENXIO; + } +} \ No newline at end of file diff --git a/HelloSerial4j/src/main/java/com/serial4j/core/serial/throwable/NoSuchFileException.java b/HelloSerial4j/src/main/java/com/serial4j/core/serial/throwable/NoSuchFileException.java new file mode 100644 index 00000000..90760b28 --- /dev/null +++ b/HelloSerial4j/src/main/java/com/serial4j/core/serial/throwable/NoSuchFileException.java @@ -0,0 +1,46 @@ +/* + * BSD 3-Clause License + * + * Copyright (c) 2022, Scrappers Team, The AVR-Sandbox Project, Serial4j API. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package com.serial4j.core.serial.throwable; + +import com.serial4j.core.errno.Errno; + +public final class NoSuchFileException extends SerialThrowable { + + public NoSuchFileException(final String additionalText) { + super(Errno.ENOENT.getDescription() + "\n" + additionalText); + } + + @Override + public Errno getCausingErrno() { + return Errno.ENOENT; + } +} \ No newline at end of file diff --git a/HelloSerial4j/src/main/java/com/serial4j/core/serial/throwable/NotTtyDeviceException.java b/HelloSerial4j/src/main/java/com/serial4j/core/serial/throwable/NotTtyDeviceException.java new file mode 100644 index 00000000..f0814a4d --- /dev/null +++ b/HelloSerial4j/src/main/java/com/serial4j/core/serial/throwable/NotTtyDeviceException.java @@ -0,0 +1,46 @@ +/* + * BSD 3-Clause License + * + * Copyright (c) 2022, Scrappers Team, The AVR-Sandbox Project, Serial4j API. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package com.serial4j.core.serial.throwable; + +import com.serial4j.core.errno.Errno; + +public final class NotTtyDeviceException extends SerialThrowable { + + public NotTtyDeviceException(final String additionalText) { + super(Errno.ENOTTY.getDescription() + "\n" + additionalText); + } + + @Override + public Errno getCausingErrno() { + return Errno.ENOTTY; + } +} \ No newline at end of file diff --git a/HelloSerial4j/src/main/java/com/serial4j/core/serial/throwable/PermissionDeniedException.java b/HelloSerial4j/src/main/java/com/serial4j/core/serial/throwable/PermissionDeniedException.java new file mode 100644 index 00000000..2052b8df --- /dev/null +++ b/HelloSerial4j/src/main/java/com/serial4j/core/serial/throwable/PermissionDeniedException.java @@ -0,0 +1,61 @@ +/* + * BSD 3-Clause License + * + * Copyright (c) 2022, Scrappers Team, The AVR-Sandbox Project, Serial4j API. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package com.serial4j.core.serial.throwable; + +import java.io.IOException; +import com.serial4j.core.errno.Errno; +import com.serial4j.core.serial.throwable.SerialThrowable; + +/** + * Implements a permission exception for error code [EACCESS] or [13] as defined by . + * Possibly thrown from non-authorized permissions from a non-root user during an attempt to open + * a system resource. + * + * @author pavl_g. + */ +public class PermissionDeniedException extends SerialThrowable { + + /** + * Instantiates a permission exception with an additionaltext and error code [13]. + * + * @param additionalText additional text for the permission message. + */ + public PermissionDeniedException(final String additionalText) { + super(Errno.EACCES.getDescription() + "\n" + additionalText); + } + + @Override + public Errno getCausingErrno() { + return Errno.EACCES; + } + +} \ No newline at end of file diff --git a/HelloSerial4j/src/main/java/com/serial4j/core/serial/throwable/ReadOnlyFileSystemException.java b/HelloSerial4j/src/main/java/com/serial4j/core/serial/throwable/ReadOnlyFileSystemException.java new file mode 100644 index 00000000..886f8f9d --- /dev/null +++ b/HelloSerial4j/src/main/java/com/serial4j/core/serial/throwable/ReadOnlyFileSystemException.java @@ -0,0 +1,46 @@ +/* + * BSD 3-Clause License + * + * Copyright (c) 2022, Scrappers Team, The AVR-Sandbox Project, Serial4j API. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package com.serial4j.core.serial.throwable; + +import com.serial4j.core.errno.Errno; + +public final class ReadOnlyFileSystemException extends SerialThrowable { + + public ReadOnlyFileSystemException(final String additionalText) { + super(Errno.EROFS.getDescription() + "\n" + additionalText); + } + + @Override + public Errno getCausingErrno() { + return Errno.EROFS; + } +} \ No newline at end of file diff --git a/HelloSerial4j/src/main/java/com/serial4j/core/serial/throwable/SerialThrowable.java b/HelloSerial4j/src/main/java/com/serial4j/core/serial/throwable/SerialThrowable.java new file mode 100644 index 00000000..7a2bedcc --- /dev/null +++ b/HelloSerial4j/src/main/java/com/serial4j/core/serial/throwable/SerialThrowable.java @@ -0,0 +1,53 @@ +/* + * BSD 3-Clause License + * + * Copyright (c) 2022, Scrappers Team, The AVR-Sandbox Project, Serial4j API. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package com.serial4j.core.serial.throwable; + +import com.serial4j.core.errno.Errno; + +/** + * Defines an abstract entity for the serial throwable exceptions. + * + * @author pavl_g. + */ +public abstract class SerialThrowable extends RuntimeException { + + public SerialThrowable(String message) { + super(message); + } + + /** + * Gets the causing error code. + * + * @return the error code causing this exception. + */ + abstract Errno getCausingErrno(); +} \ No newline at end of file diff --git a/HelloSerial4j/src/main/java/com/serial4j/core/serial/throwable/TooManyOpenedFilesException.java b/HelloSerial4j/src/main/java/com/serial4j/core/serial/throwable/TooManyOpenedFilesException.java new file mode 100644 index 00000000..bdb214cb --- /dev/null +++ b/HelloSerial4j/src/main/java/com/serial4j/core/serial/throwable/TooManyOpenedFilesException.java @@ -0,0 +1,46 @@ +/* + * BSD 3-Clause License + * + * Copyright (c) 2022, Scrappers Team, The AVR-Sandbox Project, Serial4j API. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package com.serial4j.core.serial.throwable; + +import com.serial4j.core.errno.Errno; + +public final class TooManyOpenedFilesException extends SerialThrowable { + + public TooManyOpenedFilesException(final String additionalText) { + super(Errno.EMFILE.getDescription() + "\n" + additionalText); + } + + @Override + public Errno getCausingErrno() { + return Errno.EMFILE; + } +} \ No newline at end of file diff --git a/HelloSerial4j/src/main/java/com/serial4j/core/serial/throwable/TryAgainException.java b/HelloSerial4j/src/main/java/com/serial4j/core/serial/throwable/TryAgainException.java new file mode 100644 index 00000000..695f2623 --- /dev/null +++ b/HelloSerial4j/src/main/java/com/serial4j/core/serial/throwable/TryAgainException.java @@ -0,0 +1,46 @@ +/* + * BSD 3-Clause License + * + * Copyright (c) 2022, Scrappers Team, The AVR-Sandbox Project, Serial4j API. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package com.serial4j.core.serial.throwable; + +import com.serial4j.core.errno.Errno; + +public final class TryAgainException extends SerialThrowable { + + public TryAgainException(final String additionalText) { + super(Errno.EAGAIN.getDescription() + "\n" + additionalText); + } + + @Override + public Errno getCausingErrno() { + return Errno.EAGAIN; + } +} \ No newline at end of file diff --git a/HelloSerial4j/src/main/java/com/serial4j/core/util/natives/NativeImageLoader.java b/HelloSerial4j/src/main/java/com/serial4j/core/util/natives/NativeImageLoader.java new file mode 100644 index 00000000..6e7cc17f --- /dev/null +++ b/HelloSerial4j/src/main/java/com/serial4j/core/util/natives/NativeImageLoader.java @@ -0,0 +1,189 @@ +/* + * BSD 3-Clause License + * + * Copyright (c) 2022, Scrappers Team, The Arithmos Project. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package com.serial4j.core.util.natives; + +import java.io.FileOutputStream; +import java.io.InputStream; +import com.serial4j.core.util.process.Semaphore; + +/** + * Helper utility for loading native images. + * + * @author pavl_g. + */ +public final class NativeImageLoader { + + /** + * A state for a critical section. + */ + public enum State { + TOGGLED, + } + + /** + * Represents an image domain. + */ + public enum NativeImage { + LINUX_x86_x64("native/Linux/linux-x86-x64/libserial4j.so"), + LINUX_x86_x86("native/Linux/linux-x86-x86/libserial4j.so"), + MAC_x86_x64("native/OSX/mac-x86-x64/libserial4j.dylb"), + WIN_x86_x64("native/Windows/win-x86-x64/libserial4j.dll"); + + private final String image; + + NativeImage(final String image) { + this.image = image; + } + + public String getImage() { + return image; + } + } + + /** + * Represents an operating system domain. + */ + private enum OS { + NAME(System.getProperty("os.name")), + ARCH(System.getProperty("os.arch")); + + public static final String Linux = "Linux"; + public static final String Windows = "Windows"; + public static final String Mac = "Mac"; + public static final String Android = "Android"; + + private final String data; + + OS(final String data) { + this.data = data; + } + public String getData() { + return data; + } + + /** WIP */ + + public static boolean is_x86_x64(final String arch) { + return arch.equals("amd64"); + } + public static boolean is_x86_x86(final String arch) { + return arch.equals("amd32"); + } + public static boolean is_arrm32(final String arch) { + return arch.equals("armhf"); + } + } + + protected static final Semaphore.Mutex MUTEX = new Semaphore.Mutex(); + protected static final Semaphore SEMAPHORE = Semaphore.build(MUTEX); + + private static boolean isLoaded = false; + + private NativeImageLoader() { + } + + public static void loadLibrary() { + if (OS.NAME.getData().equals(OS.Linux)) { + loadLinux(); + } else if (OS.NAME.getData().equals(OS.Windows)) { + /** WIP */ + } else if (OS.NAME.getData().equals(OS.Mac)) { + /** WIP */ + } else if (OS.NAME.getData().equals(OS.Android)) { + loadAndroid(); + } + } + + private static void loadLinux() { + if (OS.is_x86_x64(OS.ARCH.getData())) { + extractImage(NativeImage.LINUX_x86_x64); + } + } + + private static void loadWindows() { + /** WIP */ + } + + private static void loadMac() { + /** WIP */ + } + + private static void loadAndroid() { + System.loadLibrary("Serial4j"); + } + + /** + * Extracts an appropriate system-based native image from sources. + * + * @param image the image to extract to the user directory. + */ + private static void extractImage(final NativeImage image) { + + // protect a critical section + initMutexWithLockData(); + + SEMAPHORE.lock(NativeImageLoader.class); + + if (isLoaded) { + SEMAPHORE.unlock(NativeImageLoader.class); + return; + } + + // extract the shipped native files + final String workingDirectory = System.getProperty("user.dir"); + try { + final InputStream nativeImageIS = NativeImageLoader.class.getClassLoader().getResourceAsStream(image.getImage()); + final byte[] buffer = new byte[nativeImageIS.available()]; + final FileOutputStream fos = new FileOutputStream(workingDirectory + "/libserial4j.so"); + int numberOfReadBytes = 0; + while ((numberOfReadBytes = nativeImageIS.read(buffer)) != -1) { + /* use the numberOfReadBytes as the buffer length to write valid data */ + fos.write(buffer, 0, numberOfReadBytes); + } + nativeImageIS.close(); + fos.close(); + System.load(workingDirectory + "/libserial4j.so"); + } catch(final Exception exception) { + exception.printStackTrace(); + } + + isLoaded = true; + + SEMAPHORE.unlock(NativeImageLoader.class); + + } + + private static void initMutexWithLockData() { + MUTEX.setLockData(NativeImageLoader.State.TOGGLED); + MUTEX.setMonitorObject(NativeImageLoader.class); + } +} \ No newline at end of file diff --git a/HelloSerial4j/src/main/java/com/serial4j/core/util/process/Semaphore.java b/HelloSerial4j/src/main/java/com/serial4j/core/util/process/Semaphore.java new file mode 100644 index 00000000..3338a30c --- /dev/null +++ b/HelloSerial4j/src/main/java/com/serial4j/core/util/process/Semaphore.java @@ -0,0 +1,131 @@ +/* + * BSD 3-Clause License + * + * Copyright (c) 2022, Scrappers Team, The Arithmos Project. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package com.serial4j.core.util.process; + +import java.util.logging.Logger; + +/** + * A thread synchronizer utility using mutex data states. + * + * @see Semaphore.Mutex + * @author pavl_g. + */ +public final class Semaphore { + private final Mutex mutex; + private static final Logger logger = Logger.getLogger(Semaphore.class.getName()); + + public static final class Mutex { + private Object lockData; + private Object monitorObject; + private Object unlockData; + + public Mutex(final O monitorObject, final LD lockData, final ULD unlockData) { + this.monitorObject = monitorObject; + this.lockData = lockData; + this.unlockData = unlockData; + } + + public Mutex() { + this(new Object(), new Object(), new Object()); + } + + public void setLockData(Object lockData) { + this.lockData = lockData; + } + + public void setMonitorObject(Object monitorObject) { + this.monitorObject = monitorObject; + } + + protected void setUnlockData(Object unlockData) { + this.unlockData = unlockData; + } + + public Object getLockData() { + return lockData; + } + + public Object getMonitorObject() { + return monitorObject; + } + + public Object getUnlockData() { + return unlockData; + } + + /** + * Creates a 'no job' job to trick the java loop. + * (a java loop must have something inside to act upon). + * + * @return a null job. + */ + protected final Void NO_JOB() { + return null; + } + } + + private Semaphore(Mutex mutex) { + this.mutex = mutex; + } + + public static Semaphore build(Mutex mutex) { + logger.fine("Semaphore initialized with monitor " + mutex.getMonitorObject() + " and data object " + mutex.getLockData()); + return new Semaphore(mutex); + } + + public void lock(final MO monitorObject) { + // order for a lock + this.mutex.setMonitorObject(monitorObject); + // format the unlock data for a new lock dispatcher + this.mutex.setUnlockData(new Object()); + logger.fine("Lock obtained with monitor " + monitorObject); + } + + public void waitForUnlock() { + while (mutex.getLockData() != mutex.getUnlockData()) { + final Void NO_JOB = mutex.NO_JOB(); + } + } + + public void unlock(final O locker) { + if (locker != mutex.getMonitorObject()) { + throw new IllegalMonitorStateException("The current thread doesn't own this object !"); + } + // release the lock + mutex.setUnlockData(mutex.getLockData()); + logger.fine(locker + " Unlocked"); + } + + public Mutex getMutex() { + return mutex; + } +} diff --git a/HelloSerial4j/src/main/java/com/serial4j/example/Launcher.java b/HelloSerial4j/src/main/java/com/serial4j/example/Launcher.java new file mode 100644 index 00000000..f1f14b4a --- /dev/null +++ b/HelloSerial4j/src/main/java/com/serial4j/example/Launcher.java @@ -0,0 +1,51 @@ +/* + * BSD 3-Clause License + * + * Copyright (c) 2022, Scrappers Team, The AVR-Sandbox Project, Serial4j API. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package com.serial4j.example; + +import com.serial4j.example.serial4j.HelloSerial4jIO; +import com.serial4j.example.serial4j.HelloNativeSerial4J; +import com.serial4j.example.monitor.HelloSerialMonitor; + +/** + * Starts the applications test cases. + * + * @author pavl_g. + */ +public final class Launcher { + + public static void main(String args[]) throws InterruptedException { + /* starts the native fctnl io example */ + // Thread.ofVirtual().start(new HelloNativeSerial4J()); + Thread.ofPlatform().start(new HelloSerialMonitor()); + while (true); + } +} \ No newline at end of file diff --git a/HelloSerial4j/src/main/java/com/serial4j/example/monitor/HelloSerialMonitor.java b/HelloSerial4j/src/main/java/com/serial4j/example/monitor/HelloSerialMonitor.java new file mode 100644 index 00000000..6fbb91c2 --- /dev/null +++ b/HelloSerial4j/src/main/java/com/serial4j/example/monitor/HelloSerialMonitor.java @@ -0,0 +1,123 @@ +/* + * BSD 3-Clause License + * + * Copyright (c) 2022, Scrappers Team, The AVR-Sandbox Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package com.serial4j.example.monitor; + +import com.serial4j.core.serial.BaudRate; +import com.serial4j.core.serial.entity.EntityStatus; +import com.serial4j.core.serial.entity.impl.WritableCapsule; +import com.serial4j.core.serial.entity.impl.SerialWriteEntity; +import com.serial4j.core.serial.monitor.SerialDataListener; +import com.serial4j.core.serial.monitor.SerialMonitor; + +/** + * Represents an example for UART using jSerialComm. + * + * @author pavl_g. + */ +public class HelloSerialMonitor implements SerialDataListener, EntityStatus, Runnable { + + private static boolean isDataSent; + + @Override + public void run() { + System.out.println(Thread.currentThread()); + System.out.println("---------------Welcome to Serial4j Monitor Testcase---------------"); + try { + final SerialMonitor serialMonitor = new SerialMonitor("Monitor A"); + serialMonitor.startDataMonitoring("/dev/ttyUSB0", BaudRate.B57600, null); + serialMonitor.setWriteEntityStatus(this); + serialMonitor.addSerialDataListener(this); + + // /* write data to UART with return-carriage/newline */ + // delay(2000); + // writeInUARTCapsule(serialMonitor, "0\n\r"); + + /* terminate after 20 seconds */ + delay(20000); + serialMonitor.setTerminate(); + } catch (Exception e) { + e.printStackTrace(); + } + } + + private void writeInUARTCapsule(final SerialMonitor serialMonitor, final String data) { + final WritableCapsule writableCapsule = new WritableCapsule(); + writableCapsule.write(data); + serialMonitor.getSerialWriteEntity().addWritableCapsule(writableCapsule); + } + + private void delay(final long millis) { + try { + Thread.sleep(millis); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + + @Override + public void onSerialEntityInitialized(SerialWriteEntity serialMonitorEntity) { + + } + + @Override + public void onSerialEntityTerminated(SerialWriteEntity serialMonitorEntity) { + System.err.println("Serial4j: Terminated"); + } + + @Override + public void onUpdate(SerialWriteEntity serialMonitorEntity) { + if (isDataSent) { + return; + } + /* send data after 5 seconds */ + delay(5000); + /* send data in a UART capsule on the serial write entity thread */ + writeInUARTCapsule(serialMonitorEntity.getSerialMonitor(), "0\n"); + isDataSent = true; + } + + @Override + public void onDataReceived(int data) { + + } + + @Override + public void onDataTransmitted(int data) { + + } + + @Override + public void onDataReceived(String data) { + System.out.println(Thread.currentThread()); + System.out.println(data); + } +} diff --git a/HelloSerial4j/src/main/java/com/serial4j/example/serial4j/HelloNativeSerial4J.java b/HelloSerial4j/src/main/java/com/serial4j/example/serial4j/HelloNativeSerial4J.java new file mode 100644 index 00000000..08945dd8 --- /dev/null +++ b/HelloSerial4j/src/main/java/com/serial4j/example/serial4j/HelloNativeSerial4J.java @@ -0,0 +1,174 @@ +/* + * BSD 3-Clause License + * + * Copyright (c) 2022, Scrappers Team, The AVR-Sandbox Project, Serial4j API. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package com.serial4j.example.serial4j; + +import java.io.FileOutputStream; +import java.io.IOException; +import java.util.Arrays; +import java.io.FileNotFoundException; +import java.util.logging.Logger; +import com.serial4j.core.serial.control.TerminalControlFlag; +import com.serial4j.core.serial.control.TerminalLocalFlag; +import com.serial4j.core.serial.control.TerminalOutputFlag; +import com.serial4j.core.serial.control.TerminalInputFlag; +import com.serial4j.core.serial.ReadConfiguration; +import com.serial4j.core.serial.Permissions; +import com.serial4j.core.serial.BaudRate; +import com.serial4j.core.serial.SerialPort; +import com.serial4j.core.serial.TerminalDevice; +import com.serial4j.core.serial.throwable.PermissionDeniedException; +import com.serial4j.core.serial.throwable.BrokenPipeException; +import com.serial4j.core.serial.throwable.NoSuchDeviceException; +import com.serial4j.core.serial.throwable.InvalidPortException; +import com.serial4j.core.serial.throwable.OperationFailedException; + +/** + * An example for Serial4j showing Native terminal control and + * native file io on a serial port using a java binding to and read (...) and write (...). + * + * @author pavl_g. + */ +public final class HelloNativeSerial4J implements Runnable { + + /** + * Provides a java binding to a native terminal device. + */ + protected final TerminalDevice ttyDevice = new TerminalDevice(); + + protected static final Logger EXAMPLE_LOGGER = Logger.getLogger(HelloNativeSerial4J.class.getName()); + + @Override + public void run() { + System.out.println(Thread.currentThread()); + try { + System.out.println("Started native io example: "); + /* set port permissions */ + final Permissions permissions = Permissions.O_RDWR.append(Permissions.O_NOCTTY) + .append(Permissions.O_NONBLOCK); + ttyDevice.setPermissions(permissions); + /* define terminal flags */ + final TerminalControlFlag TCF_VALUE = (TerminalControlFlag) TerminalControlFlag.CLOCAL + .append(TerminalControlFlag.CS8, TerminalControlFlag.CREAD); + final TerminalLocalFlag TLF_VALUE = (TerminalLocalFlag) TerminalLocalFlag.EMPTY_INSTANCE + .disable(TerminalLocalFlag.ECHO, TerminalLocalFlag.ECHOK, + TerminalLocalFlag.ECHOE, TerminalLocalFlag.ECHOKE, + TerminalLocalFlag.ECHONL, TerminalLocalFlag.ECHOPRT, + TerminalLocalFlag.ECHOCTL, TerminalLocalFlag.ISIG, + TerminalLocalFlag.IEXTEN, TerminalLocalFlag.ICANON); + final TerminalOutputFlag TOF_VALUE = (TerminalOutputFlag) TerminalOutputFlag.EMPTY_INSTANCE + .disable(TerminalOutputFlag.OPOST, TerminalOutputFlag.ONLCR); + final TerminalInputFlag TIF_VALUE = (TerminalInputFlag) TerminalInputFlag.EMPTY_INSTANCE.disableAll(); + /* open the serial port using the path or the name */ + ttyDevice.openPort(new SerialPort("/dev/ttyUSB0")); + /* initialize the terminal IO with the default terminal flags */ + ttyDevice.initTermios(); + /* print the initial terminal control flags as long value */ + System.out.println(ttyDevice.getTerminalControlFlag().getValue()); + /* set and update the new terminal flags */ + ttyDevice.setTerminalControlFlag(TCF_VALUE); + ttyDevice.setTerminalLocalFlag(TLF_VALUE); + ttyDevice.setTerminalOutputFlag(TOF_VALUE); + ttyDevice.setTerminalInputFlag(TIF_VALUE); + /* print the new terminal control flag */ + System.out.println(ttyDevice.getTerminalControlFlag().getValue()); + /* set the baud rate (bits/second) */ + ttyDevice.setBaudRate(BaudRate.B57600); + /* set the reading mode config to interbyte timeout of delay 510 bytes and delay of 5ms between each charachter */ + ttyDevice.setReadConfigurationMode(ReadConfiguration.READ_WITH_INTERBYTE_TIMEOUT, 0, 255); + + /* print the port file descriptor */ + if (ttyDevice.getSerialPort().getFd() > 0) { + System.out.println("Port Opened with " + ttyDevice.getSerialPort().getFd()); + } + System.out.println(Arrays.toString(ttyDevice.getReadConfigurationMode().getMode())); + System.out.println(Arrays.toString(ttyDevice.getSerialPorts()) + " " + ttyDevice.getSerialPorts().length); + // /* start the R/W threads */ + startReadThread(ttyDevice, 0); + startWriteThread(ttyDevice, 20000); + } catch(FileNotFoundException e) { + e.printStackTrace(); + } + + } + + /** + * Uses the [extern ssize_t read (int __fd, void *__buf, size_t __nbytes) __wur] provided by base posix api + * to read from the pre-initialized port in a new thread. + * + * @param ttyDevice the terminal device object to read the data from. + * @param millis a delay before the reading operation starts in ms. + */ + private void startReadThread(final TerminalDevice ttyDevice, final long millis) { + new Thread(new Runnable() { + public void run() { + try { + Thread.sleep(millis); + long read; + while(true) { + /* read data and get the buffer */ + if ((read = ttyDevice.readBuffer()) > 0) { + System.out.println(read); + System.out.println(ttyDevice.getReadBuffer()); + // System.exit(0); + } + } + } catch(Exception e) { + e.printStackTrace(); + } + } + }).start(); + } + + /** + * Uses the [extern ssize_t write (int __fd, const void *__buf, size_t __n) __wur] provided by base posix api + * to write to the pre-initialized port in a new thread. + * + * @param ttyDevice the terminal device object to write the data to. + * @param millis a delay before the writing operation starts in ms. + */ + private void startWriteThread(final TerminalDevice ttyDevice, final long millis) { + new Thread(new Runnable() { + @Override + public void run() { + try { + /* write a buffer (array of chars) and close the port */ + Thread.sleep(millis); + ttyDevice.writeData(new int[] {'A', 'B'}); + Thread.sleep(millis / 2); + ttyDevice.closePort(); + } catch (Exception e) { + e.printStackTrace(); + } + } + }).start(); + } +} diff --git a/HelloSerial4j/src/main/java/com/serial4j/example/serial4j/HelloSerial4jIO.java b/HelloSerial4j/src/main/java/com/serial4j/example/serial4j/HelloSerial4jIO.java new file mode 100644 index 00000000..2d463c17 --- /dev/null +++ b/HelloSerial4j/src/main/java/com/serial4j/example/serial4j/HelloSerial4jIO.java @@ -0,0 +1,138 @@ +/* + * BSD 3-Clause License + * + * Copyright (c) 2022, Scrappers Team, The AVR-Sandbox Project, Serial4j API. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package com.serial4j.example.serial4j; + +import java.io.FileOutputStream; +import java.io.IOException; +import java.util.Arrays; +import java.io.FileNotFoundException; +import com.serial4j.core.serial.BaudRate; +import com.serial4j.core.serial.SerialPort; +import com.serial4j.core.serial.TerminalDevice; +import com.serial4j.core.serial.ReadConfiguration; +import com.serial4j.core.serial.throwable.PermissionDeniedException; +import com.serial4j.core.serial.throwable.BrokenPipeException; +import com.serial4j.core.serial.throwable.NoSuchDeviceException; +import com.serial4j.core.serial.throwable.InvalidPortException; +import com.serial4j.core.serial.throwable.OperationFailedException; +import com.serial4j.core.serial.Permissions; + +/** + * An example showing serial and terminal io using java.io API. + * + * @author pavl_g. + */ +public final class HelloSerial4jIO implements Runnable { + + /** + * Provides a java binding to the native terminal device. + */ + protected final TerminalDevice ttyDevice = new TerminalDevice(); + + @Override + public void run() { + try { + System.out.println("Started java io example: "); + /* disable native logger */ + /* enable java logger */ + ttyDevice.setSerial4jLoggingEnabled(true); + ttyDevice.openPort(new SerialPort(ttyDevice.getSerialPorts()[0])); + if (ttyDevice.getSerialPort().getFd() > 0) { + System.out.println("Port Opened with " + ttyDevice.getSerialPort().getFd()); + } else { + System.err.println("Cannot open serial port" + " " + ttyDevice.getSerialPort().getFd()); + } + /* initialize terminal io base POSIX library with the default terminal flags */ + ttyDevice.initTermios(); + /* set and apply the baud rate to determine transmission speed */ + ttyDevice.setBaudRate(BaudRate.B57600); + System.out.println("Available serial ports: " + Arrays.toString(ttyDevice.getSerialPorts()) + " " + ttyDevice.getSerialPorts().length); + /* start R/W threads */ + startReadThread(ttyDevice, 0); + startWriteThread(ttyDevice, 1000); + } catch(NoSuchDeviceException | + PermissionDeniedException | + BrokenPipeException | + InvalidPortException | + OperationFailedException | + FileNotFoundException e) { + e.printStackTrace(); + } + } + + /** + * Uses the {@link java.io.FileOutputStream} to write to the pre-initialized port in a new thread. + * + * @param ttyDevice the terminal device object to get the {@link FileOutputStream} from. + * @param millis a delay before the writing operation starts in ms. + */ + private static void startWriteThread(final TerminalDevice ttyDevice, final long millis) { + new Thread(new Runnable() { + @Override + public void run() { + try { + Thread.sleep(millis); + /* uses the java io to write to the serial port */ + ttyDevice.getOutputStream().write('A'); + ttyDevice.getOutputStream().write('D'); + ttyDevice.closePort(); + } catch (IOException | InterruptedException e) { + e.printStackTrace(); + } + } + }).start(); + } + + /** + * Uses the {@link java.io.FileInputStream} to read from the pre-initialized port in a new thread. + * + * @param ttyDevice the terminal device object to get the {@link FileInputStream} from. + * @param millis a delay before the writing operation starts in ms. + */ + private static void startReadThread(final TerminalDevice ttyDevice, final long millis) { + new Thread(new Runnable() { + public void run() { + try { + Thread.sleep(millis); + while(true) { + /* check for the number of the available charachters to read */ + if (ttyDevice.getInputStream().available() > 0) { + System.out.print((char) ttyDevice.getInputStream().read()); + } + } + } catch (IOException | InterruptedException e) { + e.printStackTrace(); + } + } + }).start(); + } +} diff --git a/HelloSerial4j/src/main/native/include/BufferUtils.h b/HelloSerial4j/src/main/native/include/BufferUtils.h new file mode 100644 index 00000000..06b3895b --- /dev/null +++ b/HelloSerial4j/src/main/native/include/BufferUtils.h @@ -0,0 +1,124 @@ +/** + * @file BufferUtils.util + * @author pavl_g. + * @brief Represents utility functions for buffers. + * @version 0.1 + * @date 2022-08-24 + * + * @copyright + * BSD 3-Clause License + * + * Copyright (c) 2022, Scrappers Team, The AVR-Sandbox Project, Serial4j API. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#ifndef BUFFER_UTILS +#define BUFFER_UTILS + +#include +#include +#include + +namespace BufferUtils { + + /** + * Nullifies a single buffer cell at the index. + * + * @param buffer the buffer to nullify its cell. + * @param index the index of the buffer cell to nullify. + */ + static inline void nullifyBuffer(void** buffer, int index) { + buffer[index] = NULL; + } + + /** + * Frees the memory utilized by the individual buffer cells on a [buffer] with [count] number of cells. + * + * @param buffer the buffer to free its cells. + * @param count the number of cells to free, starting from index zero. + */ + static inline void freeBufferCells(void** buffer, int* count) { + for (int i = 0; i < *count; i++) { + BufferUtils::nullifyBuffer(buffer, i); + free(buffer[i]); + } + } + + /** + * @brief Deletes a typified buffer and frees its memory. + * + * @param buffer the buffer to delete. + */ + static inline void deleteBuffer(void* buffer) { + free(buffer); + BufferUtils::nullifyBuffer(&buffer, 0); + } + + /** + * @brief Deeply copies the data of the [src] buffer into a new + * buffer and returns it. + * + * @param src the source buffer to get the data from. + * @param count the count length of the buffer. + * @return void** a new buffer with the same data as the source. + */ + static inline void** copy(void** src, int* count) { + void** copy = (void**) calloc(1, sizeof(void**)); + for (int i = 0; i < *count; i++) { + /* add new memory on the next array block */ + copy[i] = (void*) calloc(1, sizeof(void*)); + copy[i] = src[i]; + } + return copy; + } + + /** + * @brief Re-validates the buffer from [NULL] pointers. + * + * @param buffer the buffer to re-validate. + * @param count the pointers count. + */ + static inline void reValidateBuffer(void** buffer, int* count, int* isProcessed) { + /* get a temp copy from flagged buffer */ + void** temp = BufferUtils::copy(buffer, count); + /* free the buffer cells to prepare the buffer to be reinitialized */ + BufferUtils::freeBufferCells(buffer, count); + /* re-init the buffer, removing the null pointers */ + for (int i = 0, j = 0; i < *count; i++) { + if (temp[i] == NULL) { + printf("%s\n", "zero"); + continue; + } + buffer[j] = (void*) calloc(1, sizeof(void*)); + buffer[j] = temp[i]; + j++; + } + *isProcessed = 1; + /* free the temp buffer */ + BufferUtils::freeBufferCells(temp, count); + } +} +#endif \ No newline at end of file diff --git a/HelloSerial4j/src/main/native/include/DynamicBuffer.h b/HelloSerial4j/src/main/native/include/DynamicBuffer.h new file mode 100644 index 00000000..8b86e85c --- /dev/null +++ b/HelloSerial4j/src/main/native/include/DynamicBuffer.h @@ -0,0 +1,156 @@ +/** + * @file DynamicBuffer.h + * @author pavl_g. + * @brief Represents a cross platform dynamic buffer wrapper. + * @version 0.1 + * @date 2022-08-24 + * + * @copyright + * BSD 3-Clause License + * + * Copyright (c) 2022, Scrappers Team, The AVR-Sandbox Project, Serial4j API. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#ifndef DY_BUFFER + +#define DY_BUFFER 1 + +#include +#include +#include + +struct DynamicBuffer { + + int count = 0; + int isProcessed = 0; + + /** + * Declares and initializes a pointer that points to + * other void* buffers starting from index zero. + * + * @note The pointer is of single size of a type. + * @note The pointer points to only and only one buffer at a time. + * @note New buffers can be added to this pointer by dereferencing it and adding one to the memory address to move + * it to a new cell block. + * e.g: + * 1) First way of adding a new buffer to this pointer using the deep copy: + * buffer[index] = (void*) calloc(1, sizeof(void*)); + * buffer[index] = item; + * + * 2) Second way of adding a new buffer to this pointer (the one used here): + * *(buffer += count) = (void*) calloc(1, sizeof(void*)); + * *buffer = item; + * buffer -= count; + * + * 3) The superficial copy example: + * buffer[index] = item; + */ + void** buffer = (void**) calloc(1, sizeof(void**));; + + static inline struct DynamicBuffer* createNewInstance() { + return (struct DynamicBuffer*) calloc(1, sizeof(struct DynamicBuffer)); + } + + /** + * Retrieves the pointer to this dynamic buffer. + * + * @return a pointer to this array of buffers. + */ + void** getBuffer() { + return buffer; + } + + /** + * Retrieves this structure size. + * + * @return an integer representing this struct in bytes. + */ + size_t getBufferSize() { + return sizeof(struct DynamicBuffer); + } + + /** + * Resets the pointer value back to zero. + */ + void resetDataPointer() { + this->count = 0; + } + + /** + * Gets the memory address to the integer of the items count. + * + * @return a pointer referring to the memory address of the integer that represents the item counts. + */ + int* getItemsCount(); + + /** + * Adds a new buffer to this pointer in a new index. + * + * @param item a void* buffer to add. + */ + void add(void* item); + + /** + * Adds a new buffer on a particular location in this pointer replacing an old one if exists. + * + * @param index the index where the new buffer will be located in this pointer. + * @param item the buffer to add. + */ + void add(int index, void* item); + + /** + * Frees a buffer from the memory at a particular index. + * @warning this method call is expensive as it removes and revalidates the whole buffer from NULL pointers. + * + * @param index the index of the buffer to remove. + */ + void removeAt(int index); + + /** + * Frees all the buffers of this pointer from the memory. + */ + void removeAll(); + + /** + * Retrieves a buffer index. + * + * @param item the buffer to get its index. + * @return the buffer index in an integer format. + */ + int getItemIndex(void* item); + + /** + * Retrieves a buffer from this pointer using its index. + * + * @param index the index where the buffer is located in this pointer. + * @return the buffer corresponding to this index. + */ + void* getItem(int index); +}; + + +#endif \ No newline at end of file diff --git a/HelloSerial4j/src/main/native/include/ErrnoUtils.h b/HelloSerial4j/src/main/native/include/ErrnoUtils.h new file mode 100644 index 00000000..7e821372 --- /dev/null +++ b/HelloSerial4j/src/main/native/include/ErrnoUtils.h @@ -0,0 +1,53 @@ +/** + * @file ErrnoUtils.util + * @author pavl_g. + * @brief Represents native user and machine errnos. + * @version 0.1 + * @date 2022-08-24 + * + * @copyright + * BSD 3-Clause License + * + * Copyright (c) 2022, Scrappers Team, The AVR-Sandbox Project, Serial4j API. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#ifndef ERRNO_UTILS +#define ERRNO_UTILS + +#include + +#define ERR_INVALID_PORT (-2) +#define ERR_INVALID_DIR (-3) +#define ERR_NO_RESULT (0) +#define LOGGER_DISABLED (-5) +#define ERR_OPERATION_FAILED (-1) +#define ERR_NO_AVAILABLE_TTY_DEVICES (-4) + +#define OPERATION_SUCCEEDED (1) + + +#endif \ No newline at end of file diff --git a/HelloSerial4j/src/main/native/include/JniUtils.h b/HelloSerial4j/src/main/native/include/JniUtils.h new file mode 100644 index 00000000..65647a46 --- /dev/null +++ b/HelloSerial4j/src/main/native/include/JniUtils.h @@ -0,0 +1,327 @@ +/** + * @file JniUtils.util + * @author pavl_g. + * @brief Java Native Interface Utility methods for jni java 8 and invocation api. + * @version 0.1 + * @date 2022-08-28 + * + * @copyright + * BSD 3-Clause License + * + * Copyright (c) 2022, Scrappers Team, The AVR-Sandbox Project, Serial4j API. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#ifndef JNI_UTILS +#define JNI_UTILS + +#include +#include +#include +#include +#include +#include + +#define CONSTRUCTOR ((const char*) "") +#define STATIC_INIT ((const char*) "") + +#define NON_PARAMTERIZED_VOID_SIG ((const char*) "()V") +#define NON_PARAMETERIZED_INT_SIG ((const char*) "()I") +#define NON_PARAMETERIZED_STRING_SIG ((const char*) "()[Ljava/lang/String;") +#define NON_PARAMETERIZED_LONG_SIG ((const char*) "()J") + +#define java_lang_String ((const char*) "java/lang/String") +#define java_io_IOException ((const char*) "java/io/IOException") +#define java_io_InputStream ((const char*) "java/io/InputStream") +#define java_io_OutputStream ((const char*) "java/io/OutputStream") +#define java_io_FileInputStream ((const char*) "java/io/FileIntputStream") +#define java_io_FileOutputStream ((const char*) "java/io/FileOutputStream") + +namespace JniUtils { + + static JNIEnv* env; + static JavaVM* jvm; + static jint version; + static struct JavaVMAttachArgs* jvmArgs; + + /** + * @brief Sets the Jni Env pointer for jni functions. + * + * @param env the environment pointer to use. + */ + static inline int setupJavaEnvironment(JNIEnv* env, jint version) { + if (env == NULL) { + return ERR_OPERATION_FAILED; + } + env->GetJavaVM(&JniUtils::jvm); + JniUtils::version = version; + return OPERATION_SUCCEEDED; + } + + static inline JavaVM* getJavaVM() { + return JniUtils::jvm; + } + + /** + * @brief Gets the Jni Env pointer from the jvm with multithreading support. + * + * @return JNIEnv* the namespace env pointer. + */ + static inline JNIEnv** getJniEnv() { + JniUtils::jvm->GetEnv((void**) &JniUtils::env, version); + return &JniUtils::env; + } + + static inline struct JavaVMAttachArgs* getJVMAttachArgs(jint jreVersion, char* threadName, jobject threadGroupObj) { + jvmArgs->version = jreVersion; + jvmArgs->name = threadName; + jvmArgs->group = threadGroupObj; + return jvmArgs; + } + + static inline jint attachNativeThread(char* threadName, jobject threadGroupObj) { + void** jniEnvPointer = (void**) JniUtils::getJniEnv(); + struct JavaVMAttachArgs* jvmArgs = getJVMAttachArgs(JniUtils::version, threadName, threadGroupObj); + return JniUtils::getJavaVM()->AttachCurrentThread(jniEnvPointer, jvmArgs); + } + + /** + * @brief Retrieves a java class from a name, the name is referred to by the + * package/class, example: {"com/java/io/IOException"}. + * + * @param clazzName the class name using the format {package/class}. + * @return jclass the reflected java class. + */ + static inline jclass getClassFromString(const char* clazzName) { + return (*JniUtils::getJniEnv())->FindClass(clazzName); + } + + /** + * @brief Retrieves a java class method using the [methodName] for the method name + * and the [sig] for the method signature. + * + * @param clazzName the class name in the format {"package/class"}. + * @param methodName the method name, use `` for constructors. + * @param sig the method signature, eg: ()V for non-parameterized void method. + * @return jmethodID a new method id for the requested method. + */ + static inline jmethodID getClassMethod(const char* clazzName, const char* methodName, const char* sig) { + return (*JniUtils::getJniEnv())->GetMethodID(getClassFromString(clazzName), methodName, sig); + } + + /** + * @brief Retrieves the java class constructor. + * + * @version version 0 from getClassConstructor for parameteized constructors using constructor + * signature. + * @param clazzName the java class name in the format {"package/class"}. + * @param sig the constructor signature, eg: ()V for non-parameterized void type. + * @return jmethodID an id referring to the class constructor. + */ + static inline jmethodID getClassConstructor0(const char* clazzName, const char* sig) { + return JniUtils::getClassMethod(clazzName, CONSTRUCTOR, sig); + } + + /** + * @brief Retrieves the java class non-parameterized constructor with signature + * [NON_PARAMTERIZED_VOID_SIG]. + * + * @param clazzName the java class name. + * @return jmethodID an id referring to the class non-parameterized constructor. + */ + static inline jmethodID getClassConstructor1(const char* clazzName) { + return JniUtils::getClassConstructor0(clazzName, NON_PARAMTERIZED_VOID_SIG); + } + + /** + * @brief Calls a parameterized method [methodName] from class [clazzName]. + * + * @param clazzName the class name where the method is located, eg: {"java/io/IOException"}. + * @param methodName the method name to call. + * @param sig the signature of the method, eg: ()V for non-paramterized void methods. + * @param args an array for the method parameters of type [jvalue] referring to one of the JNI + * data types [jint, jbyte, jlong, jshort, jchar, jobject...etc]. + */ + static inline void callParameterizedMethod(const char* clazzName, const char* methodName, const char* sig, jvalue* args) { + jclass clazz = JniUtils::getClassFromString(clazzName); + jmethodID mid = JniUtils::getClassMethod(clazzName, methodName, sig); + if (args == NULL) { + (*JniUtils::getJniEnv())->CallVoidMethod(clazz, mid); + } else { + (*JniUtils::getJniEnv())->CallVoidMethod(clazz, mid, args); + } + } + + /** + * @brief Calls a non-parameterized method [methodName] with signature [sig]. + * + * @param clazzName the class name where the method is located, eg: {"java/lang/String"}. + * @param methodName the method name to call. + * @param sig the signature of the method, eg: ()V, ()I, ()J. + */ + static inline void callNonParameterizedMethod(const char* clazzName, const char* methodName, const char* sig) { + JniUtils::callParameterizedMethod(clazzName, methodName, sig, NULL); + } + + /** + * @brief Calls a class parameterized constructor ( method) with + * signature and jvalue (holds only one variable of one JNI data type at a time) parameters. + * + * @param clazzName + * @param sig + * @param args + */ + static inline void callParameterizedConstructor(const char* clazzName, const char* sig, jvalue* args) { + JniUtils::callParameterizedMethod(clazzName, CONSTRUCTOR, sig, args); + } + + static inline void callNonParameterizedConstructor(const char* clazzName) { + JniUtils::callParameterizedConstructor(clazzName, NON_PARAMTERIZED_VOID_SIG, NULL); + } + + static inline jobject getObjectFromClass0(const char* clazzName) { + return (*JniUtils::getJniEnv())->AllocObject(JniUtils::getClassFromString(clazzName)); + } + + static inline jobject getObjectFromClass1(const char* clazzName, jmethodID constructor) { + return (*JniUtils::getJniEnv())->NewObject(JniUtils::getClassFromString(clazzName), constructor); + } + + static inline jobject getObjectFromClass2(const char* clazzName) { + return JniUtils::getObjectFromClass1(clazzName, JniUtils::getClassConstructor1(clazzName)); + } + + static inline jclass getObjectClass(jobject* object) { + return (*JniUtils::getJniEnv())->GetObjectClass(*object); + } + + static inline jfieldID getFieldIDFromObject(jobject* object, const char* fieldName, const char* fieldSig) { + return (*JniUtils::getJniEnv())->GetFieldID(getObjectClass(object), fieldName, fieldSig); + } + + static inline jobject getObjectFieldFromClass(jobject* object, const char* fieldName, const char* fieldSig) { + jfieldID fieldId = getFieldIDFromObject(object, fieldName, fieldSig); + return (*JniUtils::getJniEnv())->GetObjectField(*object, fieldId); + } + + static inline jint getIntFieldFromClass(jobject* object, const char* fieldName, const char* fieldSig) { + jfieldID fieldId = getFieldIDFromObject(object, fieldName, fieldSig); + return (*JniUtils::getJniEnv())->GetIntField(*object, fieldId); + } + + static inline void setObjectField(jobject* object, const char* fieldName, const char* fieldSig, jobject value) { + jfieldID fieldId = getFieldIDFromObject(object, fieldName, fieldSig); + (*JniUtils::getJniEnv())->SetObjectField(*object, fieldId, value); + } + + static inline void setIntField(jobject* object, const char* fieldName, const char* fieldSig, jint value) { + jfieldID fieldId = getFieldIDFromObject(object, fieldName, fieldSig); + (*JniUtils::getJniEnv())->SetIntField(*object, fieldId, value); + } + + /** + * Translates a java TerminalDevice object into a native TerminalDevice object. + * + * @param object a pointer referring to the java TerminalDevice object. + * @return a native terminal device holding the jdk terminal device's data. + */ + static inline jobject getSerialPortFromTerminalDevice(jobject* object) { + return getObjectFieldFromClass(object, "serialPort", "Lcom/serial4j/core/serial/SerialPort;"); + } + + static inline int getPortDescriptorFromSerialPort(jobject* object) { + jobject serialPortObject = getSerialPortFromTerminalDevice(object); + return getIntFieldFromClass(&serialPortObject, "fd", "I"); + } + + static inline jobjectArray createNewArrayFromBuffer(const char* clazzName, jsize length) { + jobject initialElement = (*JniUtils::getJniEnv())->NewStringUTF(""); + + jclass clazz = JniUtils::getClassFromString(clazzName); + jobjectArray array = (*JniUtils::getJniEnv())->NewObjectArray(length, clazz, initialElement); + return array; + } + + static inline jobject* getObjectBufferFromString(const char** buffer, int length) { + jobject* objectBuffer = (jobject*) calloc(length, sizeof(jobject)); + for (int i = 0; i < length; i++) { + objectBuffer[i] = (*JniUtils::getJniEnv())->NewStringUTF(buffer[i]); + } + return objectBuffer; + } + + static inline const char* getBufferFromString(jstring string) { + return (*JniUtils::getJniEnv())->GetStringUTFChars(string, 0); + } + + static inline jstring getStringFromBuffer(const char* buffer) { + return (*JniUtils::getJniEnv())->NewStringUTF(buffer); + } + + static inline void setArrayElements(jobjectArray array, jsize length, jobject* buffer) { + for (int i = 0; i < length; i++) { + (*JniUtils::getJniEnv())->SetObjectArrayElement(array, i, buffer[i]); + } + } + + static inline jobject getArrayElement(jobjectArray* array, jsize index) { + return (*JniUtils::getJniEnv())->GetObjectArrayElement(*array, index); + } + + static inline jint getIntArrayElement(jintArray* array, jsize index) { + return (*JniUtils::getJniEnv())->GetIntArrayElements(*array, 0)[index]; + } + + static inline jbyte* getByteArrayElement(jbyteArray* array, jsize index) { + return (*JniUtils::getJniEnv())->GetByteArrayElements(*array, 0); + } + + static inline jintArray getIntArrayFromBuffer(int* buffer, int length) { + jintArray intArray = (*JniUtils::getJniEnv())->NewIntArray(length); + (*JniUtils::getJniEnv())->SetIntArrayRegion(intArray, 0, length, buffer); + return intArray; + } + + static inline jbyteArray getByteArrayFromBuffer(signed char* buffer, int length) { + jbyteArray byetArray = (*JniUtils::getJniEnv())->NewByteArray(length); + (*JniUtils::getJniEnv())->SetByteArrayRegion(byetArray, 0, length, buffer); + return byetArray; + } + + static inline jcharArray getCharArrayFromBuffer(jchar* buffer, int length) { + jcharArray charArray = (*JniUtils::getJniEnv())->NewCharArray(length); + (*JniUtils::getJniEnv())->SetCharArrayRegion(charArray, 0, length, buffer); + return charArray; + } + + static inline jbooleanArray getBooleanArrayFromBuffer(jboolean* buffer, int length) { + jbooleanArray booleanArray = (*JniUtils::getJniEnv())->NewBooleanArray(length); + (*JniUtils::getJniEnv())->SetBooleanArrayRegion(booleanArray, 0, length, buffer); + return booleanArray; + } +} + +#endif \ No newline at end of file diff --git a/HelloSerial4j/src/main/native/include/Logger.h b/HelloSerial4j/src/main/native/include/Logger.h new file mode 100644 index 00000000..bf3f28ad --- /dev/null +++ b/HelloSerial4j/src/main/native/include/Logger.h @@ -0,0 +1,73 @@ +#ifndef LOGGER + +#define LOGGER + +#include +#include +#include +#include +#include + +typedef const char* AlertType; + +#define INFO ((AlertType) "Info") +#define WARNING ((AlertType) "Warning") +#define OK ((AlertType) "Status Ok") +#define FAILURE ((AlertType) "Failed") +#define SUCCESS ((AlertType) "Succeeded") + +#define LOGGER_FORMAT ((const char*) "%s::%s: %s \n\r") + +struct Logger { + + int* loggingEnabled; + + void init() { + loggingEnabled = (int*) calloc(1, sizeof(int*)); + } + + void destroy() { + BufferUtils::deleteBuffer(loggingEnabled); + } + + void setLoggingEnabled() { + *(this->loggingEnabled) = 1; + } + + void setLoggingDisabled() { + *(this->loggingEnabled) = 0; + } + + int* isLoggingEnabled() { + return this->loggingEnabled; + } + + int LOG(const char* API_LABEL, AlertType ALERT_TYPE, const char* MSG) { + if (!*(this->isLoggingEnabled())) { + return LOGGER_DISABLED; + } + return printf(LOGGER_FORMAT, API_LABEL, ALERT_TYPE, MSG); + } + + int LOGI(const char* API_LABEL, const char* MSG) { + return LOG(API_LABEL, INFO, MSG); + } + + int LOGW(const char* API_LABEL, const char* MSG) { + return LOG(API_LABEL, WARNING, MSG); + } + + int LOGF(const char* API_LABEL, const char* MSG) { + return LOG(API_LABEL, FAILURE, MSG); + } + + int LOGS(const char* API_LABEL, const char* MSG) { + return LOG(API_LABEL, SUCCESS, MSG); + } + + int LOG_OK(const char* API_LABEL, const char* MSG) { + return LOG(API_LABEL, OK, MSG); + } +}; + +#endif \ No newline at end of file diff --git a/HelloSerial4j/src/main/native/include/info.md b/HelloSerial4j/src/main/native/include/info.md new file mode 100644 index 00000000..b69ea01a --- /dev/null +++ b/HelloSerial4j/src/main/native/include/info.md @@ -0,0 +1,8 @@ +# Serial4j API C Utils + +## Includes the following: +- BufferUtils.h: for managing native buffers. +- DynamicBuffer.h: for creating dynamic buffers. +- ErrnoUtils.h: for checking and referencing different errno code numbers. +- JniUtils.h: for java native interface utilities. +- Logger.h: for native logging using {printf}. \ No newline at end of file diff --git a/HelloSerial4j/src/main/native/include/jni/com_serial4j_core_errno_NativeErrno.h b/HelloSerial4j/src/main/native/include/jni/com_serial4j_core_errno_NativeErrno.h new file mode 100644 index 00000000..5356cc8e --- /dev/null +++ b/HelloSerial4j/src/main/native/include/jni/com_serial4j_core_errno_NativeErrno.h @@ -0,0 +1,173 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class com_serial4j_core_errno_NativeErrno */ + +#ifndef _Included_com_serial4j_core_errno_NativeErrno +#define _Included_com_serial4j_core_errno_NativeErrno +#ifdef __cplusplus +extern "C" { +#endif +/* + * Class: com_serial4j_core_errno_NativeErrno + * Method: getBadFileDescriptorErrno + * Signature: ()I + */ +JNIEXPORT jint JNICALL Java_com_serial4j_core_errno_NativeErrno_getBadFileDescriptorErrno + (JNIEnv *, jclass); + +/* + * Class: com_serial4j_core_errno_NativeErrno + * Method: getBrokenPipeErrno + * Signature: ()I + */ +JNIEXPORT jint JNICALL Java_com_serial4j_core_errno_NativeErrno_getBrokenPipeErrno + (JNIEnv *, jclass); + +/* + * Class: com_serial4j_core_errno_NativeErrno + * Method: getFileAlreadyOpenedErrno + * Signature: ()I + */ +JNIEXPORT jint JNICALL Java_com_serial4j_core_errno_NativeErrno_getFileAlreadyOpenedErrno + (JNIEnv *, jclass); + +/* + * Class: com_serial4j_core_errno_NativeErrno + * Method: getFileIsDirectoryErrno + * Signature: ()I + */ +JNIEXPORT jint JNICALL Java_com_serial4j_core_errno_NativeErrno_getFileIsDirectoryErrno + (JNIEnv *, jclass); + +/* + * Class: com_serial4j_core_errno_NativeErrno + * Method: getFileTableOverflowErrno + * Signature: ()I + */ +JNIEXPORT jint JNICALL Java_com_serial4j_core_errno_NativeErrno_getFileTableOverflowErrno + (JNIEnv *, jclass); + +/* + * Class: com_serial4j_core_errno_NativeErrno + * Method: getFileTooLargeErrno + * Signature: ()I + */ +JNIEXPORT jint JNICALL Java_com_serial4j_core_errno_NativeErrno_getFileTooLargeErrno + (JNIEnv *, jclass); + +/* + * Class: com_serial4j_core_errno_NativeErrno + * Method: getInputOutputErrno + * Signature: ()I + */ +JNIEXPORT jint JNICALL Java_com_serial4j_core_errno_NativeErrno_getInputOutputErrno + (JNIEnv *, jclass); + +/* + * Class: com_serial4j_core_errno_NativeErrno + * Method: getInterruptedSystemCallErrno + * Signature: ()I + */ +JNIEXPORT jint JNICALL Java_com_serial4j_core_errno_NativeErrno_getInterruptedSystemCallErrno + (JNIEnv *, jclass); + +/* + * Class: com_serial4j_core_errno_NativeErrno + * Method: getInvalidArgumentErrno + * Signature: ()I + */ +JNIEXPORT jint JNICALL Java_com_serial4j_core_errno_NativeErrno_getInvalidArgumentErrno + (JNIEnv *, jclass); + +/* + * Class: com_serial4j_core_errno_NativeErrno + * Method: getInvalidPortErrno + * Signature: ()I + */ +JNIEXPORT jint JNICALL Java_com_serial4j_core_errno_NativeErrno_getInvalidPortErrno + (JNIEnv *, jclass); + +/* + * Class: com_serial4j_core_errno_NativeErrno + * Method: getNoAvailableTtyDevicesErrno + * Signature: ()I + */ +JNIEXPORT jint JNICALL Java_com_serial4j_core_errno_NativeErrno_getNoAvailableTtyDevicesErrno + (JNIEnv *, jclass); + +/* + * Class: com_serial4j_core_errno_NativeErrno + * Method: getNoSpaceLeftErrno + * Signature: ()I + */ +JNIEXPORT jint JNICALL Java_com_serial4j_core_errno_NativeErrno_getNoSpaceLeftErrno + (JNIEnv *, jclass); + +/* + * Class: com_serial4j_core_errno_NativeErrno + * Method: getNoSuchDeviceErrno + * Signature: ()I + */ +JNIEXPORT jint JNICALL Java_com_serial4j_core_errno_NativeErrno_getNoSuchDeviceErrno + (JNIEnv *, jclass); + +/* + * Class: com_serial4j_core_errno_NativeErrno + * Method: getNoSuchFileErrno + * Signature: ()I + */ +JNIEXPORT jint JNICALL Java_com_serial4j_core_errno_NativeErrno_getNoSuchFileErrno + (JNIEnv *, jclass); + +/* + * Class: com_serial4j_core_errno_NativeErrno + * Method: getNotTtyDeviceErrno + * Signature: ()I + */ +JNIEXPORT jint JNICALL Java_com_serial4j_core_errno_NativeErrno_getNotTtyDeviceErrno + (JNIEnv *, jclass); + +/* + * Class: com_serial4j_core_errno_NativeErrno + * Method: getOperationFailedErrno + * Signature: ()I + */ +JNIEXPORT jint JNICALL Java_com_serial4j_core_errno_NativeErrno_getOperationFailedErrno + (JNIEnv *, jclass); + +/* + * Class: com_serial4j_core_errno_NativeErrno + * Method: getPermissionDeniedErrno + * Signature: ()I + */ +JNIEXPORT jint JNICALL Java_com_serial4j_core_errno_NativeErrno_getPermissionDeniedErrno + (JNIEnv *, jclass); + +/* + * Class: com_serial4j_core_errno_NativeErrno + * Method: getReadOnlyFileSystemErrno + * Signature: ()I + */ +JNIEXPORT jint JNICALL Java_com_serial4j_core_errno_NativeErrno_getReadOnlyFileSystemErrno + (JNIEnv *, jclass); + +/* + * Class: com_serial4j_core_errno_NativeErrno + * Method: getTooManyOpenedFilesErrno + * Signature: ()I + */ +JNIEXPORT jint JNICALL Java_com_serial4j_core_errno_NativeErrno_getTooManyOpenedFilesErrno + (JNIEnv *, jclass); + +/* + * Class: com_serial4j_core_errno_NativeErrno + * Method: getTryAgainErrno + * Signature: ()I + */ +JNIEXPORT jint JNICALL Java_com_serial4j_core_errno_NativeErrno_getTryAgainErrno + (JNIEnv *, jclass); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/HelloSerial4j/src/main/native/include/jni/com_serial4j_core_serial_NativeTerminalDevice.h b/HelloSerial4j/src/main/native/include/jni/com_serial4j_core_serial_NativeTerminalDevice.h new file mode 100644 index 00000000..71264988 --- /dev/null +++ b/HelloSerial4j/src/main/native/include/jni/com_serial4j_core_serial_NativeTerminalDevice.h @@ -0,0 +1,189 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class com_serial4j_core_serial_NativeTerminalDevice */ + +#ifndef _Included_com_serial4j_core_serial_NativeTerminalDevice +#define _Included_com_serial4j_core_serial_NativeTerminalDevice +#ifdef __cplusplus +extern "C" { +#endif +/* + * Class: com_serial4j_core_serial_NativeTerminalDevice + * Method: setupJniEnvironment0 + * Signature: ()I + */ +JNIEXPORT jint JNICALL Java_com_serial4j_core_serial_NativeTerminalDevice_setupJniEnvironment0 + (JNIEnv *, jclass); + +/* + * Class: com_serial4j_core_serial_NativeTerminalDevice + * Method: setTerminalControlFlag + * Signature: (J)I + */ +JNIEXPORT jint JNICALL Java_com_serial4j_core_serial_NativeTerminalDevice_setTerminalControlFlag + (JNIEnv *, jobject, jlong); + +/* + * Class: com_serial4j_core_serial_NativeTerminalDevice + * Method: setTerminalLocalFlag + * Signature: (J)I + */ +JNIEXPORT jint JNICALL Java_com_serial4j_core_serial_NativeTerminalDevice_setTerminalLocalFlag + (JNIEnv *, jobject, jlong); + +/* + * Class: com_serial4j_core_serial_NativeTerminalDevice + * Method: setTerminalInputFlag + * Signature: (J)I + */ +JNIEXPORT jint JNICALL Java_com_serial4j_core_serial_NativeTerminalDevice_setTerminalInputFlag + (JNIEnv *, jobject, jlong); + +/* + * Class: com_serial4j_core_serial_NativeTerminalDevice + * Method: setTerminalOutputFlag + * Signature: (J)I + */ +JNIEXPORT jint JNICALL Java_com_serial4j_core_serial_NativeTerminalDevice_setTerminalOutputFlag + (JNIEnv *, jobject, jlong); + +/* + * Class: com_serial4j_core_serial_NativeTerminalDevice + * Method: getTerminalControlFlag + * Signature: ()J + */ +JNIEXPORT jlong JNICALL Java_com_serial4j_core_serial_NativeTerminalDevice_getTerminalControlFlag + (JNIEnv *, jobject); + +/* + * Class: com_serial4j_core_serial_NativeTerminalDevice + * Method: getTerminalLocalFlag + * Signature: ()J + */ +JNIEXPORT jlong JNICALL Java_com_serial4j_core_serial_NativeTerminalDevice_getTerminalLocalFlag + (JNIEnv *, jobject); + +/* + * Class: com_serial4j_core_serial_NativeTerminalDevice + * Method: getTerminalInputFlag + * Signature: ()J + */ +JNIEXPORT jlong JNICALL Java_com_serial4j_core_serial_NativeTerminalDevice_getTerminalInputFlag + (JNIEnv *, jobject); + +/* + * Class: com_serial4j_core_serial_NativeTerminalDevice + * Method: getTerminalOutputFlag + * Signature: ()J + */ +JNIEXPORT jlong JNICALL Java_com_serial4j_core_serial_NativeTerminalDevice_getTerminalOutputFlag + (JNIEnv *, jobject); + +/* + * Class: com_serial4j_core_serial_NativeTerminalDevice + * Method: setReadConfigurationMode0 + * Signature: (II)I + */ +JNIEXPORT jint JNICALL Java_com_serial4j_core_serial_NativeTerminalDevice_setReadConfigurationMode0 + (JNIEnv *, jobject, jint, jint); + +/* + * Class: com_serial4j_core_serial_NativeTerminalDevice + * Method: getReadConfigurationMode0 + * Signature: ()[I + */ +JNIEXPORT jintArray JNICALL Java_com_serial4j_core_serial_NativeTerminalDevice_getReadConfigurationMode0 + (JNIEnv *, jobject); + +/* + * Class: com_serial4j_core_serial_NativeTerminalDevice + * Method: getErrno0 + * Signature: ()I + */ +JNIEXPORT jint JNICALL Java_com_serial4j_core_serial_NativeTerminalDevice_getErrno0 + (JNIEnv *, jobject); + +/* + * Class: com_serial4j_core_serial_NativeTerminalDevice + * Method: fetchSerialPorts0 + * Signature: ()I + */ +JNIEXPORT jint JNICALL Java_com_serial4j_core_serial_NativeTerminalDevice_fetchSerialPorts0 + (JNIEnv *, jobject); + +/* + * Class: com_serial4j_core_serial_NativeTerminalDevice + * Method: getBaudRate0 + * Signature: ()I + */ +JNIEXPORT jint JNICALL Java_com_serial4j_core_serial_NativeTerminalDevice_getBaudRate0 + (JNIEnv *, jobject); + +/* + * Class: com_serial4j_core_serial_NativeTerminalDevice + * Method: writeData0 + * Signature: (I)J + */ +JNIEXPORT jlong JNICALL Java_com_serial4j_core_serial_NativeTerminalDevice_writeData0 + (JNIEnv *, jobject, jint); + +/* + * Class: com_serial4j_core_serial_NativeTerminalDevice + * Method: readData0 + * Signature: ()J + */ +JNIEXPORT jlong JNICALL Java_com_serial4j_core_serial_NativeTerminalDevice_readData0 + (JNIEnv *, jobject); + +/* + * Class: com_serial4j_core_serial_NativeTerminalDevice + * Method: writeBuffer0 + * Signature: (Ljava/lang/String;I)J + */ +JNIEXPORT jlong JNICALL Java_com_serial4j_core_serial_NativeTerminalDevice_writeBuffer0 + (JNIEnv *, jobject, jstring, jint); + +/* + * Class: com_serial4j_core_serial_NativeTerminalDevice + * Method: readBuffer0 + * Signature: ()J + */ +JNIEXPORT jlong JNICALL Java_com_serial4j_core_serial_NativeTerminalDevice_readBuffer0 + (JNIEnv *, jobject); + +/* + * Class: com_serial4j_core_serial_NativeTerminalDevice + * Method: openPort0 + * Signature: (Ljava/lang/String;I)I + */ +JNIEXPORT jint JNICALL Java_com_serial4j_core_serial_NativeTerminalDevice_openPort0 + (JNIEnv *, jobject, jstring, jint); + +/* + * Class: com_serial4j_core_serial_NativeTerminalDevice + * Method: initTermios0 + * Signature: ()I + */ +JNIEXPORT jint JNICALL Java_com_serial4j_core_serial_NativeTerminalDevice_initTermios0 + (JNIEnv *, jobject); + +/* + * Class: com_serial4j_core_serial_NativeTerminalDevice + * Method: setBaudRate0 + * Signature: (I)I + */ +JNIEXPORT jint JNICALL Java_com_serial4j_core_serial_NativeTerminalDevice_setBaudRate0 + (JNIEnv *, jobject, jint); + +/* + * Class: com_serial4j_core_serial_NativeTerminalDevice + * Method: closePort0 + * Signature: ()I + */ +JNIEXPORT jint JNICALL Java_com_serial4j_core_serial_NativeTerminalDevice_closePort0 + (JNIEnv *, jobject); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/HelloSerial4j/src/main/native/include/jni/info.md b/HelloSerial4j/src/main/native/include/jni/info.md new file mode 100644 index 00000000..81652f87 --- /dev/null +++ b/HelloSerial4j/src/main/native/include/jni/info.md @@ -0,0 +1,4 @@ +# Serial4j API Native Jni headers + +## Includes the following: +- {com_serial4j_core_serial_NativeTerminalDevice.h}: for terminal device operation and initialization. \ No newline at end of file diff --git a/HelloSerial4j/src/main/native/include/linux/SerialUtils.h b/HelloSerial4j/src/main/native/include/linux/SerialUtils.h new file mode 100644 index 00000000..1a72934c --- /dev/null +++ b/HelloSerial4j/src/main/native/include/linux/SerialUtils.h @@ -0,0 +1,77 @@ +/** + * @file SerialUtils.util + * @author pavl_g. + * @brief Represents utilities for the [Serial.h] library. + * @version 0.1 + * @date 2022-08-24 + * + * @copyright + * BSD 3-Clause License + * + * Copyright (c) 2022, Scrappers Team, The AVR-Sandbox Project, Serial4j API. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#ifndef SERIAL_UTILS +#define SERIAL_UTILS + +#include +#include +#include +#include +#include + +namespace SerialUtils { + + /** + * @brief Converts a [file] into a [device] and outputs the + * result into a [buffer]. + * + * @param buffer a buffer to fill in the operation. + * @param file the file to convert into a device. + * @return char* a buffer of {"/dev/"} formula. + */ + static inline char* concatIntoDevice(char* buffer, const char* file, const char* DEVICES_DIR) { + strcat(buffer, DEVICES_DIR); + strcat(buffer, file); + return buffer; + } + + /** + * @brief Tests whether the PATH specified is a real serial port. + * + * @param path the path to specify if its a serial port. + * @return int 1 if FD is a valid descriptor, 0 otherwise. + */ + static inline int isSerialPort(char* path, const int FLAG) { + int fdp = open(path, FLAG); + int state = isatty(fdp); + close(fdp); + return state; + } +} + +#endif \ No newline at end of file diff --git a/HelloSerial4j/src/main/native/include/linux/TerminalDevice.h b/HelloSerial4j/src/main/native/include/linux/TerminalDevice.h new file mode 100644 index 00000000..66b9385d --- /dev/null +++ b/HelloSerial4j/src/main/native/include/linux/TerminalDevice.h @@ -0,0 +1,258 @@ +/** + * @file Serial.h + * @author pavl_g. + * @brief Represents the serial port devices control and operation for POSIX systems. + * @note This is the base [HAL] (Hardware abstraction layer) for the Serial4j api. + * @version 0.1 + * @date 2022-08-24 + * + * @copyright + * BSD 3-Clause License + * + * Copyright (c) 2022, Scrappers Team, The AVR-Sandbox Project, Serial4j API. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#ifndef SERIAL +#define SERIAL "Serial4j-API" + +#include +#include +#include + +#include +#include +#include +#include +#include + +#include +#include +#include + +#define READ_CONFIG_SIZE (2) +#define DEVICES_DIR ((const char*) "/dev/") + +/** The default flags for the base file api */ +#define DEFAULT_FLAGS (O_RDWR | O_NONBLOCK | O_NOCTTY) + +typedef unsigned short int TerminalFlag; + +namespace TerminalDevice { + + /** Param@0 = VTIME, Param@1 = VMIN */ + const cc_t POLLING_READ[READ_CONFIG_SIZE] = {0, 0}; + const cc_t BLOCKING_READ_ONE_CHAR[READ_CONFIG_SIZE] = {0, 1}; + const cc_t READ_WITH_TIMEOUT[READ_CONFIG_SIZE] = {1, 0}; + const cc_t READ_WITH_INTERBYTE_TIMEOUT[READ_CONFIG_SIZE] = {1, 1}; + + /** + * Retrieves the termios of this tty device described by the file descriptor (fd). + * + * @param fd the virtual file descriptor for this tty device. + * @return a memory reference to the termios defining this tty device terminal attributes. + */ + struct termios* getTermiosFromFd(int* fd); + + /** + * @brief Fetches serial port devices on "/dev/" into [serialPorts] buffer. + * @note Uses , , , and . + * + * @return int (-3) if the directory ["/dev"] is invalid, (-4) if there are no tty + * devices available at the ["/dev"] directory, (1) if operation succeeded. + */ + int fetchSerialPorts(struct DynamicBuffer* serialPorts); + + /** + * @brief Opens a serial port device with a name. + * @note Uses Unix file base api and . + * + * @param port the path for the serial port device. + * @return int* a memory reference for the port file descriptor. + */ + int openPort(const char* port, int flag); + + /** + * @brief Initializes the default terminal for this device with the following default charachteristics: + * ----------- + * # c_cflag: for control mode flags. + * *** Enable these bits: + * - [CREAD]: Allow input to be received. + * - [CS8]: For charachter size 8-bit, you can use the bit mask CSIZE to read this value. + * - [CLOCAL]: Ignore modem status lines (donÂ’t check carrier signal). + * ----------- + * # c_lflag: for local mode flags. + * ***Disable these bits: + * - [ICANON]: Canonical mode (line-by-line) input. + * - [ECHO]: Echo input characters. + * - [ECHOE]: Perform ERASE visually. + * - [ECHOK]: Echo KILL visually. + * - [ECHOKE]: DonÂ’t output a newline after echoed KILL. + * - [ECHONL]: Echo NL (in canonical mode) even if echoing is disabled. + * - [ECHOPRT]: Echo deleted characters backward (between \ and / ). + * - [ECHOCTL]: Echo control characters visually (e.g., ^L ). + * - [ISIG]: Enable signal-generating characters (INTR, QUIT, SUSP). + * - [IEXTEN]: Enable extended processing of input characters. + * ----------- + * # c_oflag: for output mode flags. + * ***Disable these bits: + * - [OPOST]: Perform output postprocessing. + * - [ONLCR]: Map NL to CR-NL on output. + * ----------- + * # c_iflag: for input mode flags. + * ***Disable all input bit masks. + * ----------- + * # c_cc: For control characters. + * ***Sets to BLOCKING READ ONE CHAR AT A TIME MODE. + * ----------- + * + * @return int (-1) for failure, (-2) for invalid port or (1) for success. + */ + int initTermios(int* fd); + + /** + * @brief Sets the Terminal Control Flag [c_cflag] for the [termios] variable. + * + * @param flag bits to set, concatenate the flags using bitwise OR [|]. + * @return int (-1) for failure, (-2) for invalid port or (1) for success. + */ + int setTerminalControlFlag(TerminalFlag flag, int* fd); + + /** + * @brief Sets the Terminal Local Flag [c_lflag] for the [termios] variable. + * + * @param flag bits to set, concatenate the flags using bitwise OR [|]. + * @return int (-1) for failure, (-2) for invalid port or (1) for success. + */ + int setTerminalLocalFlag(TerminalFlag flag, int* fd); + + /** + * @brief Sets the Terminal Output Flag [c_oflag] for the [termios] variable. + * + * @param flag bits to set, concatenate the flags using bitwise OR [|]. + * @return int (-1) for failure, (-2) for invalid port or (1) for success. + */ + int setTerminalOutputFlag(TerminalFlag flag, int* fd); + + /** + * @brief Sets the Terminal Input Flag [c_iflag] for the [termios] variable. + * + * @param flags bits to set, concatenate the flags using bitwise OR [|]. + * @return int (-1) for failure, (-2) for invalid port or (1) for success. + */ + int setTerminalInputFlag(TerminalFlag flag, int* fd); + + /** + * @brief Gets the Terminal Control Flag defined by the termios attributes for this serial device. + * + * @return TerminalFlag the terminal control flag in [unsigned short int]. + */ + TerminalFlag getTerminalControlFlag(int* fd); + + /** + * @brief Gets the Terminal Local Flag defined by the termios attributes for this serial device. + * + * @return TerminalFlag the terminal local flag in [unsigned short int]. + */ + TerminalFlag getTerminalLocalFlag(int* fd); + + /** + * @brief Gets the Terminal Input Flag defined by the termios attributes for this serial device. + * + * @return TerminalFlag the terminal input flag in [unsigned short int]. + */ + TerminalFlag getTerminalInputFlag(int* fd); + + /** + * @brief Gets the Terminal Output Flag defined by the termios attributes for this serial device. + * + * @return TerminalFlag the terminal output flag in [unsigned short int]. + */ + TerminalFlag getTerminalOutputFlag(int* fd); + + /** + * @brief Sets the Read Configuration Mode using a ReadConfiguration with a + * VMIN_VALUE for lesser bytes to read and VTIME_VALUE for the elapsed time to + * set if the ReadConfiguration mode provides a timeout. + * + * @param VTIME_VALUE the value of the read timeout elapsed time, the timer starts + * with this value after read() is called. + * @param VMIN_VALUE the value of the minimum number of bytes to read. + * @return int (ERR_INVALID_PORT = -2) if port isn't available, (0) otherwise. + */ + int setReadConfigurationMode(const int VTIME_VALUE, const int VMIN_VALUE, int* fd); + + /** + * @brief Get the Read Configuration Mode in a new pointer. + * + * @return int* a memory reference to the new read configuration instance holding the VTIME and VMIN. + */ + cc_t* getReadConfigurationMode(int* fd); + + /** + * @brief Sets the Baud Rate object for the terminal io. + * + * @param baudRate the baud rate (bits/seconds). + * @return int (1) for success, (-1) for failure, (-2) for invalid port. + */ + int setBaudRate(int baudRate, int* fd); + + /** + * @brief Gets the Baud Rate object. + * + * @return speed_t baud rate in integers. + */ + speed_t getBaudRate(int* fd); + + /** + * @brief Writes a data to the serial port device from a buffer. + * + * @param buffer a buffer to write to the file. + * @param length the number of charachters to write from the buffer. + * @return ssize_t the number of bytes written to the serial device, (-1) for failure, (-2) for invalid port. + */ + ssize_t writeData(const void* buffer, int length, int* fd); + + /** + * @brief Reads data from the serial port device and saves it to a buffer. + * + * @param buffer a buffer to read from the file to it. + * @param length the number of the charachters to read by this buffer. + * @return ssize_t the number of bytes read from the terminal, (-1) for failure, (-2) for invalid port. + */ + ssize_t readData(void* buffer, int length, int* fd); + + /** + * @brief Closes the serial port device. + * + * @return int (1) for success, (-1) for failure, (-2) for invalid port. + */ + int closePort(int* fd); + +} + + +#endif diff --git a/HelloSerial4j/src/main/native/include/linux/Thread.h b/HelloSerial4j/src/main/native/include/linux/Thread.h new file mode 100644 index 00000000..7b57ec42 --- /dev/null +++ b/HelloSerial4j/src/main/native/include/linux/Thread.h @@ -0,0 +1,51 @@ +/** + * @file Thread.h + * @author pavl_g. + * @brief Optional header for operating within PThreads. + * @version 0.1 + * @date 2022-08-24 + * + * @note TODO. + * + * @copyright + * BSD 3-Clause License + * + * Copyright (c) 2022, Scrappers Team, The AVR-Sandbox Project, Serial4j API. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#ifndef _THREADS +#define _THREADS + +#include + +namespace POSIX { + struct Thread { + + }; +} + +#endif \ No newline at end of file diff --git a/HelloSerial4j/src/main/native/include/linux/info.md b/HelloSerial4j/src/main/native/include/linux/info.md new file mode 100644 index 00000000..615ff40e --- /dev/null +++ b/HelloSerial4j/src/main/native/include/linux/info.md @@ -0,0 +1 @@ +# Serial4j API Native Side designed for Linux/Unix \ No newline at end of file diff --git a/HelloSerial4j/src/main/native/include/windows/info.md b/HelloSerial4j/src/main/native/include/windows/info.md new file mode 100644 index 00000000..5cac7b1e --- /dev/null +++ b/HelloSerial4j/src/main/native/include/windows/info.md @@ -0,0 +1 @@ +# Serial4j API Win Side \ No newline at end of file diff --git a/HelloSerial4j/src/main/native/lib/DynamicBuffer.c b/HelloSerial4j/src/main/native/lib/DynamicBuffer.c new file mode 100755 index 00000000..0bd13205 --- /dev/null +++ b/HelloSerial4j/src/main/native/lib/DynamicBuffer.c @@ -0,0 +1,62 @@ +#include + +void DynamicBuffer::add(void* item) { + + /* move the pointer to point to the last item */ + /* then, obtain a superficial copy */ + void** copy = (buffer += count); + /* dereference and evalute using the superficial copy */ + *copy = (void*) calloc(1, sizeof(void*)); + *copy = item; + /* move the pointer back to the start of the buffer (first item) */ + buffer -= count; + count++; +} + +void DynamicBuffer::add(int index, void* item) { + /* adds on the count if the location was empty previously */ + if (buffer[index] == NULL) { + ++count; + } + buffer[index] = item; +} + +void DynamicBuffer::removeAt(int index) { + BufferUtils::nullifyBuffer(buffer, index); + BufferUtils::reValidateBuffer(buffer, getItemsCount(), &(this->isProcessed)); + + while (!this->isProcessed); + this->isProcessed = 0; + + count--; +} + +void DynamicBuffer::removeAll() { + for (int i = 0; i < *(this->getItemsCount()); i++) { + BufferUtils::nullifyBuffer(buffer, i); + } + + BufferUtils::reValidateBuffer(buffer, getItemsCount(), &(this->isProcessed)); + + while (!this->isProcessed); + this->isProcessed = 0; + + this->resetDataPointer(); +} + +void* DynamicBuffer::getItem(int index) { + return buffer[index]; +} + +int DynamicBuffer::getItemIndex(void* item) { + for (int i = 0; i < *getItemsCount(); i++) { + if (buffer[i] == item) { + return i; + } + } + return ERR_OPERATION_FAILED; +} + +int* DynamicBuffer::getItemsCount() { + return &count; +} diff --git a/HelloSerial4j/src/main/native/lib/info.md b/HelloSerial4j/src/main/native/lib/info.md new file mode 100644 index 00000000..d9a935a6 --- /dev/null +++ b/HelloSerial4j/src/main/native/lib/info.md @@ -0,0 +1,4 @@ +# Serial4j API C Utils + +## Includes the following: +- DynamicBuffer.c: for creating dynamic buffers. \ No newline at end of file diff --git a/HelloSerial4j/src/main/native/lib/jni/com_serial4j_core_errno_NativeErrno.c b/HelloSerial4j/src/main/native/lib/jni/com_serial4j_core_errno_NativeErrno.c new file mode 100755 index 00000000..aa6e263f --- /dev/null +++ b/HelloSerial4j/src/main/native/lib/jni/com_serial4j_core_errno_NativeErrno.c @@ -0,0 +1,102 @@ +#include +#include + +JNIEXPORT jint JNICALL Java_com_serial4j_core_errno_NativeErrno_getBadFileDescriptorErrno + (JNIEnv* env, jclass clazz) { + return EBADFD; +} + +JNIEXPORT jint JNICALL Java_com_serial4j_core_errno_NativeErrno_getBrokenPipeErrno + (JNIEnv* env, jclass clazz) { + return EPIPE; +} + +JNIEXPORT jint JNICALL Java_com_serial4j_core_errno_NativeErrno_getFileAlreadyOpenedErrno + (JNIEnv* env, jclass clazz) { + return EEXIST; +} + +JNIEXPORT jint JNICALL Java_com_serial4j_core_errno_NativeErrno_getFileIsDirectoryErrno + (JNIEnv* env, jclass clazz) { + return EISDIR; +} + +JNIEXPORT jint JNICALL Java_com_serial4j_core_errno_NativeErrno_getFileTableOverflowErrno + (JNIEnv* env, jclass clazz) { + return ENFILE; +} + +JNIEXPORT jint JNICALL Java_com_serial4j_core_errno_NativeErrno_getFileTooLargeErrno + (JNIEnv* env, jclass clazz) { + return EFBIG; +} + +JNIEXPORT jint JNICALL Java_com_serial4j_core_errno_NativeErrno_getInputOutputErrno + (JNIEnv* env, jclass clazz) { + return EIO; +} + +JNIEXPORT jint JNICALL Java_com_serial4j_core_errno_NativeErrno_getInterruptedSystemCallErrno + (JNIEnv* env, jclass clazz) { + return EINTR; +} + +JNIEXPORT jint JNICALL Java_com_serial4j_core_errno_NativeErrno_getInvalidArgumentErrno + (JNIEnv* env, jclass clazz) { + return EINVAL; +} + +JNIEXPORT jint JNICALL Java_com_serial4j_core_errno_NativeErrno_getInvalidPortErrno + (JNIEnv* env, jclass clazz) { + return ERR_INVALID_PORT; +} + +JNIEXPORT jint JNICALL Java_com_serial4j_core_errno_NativeErrno_getNoAvailableTtyDevicesErrno + (JNIEnv* env, jclass clazz) { + return ERR_NO_AVAILABLE_TTY_DEVICES; +} + +JNIEXPORT jint JNICALL Java_com_serial4j_core_errno_NativeErrno_getNoSpaceLeftErrno + (JNIEnv* env, jclass clazz) { + return ENOSPC; +} + +JNIEXPORT jint JNICALL Java_com_serial4j_core_errno_NativeErrno_getNoSuchDeviceErrno + (JNIEnv* env, jclass clazz) { + return ENXIO; +} + +JNIEXPORT jint JNICALL Java_com_serial4j_core_errno_NativeErrno_getNoSuchFileErrno + (JNIEnv* env, jclass clazz) { + return ENOENT; +} + +JNIEXPORT jint JNICALL Java_com_serial4j_core_errno_NativeErrno_getNotTtyDeviceErrno + (JNIEnv* env, jclass clazz) { + return ERR_NO_AVAILABLE_TTY_DEVICES; +} + +JNIEXPORT jint JNICALL Java_com_serial4j_core_errno_NativeErrno_getOperationFailedErrno + (JNIEnv* env, jclass clazz) { + return ERR_OPERATION_FAILED; +} + +JNIEXPORT jint JNICALL Java_com_serial4j_core_errno_NativeErrno_getPermissionDeniedErrno + (JNIEnv* env, jclass clazz) { + return EACCES; +} + +JNIEXPORT jint JNICALL Java_com_serial4j_core_errno_NativeErrno_getReadOnlyFileSystemErrno + (JNIEnv* env, jclass clazz) { + return EROFS; +} + +JNIEXPORT jint JNICALL Java_com_serial4j_core_errno_NativeErrno_getTooManyOpenedFilesErrno + (JNIEnv* env, jclass clazz) { + return EMFILE; +} + +JNIEXPORT jint JNICALL Java_com_serial4j_core_errno_NativeErrno_getTryAgainErrno + (JNIEnv* env, jclass clazz) { + return EAGAIN; +} diff --git a/HelloSerial4j/src/main/native/lib/jni/com_serial4j_core_serial_NativeTerminalDevice.c b/HelloSerial4j/src/main/native/lib/jni/com_serial4j_core_serial_NativeTerminalDevice.c new file mode 100755 index 00000000..350b4f93 --- /dev/null +++ b/HelloSerial4j/src/main/native/lib/jni/com_serial4j_core_serial_NativeTerminalDevice.c @@ -0,0 +1,238 @@ +/** + * @file com_serial4j_core_serial_NativeTerminalDevice.c + * @author pavl_g. + * @brief Instantiates a native interface of Serial4j API for the java programming language. + * @version 0.1 + * @date 2022-09-06 + * + * @copyright + * BSD 3-Clause License + * + * Copyright (c) 2022, Scrappers Team, The AVR-Sandbox Project, Serial4j API. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#include +#include +#include +#include +#include + +struct DynamicBuffer serialPorts; +cc_t* config = (cc_t*) calloc(2, sizeof(cc_t)); + +const cc_t* getReadConfiguration(jobject* object); + +const cc_t* getReadConfiguration(jobject* object) { + jint fd = JniUtils::getPortDescriptorFromSerialPort(object); + const cc_t* readConfigBuffer = TerminalDevice::getReadConfigurationMode(&fd); + return readConfigBuffer; +} + +JNIEXPORT jint JNICALL Java_com_serial4j_core_serial_NativeTerminalDevice_setupJniEnvironment0 + (JNIEnv* env, jclass clazz) { + return JniUtils::setupJavaEnvironment(env, JNI_VERSION_1_8); +} + +JNIEXPORT jint JNICALL Java_com_serial4j_core_serial_NativeTerminalDevice_setTerminalControlFlag + (JNIEnv* env, jobject object, jlong flag) { + jint fd = JniUtils::getPortDescriptorFromSerialPort(&object); + return TerminalDevice::setTerminalControlFlag((jlong) flag, &fd); +} + +JNIEXPORT jint JNICALL Java_com_serial4j_core_serial_NativeTerminalDevice_setTerminalLocalFlag + (JNIEnv* env, jobject object, jlong flag) { + jint fd = JniUtils::getPortDescriptorFromSerialPort(&object); + return TerminalDevice::setTerminalLocalFlag((jlong) flag, &fd); +} + +JNIEXPORT jint JNICALL Java_com_serial4j_core_serial_NativeTerminalDevice_setTerminalInputFlag + (JNIEnv* env, jobject object, jlong flag) { + jint fd = JniUtils::getPortDescriptorFromSerialPort(&object); + return TerminalDevice::setTerminalInputFlag((jlong) flag, &fd); +} + +JNIEXPORT jint JNICALL Java_com_serial4j_core_serial_NativeTerminalDevice_setTerminalOutputFlag + (JNIEnv* env, jobject object, jlong flag) { + jint fd = JniUtils::getPortDescriptorFromSerialPort(&object); + return TerminalDevice::setTerminalOutputFlag((jlong) flag, &fd); +} + +JNIEXPORT jlong JNICALL Java_com_serial4j_core_serial_NativeTerminalDevice_getTerminalControlFlag + (JNIEnv* env, jobject object) { + jint fd = JniUtils::getPortDescriptorFromSerialPort(&object); + return (jlong) TerminalDevice::getTerminalControlFlag(&fd); +} + +JNIEXPORT jlong JNICALL Java_com_serial4j_core_serial_NativeTerminalDevice_getTerminalLocalFlag + (JNIEnv* env, jobject object) { + jint fd = JniUtils::getPortDescriptorFromSerialPort(&object); + return (jlong) TerminalDevice::getTerminalLocalFlag(&fd); +} + +JNIEXPORT jlong JNICALL Java_com_serial4j_core_serial_NativeTerminalDevice_getTerminalInputFlag + (JNIEnv* env, jobject object) { + jint fd = JniUtils::getPortDescriptorFromSerialPort(&object); + return (jlong) TerminalDevice::getTerminalInputFlag(&fd); +} + +JNIEXPORT jlong JNICALL Java_com_serial4j_core_serial_NativeTerminalDevice_getTerminalOutputFlag + (JNIEnv* env, jobject object) { + jint fd = JniUtils::getPortDescriptorFromSerialPort(&object); + return (jlong) TerminalDevice::getTerminalOutputFlag(&fd); +} + +JNIEXPORT jint JNICALL Java_com_serial4j_core_serial_NativeTerminalDevice_setReadConfigurationMode0 + (JNIEnv* env, jobject object, jint timeoutValue, jint minimumBytes) { + + jint fd = JniUtils::getPortDescriptorFromSerialPort(&object); + + return TerminalDevice::setReadConfigurationMode(timeoutValue, minimumBytes, &fd); +} + +JNIEXPORT jintArray JNICALL Java_com_serial4j_core_serial_NativeTerminalDevice_getReadConfigurationMode0 + (JNIEnv* env, jobject object) { + const cc_t* readConfig = getReadConfiguration(&object); + int* buffer = (int*) calloc(2, sizeof(int)); + buffer[0] = readConfig[0]; + buffer[1] = readConfig[1]; + return JniUtils::getIntArrayFromBuffer(buffer, READ_CONFIG_SIZE); +} + +JNIEXPORT jint JNICALL Java_com_serial4j_core_serial_NativeTerminalDevice_fetchSerialPorts0 + (JNIEnv* env, jobject object) { + int state = TerminalDevice::fetchSerialPorts(&serialPorts); + + int length = *serialPorts.getItemsCount(); + jobjectArray stringArray = JniUtils::createNewArrayFromBuffer(java_lang_String, length); + JniUtils::setObjectField(&object, "serialPorts", "[Ljava/lang/String;", stringArray); + + jobject* objectBuffer = JniUtils::getObjectBufferFromString((const char**) serialPorts.getBuffer(), length); + JniUtils::setArrayElements(stringArray, length, objectBuffer); + BufferUtils::deleteBuffer(objectBuffer); + + return state; +} + +JNIEXPORT jlong JNICALL Java_com_serial4j_core_serial_NativeTerminalDevice_writeData0 + (JNIEnv* env, jobject object, jint buffer) { + jint fd = JniUtils::getPortDescriptorFromSerialPort(&object); + return TerminalDevice::writeData(&buffer, 1, &fd); +} + +JNIEXPORT jlong JNICALL Java_com_serial4j_core_serial_NativeTerminalDevice_readData0 + (JNIEnv* env, jobject object) { + jint fd = JniUtils::getPortDescriptorFromSerialPort(&object); + int length = getReadConfiguration(&object)[1] <= 0 ? getReadConfiguration(&object)[1] : 1; + + jchar* buffer = (jchar*) calloc(length, sizeof(jchar)); + int state = TerminalDevice::readData((void*) buffer, length, &fd); + + jcharArray arrayBuffer = JniUtils::getCharArrayFromBuffer(buffer, length); + JniUtils::setObjectField(&object, "readData", "[C", arrayBuffer); + + BufferUtils::deleteBuffer(buffer); + return state; +} + +JNIEXPORT jlong JNICALL Java_com_serial4j_core_serial_NativeTerminalDevice_writeBuffer0 + (JNIEnv* env, jobject object, jstring string, jint length) { + jint fd = JniUtils::getPortDescriptorFromSerialPort(&object); + const char* buffer = JniUtils::getBufferFromString(string); + int state = TerminalDevice::writeData(buffer, length, &fd); + BufferUtils::deleteBuffer((void*) buffer); + return state; +} + +JNIEXPORT jlong JNICALL Java_com_serial4j_core_serial_NativeTerminalDevice_readBuffer0 + (JNIEnv* env, jobject object) { + jint fd = JniUtils::getPortDescriptorFromSerialPort(&object); + /* construct a termios and get the control charachter flag from fd */ + struct termios* tty = TerminalDevice::getTermiosFromFd(&fd); + + int length = tty->c_cc[VMIN]; + + const char* strBuffer = (const char*) calloc(length, sizeof(const char)); + + long numberOfReadChars = TerminalDevice::readData((void*) strBuffer, length, &fd); + + /* get the java string buffer and setup its data with the buffer */ + JniUtils::setObjectField(&object, "readBuffer", "Ljava/lang/String;", (*JniUtils::getJniEnv())->NewStringUTF(strBuffer)); + + BufferUtils::deleteBuffer(tty); + BufferUtils::deleteBuffer((void*) strBuffer); + + + return numberOfReadChars; +} + +JNIEXPORT jint JNICALL Java_com_serial4j_core_serial_NativeTerminalDevice_setBaudRate0 + (JNIEnv* env, jobject object, jint baudRate) { + jint fd = JniUtils::getPortDescriptorFromSerialPort(&object); + return TerminalDevice::setBaudRate(baudRate, &fd); +} + +JNIEXPORT jint JNICALL Java_com_serial4j_core_serial_NativeTerminalDevice_getBaudRate0 + (JNIEnv* env, jobject object) { + jint fd = JniUtils::getPortDescriptorFromSerialPort(&object); + return TerminalDevice::getBaudRate(&fd); +} + +JNIEXPORT jint JNICALL Java_com_serial4j_core_serial_NativeTerminalDevice_initTermios0 + (JNIEnv* env, jobject object) { + jint fd = JniUtils::getPortDescriptorFromSerialPort(&object); + return TerminalDevice::initTermios(&fd); +} + +JNIEXPORT jint JNICALL Java_com_serial4j_core_serial_NativeTerminalDevice_openPort0 + (JNIEnv* env, jobject object, jstring strBuffer, jint flag) { + + int fd = TerminalDevice::openPort((*JniUtils::getJniEnv())->GetStringUTFChars(strBuffer, 0), flag); + jobject serialPortObject = JniUtils::getSerialPortFromTerminalDevice(&object); + JniUtils::setIntField(&serialPortObject, "portOpened", "I", 1); + JniUtils::setIntField(&serialPortObject, "fd", "I", fd); + JniUtils::setIntField(&serialPortObject, "ioFlag", "I", flag); + + return fd; +} + +JNIEXPORT jint JNICALL Java_com_serial4j_core_serial_NativeTerminalDevice_closePort0 + (JNIEnv* env, jobject object) { + + jobject serialPortObject = JniUtils::getSerialPortFromTerminalDevice(&object); + + jint fd = JniUtils::getPortDescriptorFromSerialPort(&object); + JniUtils::setIntField(&serialPortObject, "portOpened", "I", 0); + JniUtils::setIntField(&serialPortObject, "fd", "I", 0); + JniUtils::setObjectField(&serialPortObject, "path", "Ljava/lang/String;", (*JniUtils::getJniEnv())->NewStringUTF("")); + + return TerminalDevice::closePort(&fd); +} + +JNIEXPORT jint JNICALL Java_com_serial4j_core_serial_NativeTerminalDevice_getErrno0 + (JNIEnv* env, jobject object) { + return errno; +} \ No newline at end of file diff --git a/HelloSerial4j/src/main/native/lib/linux/TerminalDevice.c b/HelloSerial4j/src/main/native/lib/linux/TerminalDevice.c new file mode 100755 index 00000000..2de4dad3 --- /dev/null +++ b/HelloSerial4j/src/main/native/lib/linux/TerminalDevice.c @@ -0,0 +1,249 @@ +#include + +struct termios* TerminalDevice::getTermiosFromFd(int* fd) { + if (fd == NULL) { + return NULL; + } + struct termios* tty = (struct termios*) calloc(1, sizeof(struct termios)); + /* update the termios struct pointer with the data from the port descriptor */ + tcgetattr(*fd, tty); + return tty; +} + +int TerminalDevice::openPort(const char* port, int flag) { + return open(port, flag); +} + +int TerminalDevice::fetchSerialPorts(struct DynamicBuffer* serialPorts) { + + DIR* dirp = opendir(DEVICES_DIR); + + /* sanity check the input */ + if (dirp == NULL) { + return ERR_INVALID_DIR; + } + + struct dirent* dp = (struct dirent*) calloc(1, sizeof(struct dirent)); + + /* start at the beginning of the buffer to override last data */ + serialPorts->resetDataPointer(); + + /* start reading available ports */ + while ((dp = readdir(dirp)) != NULL) { + + char* device = (char*) calloc(1, sizeof(char)); + device = SerialUtils::concatIntoDevice(device, dp->d_name, DEVICES_DIR); + + /* delete the device buffer if it's not a serial port */ + if (!SerialUtils::isSerialPort(device, DEFAULT_FLAGS)) { + BufferUtils::deleteBuffer(device); + continue; + } + + /* add the device to the serial ports major buffer and count up */ + serialPorts->add(device); + } + + /* release resources */ + closedir(dirp); + BufferUtils::deleteBuffer(dp); + + /* throws error indicating the availability issues */ + if (serialPorts->getItem(0) == NULL) { + return ERR_NO_AVAILABLE_TTY_DEVICES; + } + return OPERATION_SUCCEEDED; +} + +int TerminalDevice::initTermios(int* fd) { + if (*fd <= 0) { + return ERR_INVALID_PORT; + } + + struct termios* tty = TerminalDevice::getTermiosFromFd(fd); + + /* setup tty attributes */ + tty->c_cflag &= ~(CBAUDEX | CBAUD); /* clear BAUDs */ + tty->c_cflag |= (CREAD | CS8 | CLOCAL); /* set flags */ + tty->c_lflag &= ~(ICANON | ECHO | ECHOE | ECHOK | ECHOKE | ECHONL | ECHOPRT | ECHOCTL | ISIG | IEXTEN); + tty->c_oflag &= ~(OPOST | ONLCR); + tty->c_iflag = 0x00; + + /* define default read mode as blocking read on char at a time */ + tty->c_cc[VTIME] = BLOCKING_READ_ONE_CHAR[0]; + tty->c_cc[VMIN] = BLOCKING_READ_ONE_CHAR[1]; + + /* apply attriutes flag bits */ + int state = tcsetattr(*fd, TCSAFLUSH, tty); + BufferUtils::deleteBuffer(tty); + + return state; +} + +int TerminalDevice::setTerminalControlFlag(TerminalFlag flag, int* fd) { + if (*fd <= 0) { + return ERR_INVALID_PORT; + } + + struct termios* tty = TerminalDevice::getTermiosFromFd(fd); + + tty->c_cflag = flag; + /* sets the new terminal settings to the file descriptor with flushing any output */ + int state = tcsetattr(*fd, TCSAFLUSH, tty); + BufferUtils::deleteBuffer(tty); + + return state; +} + +int TerminalDevice::setTerminalLocalFlag(TerminalFlag flag, int* fd) { + if (*fd <= 0) { + return ERR_INVALID_PORT; + } + + struct termios* tty = TerminalDevice::getTermiosFromFd(fd); + + tty->c_lflag = flag; + int state = tcsetattr(*fd, TCSAFLUSH, tty); + BufferUtils::deleteBuffer(tty); + + return state; +} + +int TerminalDevice::setTerminalInputFlag(TerminalFlag flag, int* fd) { + if (*fd <= 0) { + return ERR_INVALID_PORT; + } + struct termios* tty = TerminalDevice::getTermiosFromFd(fd); + + tty->c_iflag = flag; + int state = tcsetattr(*fd, TCSAFLUSH, tty); + BufferUtils::deleteBuffer(tty); + + return state; +} + +int TerminalDevice::setTerminalOutputFlag(TerminalFlag flag, int* fd) { + if (*fd <= 0) { + return ERR_INVALID_PORT; + } + struct termios* tty = TerminalDevice::getTermiosFromFd(fd); + + tty->c_oflag = flag; + int state = tcsetattr(*fd, TCSAFLUSH, tty); + BufferUtils::deleteBuffer(tty); + + return state; +} + +TerminalFlag TerminalDevice::getTerminalControlFlag(int* fd) { + if (*fd <= 0) { + return ERR_INVALID_PORT; + } + struct termios* tty = TerminalDevice::getTermiosFromFd(fd); + + return tty->c_cflag; +} + +TerminalFlag TerminalDevice::getTerminalLocalFlag(int* fd) { + if (*fd <= 0) { + return ERR_INVALID_PORT; + } + struct termios* tty = TerminalDevice::getTermiosFromFd(fd); + + return tty->c_lflag; +} + +TerminalFlag TerminalDevice::getTerminalInputFlag(int* fd) { + if (*fd <= 0) { + return ERR_INVALID_PORT; + } + struct termios* tty = TerminalDevice::getTermiosFromFd(fd); + + return tty->c_iflag; +} + +TerminalFlag TerminalDevice::getTerminalOutputFlag(int* fd) { + if (*fd <= 0) { + return ERR_INVALID_PORT; + } + struct termios* tty = TerminalDevice::getTermiosFromFd(fd); + + return tty->c_oflag; +} + +int TerminalDevice::setReadConfigurationMode(const int VTIME_VALUE, const int VMIN_VALUE, int* fd) { + if (*fd <= 0) { + return ERR_INVALID_PORT; + } + struct termios* tty = TerminalDevice::getTermiosFromFd(fd); + + tty->c_cc[VTIME] = VTIME_VALUE; + tty->c_cc[VMIN] = VMIN_VALUE; + int state = tcsetattr(*fd, TCSAFLUSH, tty); + BufferUtils::deleteBuffer(tty); + + return state; +} + +cc_t* TerminalDevice::getReadConfigurationMode(int* fd) { + cc_t* readConfig = (cc_t*) calloc(2, sizeof(unsigned char)); + if (*fd <= 0) { + readConfig[0] = ERR_INVALID_PORT; + readConfig[1] = ERR_INVALID_PORT; + return readConfig; + } + struct termios* tty = TerminalDevice::getTermiosFromFd(fd); + + readConfig[0] = tty->c_cc[VTIME]; + readConfig[1] = tty->c_cc[VMIN]; + BufferUtils::deleteBuffer(tty); + + return readConfig; +} + +int TerminalDevice::setBaudRate(int baudRate, int* fd) { + if (*fd <= 0) { + return ERR_INVALID_PORT; + } + struct termios* tty = TerminalDevice::getTermiosFromFd(fd); + + /* update the baud rate of the termios */ + cfsetspeed(tty, baudRate); + int state = tcsetattr(*fd, TCSAFLUSH, tty); + BufferUtils::deleteBuffer(tty); + + return state; +} + +speed_t TerminalDevice::getBaudRate(int* fd) { + if (*fd <= 0) { + return ERR_INVALID_PORT; + } + struct termios* tty = TerminalDevice::getTermiosFromFd(fd); + + int speed = cfgetospeed(tty); + BufferUtils::deleteBuffer(tty); + + return speed; +} + +ssize_t TerminalDevice::writeData(const void* buffer, int length, int* fd) { + if (*fd <= 0) { + return ERR_INVALID_PORT; + } + return write(*fd, buffer, length); +} + +ssize_t TerminalDevice::readData(void* buffer, int length, int* fd) { + if (*fd <= 0) { + return ERR_INVALID_PORT; + } + return read(*fd, buffer, length); +} + +int TerminalDevice::closePort(int* fd) { + if (*fd <= 0) { + return ERR_INVALID_PORT; + } + return close(*fd); +} \ No newline at end of file diff --git a/HelloSerial4j/src/main/native/lib/linux/Thread.c b/HelloSerial4j/src/main/native/lib/linux/Thread.c new file mode 100755 index 00000000..a0dd490f --- /dev/null +++ b/HelloSerial4j/src/main/native/lib/linux/Thread.c @@ -0,0 +1,40 @@ +/** + * @file Thread.c + * @author pavl_g. + * @brief Optional source for operating within PThreads. + * @version 0.1 + * @date 2022-08-24 + * + * @note TODO. + * + * @copyright + * BSD 3-Clause License + * + * Copyright (c) 2022, Scrappers Team, The AVR-Sandbox Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#include \ No newline at end of file