Robotran C Documentation
java_functions.h
Go to the documentation of this file.
1 
7 #ifdef JAVA
8 
9 #ifndef _JAVA_FUNCTIONS_H_
10 #define _JAVA_FUNCTIONS_H_
11 
12 #include <jni.h>
13 #include "realtime.h"
14 #include "mbs_data.h"
15 
16 #if defined(__APPLE__) || defined(__MACH__)
17  #define APPLE_VISU
18 #endif
19 
20 // -- Structures -- //
21 
24 typedef struct JNI_struct
25 {
26  JNIEnv* env;
27  jmethodID updateJointMethod;
28  jmethodID updateJtMultiMethod;
29  jobject obj;
30 
31  jmethodID setVpMethod;
32  jmethodID getNbVpMethod;
33 
34  jdoubleArray *doubleArrayArgs;
35 
36 } JNI_struct;
37 
40 typedef struct JNI_in_out
41 {
42  // in
43  int nb_models;
44  int *nb_q;
45  int start_viewpoint;
46  double **q_vec;
47  char **mbs_file;
48 
49  // out
50  JNI_struct *jni_struct;
51  int nb_viewpoint;
52 
53 } JNI_in_out;
54 
55 // functions prototypes
56 
57 JNIEnv* create_vm(void);
58 void init_jni(Realtime_visu *visu, int nb_models, int *nb_q, double **q_vec, char **mbs_file, int start_viewpoint);
59 
60 #ifdef APPLE_VISU
61 void run_java_mac_os(JNI_struct *jni_struct, int nb_models, int *nb_q);
62 void* start_jni(void *args);
63 #else
64 void start_jni(JNI_in_out *jni_in_out);
65 #endif
66 
67 void update_jni(JNI_struct *jni_struct, Realtime_visu *visu, int nb_models, int *nb_q, double **q_vec);
68 void free_jni(void *visu_class);
69 void update_java(Simu_realtime *realtime);
70 
71 #endif
72 #endif
complex_float
Implementation of eig function using lapacke without using the lapackE interface.
Definition: cholesky.c:14
useful_functions.h
mbs_data.h
svbksb
void svbksb(double **u, double w[], double **v, int m, int n, double b[], double x[])
Definition: svbksb.c:16
get_dvec_0
double * get_dvec_0(int l_v)
create (with memory allocation) a vector (length l_v) of doubles, starting at index 0
Definition: mbs_1D_array.c:880
free_ivec_0
void free_ivec_0(int *vec)
release memory for a vector of integers, starting with index 0
Definition: mbs_1D_array.c:415
free_dmat_0
void free_dmat_0(double **mat)
release memory for a matrix of doubles, starting at index 0
Definition: mbs_matrix.c:293
dmaxarg2
static double dmaxarg2
Definition: svdcmp.c:21
java_functions.h
Java functions used for the visualization.
SIGN
#define SIGN(a, b)
Definition: nrfct.h:90
complex_double
Definition: cholesky.c:15
complex_float::x
float x
Definition: cholesky.c:14
mbs_svdDcmp_0
int mbs_svdDcmp_0(double **A, int x, int y, double **U, double **S, double **VT)
Realize the singular value decomposition.
Definition: svdcmp_lapack.c:78
get_dmat_0
double ** get_dmat_0(int nb_r, int nb_c)
create (with memory allocation) a [nb_r times nb_c] matrix of doubles, starting at index 0
Definition: mbs_matrix.c:238
dmaxarg1
static double dmaxarg1
Definition: svdcmp.c:21
mbs_msg
void mbs_msg(char *msg,...)
Send a message.
Definition: mbs_message.c:76
Simu_realtime::ext
Realtime_extern * ext
external variables
Definition: realtime.h:143
pythag
double pythag(double a, double b)
Definition: svdcmp.c:399
iminarg2
static int iminarg2
Definition: svdcmp.c:22
complex_float::y
float y
Definition: cholesky.c:14
free_dvec_1
void free_dvec_1(double *vec)
release memory for a vector of doubles, starting at index 1
Definition: mbs_1D_array.c:901
IMIN
#define IMIN(a, b)
Definition: nrfct.h:92
complex_double::y
double y
Definition: cholesky.c:15
nrfct.h
transpose_dmat_0
void transpose_dmat_0(double **tab_src, double **tab_dest, int nb_r, int nb_c)
Transpose a [nb_r times nb_c] matrix of doubles and store the results in a [y times nb_r] matrix,...
Definition: mbs_matrix.c:440
mbs_schur_0
int mbs_schur_0(double **A, int n, double **T, double **Z, double *WR, double *WI, int reorder)
A : matrix for the Eigenvalue problem in row major n : size of the matrix WR : Result of the Eigenval...
Definition: schur_lapack.c:45
mbs_message.h
get_ivec_0
int * get_ivec_0(int l_v)
create (with memory allocation) a vector (length l_v) of integers, starting at index 0
Definition: mbs_1D_array.c:399
complex_double::x
double x
Definition: cholesky.c:15
MbsData
Definition: mbs_data.h:149
realtime.h
Real-time constraints main header.
Simu_realtime
real-time structure
Definition: realtime.h:99
mbs_select
int mbs_select(const double *real, const double *imaginary)
Definition: schur_lapack.c:33
Realtime_extern::mbs_data
MbsData * mbs_data
Robotran main structure.
Definition: realtime.h:36
svdcmp_0
void svdcmp_0(double **a, int m, int n, double w[], double **v)
computes the Singular Value Decomposition a = u.w.v'
Definition: svdcmp.c:211
svdcmp
void svdcmp(double **a, int m, int n, double w[], double **v)
computes the Singular Value Decomposition a = u.w.v'
Definition: svdcmp.c:25
svbksb_0
void svbksb_0(double **u, double w[], double **v, int m, int n, double b[], double x[])
Definition: svbksb.c:38
mbs_over_under_determined
int mbs_over_under_determined(double **A, double *b, int x, int y)
Solve a linear system of equations, A*x=b, using dgelss lapack function.
Definition: svdcmp_lapack.c:18
get_dvec_1
double * get_dvec_1(int l_v)
create (with memory allocation) a vector (length l_v) of doubles, starting at index 1
Definition: mbs_1D_array.c:885
dsqrarg
static double dsqrarg
Definition: svdcmp.c:23
free_dvec_0
void free_dvec_0(double *vec)
release memory for a vector of doubles, starting at index 0
Definition: mbs_1D_array.c:896
DMAX
#define DMAX(a, b)
Definition: nrfct.h:95
user_realtime.h
MAX
#define MAX(a, b)
Definition: useful_functions.h:14
iminarg1
static int iminarg1
Definition: svdcmp.c:22
DSQR
#define DSQR(a)
Definition: nrfct.h:98
_MBS_ERR_LOW_LAPACKE
#define _MBS_ERR_LOW_LAPACKE
Low Level error number problem with Lapacke system resolution = -5.
Definition: mbs_errors_names.h:137
mbs_errors_names.h