/* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (https://www.swig.org). * Version 4.4.1 * * Do not make changes to this file unless you know what you are doing - modify * the SWIG interface file instead. * ----------------------------------------------------------------------------- */ #define SWIG_VERSION 0x040401 #define SWIGJAVA /* ----------------------------------------------------------------------------- * This section contains generic SWIG labels for method/variable * declarations/attributes, and other compiler dependent labels. * ----------------------------------------------------------------------------- */ /* template workaround for compilers that cannot correctly implement the C++ standard */ #ifndef SWIGTEMPLATEDISAMBIGUATOR # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560) # define SWIGTEMPLATEDISAMBIGUATOR template # elif defined(__HP_aCC) /* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */ /* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */ # define SWIGTEMPLATEDISAMBIGUATOR template # else # define SWIGTEMPLATEDISAMBIGUATOR # endif #endif /* inline attribute */ #ifndef SWIGINLINE # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__)) # define SWIGINLINE inline # else # define SWIGINLINE # endif #endif /* attribute recognised by some compilers to avoid 'unused' warnings */ #ifndef SWIGUNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) # define SWIGUNUSED __attribute__ ((__unused__)) # else # define SWIGUNUSED # endif # elif defined(__ICC) # define SWIGUNUSED __attribute__ ((__unused__)) # else # define SWIGUNUSED # endif #endif #ifndef SWIG_MSC_UNSUPPRESS_4505 # if defined(_MSC_VER) # pragma warning(disable : 4505) /* unreferenced local function has been removed */ # endif #endif #ifndef SWIGUNUSEDPARM # ifdef __cplusplus # define SWIGUNUSEDPARM(p) # else # define SWIGUNUSEDPARM(p) p SWIGUNUSED # endif #endif /* internal SWIG method */ #ifndef SWIGINTERN # define SWIGINTERN static SWIGUNUSED #endif /* internal inline SWIG method */ #ifndef SWIGINTERNINLINE # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE #endif /* exporting methods */ #if defined(__GNUC__) # if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) # ifndef GCC_HASCLASSVISIBILITY # define GCC_HASCLASSVISIBILITY # endif # endif #endif #ifndef SWIGEXPORT # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) # if defined(STATIC_LINKED) # define SWIGEXPORT # else # define SWIGEXPORT __declspec(dllexport) # endif # else # if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY) # define SWIGEXPORT __attribute__ ((visibility("default"))) # else # define SWIGEXPORT # endif # endif #endif /* calling conventions for Windows */ #ifndef SWIGSTDCALL # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) # define SWIGSTDCALL __stdcall # else # define SWIGSTDCALL # endif #endif /* Deal with Microsoft's attempt at deprecating C standard runtime functions */ #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) # define _CRT_SECURE_NO_DEPRECATE #endif /* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */ #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE) # define _SCL_SECURE_NO_DEPRECATE #endif /* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */ #if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES) # define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0 #endif /* Intel's compiler complains if a variable which was never initialised is * cast to void, which is a common idiom which we use to indicate that we * are aware a variable isn't used. So we just silence that warning. * See: https://github.com/swig/swig/issues/192 for more discussion. */ #ifdef __INTEL_COMPILER # pragma warning disable 592 #endif #if defined(__cplusplus) && __cplusplus >=201103L # define SWIG_NOEXCEPT noexcept #else # define SWIG_NOEXCEPT throw() #endif /* ----------------------------------------------------------------------------- * swigcompat.swg * * Macros to provide support compatibility with older C and C++ standards. * * Note that SWIG expects __cplusplus to be defined to the appropriate C++ standard. * MSVC users are urged to check and examine the /Zc:__cplusplus compiler option. * See https://learn.microsoft.com/en-us/cpp/build/reference/zc-cplusplus. * ----------------------------------------------------------------------------- */ /* C99 and C++11 should provide snprintf, but define SWIG_NO_SNPRINTF * if you're missing it. */ #if ((defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L) || \ (defined __cplusplus && __cplusplus >= 201103L) || \ defined SWIG_HAVE_SNPRINTF) && \ !defined SWIG_NO_SNPRINTF # define SWIG_snprintf(O,S,F,A) snprintf(O,S,F,A) # define SWIG_snprintf2(O,S,F,A,B) snprintf(O,S,F,A,B) #else /* Fallback versions ignore the buffer size, but most of our uses either have a * fixed maximum possible size or dynamically allocate a buffer that's large * enough. */ # define SWIG_snprintf(O,S,F,A) sprintf(O,F,A) # define SWIG_snprintf2(O,S,F,A,B) sprintf(O,F,A,B) #endif #include #include #include /* Support for throwing Java exceptions */ typedef enum { SWIG_JavaOutOfMemoryError = 1, SWIG_JavaIOException, SWIG_JavaRuntimeException, SWIG_JavaIndexOutOfBoundsException, SWIG_JavaArithmeticException, SWIG_JavaIllegalArgumentException, SWIG_JavaNullPointerException, SWIG_JavaDirectorPureVirtual, SWIG_JavaUnknownError, SWIG_JavaIllegalStateException, } SWIG_JavaExceptionCodes; typedef struct { SWIG_JavaExceptionCodes code; const char *java_exception; } SWIG_JavaExceptions_t; static void SWIGUNUSED SWIG_JavaThrowException(JNIEnv *jenv, SWIG_JavaExceptionCodes code, const char *msg) { jclass excep; static const SWIG_JavaExceptions_t java_exceptions[] = { { SWIG_JavaOutOfMemoryError, "java/lang/OutOfMemoryError" }, { SWIG_JavaIOException, "java/io/IOException" }, { SWIG_JavaRuntimeException, "java/lang/RuntimeException" }, { SWIG_JavaIndexOutOfBoundsException, "java/lang/IndexOutOfBoundsException" }, { SWIG_JavaArithmeticException, "java/lang/ArithmeticException" }, { SWIG_JavaIllegalArgumentException, "java/lang/IllegalArgumentException" }, { SWIG_JavaNullPointerException, "java/lang/NullPointerException" }, { SWIG_JavaDirectorPureVirtual, "java/lang/RuntimeException" }, { SWIG_JavaUnknownError, "java/lang/UnknownError" }, { SWIG_JavaIllegalStateException, "java/lang/IllegalStateException" }, { (SWIG_JavaExceptionCodes)0, "java/lang/UnknownError" } }; const SWIG_JavaExceptions_t *except_ptr = java_exceptions; while (except_ptr->code != code && except_ptr->code) except_ptr++; jenv->ExceptionClear(); excep = jenv->FindClass(except_ptr->java_exception); if (excep) jenv->ThrowNew(excep, msg); } /* Contract support */ #define SWIG_contract_assert(nullreturn, expr, msg) do { if (!(expr)) {SWIG_JavaThrowException(jenv, SWIG_JavaIllegalArgumentException, msg); return nullreturn; } } while (0) /* SWIG Errors applicable to all language modules, values are reserved from -1 to -99 */ #define SWIG_UnknownError -1 #define SWIG_IOError -2 #define SWIG_RuntimeError -3 #define SWIG_IndexError -4 #define SWIG_TypeError -5 #define SWIG_DivisionByZero -6 #define SWIG_OverflowError -7 #define SWIG_SyntaxError -8 #define SWIG_ValueError -9 #define SWIG_SystemError -10 #define SWIG_AttributeError -11 #define SWIG_MemoryError -12 #define SWIG_NullReferenceError -13 #ifdef __cplusplus #include /* SwigValueWrapper is described in swig.swg */ template class SwigValueWrapper { struct SwigSmartPointer { T *ptr; SwigSmartPointer(T *p) : ptr(p) { } ~SwigSmartPointer() { delete ptr; } SwigSmartPointer& operator=(SwigSmartPointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; } void reset(T *p) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = p; } } pointer; SwigValueWrapper& operator=(const SwigValueWrapper& rhs); SwigValueWrapper(const SwigValueWrapper& rhs); public: SwigValueWrapper() : pointer(0) { } SwigValueWrapper& operator=(const T& t) { SwigSmartPointer tmp(new T(t)); pointer = tmp; return *this; } #if __cplusplus >=201103L SwigValueWrapper& operator=(T&& t) { SwigSmartPointer tmp(new T(std::move(t))); pointer = tmp; return *this; } operator T&&() const { return std::move(*pointer.ptr); } #else operator T&() const { return *pointer.ptr; } #endif T *operator&() const { return pointer.ptr; } static void reset(SwigValueWrapper& t, T *p) { t.pointer.reset(p); } }; /* * SwigValueInit() is a generic initialisation solution as the following approach: * * T c_result = T(); * * doesn't compile for all types for example: * * unsigned int c_result = unsigned int(); */ template T SwigValueInit() { return T(); } #if __cplusplus >=201103L # define SWIG_STD_MOVE(OBJ) std::move(OBJ) #else # define SWIG_STD_MOVE(OBJ) OBJ #endif #endif #if defined(__cplusplus) && (__cplusplus >=201103L) # define SWIG_OVERRIDE override #else # define SWIG_OVERRIDE #endif #include #include // Use the C99 official header #include SWIGINTERN void SWIG_JavaException(JNIEnv *jenv, int code, const char *msg) { SWIG_JavaExceptionCodes exception_code = SWIG_JavaUnknownError; switch(code) { case SWIG_MemoryError: exception_code = SWIG_JavaOutOfMemoryError; break; case SWIG_IOError: exception_code = SWIG_JavaIOException; break; case SWIG_SystemError: case SWIG_RuntimeError: exception_code = SWIG_JavaRuntimeException; break; case SWIG_OverflowError: case SWIG_IndexError: exception_code = SWIG_JavaIndexOutOfBoundsException; break; case SWIG_DivisionByZero: exception_code = SWIG_JavaArithmeticException; break; case SWIG_SyntaxError: case SWIG_ValueError: case SWIG_TypeError: exception_code = SWIG_JavaIllegalArgumentException; break; case SWIG_NullReferenceError: exception_code = SWIG_JavaNullPointerException; break; case SWIG_UnknownError: default: exception_code = SWIG_JavaUnknownError; break; } SWIG_JavaThrowException(jenv, exception_code, msg); } #include #include #include "version.hpp" #include "ads1x15.hpp" #include "ads1015.hpp" #include "ads1115.hpp" #ifdef __cplusplus extern "C" { #endif SWIGEXPORT jstring JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_getVersion(JNIEnv *jenv, jclass jcls) { jstring jresult = 0 ; std::string result; (void)jenv; (void)jcls; { try { result = getVersion(); } catch (std::invalid_argument& e) { std::string s1("UPM Invalid Argument: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return 0; }; } catch (std::domain_error& e) { std::string s1("UPM Domain Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return 0; }; } catch (std::overflow_error& e) { std::string s1("UPM Overflow Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_OverflowError, s1.c_str()); return 0; }; } catch (std::out_of_range& e) { std::string s1("UPM Out of Range: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return 0; }; } catch (std::length_error& e) { std::string s1("UPM Length Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return 0; }; } catch (std::logic_error& e) { std::string s1("UPM Logic Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return 0; }; } catch (std::bad_alloc& e) { /* for an allocation exception, don't try to create a string... */ { SWIG_JavaException(jenv, SWIG_MemoryError, e.what()); return 0; }; } catch (std::runtime_error& e) { /* catch other std::runtime_error exceptions here */ std::string s1("UPM Runtime Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return 0; }; } catch (std::exception& e) { /* catch other std::exceptions here */ std::string s1("UPM Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_SystemError, s1.c_str()); return 0; }; } catch (...) { /* catch everything else */ { SWIG_JavaException(jenv, SWIG_UnknownError, "UPM Unknown exception"); return 0; }; } } jresult = jenv->NewStringUTF((&result)->c_str()); return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1ADDRESS_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; int result; (void)jenv; (void)jcls; result = (int)((0x48)); jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1REG_1POINTER_1MASK_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; int result; (void)jenv; (void)jcls; result = (int)((0x03)); jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1REG_1POINTER_1CONVERT_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; int result; (void)jenv; (void)jcls; result = (int)((0x00)); jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1REG_1POINTER_1CONFIG_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; int result; (void)jenv; (void)jcls; result = (int)((0x01)); jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1REG_1POINTER_1LOWTHRESH_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; int result; (void)jenv; (void)jcls; result = (int)((0x02)); jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1REG_1POINTER_1HITHRESH_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; int result; (void)jenv; (void)jcls; result = (int)((0x03)); jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1OS_1MASK_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; int result; (void)jenv; (void)jcls; result = (int)((0x8000)); jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1OS_1SINGLE_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; int result; (void)jenv; (void)jcls; result = (int)((0x8000)); jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1OS_1BUSY_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; int result; (void)jenv; (void)jcls; result = (int)((0x0000)); jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1OS_1NOTBUSY_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; int result; (void)jenv; (void)jcls; result = (int)((0x8000)); jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1MUX_1MASK_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; int result; (void)jenv; (void)jcls; result = (int)((0x7000)); jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1MUX_1DIFF_10_11_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; int result; (void)jenv; (void)jcls; result = (int)((0x0000)); jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1MUX_1DIFF_10_13_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; int result; (void)jenv; (void)jcls; result = (int)((0x1000)); jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1MUX_1DIFF_11_13_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; int result; (void)jenv; (void)jcls; result = (int)((0x2000)); jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1MUX_1DIFF_12_13_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; int result; (void)jenv; (void)jcls; result = (int)((0x3000)); jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1MUX_1SINGLE_10_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; int result; (void)jenv; (void)jcls; result = (int)((0x4000)); jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1MUX_1SINGLE_11_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; int result; (void)jenv; (void)jcls; result = (int)((0x5000)); jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1MUX_1SINGLE_12_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; int result; (void)jenv; (void)jcls; result = (int)((0x6000)); jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1MUX_1SINGLE_13_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; int result; (void)jenv; (void)jcls; result = (int)((0x7000)); jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1PGA_1MASK_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; int result; (void)jenv; (void)jcls; result = (int)((0x0E00)); jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1PGA_16_1144V_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; int result; (void)jenv; (void)jcls; result = (int)((0x0000)); jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1PGA_14_1096V_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; int result; (void)jenv; (void)jcls; result = (int)((0x0200)); jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1PGA_12_1048V_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; int result; (void)jenv; (void)jcls; result = (int)((0x0400)); jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1PGA_11_1024V_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; int result; (void)jenv; (void)jcls; result = (int)((0x0600)); jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1PGA_10_1512V_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; int result; (void)jenv; (void)jcls; result = (int)((0x0800)); jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1PGA_10_1256V_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; int result; (void)jenv; (void)jcls; result = (int)((0x0A00)); jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1MODE_1MASK_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; int result; (void)jenv; (void)jcls; result = (int)((0x0100)); jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1MODE_1CONTIN_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; int result; (void)jenv; (void)jcls; result = (int)((0x0000)); jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1MODE_1SINGLE_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; int result; (void)jenv; (void)jcls; result = (int)((0x0100)); jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1DR_1MASK_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; int result; (void)jenv; (void)jcls; result = (int)((0x00E0)); jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1CMODE_1MASK_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; int result; (void)jenv; (void)jcls; result = (int)((0x0010)); jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1CMODE_1TRAD_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; int result; (void)jenv; (void)jcls; result = (int)((0x0000)); jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1CMODE_1WINDOW_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; int result; (void)jenv; (void)jcls; result = (int)((0x0010)); jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1CPOL_1MASK_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; int result; (void)jenv; (void)jcls; result = (int)((0x0008)); jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1CPOL_1ACTVLOW_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; int result; (void)jenv; (void)jcls; result = (int)((0x0000)); jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1CPOL_1ACTVHI_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; int result; (void)jenv; (void)jcls; result = (int)((0x0008)); jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1CLAT_1MASK_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; int result; (void)jenv; (void)jcls; result = (int)((0x0400)); jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1CLAT_1NONLAT_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; int result; (void)jenv; (void)jcls; result = (int)((0x0000)); jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1CLAT_1LATCH_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; int result; (void)jenv; (void)jcls; result = (int)((0x0400)); jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1CQUE_1MASK_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; int result; (void)jenv; (void)jcls; result = (int)((0x0003)); jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1GAIN_1TWOTHIRDS_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; upm::ADS1X15::ADSGAIN result; (void)jenv; (void)jcls; result = (upm::ADS1X15::ADSGAIN)upm::ADS1X15::GAIN_TWOTHIRDS; jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1GAIN_1ONE_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; upm::ADS1X15::ADSGAIN result; (void)jenv; (void)jcls; result = (upm::ADS1X15::ADSGAIN)upm::ADS1X15::GAIN_ONE; jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1GAIN_1TWO_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; upm::ADS1X15::ADSGAIN result; (void)jenv; (void)jcls; result = (upm::ADS1X15::ADSGAIN)upm::ADS1X15::GAIN_TWO; jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1GAIN_1FOUR_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; upm::ADS1X15::ADSGAIN result; (void)jenv; (void)jcls; result = (upm::ADS1X15::ADSGAIN)upm::ADS1X15::GAIN_FOUR; jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1GAIN_1EIGHT_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; upm::ADS1X15::ADSGAIN result; (void)jenv; (void)jcls; result = (upm::ADS1X15::ADSGAIN)upm::ADS1X15::GAIN_EIGHT; jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1GAIN_1SIXTEEN_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; upm::ADS1X15::ADSGAIN result; (void)jenv; (void)jcls; result = (upm::ADS1X15::ADSGAIN)upm::ADS1X15::GAIN_SIXTEEN; jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1DIFF_10_11_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; upm::ADS1X15::ADSMUXMODE result; (void)jenv; (void)jcls; result = (upm::ADS1X15::ADSMUXMODE)upm::ADS1X15::DIFF_0_1; jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1DIFF_10_13_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; upm::ADS1X15::ADSMUXMODE result; (void)jenv; (void)jcls; result = (upm::ADS1X15::ADSMUXMODE)upm::ADS1X15::DIFF_0_3; jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1DIFF_11_13_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; upm::ADS1X15::ADSMUXMODE result; (void)jenv; (void)jcls; result = (upm::ADS1X15::ADSMUXMODE)upm::ADS1X15::DIFF_1_3; jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1DIFF_12_13_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; upm::ADS1X15::ADSMUXMODE result; (void)jenv; (void)jcls; result = (upm::ADS1X15::ADSMUXMODE)upm::ADS1X15::DIFF_2_3; jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1SINGLE_10_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; upm::ADS1X15::ADSMUXMODE result; (void)jenv; (void)jcls; result = (upm::ADS1X15::ADSMUXMODE)upm::ADS1X15::SINGLE_0; jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1SINGLE_11_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; upm::ADS1X15::ADSMUXMODE result; (void)jenv; (void)jcls; result = (upm::ADS1X15::ADSMUXMODE)upm::ADS1X15::SINGLE_1; jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1SINGLE_12_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; upm::ADS1X15::ADSMUXMODE result; (void)jenv; (void)jcls; result = (upm::ADS1X15::ADSMUXMODE)upm::ADS1X15::SINGLE_2; jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1SINGLE_13_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; upm::ADS1X15::ADSMUXMODE result; (void)jenv; (void)jcls; result = (upm::ADS1X15::ADSMUXMODE)upm::ADS1X15::SINGLE_3; jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1CQUE_11CONV_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; upm::ADS1X15::ADSCOMP result; (void)jenv; (void)jcls; result = (upm::ADS1X15::ADSCOMP)upm::ADS1X15::CQUE_1CONV; jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1CQUE_12CONV_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; upm::ADS1X15::ADSCOMP result; (void)jenv; (void)jcls; result = (upm::ADS1X15::ADSCOMP)upm::ADS1X15::CQUE_2CONV; jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1CQUE_14CONV_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; upm::ADS1X15::ADSCOMP result; (void)jenv; (void)jcls; result = (upm::ADS1X15::ADSCOMP)upm::ADS1X15::CQUE_4CONV; jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1CQUE_1NONE_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; upm::ADS1X15::ADSCOMP result; (void)jenv; (void)jcls; result = (upm::ADS1X15::ADSCOMP)upm::ADS1X15::CQUE_NONE; jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1THRESH_1LOW_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; upm::ADS1X15::ADSTHRESH result; (void)jenv; (void)jcls; result = (upm::ADS1X15::ADSTHRESH)upm::ADS1X15::THRESH_LOW; jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1THRESH_1HIGH_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; upm::ADS1X15::ADSTHRESH result; (void)jenv; (void)jcls; result = (upm::ADS1X15::ADSTHRESH)upm::ADS1X15::THRESH_HIGH; jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1CONVERSION_1RDY_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; upm::ADS1X15::ADSTHRESH result; (void)jenv; (void)jcls; result = (upm::ADS1X15::ADSTHRESH)upm::ADS1X15::CONVERSION_RDY; jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1THRESH_1DEFAULT_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; upm::ADS1X15::ADSTHRESH result; (void)jenv; (void)jcls; result = (upm::ADS1X15::ADSTHRESH)upm::ADS1X15::THRESH_DEFAULT; jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1SPS_1DEFAULT_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; upm::ADS1X15::ADSSAMPLERATE result; (void)jenv; (void)jcls; result = (upm::ADS1X15::ADSSAMPLERATE)upm::ADS1X15::SPS_DEFAULT; jresult = (jint)result; return jresult; } SWIGEXPORT void JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_delete_1ADS1X15(JNIEnv *jenv, jclass jcls, jlong jarg1) { upm::ADS1X15 *arg1 = 0 ; (void)jenv; (void)jcls; arg1 = *(upm::ADS1X15 **)&jarg1; { try { delete arg1; } catch (std::invalid_argument& e) { std::string s1("UPM Invalid Argument: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return ; }; } catch (std::domain_error& e) { std::string s1("UPM Domain Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return ; }; } catch (std::overflow_error& e) { std::string s1("UPM Overflow Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_OverflowError, s1.c_str()); return ; }; } catch (std::out_of_range& e) { std::string s1("UPM Out of Range: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return ; }; } catch (std::length_error& e) { std::string s1("UPM Length Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return ; }; } catch (std::logic_error& e) { std::string s1("UPM Logic Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return ; }; } catch (std::bad_alloc& e) { /* for an allocation exception, don't try to create a string... */ { SWIG_JavaException(jenv, SWIG_MemoryError, e.what()); return ; }; } catch (std::runtime_error& e) { /* catch other std::runtime_error exceptions here */ std::string s1("UPM Runtime Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return ; }; } catch (std::exception& e) { /* catch other std::exceptions here */ std::string s1("UPM Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_SystemError, s1.c_str()); return ; }; } catch (...) { /* catch everything else */ { SWIG_JavaException(jenv, SWIG_UnknownError, "UPM Unknown exception"); return ; }; } } } SWIGEXPORT jstring JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1name(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { jstring jresult = 0 ; upm::ADS1X15 *arg1 = 0 ; std::string result; (void)jenv; (void)jcls; (void)jarg1_; arg1 = *(upm::ADS1X15 **)&jarg1; { try { result = (arg1)->name(); } catch (std::invalid_argument& e) { std::string s1("UPM Invalid Argument: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return 0; }; } catch (std::domain_error& e) { std::string s1("UPM Domain Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return 0; }; } catch (std::overflow_error& e) { std::string s1("UPM Overflow Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_OverflowError, s1.c_str()); return 0; }; } catch (std::out_of_range& e) { std::string s1("UPM Out of Range: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return 0; }; } catch (std::length_error& e) { std::string s1("UPM Length Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return 0; }; } catch (std::logic_error& e) { std::string s1("UPM Logic Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return 0; }; } catch (std::bad_alloc& e) { /* for an allocation exception, don't try to create a string... */ { SWIG_JavaException(jenv, SWIG_MemoryError, e.what()); return 0; }; } catch (std::runtime_error& e) { /* catch other std::runtime_error exceptions here */ std::string s1("UPM Runtime Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return 0; }; } catch (std::exception& e) { /* catch other std::exceptions here */ std::string s1("UPM Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_SystemError, s1.c_str()); return 0; }; } catch (...) { /* catch everything else */ { SWIG_JavaException(jenv, SWIG_UnknownError, "UPM Unknown exception"); return 0; }; } } jresult = jenv->NewStringUTF((&result)->c_str()); return jresult; } SWIGEXPORT jfloat JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1getLastSample_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) { jfloat jresult = 0 ; upm::ADS1X15 *arg1 = 0 ; int arg2 ; float result; (void)jenv; (void)jcls; (void)jarg1_; arg1 = *(upm::ADS1X15 **)&jarg1; arg2 = (int)jarg2; { try { result = (float)(arg1)->getLastSample(arg2); } catch (std::invalid_argument& e) { std::string s1("UPM Invalid Argument: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return 0; }; } catch (std::domain_error& e) { std::string s1("UPM Domain Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return 0; }; } catch (std::overflow_error& e) { std::string s1("UPM Overflow Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_OverflowError, s1.c_str()); return 0; }; } catch (std::out_of_range& e) { std::string s1("UPM Out of Range: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return 0; }; } catch (std::length_error& e) { std::string s1("UPM Length Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return 0; }; } catch (std::logic_error& e) { std::string s1("UPM Logic Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return 0; }; } catch (std::bad_alloc& e) { /* for an allocation exception, don't try to create a string... */ { SWIG_JavaException(jenv, SWIG_MemoryError, e.what()); return 0; }; } catch (std::runtime_error& e) { /* catch other std::runtime_error exceptions here */ std::string s1("UPM Runtime Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return 0; }; } catch (std::exception& e) { /* catch other std::exceptions here */ std::string s1("UPM Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_SystemError, s1.c_str()); return 0; }; } catch (...) { /* catch everything else */ { SWIG_JavaException(jenv, SWIG_UnknownError, "UPM Unknown exception"); return 0; }; } } jresult = (jfloat)result; return jresult; } SWIGEXPORT jfloat JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1getLastSample_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { jfloat jresult = 0 ; upm::ADS1X15 *arg1 = 0 ; float result; (void)jenv; (void)jcls; (void)jarg1_; arg1 = *(upm::ADS1X15 **)&jarg1; { try { result = (float)(arg1)->getLastSample(); } catch (std::invalid_argument& e) { std::string s1("UPM Invalid Argument: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return 0; }; } catch (std::domain_error& e) { std::string s1("UPM Domain Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return 0; }; } catch (std::overflow_error& e) { std::string s1("UPM Overflow Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_OverflowError, s1.c_str()); return 0; }; } catch (std::out_of_range& e) { std::string s1("UPM Out of Range: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return 0; }; } catch (std::length_error& e) { std::string s1("UPM Length Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return 0; }; } catch (std::logic_error& e) { std::string s1("UPM Logic Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return 0; }; } catch (std::bad_alloc& e) { /* for an allocation exception, don't try to create a string... */ { SWIG_JavaException(jenv, SWIG_MemoryError, e.what()); return 0; }; } catch (std::runtime_error& e) { /* catch other std::runtime_error exceptions here */ std::string s1("UPM Runtime Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return 0; }; } catch (std::exception& e) { /* catch other std::exceptions here */ std::string s1("UPM Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_SystemError, s1.c_str()); return 0; }; } catch (...) { /* catch everything else */ { SWIG_JavaException(jenv, SWIG_UnknownError, "UPM Unknown exception"); return 0; }; } } jresult = (jfloat)result; return jresult; } SWIGEXPORT jfloat JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1getSample_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) { jfloat jresult = 0 ; upm::ADS1X15 *arg1 = 0 ; upm::ADS1X15::ADSMUXMODE arg2 ; float result; (void)jenv; (void)jcls; (void)jarg1_; arg1 = *(upm::ADS1X15 **)&jarg1; arg2 = (upm::ADS1X15::ADSMUXMODE)jarg2; { try { result = (float)(arg1)->getSample(arg2); } catch (std::invalid_argument& e) { std::string s1("UPM Invalid Argument: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return 0; }; } catch (std::domain_error& e) { std::string s1("UPM Domain Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return 0; }; } catch (std::overflow_error& e) { std::string s1("UPM Overflow Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_OverflowError, s1.c_str()); return 0; }; } catch (std::out_of_range& e) { std::string s1("UPM Out of Range: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return 0; }; } catch (std::length_error& e) { std::string s1("UPM Length Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return 0; }; } catch (std::logic_error& e) { std::string s1("UPM Logic Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return 0; }; } catch (std::bad_alloc& e) { /* for an allocation exception, don't try to create a string... */ { SWIG_JavaException(jenv, SWIG_MemoryError, e.what()); return 0; }; } catch (std::runtime_error& e) { /* catch other std::runtime_error exceptions here */ std::string s1("UPM Runtime Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return 0; }; } catch (std::exception& e) { /* catch other std::exceptions here */ std::string s1("UPM Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_SystemError, s1.c_str()); return 0; }; } catch (...) { /* catch everything else */ { SWIG_JavaException(jenv, SWIG_UnknownError, "UPM Unknown exception"); return 0; }; } } jresult = (jfloat)result; return jresult; } SWIGEXPORT jfloat JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1getSample_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { jfloat jresult = 0 ; upm::ADS1X15 *arg1 = 0 ; float result; (void)jenv; (void)jcls; (void)jarg1_; arg1 = *(upm::ADS1X15 **)&jarg1; { try { result = (float)(arg1)->getSample(); } catch (std::invalid_argument& e) { std::string s1("UPM Invalid Argument: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return 0; }; } catch (std::domain_error& e) { std::string s1("UPM Domain Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return 0; }; } catch (std::overflow_error& e) { std::string s1("UPM Overflow Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_OverflowError, s1.c_str()); return 0; }; } catch (std::out_of_range& e) { std::string s1("UPM Out of Range: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return 0; }; } catch (std::length_error& e) { std::string s1("UPM Length Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return 0; }; } catch (std::logic_error& e) { std::string s1("UPM Logic Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return 0; }; } catch (std::bad_alloc& e) { /* for an allocation exception, don't try to create a string... */ { SWIG_JavaException(jenv, SWIG_MemoryError, e.what()); return 0; }; } catch (std::runtime_error& e) { /* catch other std::runtime_error exceptions here */ std::string s1("UPM Runtime Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return 0; }; } catch (std::exception& e) { /* catch other std::exceptions here */ std::string s1("UPM Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_SystemError, s1.c_str()); return 0; }; } catch (...) { /* catch everything else */ { SWIG_JavaException(jenv, SWIG_UnknownError, "UPM Unknown exception"); return 0; }; } } jresult = (jfloat)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1getGain(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { jint jresult = 0 ; upm::ADS1X15 *arg1 = 0 ; upm::ADS1X15::ADSGAIN result; (void)jenv; (void)jcls; (void)jarg1_; arg1 = *(upm::ADS1X15 **)&jarg1; { try { result = (upm::ADS1X15::ADSGAIN)(arg1)->getGain(); } catch (std::invalid_argument& e) { std::string s1("UPM Invalid Argument: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return 0; }; } catch (std::domain_error& e) { std::string s1("UPM Domain Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return 0; }; } catch (std::overflow_error& e) { std::string s1("UPM Overflow Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_OverflowError, s1.c_str()); return 0; }; } catch (std::out_of_range& e) { std::string s1("UPM Out of Range: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return 0; }; } catch (std::length_error& e) { std::string s1("UPM Length Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return 0; }; } catch (std::logic_error& e) { std::string s1("UPM Logic Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return 0; }; } catch (std::bad_alloc& e) { /* for an allocation exception, don't try to create a string... */ { SWIG_JavaException(jenv, SWIG_MemoryError, e.what()); return 0; }; } catch (std::runtime_error& e) { /* catch other std::runtime_error exceptions here */ std::string s1("UPM Runtime Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return 0; }; } catch (std::exception& e) { /* catch other std::exceptions here */ std::string s1("UPM Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_SystemError, s1.c_str()); return 0; }; } catch (...) { /* catch everything else */ { SWIG_JavaException(jenv, SWIG_UnknownError, "UPM Unknown exception"); return 0; }; } } jresult = (jint)result; return jresult; } SWIGEXPORT void JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1setGain_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) { upm::ADS1X15 *arg1 = 0 ; upm::ADS1X15::ADSGAIN arg2 ; (void)jenv; (void)jcls; (void)jarg1_; arg1 = *(upm::ADS1X15 **)&jarg1; arg2 = (upm::ADS1X15::ADSGAIN)jarg2; { try { (arg1)->setGain(arg2); } catch (std::invalid_argument& e) { std::string s1("UPM Invalid Argument: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return ; }; } catch (std::domain_error& e) { std::string s1("UPM Domain Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return ; }; } catch (std::overflow_error& e) { std::string s1("UPM Overflow Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_OverflowError, s1.c_str()); return ; }; } catch (std::out_of_range& e) { std::string s1("UPM Out of Range: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return ; }; } catch (std::length_error& e) { std::string s1("UPM Length Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return ; }; } catch (std::logic_error& e) { std::string s1("UPM Logic Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return ; }; } catch (std::bad_alloc& e) { /* for an allocation exception, don't try to create a string... */ { SWIG_JavaException(jenv, SWIG_MemoryError, e.what()); return ; }; } catch (std::runtime_error& e) { /* catch other std::runtime_error exceptions here */ std::string s1("UPM Runtime Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return ; }; } catch (std::exception& e) { /* catch other std::exceptions here */ std::string s1("UPM Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_SystemError, s1.c_str()); return ; }; } catch (...) { /* catch everything else */ { SWIG_JavaException(jenv, SWIG_UnknownError, "UPM Unknown exception"); return ; }; } } } SWIGEXPORT void JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1setGain_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { upm::ADS1X15 *arg1 = 0 ; (void)jenv; (void)jcls; (void)jarg1_; arg1 = *(upm::ADS1X15 **)&jarg1; { try { (arg1)->setGain(); } catch (std::invalid_argument& e) { std::string s1("UPM Invalid Argument: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return ; }; } catch (std::domain_error& e) { std::string s1("UPM Domain Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return ; }; } catch (std::overflow_error& e) { std::string s1("UPM Overflow Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_OverflowError, s1.c_str()); return ; }; } catch (std::out_of_range& e) { std::string s1("UPM Out of Range: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return ; }; } catch (std::length_error& e) { std::string s1("UPM Length Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return ; }; } catch (std::logic_error& e) { std::string s1("UPM Logic Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return ; }; } catch (std::bad_alloc& e) { /* for an allocation exception, don't try to create a string... */ { SWIG_JavaException(jenv, SWIG_MemoryError, e.what()); return ; }; } catch (std::runtime_error& e) { /* catch other std::runtime_error exceptions here */ std::string s1("UPM Runtime Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return ; }; } catch (std::exception& e) { /* catch other std::exceptions here */ std::string s1("UPM Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_SystemError, s1.c_str()); return ; }; } catch (...) { /* catch everything else */ { SWIG_JavaException(jenv, SWIG_UnknownError, "UPM Unknown exception"); return ; }; } } } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1getSPS(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { jint jresult = 0 ; upm::ADS1X15 *arg1 = 0 ; upm::ADS1X15::ADSSAMPLERATE result; (void)jenv; (void)jcls; (void)jarg1_; arg1 = *(upm::ADS1X15 **)&jarg1; { try { result = (upm::ADS1X15::ADSSAMPLERATE)(arg1)->getSPS(); } catch (std::invalid_argument& e) { std::string s1("UPM Invalid Argument: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return 0; }; } catch (std::domain_error& e) { std::string s1("UPM Domain Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return 0; }; } catch (std::overflow_error& e) { std::string s1("UPM Overflow Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_OverflowError, s1.c_str()); return 0; }; } catch (std::out_of_range& e) { std::string s1("UPM Out of Range: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return 0; }; } catch (std::length_error& e) { std::string s1("UPM Length Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return 0; }; } catch (std::logic_error& e) { std::string s1("UPM Logic Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return 0; }; } catch (std::bad_alloc& e) { /* for an allocation exception, don't try to create a string... */ { SWIG_JavaException(jenv, SWIG_MemoryError, e.what()); return 0; }; } catch (std::runtime_error& e) { /* catch other std::runtime_error exceptions here */ std::string s1("UPM Runtime Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return 0; }; } catch (std::exception& e) { /* catch other std::exceptions here */ std::string s1("UPM Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_SystemError, s1.c_str()); return 0; }; } catch (...) { /* catch everything else */ { SWIG_JavaException(jenv, SWIG_UnknownError, "UPM Unknown exception"); return 0; }; } } jresult = (jint)result; return jresult; } SWIGEXPORT void JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1setSPS(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) { upm::ADS1X15 *arg1 = 0 ; upm::ADS1X15::ADSSAMPLERATE arg2 ; (void)jenv; (void)jcls; (void)jarg1_; arg1 = *(upm::ADS1X15 **)&jarg1; arg2 = (upm::ADS1X15::ADSSAMPLERATE)jarg2; { try { (arg1)->setSPS(arg2); } catch (std::invalid_argument& e) { std::string s1("UPM Invalid Argument: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return ; }; } catch (std::domain_error& e) { std::string s1("UPM Domain Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return ; }; } catch (std::overflow_error& e) { std::string s1("UPM Overflow Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_OverflowError, s1.c_str()); return ; }; } catch (std::out_of_range& e) { std::string s1("UPM Out of Range: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return ; }; } catch (std::length_error& e) { std::string s1("UPM Length Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return ; }; } catch (std::logic_error& e) { std::string s1("UPM Logic Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return ; }; } catch (std::bad_alloc& e) { /* for an allocation exception, don't try to create a string... */ { SWIG_JavaException(jenv, SWIG_MemoryError, e.what()); return ; }; } catch (std::runtime_error& e) { /* catch other std::runtime_error exceptions here */ std::string s1("UPM Runtime Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return ; }; } catch (std::exception& e) { /* catch other std::exceptions here */ std::string s1("UPM Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_SystemError, s1.c_str()); return ; }; } catch (...) { /* catch everything else */ { SWIG_JavaException(jenv, SWIG_UnknownError, "UPM Unknown exception"); return ; }; } } } SWIGEXPORT jboolean JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1getCompMode(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { jboolean jresult = 0 ; upm::ADS1X15 *arg1 = 0 ; bool result; (void)jenv; (void)jcls; (void)jarg1_; arg1 = *(upm::ADS1X15 **)&jarg1; { try { result = (bool)(arg1)->getCompMode(); } catch (std::invalid_argument& e) { std::string s1("UPM Invalid Argument: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return 0; }; } catch (std::domain_error& e) { std::string s1("UPM Domain Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return 0; }; } catch (std::overflow_error& e) { std::string s1("UPM Overflow Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_OverflowError, s1.c_str()); return 0; }; } catch (std::out_of_range& e) { std::string s1("UPM Out of Range: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return 0; }; } catch (std::length_error& e) { std::string s1("UPM Length Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return 0; }; } catch (std::logic_error& e) { std::string s1("UPM Logic Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return 0; }; } catch (std::bad_alloc& e) { /* for an allocation exception, don't try to create a string... */ { SWIG_JavaException(jenv, SWIG_MemoryError, e.what()); return 0; }; } catch (std::runtime_error& e) { /* catch other std::runtime_error exceptions here */ std::string s1("UPM Runtime Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return 0; }; } catch (std::exception& e) { /* catch other std::exceptions here */ std::string s1("UPM Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_SystemError, s1.c_str()); return 0; }; } catch (...) { /* catch everything else */ { SWIG_JavaException(jenv, SWIG_UnknownError, "UPM Unknown exception"); return 0; }; } } jresult = (jboolean)result; return jresult; } SWIGEXPORT void JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1setCompMode_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jboolean jarg2) { upm::ADS1X15 *arg1 = 0 ; bool arg2 ; (void)jenv; (void)jcls; (void)jarg1_; arg1 = *(upm::ADS1X15 **)&jarg1; arg2 = jarg2 ? true : false; { try { (arg1)->setCompMode(arg2); } catch (std::invalid_argument& e) { std::string s1("UPM Invalid Argument: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return ; }; } catch (std::domain_error& e) { std::string s1("UPM Domain Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return ; }; } catch (std::overflow_error& e) { std::string s1("UPM Overflow Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_OverflowError, s1.c_str()); return ; }; } catch (std::out_of_range& e) { std::string s1("UPM Out of Range: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return ; }; } catch (std::length_error& e) { std::string s1("UPM Length Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return ; }; } catch (std::logic_error& e) { std::string s1("UPM Logic Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return ; }; } catch (std::bad_alloc& e) { /* for an allocation exception, don't try to create a string... */ { SWIG_JavaException(jenv, SWIG_MemoryError, e.what()); return ; }; } catch (std::runtime_error& e) { /* catch other std::runtime_error exceptions here */ std::string s1("UPM Runtime Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return ; }; } catch (std::exception& e) { /* catch other std::exceptions here */ std::string s1("UPM Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_SystemError, s1.c_str()); return ; }; } catch (...) { /* catch everything else */ { SWIG_JavaException(jenv, SWIG_UnknownError, "UPM Unknown exception"); return ; }; } } } SWIGEXPORT void JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1setCompMode_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { upm::ADS1X15 *arg1 = 0 ; (void)jenv; (void)jcls; (void)jarg1_; arg1 = *(upm::ADS1X15 **)&jarg1; { try { (arg1)->setCompMode(); } catch (std::invalid_argument& e) { std::string s1("UPM Invalid Argument: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return ; }; } catch (std::domain_error& e) { std::string s1("UPM Domain Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return ; }; } catch (std::overflow_error& e) { std::string s1("UPM Overflow Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_OverflowError, s1.c_str()); return ; }; } catch (std::out_of_range& e) { std::string s1("UPM Out of Range: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return ; }; } catch (std::length_error& e) { std::string s1("UPM Length Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return ; }; } catch (std::logic_error& e) { std::string s1("UPM Logic Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return ; }; } catch (std::bad_alloc& e) { /* for an allocation exception, don't try to create a string... */ { SWIG_JavaException(jenv, SWIG_MemoryError, e.what()); return ; }; } catch (std::runtime_error& e) { /* catch other std::runtime_error exceptions here */ std::string s1("UPM Runtime Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return ; }; } catch (std::exception& e) { /* catch other std::exceptions here */ std::string s1("UPM Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_SystemError, s1.c_str()); return ; }; } catch (...) { /* catch everything else */ { SWIG_JavaException(jenv, SWIG_UnknownError, "UPM Unknown exception"); return ; }; } } } SWIGEXPORT jboolean JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1getCompPol(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { jboolean jresult = 0 ; upm::ADS1X15 *arg1 = 0 ; bool result; (void)jenv; (void)jcls; (void)jarg1_; arg1 = *(upm::ADS1X15 **)&jarg1; { try { result = (bool)(arg1)->getCompPol(); } catch (std::invalid_argument& e) { std::string s1("UPM Invalid Argument: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return 0; }; } catch (std::domain_error& e) { std::string s1("UPM Domain Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return 0; }; } catch (std::overflow_error& e) { std::string s1("UPM Overflow Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_OverflowError, s1.c_str()); return 0; }; } catch (std::out_of_range& e) { std::string s1("UPM Out of Range: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return 0; }; } catch (std::length_error& e) { std::string s1("UPM Length Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return 0; }; } catch (std::logic_error& e) { std::string s1("UPM Logic Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return 0; }; } catch (std::bad_alloc& e) { /* for an allocation exception, don't try to create a string... */ { SWIG_JavaException(jenv, SWIG_MemoryError, e.what()); return 0; }; } catch (std::runtime_error& e) { /* catch other std::runtime_error exceptions here */ std::string s1("UPM Runtime Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return 0; }; } catch (std::exception& e) { /* catch other std::exceptions here */ std::string s1("UPM Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_SystemError, s1.c_str()); return 0; }; } catch (...) { /* catch everything else */ { SWIG_JavaException(jenv, SWIG_UnknownError, "UPM Unknown exception"); return 0; }; } } jresult = (jboolean)result; return jresult; } SWIGEXPORT void JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1setCompPol_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jboolean jarg2) { upm::ADS1X15 *arg1 = 0 ; bool arg2 ; (void)jenv; (void)jcls; (void)jarg1_; arg1 = *(upm::ADS1X15 **)&jarg1; arg2 = jarg2 ? true : false; { try { (arg1)->setCompPol(arg2); } catch (std::invalid_argument& e) { std::string s1("UPM Invalid Argument: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return ; }; } catch (std::domain_error& e) { std::string s1("UPM Domain Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return ; }; } catch (std::overflow_error& e) { std::string s1("UPM Overflow Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_OverflowError, s1.c_str()); return ; }; } catch (std::out_of_range& e) { std::string s1("UPM Out of Range: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return ; }; } catch (std::length_error& e) { std::string s1("UPM Length Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return ; }; } catch (std::logic_error& e) { std::string s1("UPM Logic Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return ; }; } catch (std::bad_alloc& e) { /* for an allocation exception, don't try to create a string... */ { SWIG_JavaException(jenv, SWIG_MemoryError, e.what()); return ; }; } catch (std::runtime_error& e) { /* catch other std::runtime_error exceptions here */ std::string s1("UPM Runtime Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return ; }; } catch (std::exception& e) { /* catch other std::exceptions here */ std::string s1("UPM Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_SystemError, s1.c_str()); return ; }; } catch (...) { /* catch everything else */ { SWIG_JavaException(jenv, SWIG_UnknownError, "UPM Unknown exception"); return ; }; } } } SWIGEXPORT void JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1setCompPol_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { upm::ADS1X15 *arg1 = 0 ; (void)jenv; (void)jcls; (void)jarg1_; arg1 = *(upm::ADS1X15 **)&jarg1; { try { (arg1)->setCompPol(); } catch (std::invalid_argument& e) { std::string s1("UPM Invalid Argument: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return ; }; } catch (std::domain_error& e) { std::string s1("UPM Domain Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return ; }; } catch (std::overflow_error& e) { std::string s1("UPM Overflow Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_OverflowError, s1.c_str()); return ; }; } catch (std::out_of_range& e) { std::string s1("UPM Out of Range: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return ; }; } catch (std::length_error& e) { std::string s1("UPM Length Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return ; }; } catch (std::logic_error& e) { std::string s1("UPM Logic Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return ; }; } catch (std::bad_alloc& e) { /* for an allocation exception, don't try to create a string... */ { SWIG_JavaException(jenv, SWIG_MemoryError, e.what()); return ; }; } catch (std::runtime_error& e) { /* catch other std::runtime_error exceptions here */ std::string s1("UPM Runtime Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return ; }; } catch (std::exception& e) { /* catch other std::exceptions here */ std::string s1("UPM Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_SystemError, s1.c_str()); return ; }; } catch (...) { /* catch everything else */ { SWIG_JavaException(jenv, SWIG_UnknownError, "UPM Unknown exception"); return ; }; } } } SWIGEXPORT jboolean JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1getCompLatch(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { jboolean jresult = 0 ; upm::ADS1X15 *arg1 = 0 ; bool result; (void)jenv; (void)jcls; (void)jarg1_; arg1 = *(upm::ADS1X15 **)&jarg1; { try { result = (bool)(arg1)->getCompLatch(); } catch (std::invalid_argument& e) { std::string s1("UPM Invalid Argument: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return 0; }; } catch (std::domain_error& e) { std::string s1("UPM Domain Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return 0; }; } catch (std::overflow_error& e) { std::string s1("UPM Overflow Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_OverflowError, s1.c_str()); return 0; }; } catch (std::out_of_range& e) { std::string s1("UPM Out of Range: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return 0; }; } catch (std::length_error& e) { std::string s1("UPM Length Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return 0; }; } catch (std::logic_error& e) { std::string s1("UPM Logic Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return 0; }; } catch (std::bad_alloc& e) { /* for an allocation exception, don't try to create a string... */ { SWIG_JavaException(jenv, SWIG_MemoryError, e.what()); return 0; }; } catch (std::runtime_error& e) { /* catch other std::runtime_error exceptions here */ std::string s1("UPM Runtime Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return 0; }; } catch (std::exception& e) { /* catch other std::exceptions here */ std::string s1("UPM Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_SystemError, s1.c_str()); return 0; }; } catch (...) { /* catch everything else */ { SWIG_JavaException(jenv, SWIG_UnknownError, "UPM Unknown exception"); return 0; }; } } jresult = (jboolean)result; return jresult; } SWIGEXPORT void JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1setCompLatch_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jboolean jarg2) { upm::ADS1X15 *arg1 = 0 ; bool arg2 ; (void)jenv; (void)jcls; (void)jarg1_; arg1 = *(upm::ADS1X15 **)&jarg1; arg2 = jarg2 ? true : false; { try { (arg1)->setCompLatch(arg2); } catch (std::invalid_argument& e) { std::string s1("UPM Invalid Argument: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return ; }; } catch (std::domain_error& e) { std::string s1("UPM Domain Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return ; }; } catch (std::overflow_error& e) { std::string s1("UPM Overflow Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_OverflowError, s1.c_str()); return ; }; } catch (std::out_of_range& e) { std::string s1("UPM Out of Range: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return ; }; } catch (std::length_error& e) { std::string s1("UPM Length Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return ; }; } catch (std::logic_error& e) { std::string s1("UPM Logic Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return ; }; } catch (std::bad_alloc& e) { /* for an allocation exception, don't try to create a string... */ { SWIG_JavaException(jenv, SWIG_MemoryError, e.what()); return ; }; } catch (std::runtime_error& e) { /* catch other std::runtime_error exceptions here */ std::string s1("UPM Runtime Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return ; }; } catch (std::exception& e) { /* catch other std::exceptions here */ std::string s1("UPM Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_SystemError, s1.c_str()); return ; }; } catch (...) { /* catch everything else */ { SWIG_JavaException(jenv, SWIG_UnknownError, "UPM Unknown exception"); return ; }; } } } SWIGEXPORT void JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1setCompLatch_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { upm::ADS1X15 *arg1 = 0 ; (void)jenv; (void)jcls; (void)jarg1_; arg1 = *(upm::ADS1X15 **)&jarg1; { try { (arg1)->setCompLatch(); } catch (std::invalid_argument& e) { std::string s1("UPM Invalid Argument: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return ; }; } catch (std::domain_error& e) { std::string s1("UPM Domain Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return ; }; } catch (std::overflow_error& e) { std::string s1("UPM Overflow Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_OverflowError, s1.c_str()); return ; }; } catch (std::out_of_range& e) { std::string s1("UPM Out of Range: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return ; }; } catch (std::length_error& e) { std::string s1("UPM Length Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return ; }; } catch (std::logic_error& e) { std::string s1("UPM Logic Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return ; }; } catch (std::bad_alloc& e) { /* for an allocation exception, don't try to create a string... */ { SWIG_JavaException(jenv, SWIG_MemoryError, e.what()); return ; }; } catch (std::runtime_error& e) { /* catch other std::runtime_error exceptions here */ std::string s1("UPM Runtime Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return ; }; } catch (std::exception& e) { /* catch other std::exceptions here */ std::string s1("UPM Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_SystemError, s1.c_str()); return ; }; } catch (...) { /* catch everything else */ { SWIG_JavaException(jenv, SWIG_UnknownError, "UPM Unknown exception"); return ; }; } } } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1getCompQue(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { jint jresult = 0 ; upm::ADS1X15 *arg1 = 0 ; upm::ADS1X15::ADSCOMP result; (void)jenv; (void)jcls; (void)jarg1_; arg1 = *(upm::ADS1X15 **)&jarg1; { try { result = (upm::ADS1X15::ADSCOMP)(arg1)->getCompQue(); } catch (std::invalid_argument& e) { std::string s1("UPM Invalid Argument: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return 0; }; } catch (std::domain_error& e) { std::string s1("UPM Domain Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return 0; }; } catch (std::overflow_error& e) { std::string s1("UPM Overflow Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_OverflowError, s1.c_str()); return 0; }; } catch (std::out_of_range& e) { std::string s1("UPM Out of Range: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return 0; }; } catch (std::length_error& e) { std::string s1("UPM Length Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return 0; }; } catch (std::logic_error& e) { std::string s1("UPM Logic Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return 0; }; } catch (std::bad_alloc& e) { /* for an allocation exception, don't try to create a string... */ { SWIG_JavaException(jenv, SWIG_MemoryError, e.what()); return 0; }; } catch (std::runtime_error& e) { /* catch other std::runtime_error exceptions here */ std::string s1("UPM Runtime Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return 0; }; } catch (std::exception& e) { /* catch other std::exceptions here */ std::string s1("UPM Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_SystemError, s1.c_str()); return 0; }; } catch (...) { /* catch everything else */ { SWIG_JavaException(jenv, SWIG_UnknownError, "UPM Unknown exception"); return 0; }; } } jresult = (jint)result; return jresult; } SWIGEXPORT void JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1setCompQue_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) { upm::ADS1X15 *arg1 = 0 ; upm::ADS1X15::ADSCOMP arg2 ; (void)jenv; (void)jcls; (void)jarg1_; arg1 = *(upm::ADS1X15 **)&jarg1; arg2 = (upm::ADS1X15::ADSCOMP)jarg2; { try { (arg1)->setCompQue(arg2); } catch (std::invalid_argument& e) { std::string s1("UPM Invalid Argument: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return ; }; } catch (std::domain_error& e) { std::string s1("UPM Domain Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return ; }; } catch (std::overflow_error& e) { std::string s1("UPM Overflow Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_OverflowError, s1.c_str()); return ; }; } catch (std::out_of_range& e) { std::string s1("UPM Out of Range: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return ; }; } catch (std::length_error& e) { std::string s1("UPM Length Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return ; }; } catch (std::logic_error& e) { std::string s1("UPM Logic Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return ; }; } catch (std::bad_alloc& e) { /* for an allocation exception, don't try to create a string... */ { SWIG_JavaException(jenv, SWIG_MemoryError, e.what()); return ; }; } catch (std::runtime_error& e) { /* catch other std::runtime_error exceptions here */ std::string s1("UPM Runtime Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return ; }; } catch (std::exception& e) { /* catch other std::exceptions here */ std::string s1("UPM Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_SystemError, s1.c_str()); return ; }; } catch (...) { /* catch everything else */ { SWIG_JavaException(jenv, SWIG_UnknownError, "UPM Unknown exception"); return ; }; } } } SWIGEXPORT void JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1setCompQue_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { upm::ADS1X15 *arg1 = 0 ; (void)jenv; (void)jcls; (void)jarg1_; arg1 = *(upm::ADS1X15 **)&jarg1; { try { (arg1)->setCompQue(); } catch (std::invalid_argument& e) { std::string s1("UPM Invalid Argument: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return ; }; } catch (std::domain_error& e) { std::string s1("UPM Domain Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return ; }; } catch (std::overflow_error& e) { std::string s1("UPM Overflow Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_OverflowError, s1.c_str()); return ; }; } catch (std::out_of_range& e) { std::string s1("UPM Out of Range: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return ; }; } catch (std::length_error& e) { std::string s1("UPM Length Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return ; }; } catch (std::logic_error& e) { std::string s1("UPM Logic Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return ; }; } catch (std::bad_alloc& e) { /* for an allocation exception, don't try to create a string... */ { SWIG_JavaException(jenv, SWIG_MemoryError, e.what()); return ; }; } catch (std::runtime_error& e) { /* catch other std::runtime_error exceptions here */ std::string s1("UPM Runtime Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return ; }; } catch (std::exception& e) { /* catch other std::exceptions here */ std::string s1("UPM Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_SystemError, s1.c_str()); return ; }; } catch (...) { /* catch everything else */ { SWIG_JavaException(jenv, SWIG_UnknownError, "UPM Unknown exception"); return ; }; } } } SWIGEXPORT jboolean JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1getContinuous(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { jboolean jresult = 0 ; upm::ADS1X15 *arg1 = 0 ; bool result; (void)jenv; (void)jcls; (void)jarg1_; arg1 = *(upm::ADS1X15 **)&jarg1; { try { result = (bool)(arg1)->getContinuous(); } catch (std::invalid_argument& e) { std::string s1("UPM Invalid Argument: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return 0; }; } catch (std::domain_error& e) { std::string s1("UPM Domain Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return 0; }; } catch (std::overflow_error& e) { std::string s1("UPM Overflow Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_OverflowError, s1.c_str()); return 0; }; } catch (std::out_of_range& e) { std::string s1("UPM Out of Range: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return 0; }; } catch (std::length_error& e) { std::string s1("UPM Length Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return 0; }; } catch (std::logic_error& e) { std::string s1("UPM Logic Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return 0; }; } catch (std::bad_alloc& e) { /* for an allocation exception, don't try to create a string... */ { SWIG_JavaException(jenv, SWIG_MemoryError, e.what()); return 0; }; } catch (std::runtime_error& e) { /* catch other std::runtime_error exceptions here */ std::string s1("UPM Runtime Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return 0; }; } catch (std::exception& e) { /* catch other std::exceptions here */ std::string s1("UPM Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_SystemError, s1.c_str()); return 0; }; } catch (...) { /* catch everything else */ { SWIG_JavaException(jenv, SWIG_UnknownError, "UPM Unknown exception"); return 0; }; } } jresult = (jboolean)result; return jresult; } SWIGEXPORT void JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1setContinuous_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jboolean jarg2) { upm::ADS1X15 *arg1 = 0 ; bool arg2 ; (void)jenv; (void)jcls; (void)jarg1_; arg1 = *(upm::ADS1X15 **)&jarg1; arg2 = jarg2 ? true : false; { try { (arg1)->setContinuous(arg2); } catch (std::invalid_argument& e) { std::string s1("UPM Invalid Argument: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return ; }; } catch (std::domain_error& e) { std::string s1("UPM Domain Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return ; }; } catch (std::overflow_error& e) { std::string s1("UPM Overflow Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_OverflowError, s1.c_str()); return ; }; } catch (std::out_of_range& e) { std::string s1("UPM Out of Range: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return ; }; } catch (std::length_error& e) { std::string s1("UPM Length Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return ; }; } catch (std::logic_error& e) { std::string s1("UPM Logic Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return ; }; } catch (std::bad_alloc& e) { /* for an allocation exception, don't try to create a string... */ { SWIG_JavaException(jenv, SWIG_MemoryError, e.what()); return ; }; } catch (std::runtime_error& e) { /* catch other std::runtime_error exceptions here */ std::string s1("UPM Runtime Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return ; }; } catch (std::exception& e) { /* catch other std::exceptions here */ std::string s1("UPM Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_SystemError, s1.c_str()); return ; }; } catch (...) { /* catch everything else */ { SWIG_JavaException(jenv, SWIG_UnknownError, "UPM Unknown exception"); return ; }; } } } SWIGEXPORT void JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1setContinuous_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { upm::ADS1X15 *arg1 = 0 ; (void)jenv; (void)jcls; (void)jarg1_; arg1 = *(upm::ADS1X15 **)&jarg1; { try { (arg1)->setContinuous(); } catch (std::invalid_argument& e) { std::string s1("UPM Invalid Argument: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return ; }; } catch (std::domain_error& e) { std::string s1("UPM Domain Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return ; }; } catch (std::overflow_error& e) { std::string s1("UPM Overflow Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_OverflowError, s1.c_str()); return ; }; } catch (std::out_of_range& e) { std::string s1("UPM Out of Range: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return ; }; } catch (std::length_error& e) { std::string s1("UPM Length Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return ; }; } catch (std::logic_error& e) { std::string s1("UPM Logic Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return ; }; } catch (std::bad_alloc& e) { /* for an allocation exception, don't try to create a string... */ { SWIG_JavaException(jenv, SWIG_MemoryError, e.what()); return ; }; } catch (std::runtime_error& e) { /* catch other std::runtime_error exceptions here */ std::string s1("UPM Runtime Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return ; }; } catch (std::exception& e) { /* catch other std::exceptions here */ std::string s1("UPM Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_SystemError, s1.c_str()); return ; }; } catch (...) { /* catch everything else */ { SWIG_JavaException(jenv, SWIG_UnknownError, "UPM Unknown exception"); return ; }; } } } SWIGEXPORT jfloat JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1getThresh_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) { jfloat jresult = 0 ; upm::ADS1X15 *arg1 = 0 ; upm::ADS1X15::ADSTHRESH arg2 ; float result; (void)jenv; (void)jcls; (void)jarg1_; arg1 = *(upm::ADS1X15 **)&jarg1; arg2 = (upm::ADS1X15::ADSTHRESH)jarg2; { try { result = (float)(arg1)->getThresh(arg2); } catch (std::invalid_argument& e) { std::string s1("UPM Invalid Argument: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return 0; }; } catch (std::domain_error& e) { std::string s1("UPM Domain Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return 0; }; } catch (std::overflow_error& e) { std::string s1("UPM Overflow Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_OverflowError, s1.c_str()); return 0; }; } catch (std::out_of_range& e) { std::string s1("UPM Out of Range: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return 0; }; } catch (std::length_error& e) { std::string s1("UPM Length Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return 0; }; } catch (std::logic_error& e) { std::string s1("UPM Logic Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return 0; }; } catch (std::bad_alloc& e) { /* for an allocation exception, don't try to create a string... */ { SWIG_JavaException(jenv, SWIG_MemoryError, e.what()); return 0; }; } catch (std::runtime_error& e) { /* catch other std::runtime_error exceptions here */ std::string s1("UPM Runtime Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return 0; }; } catch (std::exception& e) { /* catch other std::exceptions here */ std::string s1("UPM Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_SystemError, s1.c_str()); return 0; }; } catch (...) { /* catch everything else */ { SWIG_JavaException(jenv, SWIG_UnknownError, "UPM Unknown exception"); return 0; }; } } jresult = (jfloat)result; return jresult; } SWIGEXPORT jfloat JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1getThresh_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { jfloat jresult = 0 ; upm::ADS1X15 *arg1 = 0 ; float result; (void)jenv; (void)jcls; (void)jarg1_; arg1 = *(upm::ADS1X15 **)&jarg1; { try { result = (float)(arg1)->getThresh(); } catch (std::invalid_argument& e) { std::string s1("UPM Invalid Argument: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return 0; }; } catch (std::domain_error& e) { std::string s1("UPM Domain Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return 0; }; } catch (std::overflow_error& e) { std::string s1("UPM Overflow Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_OverflowError, s1.c_str()); return 0; }; } catch (std::out_of_range& e) { std::string s1("UPM Out of Range: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return 0; }; } catch (std::length_error& e) { std::string s1("UPM Length Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return 0; }; } catch (std::logic_error& e) { std::string s1("UPM Logic Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return 0; }; } catch (std::bad_alloc& e) { /* for an allocation exception, don't try to create a string... */ { SWIG_JavaException(jenv, SWIG_MemoryError, e.what()); return 0; }; } catch (std::runtime_error& e) { /* catch other std::runtime_error exceptions here */ std::string s1("UPM Runtime Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return 0; }; } catch (std::exception& e) { /* catch other std::exceptions here */ std::string s1("UPM Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_SystemError, s1.c_str()); return 0; }; } catch (...) { /* catch everything else */ { SWIG_JavaException(jenv, SWIG_UnknownError, "UPM Unknown exception"); return 0; }; } } jresult = (jfloat)result; return jresult; } SWIGEXPORT void JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1setThresh_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2, jfloat jarg3) { upm::ADS1X15 *arg1 = 0 ; upm::ADS1X15::ADSTHRESH arg2 ; float arg3 ; (void)jenv; (void)jcls; (void)jarg1_; arg1 = *(upm::ADS1X15 **)&jarg1; arg2 = (upm::ADS1X15::ADSTHRESH)jarg2; arg3 = (float)jarg3; { try { (arg1)->setThresh(arg2,arg3); } catch (std::invalid_argument& e) { std::string s1("UPM Invalid Argument: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return ; }; } catch (std::domain_error& e) { std::string s1("UPM Domain Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return ; }; } catch (std::overflow_error& e) { std::string s1("UPM Overflow Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_OverflowError, s1.c_str()); return ; }; } catch (std::out_of_range& e) { std::string s1("UPM Out of Range: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return ; }; } catch (std::length_error& e) { std::string s1("UPM Length Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return ; }; } catch (std::logic_error& e) { std::string s1("UPM Logic Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return ; }; } catch (std::bad_alloc& e) { /* for an allocation exception, don't try to create a string... */ { SWIG_JavaException(jenv, SWIG_MemoryError, e.what()); return ; }; } catch (std::runtime_error& e) { /* catch other std::runtime_error exceptions here */ std::string s1("UPM Runtime Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return ; }; } catch (std::exception& e) { /* catch other std::exceptions here */ std::string s1("UPM Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_SystemError, s1.c_str()); return ; }; } catch (...) { /* catch everything else */ { SWIG_JavaException(jenv, SWIG_UnknownError, "UPM Unknown exception"); return ; }; } } } SWIGEXPORT void JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1setThresh_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) { upm::ADS1X15 *arg1 = 0 ; upm::ADS1X15::ADSTHRESH arg2 ; (void)jenv; (void)jcls; (void)jarg1_; arg1 = *(upm::ADS1X15 **)&jarg1; arg2 = (upm::ADS1X15::ADSTHRESH)jarg2; { try { (arg1)->setThresh(arg2); } catch (std::invalid_argument& e) { std::string s1("UPM Invalid Argument: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return ; }; } catch (std::domain_error& e) { std::string s1("UPM Domain Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return ; }; } catch (std::overflow_error& e) { std::string s1("UPM Overflow Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_OverflowError, s1.c_str()); return ; }; } catch (std::out_of_range& e) { std::string s1("UPM Out of Range: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return ; }; } catch (std::length_error& e) { std::string s1("UPM Length Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return ; }; } catch (std::logic_error& e) { std::string s1("UPM Logic Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return ; }; } catch (std::bad_alloc& e) { /* for an allocation exception, don't try to create a string... */ { SWIG_JavaException(jenv, SWIG_MemoryError, e.what()); return ; }; } catch (std::runtime_error& e) { /* catch other std::runtime_error exceptions here */ std::string s1("UPM Runtime Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return ; }; } catch (std::exception& e) { /* catch other std::exceptions here */ std::string s1("UPM Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_SystemError, s1.c_str()); return ; }; } catch (...) { /* catch everything else */ { SWIG_JavaException(jenv, SWIG_UnknownError, "UPM Unknown exception"); return ; }; } } } SWIGEXPORT void JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1setThresh_1_1SWIG_12(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { upm::ADS1X15 *arg1 = 0 ; (void)jenv; (void)jcls; (void)jarg1_; arg1 = *(upm::ADS1X15 **)&jarg1; { try { (arg1)->setThresh(); } catch (std::invalid_argument& e) { std::string s1("UPM Invalid Argument: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return ; }; } catch (std::domain_error& e) { std::string s1("UPM Domain Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return ; }; } catch (std::overflow_error& e) { std::string s1("UPM Overflow Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_OverflowError, s1.c_str()); return ; }; } catch (std::out_of_range& e) { std::string s1("UPM Out of Range: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return ; }; } catch (std::length_error& e) { std::string s1("UPM Length Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return ; }; } catch (std::logic_error& e) { std::string s1("UPM Logic Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return ; }; } catch (std::bad_alloc& e) { /* for an allocation exception, don't try to create a string... */ { SWIG_JavaException(jenv, SWIG_MemoryError, e.what()); return ; }; } catch (std::runtime_error& e) { /* catch other std::runtime_error exceptions here */ std::string s1("UPM Runtime Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return ; }; } catch (std::exception& e) { /* catch other std::exceptions here */ std::string s1("UPM Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_SystemError, s1.c_str()); return ; }; } catch (...) { /* catch everything else */ { SWIG_JavaException(jenv, SWIG_UnknownError, "UPM Unknown exception"); return ; }; } } } SWIGEXPORT jstring JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1X15_1getLeftoverStr(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { jstring jresult = 0 ; upm::ADS1X15 *arg1 = 0 ; std::string result; (void)jenv; (void)jcls; (void)jarg1_; arg1 = *(upm::ADS1X15 **)&jarg1; { try { result = (arg1)->getLeftoverStr(); } catch (std::invalid_argument& e) { std::string s1("UPM Invalid Argument: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return 0; }; } catch (std::domain_error& e) { std::string s1("UPM Domain Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return 0; }; } catch (std::overflow_error& e) { std::string s1("UPM Overflow Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_OverflowError, s1.c_str()); return 0; }; } catch (std::out_of_range& e) { std::string s1("UPM Out of Range: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return 0; }; } catch (std::length_error& e) { std::string s1("UPM Length Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return 0; }; } catch (std::logic_error& e) { std::string s1("UPM Logic Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return 0; }; } catch (std::bad_alloc& e) { /* for an allocation exception, don't try to create a string... */ { SWIG_JavaException(jenv, SWIG_MemoryError, e.what()); return 0; }; } catch (std::runtime_error& e) { /* catch other std::runtime_error exceptions here */ std::string s1("UPM Runtime Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return 0; }; } catch (std::exception& e) { /* catch other std::exceptions here */ std::string s1("UPM Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_SystemError, s1.c_str()); return 0; }; } catch (...) { /* catch everything else */ { SWIG_JavaException(jenv, SWIG_UnknownError, "UPM Unknown exception"); return 0; }; } } jresult = jenv->NewStringUTF((&result)->c_str()); return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1115_1CONVERSIONDELAY_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; int result; (void)jenv; (void)jcls; result = (int)((8000)); jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1115_1DR_1MASK_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; int result; (void)jenv; (void)jcls; result = (int)((0x00E0)); jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1115_1DR_18SPS_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; int result; (void)jenv; (void)jcls; result = (int)((0x0000)); jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1115_1DR_116SPS_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; int result; (void)jenv; (void)jcls; result = (int)((0x0020)); jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1115_1DR_132SPS_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; int result; (void)jenv; (void)jcls; result = (int)((0x0040)); jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1115_1DR_164SPS_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; int result; (void)jenv; (void)jcls; result = (int)((0x0060)); jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1115_1DR_1128SPS_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; int result; (void)jenv; (void)jcls; result = (int)((0x0080)); jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1115_1DR_1250SPS_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; int result; (void)jenv; (void)jcls; result = (int)((0x00A0)); jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1115_1DR_1475SPS_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; int result; (void)jenv; (void)jcls; result = (int)((0x00C0)); jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1115_1DR_1860SPS_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; int result; (void)jenv; (void)jcls; result = (int)((0x00E0)); jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1115_1SPS_18_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; upm::ADS1115::ADSDATARATE result; (void)jenv; (void)jcls; result = (upm::ADS1115::ADSDATARATE)upm::ADS1115::SPS_8; jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1115_1SPS_116_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; upm::ADS1115::ADSDATARATE result; (void)jenv; (void)jcls; result = (upm::ADS1115::ADSDATARATE)upm::ADS1115::SPS_16; jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1115_1SPS_132_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; upm::ADS1115::ADSDATARATE result; (void)jenv; (void)jcls; result = (upm::ADS1115::ADSDATARATE)upm::ADS1115::SPS_32; jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1115_1SPS_164_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; upm::ADS1115::ADSDATARATE result; (void)jenv; (void)jcls; result = (upm::ADS1115::ADSDATARATE)upm::ADS1115::SPS_64; jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1115_1SPS_1128_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; upm::ADS1115::ADSDATARATE result; (void)jenv; (void)jcls; result = (upm::ADS1115::ADSDATARATE)upm::ADS1115::SPS_128; jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1115_1SPS_1250_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; upm::ADS1115::ADSDATARATE result; (void)jenv; (void)jcls; result = (upm::ADS1115::ADSDATARATE)upm::ADS1115::SPS_250; jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1115_1SPS_1475_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; upm::ADS1115::ADSDATARATE result; (void)jenv; (void)jcls; result = (upm::ADS1115::ADSDATARATE)upm::ADS1115::SPS_475; jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1115_1SPS_1860_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; upm::ADS1115::ADSDATARATE result; (void)jenv; (void)jcls; result = (upm::ADS1115::ADSDATARATE)upm::ADS1115::SPS_860; jresult = (jint)result; return jresult; } SWIGEXPORT jlong JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_new_1ADS1115_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jint jarg1, jshort jarg2) { jlong jresult = 0 ; int arg1 ; uint8_t arg2 ; upm::ADS1115 *result = 0 ; (void)jenv; (void)jcls; arg1 = (int)jarg1; arg2 = (uint8_t)jarg2; { try { result = (upm::ADS1115 *)new upm::ADS1115(arg1,arg2); } catch (std::invalid_argument& e) { std::string s1("UPM Invalid Argument: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return 0; }; } catch (std::domain_error& e) { std::string s1("UPM Domain Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return 0; }; } catch (std::overflow_error& e) { std::string s1("UPM Overflow Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_OverflowError, s1.c_str()); return 0; }; } catch (std::out_of_range& e) { std::string s1("UPM Out of Range: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return 0; }; } catch (std::length_error& e) { std::string s1("UPM Length Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return 0; }; } catch (std::logic_error& e) { std::string s1("UPM Logic Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return 0; }; } catch (std::bad_alloc& e) { /* for an allocation exception, don't try to create a string... */ { SWIG_JavaException(jenv, SWIG_MemoryError, e.what()); return 0; }; } catch (std::runtime_error& e) { /* catch other std::runtime_error exceptions here */ std::string s1("UPM Runtime Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return 0; }; } catch (std::exception& e) { /* catch other std::exceptions here */ std::string s1("UPM Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_SystemError, s1.c_str()); return 0; }; } catch (...) { /* catch everything else */ { SWIG_JavaException(jenv, SWIG_UnknownError, "UPM Unknown exception"); return 0; }; } } *(upm::ADS1115 **)&jresult = result; return jresult; } SWIGEXPORT jlong JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_new_1ADS1115_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jint jarg1) { jlong jresult = 0 ; int arg1 ; upm::ADS1115 *result = 0 ; (void)jenv; (void)jcls; arg1 = (int)jarg1; { try { result = (upm::ADS1115 *)new upm::ADS1115(arg1); } catch (std::invalid_argument& e) { std::string s1("UPM Invalid Argument: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return 0; }; } catch (std::domain_error& e) { std::string s1("UPM Domain Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return 0; }; } catch (std::overflow_error& e) { std::string s1("UPM Overflow Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_OverflowError, s1.c_str()); return 0; }; } catch (std::out_of_range& e) { std::string s1("UPM Out of Range: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return 0; }; } catch (std::length_error& e) { std::string s1("UPM Length Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return 0; }; } catch (std::logic_error& e) { std::string s1("UPM Logic Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return 0; }; } catch (std::bad_alloc& e) { /* for an allocation exception, don't try to create a string... */ { SWIG_JavaException(jenv, SWIG_MemoryError, e.what()); return 0; }; } catch (std::runtime_error& e) { /* catch other std::runtime_error exceptions here */ std::string s1("UPM Runtime Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return 0; }; } catch (std::exception& e) { /* catch other std::exceptions here */ std::string s1("UPM Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_SystemError, s1.c_str()); return 0; }; } catch (...) { /* catch everything else */ { SWIG_JavaException(jenv, SWIG_UnknownError, "UPM Unknown exception"); return 0; }; } } *(upm::ADS1115 **)&jresult = result; return jresult; } SWIGEXPORT jlong JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_new_1ADS1115_1_1SWIG_12(JNIEnv *jenv, jclass jcls, jstring jarg1) { jlong jresult = 0 ; std::string arg1 ; upm::ADS1115 *result = 0 ; (void)jenv; (void)jcls; if(!jarg1) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string"); return 0; } const char *arg1_pstr = jenv->GetStringUTFChars(jarg1, 0); if (!arg1_pstr) return 0; (&arg1)->assign(arg1_pstr); jenv->ReleaseStringUTFChars(jarg1, arg1_pstr); { try { result = (upm::ADS1115 *)new upm::ADS1115(SWIG_STD_MOVE(arg1)); } catch (std::invalid_argument& e) { std::string s1("UPM Invalid Argument: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return 0; }; } catch (std::domain_error& e) { std::string s1("UPM Domain Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return 0; }; } catch (std::overflow_error& e) { std::string s1("UPM Overflow Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_OverflowError, s1.c_str()); return 0; }; } catch (std::out_of_range& e) { std::string s1("UPM Out of Range: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return 0; }; } catch (std::length_error& e) { std::string s1("UPM Length Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return 0; }; } catch (std::logic_error& e) { std::string s1("UPM Logic Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return 0; }; } catch (std::bad_alloc& e) { /* for an allocation exception, don't try to create a string... */ { SWIG_JavaException(jenv, SWIG_MemoryError, e.what()); return 0; }; } catch (std::runtime_error& e) { /* catch other std::runtime_error exceptions here */ std::string s1("UPM Runtime Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return 0; }; } catch (std::exception& e) { /* catch other std::exceptions here */ std::string s1("UPM Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_SystemError, s1.c_str()); return 0; }; } catch (...) { /* catch everything else */ { SWIG_JavaException(jenv, SWIG_UnknownError, "UPM Unknown exception"); return 0; }; } } *(upm::ADS1115 **)&jresult = result; return jresult; } SWIGEXPORT void JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_delete_1ADS1115(JNIEnv *jenv, jclass jcls, jlong jarg1) { upm::ADS1115 *arg1 = 0 ; (void)jenv; (void)jcls; arg1 = *(upm::ADS1115 **)&jarg1; { try { delete arg1; } catch (std::invalid_argument& e) { std::string s1("UPM Invalid Argument: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return ; }; } catch (std::domain_error& e) { std::string s1("UPM Domain Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return ; }; } catch (std::overflow_error& e) { std::string s1("UPM Overflow Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_OverflowError, s1.c_str()); return ; }; } catch (std::out_of_range& e) { std::string s1("UPM Out of Range: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return ; }; } catch (std::length_error& e) { std::string s1("UPM Length Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return ; }; } catch (std::logic_error& e) { std::string s1("UPM Logic Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return ; }; } catch (std::bad_alloc& e) { /* for an allocation exception, don't try to create a string... */ { SWIG_JavaException(jenv, SWIG_MemoryError, e.what()); return ; }; } catch (std::runtime_error& e) { /* catch other std::runtime_error exceptions here */ std::string s1("UPM Runtime Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return ; }; } catch (std::exception& e) { /* catch other std::exceptions here */ std::string s1("UPM Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_SystemError, s1.c_str()); return ; }; } catch (...) { /* catch everything else */ { SWIG_JavaException(jenv, SWIG_UnknownError, "UPM Unknown exception"); return ; }; } } } SWIGEXPORT void JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1115_1setSPS_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) { upm::ADS1115 *arg1 = 0 ; upm::ADS1115::ADSDATARATE arg2 ; (void)jenv; (void)jcls; (void)jarg1_; arg1 = *(upm::ADS1115 **)&jarg1; arg2 = (upm::ADS1115::ADSDATARATE)jarg2; { try { (arg1)->setSPS(arg2); } catch (std::invalid_argument& e) { std::string s1("UPM Invalid Argument: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return ; }; } catch (std::domain_error& e) { std::string s1("UPM Domain Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return ; }; } catch (std::overflow_error& e) { std::string s1("UPM Overflow Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_OverflowError, s1.c_str()); return ; }; } catch (std::out_of_range& e) { std::string s1("UPM Out of Range: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return ; }; } catch (std::length_error& e) { std::string s1("UPM Length Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return ; }; } catch (std::logic_error& e) { std::string s1("UPM Logic Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return ; }; } catch (std::bad_alloc& e) { /* for an allocation exception, don't try to create a string... */ { SWIG_JavaException(jenv, SWIG_MemoryError, e.what()); return ; }; } catch (std::runtime_error& e) { /* catch other std::runtime_error exceptions here */ std::string s1("UPM Runtime Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return ; }; } catch (std::exception& e) { /* catch other std::exceptions here */ std::string s1("UPM Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_SystemError, s1.c_str()); return ; }; } catch (...) { /* catch everything else */ { SWIG_JavaException(jenv, SWIG_UnknownError, "UPM Unknown exception"); return ; }; } } } SWIGEXPORT void JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1115_1setSPS_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { upm::ADS1115 *arg1 = 0 ; (void)jenv; (void)jcls; (void)jarg1_; arg1 = *(upm::ADS1115 **)&jarg1; { try { (arg1)->setSPS(); } catch (std::invalid_argument& e) { std::string s1("UPM Invalid Argument: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return ; }; } catch (std::domain_error& e) { std::string s1("UPM Domain Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return ; }; } catch (std::overflow_error& e) { std::string s1("UPM Overflow Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_OverflowError, s1.c_str()); return ; }; } catch (std::out_of_range& e) { std::string s1("UPM Out of Range: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return ; }; } catch (std::length_error& e) { std::string s1("UPM Length Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return ; }; } catch (std::logic_error& e) { std::string s1("UPM Logic Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return ; }; } catch (std::bad_alloc& e) { /* for an allocation exception, don't try to create a string... */ { SWIG_JavaException(jenv, SWIG_MemoryError, e.what()); return ; }; } catch (std::runtime_error& e) { /* catch other std::runtime_error exceptions here */ std::string s1("UPM Runtime Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return ; }; } catch (std::exception& e) { /* catch other std::exceptions here */ std::string s1("UPM Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_SystemError, s1.c_str()); return ; }; } catch (...) { /* catch everything else */ { SWIG_JavaException(jenv, SWIG_UnknownError, "UPM Unknown exception"); return ; }; } } } SWIGEXPORT jdouble JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1015_1VREF_1get(JNIEnv *jenv, jclass jcls) { jdouble jresult = 0 ; double result; (void)jenv; (void)jcls; result = (double)(2.048); jresult = (jdouble)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1015_1CONVERSIONDELAY_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; int result; (void)jenv; (void)jcls; result = (int)((8000)); jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1015_1DR_1MASK_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; int result; (void)jenv; (void)jcls; result = (int)((0x00E0)); jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1015_1DR_1128SPS_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; int result; (void)jenv; (void)jcls; result = (int)((0x0000)); jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1015_1DR_1250SPS_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; int result; (void)jenv; (void)jcls; result = (int)((0x0020)); jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1015_1DR_1490SPS_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; int result; (void)jenv; (void)jcls; result = (int)((0x0040)); jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1015_1DR_1920SPS_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; int result; (void)jenv; (void)jcls; result = (int)((0x0060)); jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1015_1DR_11600SPS_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; int result; (void)jenv; (void)jcls; result = (int)((0x0080)); jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1015_1DR_12400SPS_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; int result; (void)jenv; (void)jcls; result = (int)((0x00A0)); jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1015_1DR_13300SPS_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; int result; (void)jenv; (void)jcls; result = (int)((0x00C0)); jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1015_1SPS_1128_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; upm::ADS1015::ADSSAMPLERATE result; (void)jenv; (void)jcls; result = (upm::ADS1015::ADSSAMPLERATE)upm::ADS1015::SPS_128; jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1015_1SPS_1250_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; upm::ADS1015::ADSSAMPLERATE result; (void)jenv; (void)jcls; result = (upm::ADS1015::ADSSAMPLERATE)upm::ADS1015::SPS_250; jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1015_1SPS_1490_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; upm::ADS1015::ADSSAMPLERATE result; (void)jenv; (void)jcls; result = (upm::ADS1015::ADSSAMPLERATE)upm::ADS1015::SPS_490; jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1015_1SPS_1920_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; upm::ADS1015::ADSSAMPLERATE result; (void)jenv; (void)jcls; result = (upm::ADS1015::ADSSAMPLERATE)upm::ADS1015::SPS_920; jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1015_1SPS_11600_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; upm::ADS1015::ADSSAMPLERATE result; (void)jenv; (void)jcls; result = (upm::ADS1015::ADSSAMPLERATE)upm::ADS1015::SPS_1600; jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1015_1SPS_12400_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; upm::ADS1015::ADSSAMPLERATE result; (void)jenv; (void)jcls; result = (upm::ADS1015::ADSSAMPLERATE)upm::ADS1015::SPS_2400; jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1015_1SPS_13300_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; upm::ADS1015::ADSSAMPLERATE result; (void)jenv; (void)jcls; result = (upm::ADS1015::ADSSAMPLERATE)upm::ADS1015::SPS_3300; jresult = (jint)result; return jresult; } SWIGEXPORT jlong JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_new_1ADS1015_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jint jarg1, jshort jarg2, jfloat jarg3) { jlong jresult = 0 ; int arg1 ; uint8_t arg2 ; float arg3 ; upm::ADS1015 *result = 0 ; (void)jenv; (void)jcls; arg1 = (int)jarg1; arg2 = (uint8_t)jarg2; arg3 = (float)jarg3; { try { result = (upm::ADS1015 *)new upm::ADS1015(arg1,arg2,arg3); } catch (std::invalid_argument& e) { std::string s1("UPM Invalid Argument: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return 0; }; } catch (std::domain_error& e) { std::string s1("UPM Domain Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return 0; }; } catch (std::overflow_error& e) { std::string s1("UPM Overflow Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_OverflowError, s1.c_str()); return 0; }; } catch (std::out_of_range& e) { std::string s1("UPM Out of Range: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return 0; }; } catch (std::length_error& e) { std::string s1("UPM Length Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return 0; }; } catch (std::logic_error& e) { std::string s1("UPM Logic Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return 0; }; } catch (std::bad_alloc& e) { /* for an allocation exception, don't try to create a string... */ { SWIG_JavaException(jenv, SWIG_MemoryError, e.what()); return 0; }; } catch (std::runtime_error& e) { /* catch other std::runtime_error exceptions here */ std::string s1("UPM Runtime Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return 0; }; } catch (std::exception& e) { /* catch other std::exceptions here */ std::string s1("UPM Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_SystemError, s1.c_str()); return 0; }; } catch (...) { /* catch everything else */ { SWIG_JavaException(jenv, SWIG_UnknownError, "UPM Unknown exception"); return 0; }; } } *(upm::ADS1015 **)&jresult = result; return jresult; } SWIGEXPORT jlong JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_new_1ADS1015_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jint jarg1, jshort jarg2) { jlong jresult = 0 ; int arg1 ; uint8_t arg2 ; upm::ADS1015 *result = 0 ; (void)jenv; (void)jcls; arg1 = (int)jarg1; arg2 = (uint8_t)jarg2; { try { result = (upm::ADS1015 *)new upm::ADS1015(arg1,arg2); } catch (std::invalid_argument& e) { std::string s1("UPM Invalid Argument: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return 0; }; } catch (std::domain_error& e) { std::string s1("UPM Domain Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return 0; }; } catch (std::overflow_error& e) { std::string s1("UPM Overflow Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_OverflowError, s1.c_str()); return 0; }; } catch (std::out_of_range& e) { std::string s1("UPM Out of Range: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return 0; }; } catch (std::length_error& e) { std::string s1("UPM Length Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return 0; }; } catch (std::logic_error& e) { std::string s1("UPM Logic Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return 0; }; } catch (std::bad_alloc& e) { /* for an allocation exception, don't try to create a string... */ { SWIG_JavaException(jenv, SWIG_MemoryError, e.what()); return 0; }; } catch (std::runtime_error& e) { /* catch other std::runtime_error exceptions here */ std::string s1("UPM Runtime Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return 0; }; } catch (std::exception& e) { /* catch other std::exceptions here */ std::string s1("UPM Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_SystemError, s1.c_str()); return 0; }; } catch (...) { /* catch everything else */ { SWIG_JavaException(jenv, SWIG_UnknownError, "UPM Unknown exception"); return 0; }; } } *(upm::ADS1015 **)&jresult = result; return jresult; } SWIGEXPORT jlong JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_new_1ADS1015_1_1SWIG_12(JNIEnv *jenv, jclass jcls, jint jarg1) { jlong jresult = 0 ; int arg1 ; upm::ADS1015 *result = 0 ; (void)jenv; (void)jcls; arg1 = (int)jarg1; { try { result = (upm::ADS1015 *)new upm::ADS1015(arg1); } catch (std::invalid_argument& e) { std::string s1("UPM Invalid Argument: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return 0; }; } catch (std::domain_error& e) { std::string s1("UPM Domain Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return 0; }; } catch (std::overflow_error& e) { std::string s1("UPM Overflow Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_OverflowError, s1.c_str()); return 0; }; } catch (std::out_of_range& e) { std::string s1("UPM Out of Range: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return 0; }; } catch (std::length_error& e) { std::string s1("UPM Length Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return 0; }; } catch (std::logic_error& e) { std::string s1("UPM Logic Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return 0; }; } catch (std::bad_alloc& e) { /* for an allocation exception, don't try to create a string... */ { SWIG_JavaException(jenv, SWIG_MemoryError, e.what()); return 0; }; } catch (std::runtime_error& e) { /* catch other std::runtime_error exceptions here */ std::string s1("UPM Runtime Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return 0; }; } catch (std::exception& e) { /* catch other std::exceptions here */ std::string s1("UPM Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_SystemError, s1.c_str()); return 0; }; } catch (...) { /* catch everything else */ { SWIG_JavaException(jenv, SWIG_UnknownError, "UPM Unknown exception"); return 0; }; } } *(upm::ADS1015 **)&jresult = result; return jresult; } SWIGEXPORT jlong JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_new_1ADS1015_1_1SWIG_13(JNIEnv *jenv, jclass jcls, jstring jarg1) { jlong jresult = 0 ; std::string arg1 ; upm::ADS1015 *result = 0 ; (void)jenv; (void)jcls; if(!jarg1) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string"); return 0; } const char *arg1_pstr = jenv->GetStringUTFChars(jarg1, 0); if (!arg1_pstr) return 0; (&arg1)->assign(arg1_pstr); jenv->ReleaseStringUTFChars(jarg1, arg1_pstr); { try { result = (upm::ADS1015 *)new upm::ADS1015(SWIG_STD_MOVE(arg1)); } catch (std::invalid_argument& e) { std::string s1("UPM Invalid Argument: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return 0; }; } catch (std::domain_error& e) { std::string s1("UPM Domain Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return 0; }; } catch (std::overflow_error& e) { std::string s1("UPM Overflow Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_OverflowError, s1.c_str()); return 0; }; } catch (std::out_of_range& e) { std::string s1("UPM Out of Range: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return 0; }; } catch (std::length_error& e) { std::string s1("UPM Length Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return 0; }; } catch (std::logic_error& e) { std::string s1("UPM Logic Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return 0; }; } catch (std::bad_alloc& e) { /* for an allocation exception, don't try to create a string... */ { SWIG_JavaException(jenv, SWIG_MemoryError, e.what()); return 0; }; } catch (std::runtime_error& e) { /* catch other std::runtime_error exceptions here */ std::string s1("UPM Runtime Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return 0; }; } catch (std::exception& e) { /* catch other std::exceptions here */ std::string s1("UPM Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_SystemError, s1.c_str()); return 0; }; } catch (...) { /* catch everything else */ { SWIG_JavaException(jenv, SWIG_UnknownError, "UPM Unknown exception"); return 0; }; } } *(upm::ADS1015 **)&jresult = result; return jresult; } SWIGEXPORT void JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_delete_1ADS1015(JNIEnv *jenv, jclass jcls, jlong jarg1) { upm::ADS1015 *arg1 = 0 ; (void)jenv; (void)jcls; arg1 = *(upm::ADS1015 **)&jarg1; { try { delete arg1; } catch (std::invalid_argument& e) { std::string s1("UPM Invalid Argument: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return ; }; } catch (std::domain_error& e) { std::string s1("UPM Domain Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return ; }; } catch (std::overflow_error& e) { std::string s1("UPM Overflow Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_OverflowError, s1.c_str()); return ; }; } catch (std::out_of_range& e) { std::string s1("UPM Out of Range: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return ; }; } catch (std::length_error& e) { std::string s1("UPM Length Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return ; }; } catch (std::logic_error& e) { std::string s1("UPM Logic Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return ; }; } catch (std::bad_alloc& e) { /* for an allocation exception, don't try to create a string... */ { SWIG_JavaException(jenv, SWIG_MemoryError, e.what()); return ; }; } catch (std::runtime_error& e) { /* catch other std::runtime_error exceptions here */ std::string s1("UPM Runtime Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return ; }; } catch (std::exception& e) { /* catch other std::exceptions here */ std::string s1("UPM Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_SystemError, s1.c_str()); return ; }; } catch (...) { /* catch everything else */ { SWIG_JavaException(jenv, SWIG_UnknownError, "UPM Unknown exception"); return ; }; } } } SWIGEXPORT void JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1015_1setSPS_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) { upm::ADS1015 *arg1 = 0 ; upm::ADS1015::ADSSAMPLERATE arg2 ; (void)jenv; (void)jcls; (void)jarg1_; arg1 = *(upm::ADS1015 **)&jarg1; arg2 = (upm::ADS1015::ADSSAMPLERATE)jarg2; { try { (arg1)->setSPS(arg2); } catch (std::invalid_argument& e) { std::string s1("UPM Invalid Argument: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return ; }; } catch (std::domain_error& e) { std::string s1("UPM Domain Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return ; }; } catch (std::overflow_error& e) { std::string s1("UPM Overflow Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_OverflowError, s1.c_str()); return ; }; } catch (std::out_of_range& e) { std::string s1("UPM Out of Range: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return ; }; } catch (std::length_error& e) { std::string s1("UPM Length Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return ; }; } catch (std::logic_error& e) { std::string s1("UPM Logic Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return ; }; } catch (std::bad_alloc& e) { /* for an allocation exception, don't try to create a string... */ { SWIG_JavaException(jenv, SWIG_MemoryError, e.what()); return ; }; } catch (std::runtime_error& e) { /* catch other std::runtime_error exceptions here */ std::string s1("UPM Runtime Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return ; }; } catch (std::exception& e) { /* catch other std::exceptions here */ std::string s1("UPM Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_SystemError, s1.c_str()); return ; }; } catch (...) { /* catch everything else */ { SWIG_JavaException(jenv, SWIG_UnknownError, "UPM Unknown exception"); return ; }; } } } SWIGEXPORT void JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1015_1setSPS_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { upm::ADS1015 *arg1 = 0 ; (void)jenv; (void)jcls; (void)jarg1_; arg1 = *(upm::ADS1015 **)&jarg1; { try { (arg1)->setSPS(); } catch (std::invalid_argument& e) { std::string s1("UPM Invalid Argument: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return ; }; } catch (std::domain_error& e) { std::string s1("UPM Domain Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return ; }; } catch (std::overflow_error& e) { std::string s1("UPM Overflow Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_OverflowError, s1.c_str()); return ; }; } catch (std::out_of_range& e) { std::string s1("UPM Out of Range: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return ; }; } catch (std::length_error& e) { std::string s1("UPM Length Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return ; }; } catch (std::logic_error& e) { std::string s1("UPM Logic Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return ; }; } catch (std::bad_alloc& e) { /* for an allocation exception, don't try to create a string... */ { SWIG_JavaException(jenv, SWIG_MemoryError, e.what()); return ; }; } catch (std::runtime_error& e) { /* catch other std::runtime_error exceptions here */ std::string s1("UPM Runtime Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return ; }; } catch (std::exception& e) { /* catch other std::exceptions here */ std::string s1("UPM Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_SystemError, s1.c_str()); return ; }; } catch (...) { /* catch everything else */ { SWIG_JavaException(jenv, SWIG_UnknownError, "UPM Unknown exception"); return ; }; } } } SWIGEXPORT jlong JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1015_1getNumInputs(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { jlong jresult = 0 ; upm::ADS1015 *arg1 = 0 ; unsigned int result; (void)jenv; (void)jcls; (void)jarg1_; arg1 = *(upm::ADS1015 **)&jarg1; { try { result = (unsigned int)(arg1)->getNumInputs(); } catch (std::invalid_argument& e) { std::string s1("UPM Invalid Argument: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return 0; }; } catch (std::domain_error& e) { std::string s1("UPM Domain Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return 0; }; } catch (std::overflow_error& e) { std::string s1("UPM Overflow Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_OverflowError, s1.c_str()); return 0; }; } catch (std::out_of_range& e) { std::string s1("UPM Out of Range: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return 0; }; } catch (std::length_error& e) { std::string s1("UPM Length Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return 0; }; } catch (std::logic_error& e) { std::string s1("UPM Logic Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return 0; }; } catch (std::bad_alloc& e) { /* for an allocation exception, don't try to create a string... */ { SWIG_JavaException(jenv, SWIG_MemoryError, e.what()); return 0; }; } catch (std::runtime_error& e) { /* catch other std::runtime_error exceptions here */ std::string s1("UPM Runtime Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return 0; }; } catch (std::exception& e) { /* catch other std::exceptions here */ std::string s1("UPM Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_SystemError, s1.c_str()); return 0; }; } catch (...) { /* catch everything else */ { SWIG_JavaException(jenv, SWIG_UnknownError, "UPM Unknown exception"); return 0; }; } } jresult = (jlong)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1015_1getRawValue(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2) { jint jresult = 0 ; upm::ADS1015 *arg1 = 0 ; unsigned int arg2 ; uint16_t result; (void)jenv; (void)jcls; (void)jarg1_; arg1 = *(upm::ADS1015 **)&jarg1; arg2 = (unsigned int)jarg2; { try { result = (uint16_t)(arg1)->getRawValue(arg2); } catch (std::invalid_argument& e) { std::string s1("UPM Invalid Argument: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return 0; }; } catch (std::domain_error& e) { std::string s1("UPM Domain Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return 0; }; } catch (std::overflow_error& e) { std::string s1("UPM Overflow Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_OverflowError, s1.c_str()); return 0; }; } catch (std::out_of_range& e) { std::string s1("UPM Out of Range: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return 0; }; } catch (std::length_error& e) { std::string s1("UPM Length Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return 0; }; } catch (std::logic_error& e) { std::string s1("UPM Logic Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return 0; }; } catch (std::bad_alloc& e) { /* for an allocation exception, don't try to create a string... */ { SWIG_JavaException(jenv, SWIG_MemoryError, e.what()); return 0; }; } catch (std::runtime_error& e) { /* catch other std::runtime_error exceptions here */ std::string s1("UPM Runtime Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return 0; }; } catch (std::exception& e) { /* catch other std::exceptions here */ std::string s1("UPM Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_SystemError, s1.c_str()); return 0; }; } catch (...) { /* catch everything else */ { SWIG_JavaException(jenv, SWIG_UnknownError, "UPM Unknown exception"); return 0; }; } } jresult = (jint)result; return jresult; } SWIGEXPORT jfloat JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1015_1getVoltage(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2) { jfloat jresult = 0 ; upm::ADS1015 *arg1 = 0 ; unsigned int arg2 ; float result; (void)jenv; (void)jcls; (void)jarg1_; arg1 = *(upm::ADS1015 **)&jarg1; arg2 = (unsigned int)jarg2; { try { result = (float)(arg1)->getVoltage(arg2); } catch (std::invalid_argument& e) { std::string s1("UPM Invalid Argument: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return 0; }; } catch (std::domain_error& e) { std::string s1("UPM Domain Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return 0; }; } catch (std::overflow_error& e) { std::string s1("UPM Overflow Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_OverflowError, s1.c_str()); return 0; }; } catch (std::out_of_range& e) { std::string s1("UPM Out of Range: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return 0; }; } catch (std::length_error& e) { std::string s1("UPM Length Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return 0; }; } catch (std::logic_error& e) { std::string s1("UPM Logic Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return 0; }; } catch (std::bad_alloc& e) { /* for an allocation exception, don't try to create a string... */ { SWIG_JavaException(jenv, SWIG_MemoryError, e.what()); return 0; }; } catch (std::runtime_error& e) { /* catch other std::runtime_error exceptions here */ std::string s1("UPM Runtime Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return 0; }; } catch (std::exception& e) { /* catch other std::exceptions here */ std::string s1("UPM Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_SystemError, s1.c_str()); return 0; }; } catch (...) { /* catch everything else */ { SWIG_JavaException(jenv, SWIG_UnknownError, "UPM Unknown exception"); return 0; }; } } jresult = (jfloat)result; return jresult; } SWIGEXPORT jlong JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1015_1getResolutionInBits(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { jlong jresult = 0 ; upm::ADS1015 *arg1 = 0 ; unsigned int result; (void)jenv; (void)jcls; (void)jarg1_; arg1 = *(upm::ADS1015 **)&jarg1; { try { result = (unsigned int)(arg1)->getResolutionInBits(); } catch (std::invalid_argument& e) { std::string s1("UPM Invalid Argument: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return 0; }; } catch (std::domain_error& e) { std::string s1("UPM Domain Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return 0; }; } catch (std::overflow_error& e) { std::string s1("UPM Overflow Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_OverflowError, s1.c_str()); return 0; }; } catch (std::out_of_range& e) { std::string s1("UPM Out of Range: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return 0; }; } catch (std::length_error& e) { std::string s1("UPM Length Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return 0; }; } catch (std::logic_error& e) { std::string s1("UPM Logic Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return 0; }; } catch (std::bad_alloc& e) { /* for an allocation exception, don't try to create a string... */ { SWIG_JavaException(jenv, SWIG_MemoryError, e.what()); return 0; }; } catch (std::runtime_error& e) { /* catch other std::runtime_error exceptions here */ std::string s1("UPM Runtime Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return 0; }; } catch (std::exception& e) { /* catch other std::exceptions here */ std::string s1("UPM Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_SystemError, s1.c_str()); return 0; }; } catch (...) { /* catch everything else */ { SWIG_JavaException(jenv, SWIG_UnknownError, "UPM Unknown exception"); return 0; }; } } jresult = (jlong)result; return jresult; } SWIGEXPORT jstring JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1015_1getModuleName(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { jstring jresult = 0 ; upm::ADS1015 *arg1 = 0 ; char *result = 0 ; (void)jenv; (void)jcls; (void)jarg1_; arg1 = *(upm::ADS1015 **)&jarg1; { try { result = (char *)(arg1)->getModuleName(); } catch (std::invalid_argument& e) { std::string s1("UPM Invalid Argument: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return 0; }; } catch (std::domain_error& e) { std::string s1("UPM Domain Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return 0; }; } catch (std::overflow_error& e) { std::string s1("UPM Overflow Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_OverflowError, s1.c_str()); return 0; }; } catch (std::out_of_range& e) { std::string s1("UPM Out of Range: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return 0; }; } catch (std::length_error& e) { std::string s1("UPM Length Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return 0; }; } catch (std::logic_error& e) { std::string s1("UPM Logic Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return 0; }; } catch (std::bad_alloc& e) { /* for an allocation exception, don't try to create a string... */ { SWIG_JavaException(jenv, SWIG_MemoryError, e.what()); return 0; }; } catch (std::runtime_error& e) { /* catch other std::runtime_error exceptions here */ std::string s1("UPM Runtime Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return 0; }; } catch (std::exception& e) { /* catch other std::exceptions here */ std::string s1("UPM Error: "), s2(e.what()); s1 = s1 + s2; { SWIG_JavaException(jenv, SWIG_SystemError, s1.c_str()); return 0; }; } catch (...) { /* catch everything else */ { SWIG_JavaException(jenv, SWIG_UnknownError, "UPM Unknown exception"); return 0; }; } } if (result) jresult = jenv->NewStringUTF((const char *)result); return jresult; } SWIGEXPORT jlong JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1115_1SWIGUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { jlong baseptr = 0; (void)jenv; (void)jcls; *(upm::ADS1X15 **)&baseptr = *(upm::ADS1115 **)&jarg1; return baseptr; } SWIGEXPORT jlong JNICALL Java_upm_1ads1x15_javaupm_1ads1x15JNI_ADS1015_1SWIGUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { jlong baseptr = 0; (void)jenv; (void)jcls; *(upm::ADS1X15 **)&baseptr = *(upm::ADS1015 **)&jarg1; return baseptr; } #ifdef __cplusplus } #endif