These changes both simplify the Java code and improve performance across the
JNI boundary.
This also fixes the AnalogCrossConnectTest by adding delays to
setInterruptHigh() and setInterruptLow() to ensure the change in voltage has
time to propagate and extends the timeouts in AbstractInterruptTest.
Detailed changes:
Hoisted status checks to C. This avoids the need to create direct byte
buffers (expensive) and significantly simplifies the Java code. The C code
now directly generates the exception or reports the error to the DS.
The JVM pointer is now a global across the JNI, initialized by the OnLoad
function, avoiding the need for some of the class-specific initializers to
get this pointer for callbacks.
Opaque pointers (such as ports) are now passed as long values rather than
with a ByteBuffer wrapper.
Added extern "C" to source files. This allows earlier detection of JNI
definition mismatches to the Java source headers.
Changed JNI signatures to more closely match HAL signatures (in particular,
boolean is now universally used instead of byte for HAL bool, which cleans
up mapping back and forth to 1/0 from true/false).
Change-Id: I4ea0032cabb0871cd74106a3a70d947258c29d2d
The HAL functions often call NI functions that may expect status to be
initialized on entry. Java does not guarantee direct pointer allocation
memory to be initialized, although that may have been occurring by accident.
Change-Id: I5e3a553f3a7be8de3716ccfc13e6ca1cb4f2a552
Change-Id: If2218df082bca93d25b88088696d6c2897732efd
Adding FRC Local new mdns name
Change-Id: I53d206879663b96009ba3a12de161b7a425ffd10
Adding rpath for new libstdc++
Change-Id: I0c022efb0b15f094d153b44f60215ca00d5f1924
Updates the CAN send message to use CANSessionMuxSendMessage in the C++ JNI
Updates the CANJNI to use the new C++ JNI parameters
Change-Id: Ib7da7d5929c7c5656bf388246aa72aed23590173
This is the changes made by Patrick Plenefisch converting the native
code to use CMake and the CMake Maven Plugin, as opposed to the
native Maven plugin. This is to allow for compatibility with newer
versions of the GCC toolchain. All the cpp sources were moved from
maven style directories to cpp style directories for CMake.
Change-Id: I67f5e3608948f37c83b0990d232105a3784f8593