Robotran C Documentation
mbs_binder_private.h
Go to the documentation of this file.
1 /*
2  This header includes the functions to bind the MbsInfos structure,
3  needed during the loading.
4 
5  @Date Nov 2022
6  @Author Robotran Team
7 */
8 
9 #ifndef MBS_BINDER_PRIVATE_h
10 #define MBS_BINDER_PRIVATE_h
11 
12 #include "mbs_load_json.h"
13 #include "mbs_binder_public.h"
14 
22 MbsInfos* mbs_info_reader(const char *mbs_filename);
23 int mbs_info_updater(MbsInfos *mbs_infos, const char *mbs_filename);
24 
25 MbsInfos* mbs_new_infos(void);
26 void mbs_delete_infos(MbsInfos *mbs_infos);
27 
28 //
29 //
30 /* *****************************************
31  * useful functions for linker
32  ********************************************/
33 
34  /*
35  * Find a body in the body tree according to its name "bodyname"
36  * return NULL in case of failure
37  *
38  */
39 MbsInfoBody* find_body_in_bodytree(MbsInfos* mbs_infos, char* bodyname);
40 MbsInfoJoint* find_joint_in_bodytree(MbsInfos* mbs_infos, char* jointname);
41 MbsInfoJoint* find_joint_in_joint_list(MbsInfos* mbs_infos, char* jointname);
42 MbsInfoJoint* find_joint_with_parent_in_joint_list(MbsInfos* mbs_infos, char* jointname);
43 
44 /* BELOW ARE THE FUNCTION TO CREATE/DELETE MbsInfos structures */
45 
47 void mbs_delete_info_d_data(MbsInfoDData* mbs_info_d_data);
48 
50 void* mbs_delete_info_ref_point(MbsInfoRefPoint* mbs_info_ref_point);
51 
53 void mbs_delete_info_sensor(MbsInfoSensor* mbs_info_sensor);
54 
56 void mbs_delete_info_extforce(MbsInfoExtforce* mbs_info_extforce);
57 
59 void* mbs_delete_info_point(MbsInfoPoint* mbs_info_point);
60 
62 void mbs_delete_info_base(MbsInfoBase* mbs_info_base);
63 
65 void* mbs_delete_info_joint(MbsInfoJoint* mbs_info_joint);
66 
68 void mbs_delete_info_body(MbsInfoBody* mbs_info_body, void *all_joints_lists);
69 
71 void mbs_delete_info_bodytree(MbsInfoBodytree* mbs_info_bodytree, void *all_joints_list);
72 
74 void mbs_delete_info_ball(MbsInfoBall* mbs_info_ball);
75 
77 void mbs_delete_info_rod(MbsInfoRod* mbs_info_rod);
78 
80 void mbs_delete_info_solid(MbsInfoSolid* mbs_info_solid);
81 
83 void mbs_delete_info_cuts(MbsInfoCuts* mbs_info_cuts);
84 
86 void mbs_delete_info_link(MbsInfoLink* mbs_info_link);
87 
89 void mbs_delete_info_links(MbsInfoLinks* mbs_info_links);
90 
92 void mbs_delete_info_parameter(MbsInfoParameter* mbs_info_parameter);
93 
95 void mbs_delete_info_user_model(MbsInfoUserModel* mbs_info_user_model);
96 
98 void mbs_delete_info_user_models(MbsInfoUserModels* mbs_info_user_models);
99 
101 void mbs_delete_info_user_IO(MbsInfoUserIO* mbs_info_user_IO);
102 
104 void mbs_delete_info_user_IOs(MbsInfoUserIOs* mbs_info_user_IOs);
105 
107 void mbs_delete_info_opti(MbsInfoOpti* mbs_info_opti);
108 
109 
110 #endif
mbs_delete_info_solid
void mbs_delete_info_solid(MbsInfoSolid *mbs_info_solid)
Definition: mbs_loader_public.c:769
mbs_delete_info_rod
void mbs_delete_info_rod(MbsInfoRod *mbs_info_rod)
Definition: mbs_loader_public.c:736
mbs_delete_info_joint
void * mbs_delete_info_joint(MbsInfoJoint *mbs_info_joint)
Definition: mbs_loader_public.c:550
mbs_new_info_body
MbsInfoBody * mbs_new_info_body(void)
Definition: mbs_loader_public.c:567
mbs_delete_info_bodytree
void mbs_delete_info_bodytree(MbsInfoBodytree *mbs_info_bodytree, void *all_joints_list)
Definition: mbs_loader_public.c:658
MbsInfoBodytree
Definition: mbs_binder_public.h:169
mbs_new_info_bodytree
MbsInfoBodytree * mbs_new_info_bodytree(void)
Definition: mbs_loader_public.c:623
MbsInfoRefPoint
Structure defining the parent point of a body.
Definition: mbs_binder_public.h:47
mbs_new_info_solid
MbsInfoSolid * mbs_new_info_solid(void)
Definition: mbs_loader_public.c:754
mbs_delete_info_sensor
void mbs_delete_info_sensor(MbsInfoSensor *mbs_info_sensor)
Definition: mbs_loader_public.c:396
MbsInfoJoint
This structure contains all informations about a joint.
Definition: mbs_binder_public.h:122
MbsInfoCuts
Definition: mbs_binder_public.h:238
mbs_new_info_parameter
MbsInfoParameter * mbs_new_info_parameter(void)
Definition: mbs_loader_public.c:914
mbs_new_info_sensor
MbsInfoSensor * mbs_new_info_sensor(void)
Definition: mbs_loader_public.c:376
MbsInfos
Definition: mbs_binder_public.h:384
mbs_load_json.h
This header includes the functions to bind the JSON information to the MbsInfos structure.
mbs_delete_info_ref_point
void * mbs_delete_info_ref_point(MbsInfoRefPoint *mbs_info_ref_point)
Definition: mbs_loader_public.c:356
mbs_delete_info_link
void mbs_delete_info_link(MbsInfoLink *mbs_info_link)
Definition: mbs_loader_public.c:853
MbsInfoSolid
Definition: mbs_binder_public.h:227
mbs_new_info_user_IO
MbsInfoUserIO * mbs_new_info_user_IO(void)
Definition: mbs_loader_public.c:1037
mbs_new_info_joint
MbsInfoJoint * mbs_new_info_joint(void)
Definition: mbs_loader_public.c:522
MbsInfoUserModel
Definition: mbs_binder_public.h:334
mbs_delete_info_cuts
void mbs_delete_info_cuts(MbsInfoCuts *mbs_info_cuts)
Definition: mbs_loader_public.c:803
mbs_binder_public.h
mbs_new_info_user_IOs
MbsInfoUserIOs * mbs_new_info_user_IOs(void)
Definition: mbs_loader_public.c:1055
mbs_new_info_ball
MbsInfoBall * mbs_new_info_ball(void)
Definition: mbs_loader_public.c:684
find_joint_in_joint_list
MbsInfoJoint * find_joint_in_joint_list(MbsInfos *mbs_infos, char *jointname)
Definition: mbs_loader_public.c:1258
mbs_delete_infos
void mbs_delete_infos(MbsInfos *mbs_infos)
Definition: mbs_loader_public.c:1163
mbs_delete_info_base
void mbs_delete_info_base(MbsInfoBase *mbs_info_base)
Definition: mbs_loader_public.c:504
find_joint_with_parent_in_joint_list
MbsInfoJoint * find_joint_with_parent_in_joint_list(MbsInfos *mbs_infos, char *jointname)
Definition: mbs_loader_public.c:1273
mbs_delete_info_extforce
void mbs_delete_info_extforce(MbsInfoExtforce *mbs_info_extforce)
Definition: mbs_loader_public.c:423
MbsInfoParameter
Description of a user model parameter loaded from the mbs file.
Definition: mbs_binder_public.h:272
mbs_new_info_links
MbsInfoLinks * mbs_new_info_links(void)
Definition: mbs_loader_public.c:870
mbs_new_info_extforce
MbsInfoExtforce * mbs_new_info_extforce(void)
Definition: mbs_loader_public.c:404
mbs_new_info_d_data
MbsInfoDData * mbs_new_info_d_data(void)
Definition: mbs_loader_public.c:320
MbsInfoUserIOs
Definition: mbs_binder_public.h:357
mbs_delete_info_user_models
void mbs_delete_info_user_models(MbsInfoUserModels *mbs_info_user_models)
Definition: mbs_loader_public.c:1015
mbs_delete_info_user_IOs
void mbs_delete_info_user_IOs(MbsInfoUserIOs *mbs_info_user_IOs)
Definition: mbs_loader_public.c:1068
mbs_new_info_base
MbsInfoBase * mbs_new_info_base(void)
Definition: mbs_loader_public.c:491
mbs_delete_info_body
void mbs_delete_info_body(MbsInfoBody *mbs_info_body, void *all_joints_lists)
Definition: mbs_loader_public.c:590
MbsInfoOpti
Definition: mbs_binder_public.h:365
mbs_delete_info_user_IO
void mbs_delete_info_user_IO(MbsInfoUserIO *mbs_info_user_IO)
Definition: mbs_loader_public.c:1049
MbsInfoBody
This structure contains all informations about a body.
Definition: mbs_binder_public.h:150
mbs_new_info_ref_point
MbsInfoRefPoint * mbs_new_info_ref_point(void)
Definition: mbs_loader_public.c:345
mbs_info_reader
MbsInfos * mbs_info_reader(const char *mbs_filename)
Read the mbs file to retrieve size informations (number of joints...).
Definition: mbs_loader_public.c:12
find_joint_in_bodytree
MbsInfoJoint * find_joint_in_bodytree(MbsInfos *mbs_infos, char *jointname)
Definition: mbs_loader_public.c:1243
mbs_delete_info_point
void * mbs_delete_info_point(MbsInfoPoint *mbs_info_point)
Definition: mbs_loader_public.c:457
MbsInfoUserIO
Definition: mbs_binder_public.h:349
MbsInfoRod
Definition: mbs_binder_public.h:211
MbsInfoSensor
This structure contains all information about a sensor defined on the MBS structure.
Definition: mbs_binder_public.h:57
MbsInfoDData
Definition: mbs_binder_public.h:26
MbsInfoBase
Structure handling the informations defined on the base of the MBS.
Definition: mbs_binder_public.h:112
mbs_new_info_point
MbsInfoPoint * mbs_new_info_point(void)
Definition: mbs_loader_public.c:431
MbsInfoPoint
This structure handle everything that a point on a MBS structure can handle (sensor,...
Definition: mbs_binder_public.h:94
mbs_delete_info_links
void mbs_delete_info_links(MbsInfoLinks *mbs_info_links)
Definition: mbs_loader_public.c:884
mbs_delete_info_opti
void mbs_delete_info_opti(MbsInfoOpti *mbs_info_opti)
Definition: mbs_loader_public.c:1111
mbs_new_info_user_model
MbsInfoUserModel * mbs_new_info_user_model(void)
Definition: mbs_loader_public.c:974
mbs_new_info_cuts
MbsInfoCuts * mbs_new_info_cuts(void)
Definition: mbs_loader_public.c:787
MbsInfoBall
Definition: mbs_binder_public.h:200
mbs_info_updater
int mbs_info_updater(MbsInfos *mbs_infos, const char *mbs_filename)
Definition: mbs_loader_public.c:53
find_body_in_bodytree
MbsInfoBody * find_body_in_bodytree(MbsInfos *mbs_infos, char *bodyname)
Definition: mbs_loader_public.c:1227
mbs_new_info_user_models
MbsInfoUserModels * mbs_new_info_user_models(void)
Definition: mbs_loader_public.c:1004
mbs_delete_info_parameter
void mbs_delete_info_parameter(MbsInfoParameter *mbs_info_parameter)
Definition: mbs_loader_public.c:941
mbs_delete_info_ball
void mbs_delete_info_ball(MbsInfoBall *mbs_info_ball)
Definition: mbs_loader_public.c:699
mbs_delete_info_user_model
void mbs_delete_info_user_model(MbsInfoUserModel *mbs_info_user_model)
Definition: mbs_loader_public.c:986
mbs_delete_info_d_data
void mbs_delete_info_d_data(MbsInfoDData *mbs_info_d_data)
Definition: mbs_loader_public.c:340
mbs_new_info_link
MbsInfoLink * mbs_new_info_link(void)
Definition: mbs_loader_public.c:840
mbs_new_infos
MbsInfos * mbs_new_infos(void)
Definition: mbs_loader_public.c:1124
mbs_new_info_rod
MbsInfoRod * mbs_new_info_rod(void)
Definition: mbs_loader_public.c:716
MbsInfoUserModels
Definition: mbs_binder_public.h:342
mbs_new_info_opti
MbsInfoOpti * mbs_new_info_opti(void)
Definition: mbs_loader_public.c:1090
MbsInfoExtforce
This structure contains all information about an external force sensor defined on the MBS structure.
Definition: mbs_binder_public.h:76