/* ---------------------------------------------------------------------------- * 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 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 "max44000.hpp" #ifdef __cplusplus extern "C" { #endif SWIGEXPORT jstring JNICALL Java_upm_1max44000_javaupm_1max44000JNI_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_1max44000_javaupm_1max44000JNI_ADDR_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; int result; (void)jenv; (void)jcls; result = (int)(0x4A); jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1max44000_javaupm_1max44000JNI_ISR_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_1max44000_javaupm_1max44000JNI_MCR_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_1max44000_javaupm_1max44000JNI_RCR_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_1max44000_javaupm_1max44000JNI_TCR_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_1max44000_javaupm_1max44000JNI_ALSDATA_1HIGH_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; int result; (void)jenv; (void)jcls; result = (int)(0x04); jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1max44000_javaupm_1max44000JNI_ALSDATA_1LOW_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; int result; (void)jenv; (void)jcls; result = (int)(0x05); jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1max44000_javaupm_1max44000JNI_PRXDATA_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; int result; (void)jenv; (void)jcls; result = (int)(0x15); jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1max44000_javaupm_1max44000JNI_ALS_1UP_1THRESH_1HIGH_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; int result; (void)jenv; (void)jcls; result = (int)(0x06); jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1max44000_javaupm_1max44000JNI_ALS_1UP_1THRESH_1LOW_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; int result; (void)jenv; (void)jcls; result = (int)(0x07); jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1max44000_javaupm_1max44000JNI_ALS_1LO_1THRESH_1HIGH_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; int result; (void)jenv; (void)jcls; result = (int)(0x08); jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1max44000_javaupm_1max44000JNI_ALS_1LO_1THRESH_1LOW_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; int result; (void)jenv; (void)jcls; result = (int)(0x09); jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1max44000_javaupm_1max44000JNI_TPTR_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; int result; (void)jenv; (void)jcls; result = (int)(0x0A); jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1max44000_javaupm_1max44000JNI_PROX_1THRESH_1IND_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; int result; (void)jenv; (void)jcls; result = (int)(0x0B); jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1max44000_javaupm_1max44000JNI_PROX_1THRESH_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; int result; (void)jenv; (void)jcls; result = (int)(0x0C); jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1max44000_javaupm_1max44000JNI_TRIM_1GAIN_1GREEN_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; int result; (void)jenv; (void)jcls; result = (int)(0x0F); jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1max44000_javaupm_1max44000JNI_TRIM_1GAIN_1IR_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; int result; (void)jenv; (void)jcls; result = (int)(0x10); jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1max44000_javaupm_1max44000JNI_HIGH_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; int result; (void)jenv; (void)jcls; result = (int)(1); jresult = (jint)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1max44000_javaupm_1max44000JNI_LOW_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; int result; (void)jenv; (void)jcls; result = (int)(0); jresult = (jint)result; return jresult; } SWIGEXPORT jlong JNICALL Java_upm_1max44000_javaupm_1max44000JNI_new_1MAX44000_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jint jarg1, jint jarg2) { jlong jresult = 0 ; int arg1 ; int arg2 ; upm::MAX44000 *result = 0 ; (void)jenv; (void)jcls; arg1 = (int)jarg1; arg2 = (int)jarg2; { try { result = (upm::MAX44000 *)new upm::MAX44000(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::MAX44000 **)&jresult = result; return jresult; } SWIGEXPORT jlong JNICALL Java_upm_1max44000_javaupm_1max44000JNI_new_1MAX44000_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jint jarg1) { jlong jresult = 0 ; int arg1 ; upm::MAX44000 *result = 0 ; (void)jenv; (void)jcls; arg1 = (int)jarg1; { try { result = (upm::MAX44000 *)new upm::MAX44000(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::MAX44000 **)&jresult = result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1max44000_javaupm_1max44000JNI_MAX44000_1getProximity(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { jint jresult = 0 ; upm::MAX44000 *arg1 = 0 ; uint16_t result; (void)jenv; (void)jcls; (void)jarg1_; arg1 = *(upm::MAX44000 **)&jarg1; { try { result = (uint16_t)(arg1)->getProximity(); } 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_1max44000_javaupm_1max44000JNI_MAX44000_1getValue(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { jfloat jresult = 0 ; upm::MAX44000 *arg1 = 0 ; float result; (void)jenv; (void)jcls; (void)jarg1_; arg1 = *(upm::MAX44000 **)&jarg1; { try { result = (float)(arg1)->getValue(); } 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_1max44000_javaupm_1max44000JNI_MAX44000_1getAmbient(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { jint jresult = 0 ; upm::MAX44000 *arg1 = 0 ; uint16_t result; (void)jenv; (void)jcls; (void)jarg1_; arg1 = *(upm::MAX44000 **)&jarg1; { try { result = (uint16_t)(arg1)->getAmbient(); } 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 jstring JNICALL Java_upm_1max44000_javaupm_1max44000JNI_MAX44000_1name(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { jstring jresult = 0 ; upm::MAX44000 *arg1 = 0 ; std::string result; (void)jenv; (void)jcls; (void)jarg1_; arg1 = *(upm::MAX44000 **)&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 jshort JNICALL Java_upm_1max44000_javaupm_1max44000JNI_MAX44000_1i2cReadReg_18(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) { jshort jresult = 0 ; upm::MAX44000 *arg1 = 0 ; int arg2 ; uint8_t result; (void)jenv; (void)jcls; (void)jarg1_; arg1 = *(upm::MAX44000 **)&jarg1; arg2 = (int)jarg2; { try { result = (uint8_t)(arg1)->i2cReadReg_8(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 = (jshort)result; return jresult; } SWIGEXPORT jint JNICALL Java_upm_1max44000_javaupm_1max44000JNI_MAX44000_1i2cReadReg_116(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) { jint jresult = 0 ; upm::MAX44000 *arg1 = 0 ; int arg2 ; uint16_t result; (void)jenv; (void)jcls; (void)jarg1_; arg1 = *(upm::MAX44000 **)&jarg1; arg2 = (int)jarg2; { try { result = (uint16_t)(arg1)->i2cReadReg_16(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 jint JNICALL Java_upm_1max44000_javaupm_1max44000JNI_MAX44000_1i2cWriteReg(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jshort jarg2, jshort jarg3) { jint jresult = 0 ; upm::MAX44000 *arg1 = 0 ; uint8_t arg2 ; uint8_t arg3 ; mraa::Result result; (void)jenv; (void)jcls; (void)jarg1_; arg1 = *(upm::MAX44000 **)&jarg1; arg2 = (uint8_t)jarg2; arg3 = (uint8_t)jarg3; { try { result = (arg1)->i2cWriteReg(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; }; } } jresult = (jint)result; return jresult; } SWIGEXPORT void JNICALL Java_upm_1max44000_javaupm_1max44000JNI_delete_1MAX44000(JNIEnv *jenv, jclass jcls, jlong jarg1) { upm::MAX44000 *arg1 = 0 ; (void)jenv; (void)jcls; arg1 = *(upm::MAX44000 **)&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 jlong JNICALL Java_upm_1max44000_javaupm_1max44000JNI_MAX44000_1iProximity_1GetInterfaceCPtr(JNIEnv *jenv, jclass jcls, jlong jarg1) { jlong baseptr = 0; (void)jenv; (void)jcls; *(upm::iProximity **)&baseptr = *(upm::MAX44000 **)&jarg1; return baseptr; } #ifdef __cplusplus } #endif