Added the JAVA_JNI_LOADLIBRARY macro for the jniclasscode pragma included in _upm.i for all java SWIG interface files.

This commit is contained in:
Serban Waltter 2018-01-17 14:11:35 +02:00 committed by Noel Eck
parent 6725559669
commit 2551596309
220 changed files with 228 additions and 2193 deletions

View File

@ -1,9 +1,8 @@
/* Macro for adding JAVA runnables. /* Macro for adding JAVA run
example usage: JAVA_ADD_INSTALLISR(upm::A110x) usage: JAVA_ADD_INSTALLISR(javaupm_a110x)
UPMClassName - UPM class name w/namespace.
*/ */
%define JAVA_ADD_INSTALLISR(UPMClassName) %define JAVA_ADD_INSTALLISR(UPM_Classname)
%extend UPMClassName { %extend UPM_Classname {
void installISR(jobject runnable) void installISR(jobject runnable)
{ {
$self->installISR(mraa_java_isr_callback, runnable); $self->installISR(mraa_java_isr_callback, runnable);
@ -11,17 +10,16 @@
} }
%enddef %enddef
/* Macro for adding JNI loadLibrary dependency. /* Macro for adding JNI loadLibrary dependency
example usage: JAVA_JNI_LOADLIBRARY(javaupm_rhusb) usage: JAVA_JNI_LOADLIBRARY(javaupm_rhusb)
PackageName: Target UPM JAVA package.
*/ */
%define JAVA_JNI_LOADLIBRARY(PackageName) %define JAVA_JNI_LOADLIBRARY(MyModuleName)
%pragma(java) jniclasscode=%{ %pragma(java) jniclasscode=%{
static { static {
try { try {
System.loadLibrary("PackageName"); System.loadLibrary("MyModuleName");
} catch (UnsatisfiedLinkError e) { } catch (UnsatisfiedLinkError e) {
System.err.println("Native code library (PackageName) failed to load. \n" + e); System.err.println("Native code library (MyModuleName) failed to load. \n" + e);
System.exit(1); System.exit(1);
} }
} }

View File

@ -8,13 +8,4 @@
%} %}
%include "abp.hpp" %include "abp.hpp"
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_abp)
static {
try {
System.loadLibrary("javaupm_abp");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -7,13 +7,4 @@
%include "ad8232.hpp" %include "ad8232.hpp"
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_ad8232)
static {
try {
System.loadLibrary("javaupm_ad8232");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -7,13 +7,4 @@
%include "adafruitms1438.hpp" %include "adafruitms1438.hpp"
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_adafruitms1438)
static {
try {
System.loadLibrary("javaupm_adafruitms1438");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -6,13 +6,4 @@
#include "adafruitss.hpp" #include "adafruitss.hpp"
%} %}
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_adafruitss)
static {
try {
System.loadLibrary("javaupm_adafruitss");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -8,13 +8,4 @@
%include "adc121c021.hpp" %include "adc121c021.hpp"
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_adc121c021)
static {
try {
System.loadLibrary("javaupm_adc121c021");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -7,13 +7,4 @@
%include "adis16448.hpp" %include "adis16448.hpp"
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_adis16448)
static {
try {
System.loadLibrary("javaupm_adis16448");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -18,13 +18,4 @@ import upm_interfaces.*;
%include "ads1015.hpp" %include "ads1015.hpp"
%include "ads1115.hpp" %include "ads1115.hpp"
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_ads1x15)
static {
try {
System.loadLibrary("javaupm_ads1x15");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -42,13 +42,4 @@
%include "adxl335.hpp" %include "adxl335.hpp"
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_adxl335)
static {
try {
System.loadLibrary("javaupm_adxl335");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -35,13 +35,4 @@
%include "adxl345.hpp" %include "adxl345.hpp"
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_adxl345)
static {
try {
System.loadLibrary("javaupm_adxl345");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -7,13 +7,4 @@
%include "adxrs610.hpp" %include "adxrs610.hpp"
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_adxrs610)
static {
try {
System.loadLibrary("javaupm_adxrs610");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -7,13 +7,4 @@
%include "am2315.hpp" %include "am2315.hpp"
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_am2315)
static {
try {
System.loadLibrary("javaupm_am2315");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -18,13 +18,4 @@
%include "apa102.hpp" %include "apa102.hpp"
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_apa102)
static {
try {
System.loadLibrary("javaupm_apa102");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -7,13 +7,4 @@
%include "apds9002.hpp" %include "apds9002.hpp"
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_apds9002)
static {
try {
System.loadLibrary("javaupm_apds9002");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -6,13 +6,4 @@
%} %}
%include "apds9930.hpp" %include "apds9930.hpp"
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_apds9930)
static {
try {
System.loadLibrary("javaupm_apds9930");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -7,13 +7,4 @@
%include "at42qt1070.hpp" %include "at42qt1070.hpp"
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_at42qt1070)
static {
try {
System.loadLibrary("javaupm_at42qt1070");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -11,13 +11,4 @@
%include "bacnetmstp.hpp" %include "bacnetmstp.hpp"
%include "bacnetutil.hpp" %include "bacnetutil.hpp"
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_bacnetmstp)
static {
try {
System.loadLibrary("javaupm_bacnetmstp");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -10,13 +10,4 @@
%} %}
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_bh1750)
static {
try {
System.loadLibrary("javaupm_bh1750");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -7,13 +7,4 @@
%include "biss0001.hpp" %include "biss0001.hpp"
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_biss0001)
static {
try {
System.loadLibrary("javaupm_biss0001");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -30,13 +30,4 @@
%include "bma220.hpp" %include "bma220.hpp"
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_bma220)
static {
try {
System.loadLibrary("javaupm_bma220");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -26,13 +26,4 @@ import java.lang.Float;
#include "bma250e.hpp" #include "bma250e.hpp"
%} %}
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_bma250e)
static {
try {
System.loadLibrary("javaupm_bma250e");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -26,13 +26,4 @@ import java.lang.Float;
#include "bmg160.hpp" #include "bmg160.hpp"
%} %}
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_bmg160)
static {
try {
System.loadLibrary("javaupm_bmg160");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -30,13 +30,4 @@
%include "bmi160.hpp" %include "bmi160.hpp"
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_bmi160)
static {
try {
System.loadLibrary("javaupm_bmi160");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -26,13 +26,4 @@ import java.lang.Float;
#include "bmm150.hpp" #include "bmm150.hpp"
%} %}
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_bmm150)
static {
try {
System.loadLibrary("javaupm_bmm150");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -26,13 +26,4 @@
#include "bme280.hpp" #include "bme280.hpp"
%} %}
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_bmp280)
static {
try {
System.loadLibrary("javaupm_bmp280");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -15,13 +15,4 @@ import upm_interfaces.*;
%include "bmpx8x_defs.h" %include "bmpx8x_defs.h"
%include "bmpx8x.hpp" %include "bmpx8x.hpp"
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_bmpx8x)
static {
try {
System.loadLibrary("javaupm_bmpx8x");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -44,13 +44,4 @@ import java.lang.Float;
#include "bmi055.hpp" #include "bmi055.hpp"
%} %}
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_bmx055)
static {
try {
System.loadLibrary("javaupm_bmx055");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -24,13 +24,4 @@
#include "bno055.hpp" #include "bno055.hpp"
%} %}
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_bno055)
static {
try {
System.loadLibrary("javaupm_bno055");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -9,13 +9,4 @@
%include "button.hpp" %include "button.hpp"
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_button)
static {
try {
System.loadLibrary("javaupm_button");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -8,13 +8,4 @@
#include "buzzer.hpp" #include "buzzer.hpp"
%} %}
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_buzzer)
static {
try {
System.loadLibrary("javaupm_buzzer");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -7,13 +7,4 @@
%include "cjq4435.hpp" %include "cjq4435.hpp"
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_cjq4435)
static {
try {
System.loadLibrary("javaupm_cjq4435");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -7,13 +7,4 @@
%include "collision.hpp" %include "collision.hpp"
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_collision)
static {
try {
System.loadLibrary("javaupm_collision");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -30,13 +30,4 @@
%include "curieimu.hpp" %include "curieimu.hpp"
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_curieimu)
static {
try {
System.loadLibrary("javaupm_curieimu");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -7,13 +7,4 @@
#include "cwlsxxa.hpp" #include "cwlsxxa.hpp"
%} %}
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_cwlsxxa)
static {
try {
System.loadLibrary("javaupm_cwlsxxa");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -9,13 +9,4 @@
#include "dfrec.hpp" #include "dfrec.hpp"
%} %}
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_dfrec)
static {
try {
System.loadLibrary("javaupm_dfrec");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -9,13 +9,4 @@
#include "dfrorp.hpp" #include "dfrorp.hpp"
%} %}
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_dfrorp)
static {
try {
System.loadLibrary("javaupm_dfrorp");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -7,13 +7,4 @@
%include "dfrph.hpp" %include "dfrph.hpp"
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_dfrph)
static {
try {
System.loadLibrary("javaupm_dfrph");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -9,13 +9,4 @@
%include "ds1307.hpp" %include "ds1307.hpp"
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_ds1307)
static {
try {
System.loadLibrary("javaupm_ds1307");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -18,13 +18,4 @@ import upm_interfaces.*;
%include "ds1808lc.hpp" %include "ds1808lc.hpp"
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_ds1808lc)
static {
try {
System.loadLibrary("javaupm_ds1808lc");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -11,13 +11,4 @@
%array_class(char, charArray); %array_class(char, charArray);
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_ds18b20)
static {
try {
System.loadLibrary("javaupm_ds18b20");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -10,13 +10,4 @@
%include "ds2413.hpp" %include "ds2413.hpp"
%array_class(char, charArray); %array_class(char, charArray);
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_ds2413)
static {
try {
System.loadLibrary("javaupm_ds2413");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -22,13 +22,4 @@
%} %}
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_e50hx)
static {
try {
System.loadLibrary("javaupm_e50hx");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -10,13 +10,4 @@
#include "ecezo.hpp" #include "ecezo.hpp"
%} %}
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_ecezo)
static {
try {
System.loadLibrary("javaupm_ecezo");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -7,13 +7,4 @@
%include "ecs1030.hpp" %include "ecs1030.hpp"
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_ecs1030)
static {
try {
System.loadLibrary("javaupm_ecs1030");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -9,13 +9,4 @@
%include "ehr.hpp" %include "ehr.hpp"
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_ehr)
static {
try {
System.loadLibrary("javaupm_ehr");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -7,13 +7,4 @@
%include "eldriver.hpp" %include "eldriver.hpp"
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_eldriver)
static {
try {
System.loadLibrary("javaupm_eldriver");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -7,13 +7,4 @@
%include "electromagnet.hpp" %include "electromagnet.hpp"
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_electromagnet)
static {
try {
System.loadLibrary("javaupm_electromagnet");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -7,13 +7,4 @@
%include "emg.hpp" %include "emg.hpp"
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_emg)
static {
try {
System.loadLibrary("javaupm_emg");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -7,13 +7,4 @@
%include "enc03r.hpp" %include "enc03r.hpp"
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_enc03r)
static {
try {
System.loadLibrary("javaupm_enc03r");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -7,13 +7,4 @@
%include "flex.hpp" %include "flex.hpp"
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_flex)
static {
try {
System.loadLibrary("javaupm_flex");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -56,13 +56,4 @@
%include "mq9.hpp" %include "mq9.hpp"
%include "tp401.hpp" %include "tp401.hpp"
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_gas)
static {
try {
System.loadLibrary("javaupm_gas");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -7,13 +7,4 @@
%include "gp2y0a.hpp" %include "gp2y0a.hpp"
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_gp2y0a)
static {
try {
System.loadLibrary("javaupm_gp2y0a");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -10,13 +10,4 @@
%include "gprs.hpp" %include "gprs.hpp"
%array_class(char, charArray); %array_class(char, charArray);
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_gprs)
static {
try {
System.loadLibrary("javaupm_gprs");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -49,13 +49,4 @@
#include "grovetemp.hpp" #include "grovetemp.hpp"
%} %}
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_grove)
static {
try {
System.loadLibrary("javaupm_grove");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -7,13 +7,4 @@
%include "grovecollision.hpp" %include "grovecollision.hpp"
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_grovecollision)
static {
try {
System.loadLibrary("javaupm_grovecollision");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -9,13 +9,4 @@
%include "groveehr.hpp" %include "groveehr.hpp"
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_groveehr)
static {
try {
System.loadLibrary("javaupm_groveehr");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -7,13 +7,4 @@
%include "groveeldriver.hpp" %include "groveeldriver.hpp"
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_groveeldriver)
static {
try {
System.loadLibrary("javaupm_groveeldriver");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -7,13 +7,4 @@
%include "groveelectromagnet.hpp" %include "groveelectromagnet.hpp"
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_groveelectromagnet)
static {
try {
System.loadLibrary("javaupm_groveelectromagnet");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -7,13 +7,4 @@
%include "groveemg.hpp" %include "groveemg.hpp"
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_groveemg)
static {
try {
System.loadLibrary("javaupm_groveemg");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -10,13 +10,4 @@
%include "grovegprs.hpp" %include "grovegprs.hpp"
%array_class(char, charArray); %array_class(char, charArray);
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_grovegprs)
static {
try {
System.loadLibrary("javaupm_grovegprs");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -7,13 +7,4 @@
%include "grovegsr.hpp" %include "grovegsr.hpp"
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_grovegsr)
static {
try {
System.loadLibrary("javaupm_grovegsr");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -7,13 +7,4 @@
%include "grovelinefinder.hpp" %include "grovelinefinder.hpp"
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_grovelinefinder)
static {
try {
System.loadLibrary("javaupm_grovelinefinder");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -7,13 +7,4 @@
%include "grovemd.hpp" %include "grovemd.hpp"
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_grovemd)
static {
try {
System.loadLibrary("javaupm_grovemd");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -7,13 +7,4 @@
%include "grovemoisture.hpp" %include "grovemoisture.hpp"
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_grovemoisture)
static {
try {
System.loadLibrary("javaupm_grovemoisture");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -7,13 +7,4 @@
%include "groveo2.hpp" %include "groveo2.hpp"
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_groveo2)
static {
try {
System.loadLibrary("javaupm_groveo2");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -8,13 +8,4 @@
%include "grovescam.hpp" %include "grovescam.hpp"
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_grovescam)
static {
try {
System.loadLibrary("javaupm_grovescam");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -7,13 +7,4 @@
%include "grovespeaker.hpp" %include "grovespeaker.hpp"
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_grovespeaker)
static {
try {
System.loadLibrary("javaupm_grovespeaker");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -9,13 +9,4 @@
%include "groveultrasonic.hpp" %include "groveultrasonic.hpp"
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_groveultrasonic)
static {
try {
System.loadLibrary("javaupm_groveultrasonic");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -7,13 +7,4 @@
%include "grovevdiv.hpp" %include "grovevdiv.hpp"
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_grovevdiv)
static {
try {
System.loadLibrary("javaupm_grovevdiv");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -7,13 +7,4 @@
%include "grovewater.hpp" %include "grovewater.hpp"
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_grovewater)
static {
try {
System.loadLibrary("javaupm_grovewater");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -9,13 +9,4 @@
%include "grovewfs.hpp" %include "grovewfs.hpp"
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_grovewfs)
static {
try {
System.loadLibrary("javaupm_grovewfs");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -7,13 +7,4 @@
%include "gsr.hpp" %include "gsr.hpp"
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_gsr)
static {
try {
System.loadLibrary("javaupm_gsr");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -7,13 +7,4 @@
%include "guvas12d.hpp" %include "guvas12d.hpp"
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_guvas12d)
static {
try {
System.loadLibrary("javaupm_guvas12d");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -50,13 +50,4 @@
%include "h3lis331dl.hpp" %include "h3lis331dl.hpp"
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_h3lis331dl)
static {
try {
System.loadLibrary("javaupm_h3lis331dl");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -8,13 +8,4 @@
%include "h803x.hpp" %include "h803x.hpp"
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_h803x)
static {
try {
System.loadLibrary("javaupm_h803x");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -8,14 +8,5 @@
%include "hcsr04.h" %include "hcsr04.h"
%include "hcsr04.hpp" %include "hcsr04.hpp"
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_hcsr04)
static {
try {
System.loadLibrary("javaupm_hcsr04");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -7,13 +7,4 @@
%include "hdc1000.hpp" %include "hdc1000.hpp"
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_hdc1000)
static {
try {
System.loadLibrary("javaupm_hdc1000");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -9,13 +9,4 @@
%include "hdxxvxta.hpp" %include "hdxxvxta.hpp"
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_hdxxvxta)
static {
try {
System.loadLibrary("javaupm_hdxxvxta");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -9,13 +9,4 @@
#include "hka5.hpp" #include "hka5.hpp"
%} %}
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_hka5)
static {
try {
System.loadLibrary("javaupm_hka5");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -18,13 +18,4 @@ import upm_interfaces.*;
%include "hlg150h.hpp" %include "hlg150h.hpp"
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_hlg150h)
static {
try {
System.loadLibrary("javaupm_hlg150h");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -12,13 +12,4 @@
speed_t int_B9600 = B9600; speed_t int_B9600 = B9600;
%array_class(char, charArray); %array_class(char, charArray);
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_hm11)
static {
try {
System.loadLibrary("javaupm_hm11");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -20,13 +20,4 @@
%include "hmc5883l.hpp" %include "hmc5883l.hpp"
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_hmc5883l)
static {
try {
System.loadLibrary("javaupm_hmc5883l");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -25,13 +25,4 @@ READDATA_EXCEPTION(getModSignalStrength())
%include "hmtrp.hpp" %include "hmtrp.hpp"
speed_t int_B9600 = B9600; speed_t int_B9600 = B9600;
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_hmtrp)
static {
try {
System.loadLibrary("javaupm_hmtrp");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -7,13 +7,4 @@
%include "hp20x.hpp" %include "hp20x.hpp"
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_hp20x)
static {
try {
System.loadLibrary("javaupm_hp20x");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -7,13 +7,4 @@
%include "ht9170.hpp" %include "ht9170.hpp"
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_ht9170)
static {
try {
System.loadLibrary("javaupm_ht9170");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -9,13 +9,4 @@
%} %}
%include "htu21d.hpp" %include "htu21d.hpp"
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_htu21d)
static {
try {
System.loadLibrary("javaupm_htu21d");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -8,13 +8,4 @@
%include "hwxpxx.hpp" %include "hwxpxx.hpp"
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_hwxpxx)
static {
try {
System.loadLibrary("javaupm_hwxpxx");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -7,13 +7,4 @@
%include "hx711.hpp" %include "hx711.hpp"
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_hx711)
static {
try {
System.loadLibrary("javaupm_hx711");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -16,13 +16,4 @@
%include "ili9341.hpp" %include "ili9341.hpp"
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_ili9341)
static {
try {
System.loadLibrary("javaupm_ili9341");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -8,13 +8,4 @@
%include "ims_defs.h" %include "ims_defs.h"
%include "ims.hpp" %include "ims.hpp"
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_ims)
static {
try {
System.loadLibrary("javaupm_ims");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -7,13 +7,4 @@
%include "ina132.hpp" %include "ina132.hpp"
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_ina132)
static {
try {
System.loadLibrary("javaupm_ina132");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -10,13 +10,4 @@
%include javaupm_iTemperatureSensor.i %include javaupm_iTemperatureSensor.i
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_interfaces)
static {
try {
System.loadLibrary("javaupm_interfaces");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -8,13 +8,4 @@
%include "isd1820.hpp" %include "isd1820.hpp"
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_isd1820)
static {
try {
System.loadLibrary("javaupm_isd1820");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -34,13 +34,4 @@
%include "itg3200.hpp" %include "itg3200.hpp"
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_itg3200)
static {
try {
System.loadLibrary("javaupm_itg3200");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -11,13 +11,4 @@
#include "jhd1313m1.hpp" #include "jhd1313m1.hpp"
%} %}
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_jhd1313m1)
static {
try {
System.loadLibrary("javaupm_jhd1313m1");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -7,13 +7,4 @@
%include "joystick12.hpp" %include "joystick12.hpp"
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_joystick12)
static {
try {
System.loadLibrary("javaupm_joystick12");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -7,13 +7,4 @@
%include "l298.hpp" %include "l298.hpp"
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_l298)
static {
try {
System.loadLibrary("javaupm_l298");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -38,13 +38,4 @@
%include "ssd1306.hpp" %include "ssd1306.hpp"
%include "eboled.hpp" %include "eboled.hpp"
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_i2clcd)
static {
try {
System.loadLibrary("javaupm_i2clcd");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -11,13 +11,4 @@
#include "lcdks.hpp" #include "lcdks.hpp"
%} %}
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_lcdks)
static {
try {
System.loadLibrary("javaupm_lcdks");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

View File

@ -11,13 +11,4 @@
#include "lcm1602.hpp" #include "lcm1602.hpp"
%} %}
%pragma(java) jniclasscode=%{ JAVA_JNI_LOADLIBRARY(javaupm_lcm1602)
static {
try {
System.loadLibrary("javaupm_lcm1602");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}

Some files were not shown because too many files have changed in this diff Show More