Robotran C Documentation
mbs_project_fct_ptr.h
Go to the documentation of this file.
1 
2 #ifndef _MBS_PROJECT_FCT_PTR_H_
3 #define _MBS_PROJECT_FCT_PTR_H_
4 
5 #include <stdint.h> // necessary for uint8_t for user_keyboard_ptr
6 #include <stdio.h>
7 
14 typedef struct MbsData MbsData;
15 typedef struct MbsSensor MbsSensor;
16 typedef struct MbsDirdyn MbsDirdyn;
17 typedef struct MbsInvdyn MbsInvdyn;
18 typedef struct MbsEquil MbsEquil;
19 
20 typedef double* (*user_JointForces_ptr)(MbsData*, double);
21 typedef void (*user_load_post_ptr)(MbsData *MBSdata);
22 typedef void (*user_free_ptr)(MbsData *MBSdata);
23 typedef void (*user_dirdyn_init_ptr)(MbsData *MBSdata, MbsDirdyn *mbs_dd);
24 typedef void (*user_dirdyn_loop_ptr)(MbsData *MBSdata, MbsDirdyn *mbs_dd);
26 typedef void (*user_invdyn_init_ptr)(MbsData *MBSdata, MbsInvdyn *mbs_invd);
27 typedef void (*user_invdyn_loop_ptr)(MbsData *MBSdata, MbsInvdyn *mbs_invd);
28 typedef void (*user_invdyn_finish_ptr)(MbsData*MBSdata, MbsInvdyn* mbs_invd);
29 typedef void (*user_equil_init_ptr)(MbsData *MBSdata, MbsEquil *mbs_equil);
30 typedef void (*user_equil_loop_ptr)(MbsData *MBSdata, MbsEquil *mbs_equil);
32 typedef void (*user_equil_fxe_ptr)(MbsData*, double* f);
33 typedef void (*user_Derivative_ptr)(MbsData *s);
34 typedef void (*user_DrivenJoints_ptr)(MbsData *s, double tsim);
35 typedef void (*user_cons_hJ_ptr)(double *h, double **Jac, MbsData *s, double tsim);
36 typedef void (*user_cons_jdqd_ptr)(double *jdqd, MbsData *s, double tsim);
37 typedef void (*user_cons_J_accelred_ptr)(MbsData* s, double tsim);
38 typedef double (*user_LinkForces_ptr)(double Z, double Zd, MbsData *mbs_data, double tsim, int ilnk);
39 typedef double* (*user_Link3DForces_ptr)(double PxF[4], double RxF[4][4], double VxF[4], double OMxF[4], double AxF[4], double OMPxF[4], MbsData *s, double tsim,int ixF);
40 typedef double* (*user_ExtForces_ptr)(double PxF[4], double RxF[4][4], double VxF[4], double OMxF[4],
41  double AxF[4], double OMPxF[4], MbsData *s, double tsim,int ixF);
42 
43 typedef double (*user_LinkForces_ptr)(double Z, double Zd, MbsData *mbs_data, double tsim, int ilnk);
44 
45 
46 typedef struct MbsInfos MbsInfos;
47 
48 typedef UserIO* (*mbs_new_user_IO_ptr)(UserIoInfo* ioInfo);
49 typedef UserModel* (*mbs_new_user_model_ptr)();
50 typedef void (*mbs_delete_user_model_ptr)(UserModel* ums);
51 typedef void (*mbs_delete_user_IO_ptr)(UserIO *uvs);
52 typedef void (*mbs_get_user_IO_size_ptr)(int *n_in, int *n_out, int *n_user_IO);
53 typedef void (*mbs_get_user_model_size_ptr)(int *n_usr_model);
54 typedef void (*mbs_get_user_model_list_ptr)(int *user_model_list);
55 typedef void (*mbs_load_user_model_ptr)(MbsInfos* mbs_infos, UserModel* ums);
56 typedef void (*mbs_bind_user_model_ptr)(MbsInfos* mbs_infos, UserModel* ums);
57 typedef void (*mbs_print_user_model_ptr)(UserModel* ums);
58 typedef void (*mbs_save_um_ptr)(FILE* stream, UserModel* ums);
59 typedef void (*mbs_print_user_IO_ptr)(UserIO *uio);
60 typedef void (*mbs_save_user_IO_ptr)(FILE* stream, UserIO *uio);
61 
62 
63 #ifdef REAL_TIME
64  typedef struct Realtime_option Realtime_option;
65 
66  typedef void (*user_realtime_options_ptr)(MbsData* mbs_data, Realtime_option *options);
67  typedef struct Simu_realtime Simu_realtime;
68 
69  #ifdef SDL
70  typedef uint8_t Uint8; // copied from sdl header
71 
72  typedef void (*user_keyboard_ptr)(MbsData* mbs_data, Simu_realtime *realtime, int cur_t_usec, const Uint8 *keystates);
73  typedef void (*user_realtime_plot_ptr)(MbsData* mbs_data);
74  typedef void (*user_joystick_axes_ptr)(MbsData* mbs_data, Simu_realtime *realtime, int nb_joysticks);
75  typedef void (*user_joystick_buttons_ptr)(MbsData* mbs_data, int buttonID);
76  #endif
77 
78  #ifdef VISU_3D
79  typedef void (*user_realtime_visu_ptr)(MbsData* mbs_data, int nb_models, int *nb_q, double **q_vec);
80  #endif
81 
82 #endif
83 
84 typedef void (*mbs_link_ptr)(double **frc,double **trq,double *Flnk,double *Z,double *Zd,MbsData *s, double tsim);
85 typedef void (*mbs_link3D_ptr)(double **frc,double **trq, MbsData *s, double tsim);
86 typedef void (*mbs_extforces_ptr)(double **frc, double **trq, MbsData *s, double tsim);
87 typedef int (*mbs_accelred_ptr)(MbsData *s, double tsim);
88 typedef void (*mbs_dirdyna_ptr)(double **M,double *c, MbsData *s, double tsim);
89 typedef void (*mbs_invdyna_ptr)(double *Q, MbsData *s, double tsim);
90 typedef void (*mbs_cons_hJ_ptr)(double *h,double **Jac,MbsData *s, double tsim);
91 typedef void (*mbs_cons_jdqd_ptr)(double *Jdqd,MbsData *s, double tsim);
92 typedef void (*mbs_sensor_ptr)(MbsSensor *sens, MbsData *s, int isens);
93 typedef void (*mbs_gensensor_ptr)(MbsSensor *sens, MbsData *s, int isens);
94 
95 #endif
mbs_link_ptr
void(* mbs_link_ptr)(double **frc, double **trq, double *Flnk, double *Z, double *Zd, MbsData *s, double tsim)
Definition: mbs_project_fct_ptr.h:84
mbs_print_user_IO_ptr
void(* mbs_print_user_IO_ptr)(UserIO *uio)
Definition: mbs_project_fct_ptr.h:59
mbs_delete_user_IO_ptr
void(* mbs_delete_user_IO_ptr)(UserIO *uvs)
Definition: mbs_project_fct_ptr.h:51
user_realtime_options_ptr
void(* user_realtime_options_ptr)(MbsData *mbs_data, Realtime_option *options)
Definition: mbs_project_fct_ptr.h:66
Realtime_option
user real-time option
Definition: realtime.h:42
mbs_link3D_ptr
void(* mbs_link3D_ptr)(double **frc, double **trq, MbsData *s, double tsim)
Definition: mbs_project_fct_ptr.h:85
UserModel
Definition: user_model.h:24
MbsInvdyn
General structure of the inverse dynamics module.
Definition: mbs_invdyn_struct.h:27
user_invdyn_finish_ptr
void(* user_invdyn_finish_ptr)(MbsData *MBSdata, MbsInvdyn *mbs_invd)
Definition: mbs_project_fct_ptr.h:28
mbs_save_um_ptr
void(* mbs_save_um_ptr)(FILE *stream, UserModel *ums)
Definition: mbs_project_fct_ptr.h:58
UserIoInfo
Contains information about UserIO.
Definition: mbs_user_interface.h:44
mbs_dirdyna_ptr
void(* mbs_dirdyna_ptr)(double **M, double *c, MbsData *s, double tsim)
Definition: mbs_project_fct_ptr.h:88
mbs_delete_user_model_ptr
void(* mbs_delete_user_model_ptr)(UserModel *ums)
Definition: mbs_project_fct_ptr.h:50
mbs_save_user_IO_ptr
void(* mbs_save_user_IO_ptr)(FILE *stream, UserIO *uio)
Definition: mbs_project_fct_ptr.h:60
mbs_accelred_ptr
int(* mbs_accelred_ptr)(MbsData *s, double tsim)
Definition: mbs_project_fct_ptr.h:87
UserIO
Definition: user_IO.h:25
MbsInfos
Definition: mbs_binder_public.h:384
mbs_print_user_model_ptr
void(* mbs_print_user_model_ptr)(UserModel *ums)
Definition: mbs_project_fct_ptr.h:57
mbs_extforces_ptr
void(* mbs_extforces_ptr)(double **frc, double **trq, MbsData *s, double tsim)
Definition: mbs_project_fct_ptr.h:86
user_cons_hJ_ptr
void(* user_cons_hJ_ptr)(double *h, double **Jac, MbsData *s, double tsim)
Definition: mbs_project_fct_ptr.h:35
MbsEquil
Definition: mbs_equil_struct.h:68
mbs_load_user_model_ptr
void(* mbs_load_user_model_ptr)(MbsInfos *mbs_infos, UserModel *ums)
Definition: mbs_project_fct_ptr.h:55
user_cons_J_accelred_ptr
void(* user_cons_J_accelred_ptr)(MbsData *s, double tsim)
Definition: mbs_project_fct_ptr.h:37
user_LinkForces_ptr
double(* user_LinkForces_ptr)(double Z, double Zd, MbsData *mbs_data, double tsim, int ilnk)
Definition: mbs_project_fct_ptr.h:38
user_Derivative_ptr
void(* user_Derivative_ptr)(MbsData *s)
Definition: mbs_project_fct_ptr.h:33
user_DrivenJoints_ptr
void(* user_DrivenJoints_ptr)(MbsData *s, double tsim)
Definition: mbs_project_fct_ptr.h:34
user_invdyn_init_ptr
void(* user_invdyn_init_ptr)(MbsData *MBSdata, MbsInvdyn *mbs_invd)
Definition: mbs_project_fct_ptr.h:26
mbs_cons_hJ_ptr
void(* mbs_cons_hJ_ptr)(double *h, double **Jac, MbsData *s, double tsim)
Definition: mbs_project_fct_ptr.h:90
mbs_cons_jdqd_ptr
void(* mbs_cons_jdqd_ptr)(double *Jdqd, MbsData *s, double tsim)
Definition: mbs_project_fct_ptr.h:91
Simu_realtime::tsim
double tsim
current simulation time [s]
Definition: realtime.h:114
mbs_bind_user_model_ptr
void(* mbs_bind_user_model_ptr)(MbsInfos *mbs_infos, UserModel *ums)
Definition: mbs_project_fct_ptr.h:56
user_invdyn_loop_ptr
void(* user_invdyn_loop_ptr)(MbsData *MBSdata, MbsInvdyn *mbs_invd)
Definition: mbs_project_fct_ptr.h:27
mbs_get_user_model_size_ptr
void(* mbs_get_user_model_size_ptr)(int *n_usr_model)
Definition: mbs_project_fct_ptr.h:53
user_cons_jdqd_ptr
void(* user_cons_jdqd_ptr)(double *jdqd, MbsData *s, double tsim)
Definition: mbs_project_fct_ptr.h:36
user_equil_finish_ptr
void(* user_equil_finish_ptr)(MbsData *, MbsEquil *)
Definition: mbs_project_fct_ptr.h:31
MbsData
Definition: mbs_data.h:149
Simu_realtime
real-time structure
Definition: realtime.h:99
user_equil_loop_ptr
void(* user_equil_loop_ptr)(MbsData *MBSdata, MbsEquil *mbs_equil)
Definition: mbs_project_fct_ptr.h:30
MbsSensor
Definition: mbs_sensor_struct.h:18
user_dirdyn_loop_ptr
void(* user_dirdyn_loop_ptr)(MbsData *MBSdata, MbsDirdyn *mbs_dd)
Definition: mbs_project_fct_ptr.h:24
user_load_post_ptr
void(* user_load_post_ptr)(MbsData *MBSdata)
Definition: mbs_project_fct_ptr.h:21
user_dirdyn_finish_ptr
void(* user_dirdyn_finish_ptr)(MbsData *, MbsDirdyn *)
Definition: mbs_project_fct_ptr.h:25
mbs_invdyna_ptr
void(* mbs_invdyna_ptr)(double *Q, MbsData *s, double tsim)
Definition: mbs_project_fct_ptr.h:89
user_equil_fxe_ptr
void(* user_equil_fxe_ptr)(MbsData *, double *f)
Definition: mbs_project_fct_ptr.h:32
mbs_get_user_IO_size_ptr
void(* mbs_get_user_IO_size_ptr)(int *n_in, int *n_out, int *n_user_IO)
Definition: mbs_project_fct_ptr.h:52
mbs_gensensor_ptr
void(* mbs_gensensor_ptr)(MbsSensor *sens, MbsData *s, int isens)
Definition: mbs_project_fct_ptr.h:93
mbs_get_user_model_list_ptr
void(* mbs_get_user_model_list_ptr)(int *user_model_list)
Definition: mbs_project_fct_ptr.h:54
user_free_ptr
void(* user_free_ptr)(MbsData *MBSdata)
Definition: mbs_project_fct_ptr.h:22
MbsDirdyn
General structure of the direct dynamic module.
Definition: mbs_dirdyn_struct.h:144
user_equil_init_ptr
void(* user_equil_init_ptr)(MbsData *MBSdata, MbsEquil *mbs_equil)
Definition: mbs_project_fct_ptr.h:29
mbs_sensor_ptr
void(* mbs_sensor_ptr)(MbsSensor *sens, MbsData *s, int isens)
Definition: mbs_project_fct_ptr.h:92
user_dirdyn_init_ptr
void(* user_dirdyn_init_ptr)(MbsData *MBSdata, MbsDirdyn *mbs_dd)
Definition: mbs_project_fct_ptr.h:23