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.
example usage: JAVA_ADD_INSTALLISR(upm::A110x)
UPMClassName - UPM class name w/namespace.
/* Macro for adding JAVA run
usage: JAVA_ADD_INSTALLISR(javaupm_a110x)
*/
%define JAVA_ADD_INSTALLISR(UPMClassName)
%extend UPMClassName {
%define JAVA_ADD_INSTALLISR(UPM_Classname)
%extend UPM_Classname {
void installISR(jobject runnable)
{
$self->installISR(mraa_java_isr_callback, runnable);
@ -11,17 +10,16 @@
}
%enddef
/* Macro for adding JNI loadLibrary dependency.
example usage: JAVA_JNI_LOADLIBRARY(javaupm_rhusb)
PackageName: Target UPM JAVA package.
/* Macro for adding JNI loadLibrary dependency
usage: JAVA_JNI_LOADLIBRARY(javaupm_rhusb)
*/
%define JAVA_JNI_LOADLIBRARY(PackageName)
%define JAVA_JNI_LOADLIBRARY(MyModuleName)
%pragma(java) jniclasscode=%{
static {
try {
System.loadLibrary("PackageName");
System.loadLibrary("MyModuleName");
} 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);
}
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

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