|
Robotran C Documentation
|
Go to the documentation of this file. 1 #ifndef _MBS_LOAD_LIBRARIES_H_
2 #define _MBS_LOAD_LIBRARIES_H_
22 FARPROC WINAPI mbs_load_function(
MbsDataLibInfo* li,
char* fct_name,
const char* lib_fullpath);
23 #elif defined(__unix__) || defined(__APPLE__)
24 void* mbs_load_function(
MbsDataLibInfo* li,
char* fct_name,
const char* lib_fullpath);
26 #error Platform not supported.
38 FARPROC WINAPI mbs_try_load_function(
MbsDataLibInfo* li,
char* fct_name);
39 #elif defined(__unix__) || defined(__APPLE__)
42 #error Platform not supported.
79 int nb_loop,
int nb_link,
int nb_3d_link,
int nb_ext_forces,
int nb_sensors);
void(* mbs_link_ptr)(double **frc, double **trq, double *Flnk, double *Z, double *Zd, MbsData *s, double tsim)
Definition: mbs_project_fct_ptr.h:105
user_LinkForces_d_ptr user_LinkForces_dq
Definition: mbs_data.h:167
void(* mbs_print_user_IO_ptr)(UserIO *uio)
Definition: mbs_project_fct_ptr.h:91
void mbs_close_libraries(MbsData *mbs_data)
Close the symbolic and userfct libraries associated to the given MbsData.
Definition: mbs_load_libraries.c:387
int mbs_load_symbolic_functions(MbsData *mbs_data, const char *symbolic_path, const char *symbolicLib_name, int nb_loop, int nb_link, int nb_3d_link, int nb_ext_forces, int nb_sensors)
Loads the symbolic functions from library into MbsData structure.
Definition: mbs_load_libraries.c:166
int(* set_mbs_to_output_ptr)(MbsData *mbs_data)
Definition: mbs_project_fct_ptr.h:51
void(* mbs_delete_user_IO_ptr)(UserIO *uvs)
Definition: mbs_project_fct_ptr.h:83
mbs_checksymb_ptr mbs_check_symbolic
Definition: mbs_data.h:79
void(* user_realtime_options_ptr)(MbsData *mbs_data, Realtime_option *options)
Definition: mbs_project_fct_ptr.h:96
void mbs_msg(const char *msg,...)
Send a message.
Definition: mbs_message.c:87
mbs_invdynared_d_ptr mbs_invdynared_dqdd
Definition: mbs_data.h:82
int mbs_load_user_functions(MbsData *mbs_data, const char *userfctLib_path, const char *userfctLib_name)
mbs_load_function: dynamic loading of a function from a given library.
Definition: mbs_load_libraries.c:278
char * get_char_cpy(const char *fmt,...)
Copy the provided formatted string into a newly allocated memory.
Definition: useful_functions.c:196
void(* mbs_link3D_ptr)(double **frc, double **trq, MbsData *s, double tsim)
Definition: mbs_project_fct_ptr.h:106
mbs_invdynared_d_ptr mbs_invdynared_dqd
Definition: mbs_data.h:81
user_realtime_visu_ptr user_realtime_visu
Definition: mbs_data.h:188
struct Functions::@5 user
double(* user_LinkForces_d_ptr)(double Z, double d_Z, double Zd, double d_Zd, MbsData *mbs_data, double tsim, int i_link, int index)
Definition: mbs_project_fct_ptr.h:55
void(* user_realtime_plot_ptr)(MbsData *mbs_data)
Definition: mbs_project_fct_ptr.h:100
void(* user_invdyn_finish_ptr)(MbsData *MBSdata, MbsInvdyn *mbs_invd)
Definition: mbs_project_fct_ptr.h:34
void(* mbs_save_um_ptr)(FILE *stream, UserModel *ums)
Definition: mbs_project_fct_ptr.h:90
void mbs_close_dynamic_library(MbsDataLibInfo *li)
Close the library pointed by MbsDataLibInfo and free the memory associated to the given MbsDataLibInf...
Definition: mbs_load_libraries.c:22
mbs_cons_hJ_ptr mbs_cons_hJ
Definition: mbs_data.h:75
MbsDataLibInfo * mbs_load_dynamic_library(char *libpath)
Load the library in a MbsDataLibInfo.
Definition: mbs_load_libraries.c:46
user_equil_finish_ptr user_equil_finish
Definition: mbs_data.h:103
void(* mbs_dirdyna_ptr)(double **M, double *c, MbsData *s, double tsim)
Definition: mbs_project_fct_ptr.h:109
mbs_invdynared_d_ptr mbs_invdynared_dp
Definition: mbs_data.h:83
mbs_link_ptr mbs_link
Definition: mbs_data.h:69
mbs_new_user_model_ptr mbs_new_user_model
Definition: mbs_data.h:124
int(* mbs_checksymb_ptr)(MbsData *s)
Definition: mbs_project_fct_ptr.h:115
mbs_invdyna_ptr mbs_invdyna
Definition: mbs_data.h:74
void(* mbs_delete_user_model_ptr)(UserModel *ums)
Definition: mbs_project_fct_ptr.h:82
#define _MBS_ERR_LOW_FILES
Low Level error number Error during opening/writing files = -9.
Definition: mbs_errors_names.h:157
void(* mbs_save_user_IO_ptr)(FILE *stream, UserIO *uio)
Definition: mbs_project_fct_ptr.h:92
Declaration of functions that are project dependent.
mbs_delete_user_model_ptr mbs_delete_user_model
Definition: mbs_data.h:125
user_equil_init_ptr user_equil_init
Definition: mbs_data.h:101
int(* mbs_accelred_ptr)(MbsData *s, double tsim)
Definition: mbs_project_fct_ptr.h:108
user_dirdyn_init_ptr user_dirdyn_init
Definition: mbs_data.h:93
user_equil_loop_ptr user_equil_loop
Definition: mbs_data.h:102
set_mbs_to_output_ptr user_synch_outputs
Definition: mbs_data.h:191
mbs_save_um_ptr mbs_save_um
Definition: mbs_data.h:146
void mbs_close_dynamic_library(MbsDataLibInfo *li)
Close the library pointed by MbsDataLibInfo and free the memory associated to the given MbsDataLibInf...
Definition: mbs_load_libraries.c:22
user_dirdyn_loop_ptr user_dirdyn_loop
Definition: mbs_data.h:94
user_invdyn_finish_ptr user_invdyn_finish
Definition: mbs_data.h:99
int mbs_load_symbolic_functions(MbsData *mbs_data, const char *symbolicLib_path, const char *symbolicLib_name, int nb_loop, int nb_link, int nb_3d_link, int nb_ext_forces, int nb_sensors)
Loads the symbolic functions from library into MbsData structure.
Definition: mbs_load_libraries.c:166
user_JointForces_d_ptr user_JointForces_dqdd
Definition: mbs_data.h:164
user_ExtForces_ptr user_ExtForces
Definition: mbs_data.h:115
void(* mbs_print_user_model_ptr)(UserModel *ums)
Definition: mbs_project_fct_ptr.h:89
mbs_dirdyna_ptr mbs_dirdyna
Definition: mbs_data.h:73
user_joystick_axes_ptr user_joystick_axes
Definition: mbs_data.h:186
double *(* user_ExtForces_d_ptr)(double PxF[4], double d_PxF[4], double RxF[4][4], double d_RxF[4][4], double VxF[4], double d_VxF[4], double OMxF[4], double d_OMxF[4], double AxF[4], double d_AxF[4], double OMPxF[4], double d_OMPxF[4], MbsData *s, double tsim, int i_force, int index)
Definition: mbs_project_fct_ptr.h:68
UserIO *(* mbs_new_user_IO_ptr)(UserIoInfo *ioInfo)
Definition: mbs_project_fct_ptr.h:80
double *(* user_Link3DForces_d_ptr)(double PxF[4], double d_PxF[4], double RxF[4][4], double d_RxF[4][4], double VxF[4], double d_VxF[4], double OMxF[4], double d_OMxF[4], double AxF[4], double d_AxF[4], double OMPxF[4], double d_OMPxF[4], MbsData *s, double tsim, int i_link3d, int index)
Definition: mbs_project_fct_ptr.h:59
mbs_link3D_ptr mbs_link3D
Definition: mbs_data.h:70
void(* mbs_extforces_ptr)(double **frc, double **trq, MbsData *s, double tsim)
Definition: mbs_project_fct_ptr.h:107
user_Link3DForces_ptr user_Link3DForces
Definition: mbs_data.h:114
void(* user_cons_hJ_ptr)(double *h, double **Jac, MbsData *s, double tsim)
Definition: mbs_project_fct_ptr.h:41
double *(* user_Link3DForces_dp_ptr)(double PxF[4], double d_PxF[4], double RxF[4][4], double d_RxF[4][4], double VxF[4], double d_VxF[4], double OMxF[4], double d_OMxF[4], double AxF[4], double d_AxF[4], double OMPxF[4], double d_OMPxF[4], MbsData *s, double tsim, int i_link3d)
Definition: mbs_project_fct_ptr.h:63
void(* user_joystick_buttons_ptr)(MbsData *mbs_data, int buttonID)
Definition: mbs_project_fct_ptr.h:102
void(* user_keyboard_ptr)(MbsData *mbs_data, Simu_realtime *realtime, int cur_t_usec, const Uint8 *keystates)
Definition: mbs_project_fct_ptr.h:99
user_joystick_buttons_ptr user_joystick_buttons
Definition: mbs_data.h:187
double *(* user_JointForces_dp_ptr)(MbsData *mbs_data, double tsim)
Definition: mbs_project_fct_ptr.h:54
mbs_get_user_model_list_ptr mbs_get_user_model_list
Definition: mbs_data.h:145
mbs_print_user_IO_ptr mbs_print_user_IO
Print the current UserIO values.
Definition: mbs_data.h:152
void(* mbs_load_user_model_ptr)(MbsInfos *mbs_infos, UserModel *ums)
Definition: mbs_project_fct_ptr.h:87
mbs_load_user_model_ptr mbs_load_user_model
Definition: mbs_data.h:141
void(* user_cons_J_accelred_ptr)(MbsData *s, double tsim)
Definition: mbs_project_fct_ptr.h:43
user_Link3DForces_d_ptr user_Link3DForces_dqd
Definition: mbs_data.h:173
user_keyboard_ptr user_keyboard
Definition: mbs_data.h:184
double(* user_LinkForces_ptr)(double Z, double Zd, MbsData *mbs_data, double tsim, int ilnk)
Definition: mbs_project_fct_ptr.h:44
user_free_ptr user_free
Definition: mbs_data.h:91
UserModel *(* mbs_new_user_model_ptr)()
Definition: mbs_project_fct_ptr.h:81
mbs_sensor_ptr mbs_sensor
Definition: mbs_data.h:77
user_equil_fxe_ptr user_equil_fxe
Definition: mbs_data.h:104
void(* user_Derivative_ptr)(MbsData *s)
Definition: mbs_project_fct_ptr.h:39
user_Link3DForces_d_ptr user_Link3DForces_dq
Definition: mbs_data.h:172
double *(* user_JointForces_ptr)(MbsData *, double)
Definition: mbs_project_fct_ptr.h:26
mbs_extforces_ptr mbs_extforces
Definition: mbs_data.h:71
user_cons_hJ_ptr user_cons_hJ
Definition: mbs_data.h:109
user_LinkForces_ptr user_LinkForces
Definition: mbs_data.h:113
void(* mbs_invdynared_d_ptr)(MbsData *s, double tsim)
Definition: mbs_project_fct_ptr.h:116
void(* user_realtime_visu_ptr)(MbsData *mbs_data, int nb_models, int *nb_q, double **q_vec)
Definition: mbs_project_fct_ptr.h:103
user_ExtForces_dp_ptr user_ExtForces_dp
Definition: mbs_data.h:180
user_Link3DForces_dp_ptr user_Link3DForces_dp
Definition: mbs_data.h:175
MbsDataLibInfo * symbolicLibHandle
Definition: mbs_data.h:61
user_realtime_plot_ptr user_realtime_plot
Definition: mbs_data.h:185
user_JointForces_d_ptr user_JointForces_dqd
Definition: mbs_data.h:163
user_realtime_options_ptr user_realtime_options
Definition: mbs_data.h:183
void(* user_DrivenJoints_ptr)(MbsData *s, double tsim)
Definition: mbs_project_fct_ptr.h:40
Functions fct
Structure to store the pointer to the project-specific functions.
Definition: mbs_data.h:414
user_Derivative_ptr user_Derivative
Definition: mbs_data.h:106
void(* user_invdyn_init_ptr)(MbsData *MBSdata, MbsInvdyn *mbs_invd)
Definition: mbs_project_fct_ptr.h:32
void(* mbs_cons_hJ_ptr)(double *h, double **Jac, MbsData *s, double tsim)
Definition: mbs_project_fct_ptr.h:111
user_invdyn_loop_ptr user_invdyn_loop
Definition: mbs_data.h:98
mbs_get_user_model_size_ptr mbs_get_user_model_size
Definition: mbs_data.h:144
void(* mbs_cons_jdqd_ptr)(double *Jdqd, MbsData *s, double tsim)
Definition: mbs_project_fct_ptr.h:112
void(* mbs_bind_user_model_ptr)(MbsInfos *mbs_infos, UserModel *ums)
Definition: mbs_project_fct_ptr.h:88
void(* user_invdyn_loop_ptr)(MbsData *MBSdata, MbsInvdyn *mbs_invd)
Definition: mbs_project_fct_ptr.h:33
This structures contains a reference to a dynamic library handle.
Definition: mbs_data.h:45
user_LinkForces_dp_ptr user_LinkForces_dp
Definition: mbs_data.h:170
mbs_print_user_model_ptr mbs_print_user_model
Definition: mbs_data.h:143
double(* user_LinkForces_dp_ptr)(double Z, double d_Z, double Zd, double d_Zd, MbsData *mbs_data, double tsim, int i_link)
Definition: mbs_project_fct_ptr.h:57
mbs_accelred_ptr mbs_accelred
Definition: mbs_data.h:72
void(* mbs_get_user_model_size_ptr)(int *n_usr_model)
Definition: mbs_project_fct_ptr.h:85
void(* user_cons_jdqd_ptr)(double *jdqd, MbsData *s, double tsim)
Definition: mbs_project_fct_ptr.h:42
void(* user_equil_finish_ptr)(MbsData *, MbsEquil *)
Definition: mbs_project_fct_ptr.h:37
Definition: mbs_data.h:246
mbs_get_user_IO_size_ptr mbs_get_user_IO_size
Get the size of the UserIO structure inside the user_IO.c file.
Definition: mbs_data.h:140
mbs_gensensor_ptr mbs_gensensor
Definition: mbs_data.h:78
user_cons_J_accelred_ptr user_cons_J_accelred
Definition: mbs_data.h:111
user_ExtForces_d_ptr user_ExtForces_dqd
Definition: mbs_data.h:178
user_Link3DForces_d_ptr user_Link3DForces_dqdd
Definition: mbs_data.h:174
MbsDataLibInfo * userfctLibHandle
Definition: mbs_data.h:62
#define _MBS_ERR_MOD_SPEC_11
Mid Level error number Module specific errors range from -11 to -19 please read the error message...
Definition: mbs_errors_names.h:172
void(* user_equil_loop_ptr)(MbsData *MBSdata, MbsEquil *mbs_equil)
Definition: mbs_project_fct_ptr.h:36
user_load_post_ptr user_load_post
Definition: mbs_data.h:90
mbs_new_user_IO_ptr mbs_new_user_IO
Initialize the UserIO structure and bind the ioInfo pointer to the allocated memory (project specific...
Definition: mbs_data.h:122
user_JointForces_d_ptr user_JointForces_dq
Definition: mbs_data.h:162
void(* user_dirdyn_loop_ptr)(MbsData *MBSdata, MbsDirdyn *mbs_dd)
Definition: mbs_project_fct_ptr.h:30
void(* user_dirdyn_finish_ptr)(MbsData *, MbsDirdyn *)
Definition: mbs_project_fct_ptr.h:31
user_cons_jdqd_ptr user_cons_jdqd
Definition: mbs_data.h:110
int mbs_load_user_functions(MbsData *mbs_data, const char *user_path, const char *userfctLib_name)
mbs_load_function: dynamic loading of a function from a given library.
Definition: mbs_load_libraries.c:278
double *(* user_JointForces_d_ptr)(MbsData *mbs_data, double tsim, int index)
Definition: mbs_project_fct_ptr.h:53
user_DrivenJoints_ptr user_DrivenJoints
Definition: mbs_data.h:107
user_invdyn_init_ptr user_invdyn_init
Definition: mbs_data.h:97
void(* mbs_invdyna_ptr)(double *Q, MbsData *s, double tsim)
Definition: mbs_project_fct_ptr.h:110
void(* user_equil_fxe_ptr)(MbsData *, double *f)
Definition: mbs_project_fct_ptr.h:38
user_JointForces_dp_ptr user_JointForces_dp
Definition: mbs_data.h:165
void(* user_joystick_axes_ptr)(MbsData *mbs_data, Simu_realtime *realtime, int nb_joysticks)
Definition: mbs_project_fct_ptr.h:101
void(* mbs_get_user_IO_size_ptr)(int *n_in, int *n_out, int *n_user_IO)
Definition: mbs_project_fct_ptr.h:84
mbs_bind_user_model_ptr mbs_bind_user_model
Definition: mbs_data.h:142
void(* mbs_gensensor_ptr)(MbsSensor *sens, MbsData *s, int isens)
Definition: mbs_project_fct_ptr.h:114
void(* mbs_get_user_model_list_ptr)(int *user_model_list)
Definition: mbs_project_fct_ptr.h:86
struct Functions::@4 symb
void(* user_free_ptr)(MbsData *MBSdata)
Definition: mbs_project_fct_ptr.h:28
void(* user_equil_init_ptr)(MbsData *MBSdata, MbsEquil *mbs_equil)
Definition: mbs_project_fct_ptr.h:35
mbs_delete_user_IO_ptr mbs_delete_user_IO
Free the memory associated to the given UserIO structure.
Definition: mbs_data.h:130
double *(* user_ExtForces_dp_ptr)(double PxF[4], double d_PxF[4], double RxF[4][4], double d_RxF[4][4], double VxF[4], double d_VxF[4], double OMxF[4], double d_OMxF[4], double AxF[4], double d_AxF[4], double OMPxF[4], double d_OMPxF[4], MbsData *s, double tsim, int i_force)
Definition: mbs_project_fct_ptr.h:73
user_ExtForces_d_ptr user_ExtForces_dqdd
Definition: mbs_data.h:179
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)
Definition: mbs_project_fct_ptr.h:45
mbs_save_user_IO_ptr mbs_save_user_IO
Save the current UserIO values into a file stream.
Definition: mbs_data.h:159
user_LinkForces_d_ptr user_LinkForces_dqd
Definition: mbs_data.h:168
mbs_cons_jdqd_ptr mbs_cons_jdqd
Definition: mbs_data.h:76
user_LinkForces_d_ptr user_LinkForces_dqdd
Definition: mbs_data.h:169
void(* mbs_sensor_ptr)(MbsSensor *sens, MbsData *s, int isens)
Definition: mbs_project_fct_ptr.h:113
mbs_invdynared_d_ptr mbs_invdynared_dq
Definition: mbs_data.h:80
void(* user_dirdyn_init_ptr)(MbsData *MBSdata, MbsDirdyn *mbs_dd)
Definition: mbs_project_fct_ptr.h:29
void mbs_close_libraries(MbsData *mbs_data)
Close the symbolic and userfct libraries associated to the given MbsData.
Definition: mbs_load_libraries.c:387
double *(* user_ExtForces_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)
Definition: mbs_project_fct_ptr.h:46
user_JointForces_ptr user_JointForces
Definition: mbs_data.h:88
MbsDataLibInfo * mbs_load_dynamic_library(char *libpath)
Utility functions.
Definition: mbs_load_libraries.c:46
void(* user_load_post_ptr)(MbsData *MBSdata, MbsLoader *mbs_loader)
Definition: mbs_project_fct_ptr.h:27
user_dirdyn_finish_ptr user_dirdyn_finish
Definition: mbs_data.h:95
user_ExtForces_d_ptr user_ExtForces_dq
Definition: mbs_data.h:177