Home | History | Annotate | Download | only in itg3200
      1 %module javaupm_itg3200
      2 %include "../upm.i"
      3 
      4 %{
      5     #include "itg3200.h"
      6 %}
      7 
      8 %typemap(jni) float* "jfloatArray"
      9 %typemap(jstype) float* "float[]"
     10 %typemap(jtype) float* "float[]"
     11 
     12 %typemap(javaout) float* {
     13     return $jnicall;
     14 }
     15 
     16 %typemap(out) float *getRotation {
     17     $result = JCALL1(NewFloatArray, jenv, 3);
     18     JCALL4(SetFloatArrayRegion, jenv, $result, 0, 3, $1);
     19 }
     20 
     21 
     22 %typemap(jni) int16_t* "jintArray"
     23 %typemap(jstype) int16_t* "int[]"
     24 %typemap(jtype) int16_t* "int[]"
     25 
     26 %typemap(javaout) int16_t* {
     27     return $jnicall;
     28 }
     29 
     30 %typemap(out) int16_t *getRawValues {
     31     $result = JCALL1(NewIntArray, jenv, 3);
     32     JCALL4(SetIntArrayRegion, jenv, $result, 0, 3, (const signed int*)$1);
     33     //delete [] $1;
     34 }
     35 
     36 %include "itg3200.h"
     37