Robotran C Documentation
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
mbs_xml_binder_private.h
Go to the documentation of this file.
1 /*
2  This header includes the functions to bind the XML information to the MbsInfos structure
3  @Date Nov 2022 (modification)
4  @Author Robotran Team
5 */
6 
7 #ifndef MBS_INFO_XML_BINDER_PRIVATE_h
8 #define MBS_INFO_XML_BINDER_PRIVATE_h
9 
10 #include "mbs_xml.h"
11 #include "mbs_infos_struct.h"
12 #include "mbs_saver_struct.h"
13 
14 int mbs_info_coordinates_xml_binder(double *coordinates_pointer, xmlNodePtr node, int mission);
15 int mbs_info_sensor_xml_binder(MbsInfoSensor *mbs_info_sensor, xmlNodePtr node, int mission);
16 int mbs_info_extforce_xml_binder(MbsInfoExtforce *mbs_info_extforce, xmlNodePtr node, int mission);
17 int mbs_info_joint_xml_binder(MbsInfoJoint *mbs_info_joint, xmlNodePtr node, int mission, int verbose);
18 int mbs_info_joint_list_xml_binder(MbsInfoJoint **joint_list, xmlNodePtr node, int mission, int verbose);
19 int mbs_info_point_xml_binder(MbsInfoPoint *mbs_info_point, xmlNodePtr node, int mission);
20 int mbs_info_point_list_xml_binder(MbsInfoPoint **mbs_info_point_list, xmlNodePtr node, int mission, char *body_name);
21 int mbs_info_ref_point_xml_binder(MbsInfoRefPoint* mbs_info_ref_point, xmlNodePtr node, int mission);
22 int mbs_info_base_xml_binder(MbsInfoBase *mbs_info_base, xmlNodePtr node, int mission);
23 int mbs_info_body_xml_binder(MbsInfoBody *mbs_info_body, xmlNodePtr node, int mission, int verbose);
24 int mbs_info_bodytree_xml_binder(MbsInfoBodytree *mbs_info_bodytree, xmlNodePtr node, int mission, int verbose);
25 int mbs_info_ball_xml_binder(MbsInfoBall *mbs_info_ball, xmlNodePtr node, int mission);
26 int mbs_info_rod_xml_binder(MbsInfoRod *mbs_info_rod, xmlNodePtr node, int mission);
27 int mbs_info_solid_xml_binder(MbsInfoSolid *mbs_info_solid, xmlNodePtr node, int mission);
28 int mbs_info_cuts_xml_binder(MbsInfoCuts *mbs_info_cuts, xmlNodePtr node, int mission);
29 int mbs_info_link_xml_binder(MbsInfoLink *mbs_info_link, xmlNodePtr node, int mission);
30 int mbs_info_links_xml_binder(MbsInfoLinks *mbs_info_links, xmlNodePtr node, int mission);
31 int mbs_info_parameter_xml_binder(MbsInfoParameter *mbs_info_parameter, xmlNodePtr node, int mission);
32 int mbs_info_user_model_xml_binder(MbsInfoUserModel *mbs_info_user_model, xmlNodePtr node, int mission);
33 int mbs_info_user_models_xml_binder(MbsInfoUserModels* mbs_info_user_models, xmlNodePtr node, int mission, int verbose);
34 
49 int mbs_info_user_IOs_xml_binder(MbsInfoUserIOs *mbs_info_user_IOs, xmlNodePtr node,
50  int mission, int verbose);
51 int mbs_info_mbsDescR7_binder(MbsInfos *mbs_infos, xmlDocPtr doc, int mission);
52 int mbs_info_mbs_linker(MbsInfos* mbs_info, int mission);
53 int mbs_info_init_and_binderXML(MbsInfos *mbs_infos, const char* mbs_xml_name, int mission);
54 
67  const xmlChar *content, double value);
68 
77 xmlNodePtr mbs_info_find_children_xml(xmlNodePtr node, const char *name);
78 
86 void *mbs_xml_free_clean(xmlDocPtr doc);
87 
96 int mbs_xml_info_to_loader(MbsLoader *mbs_loader, const char *mbs_xml_name);
97 
105 xmlDocPtr mbs_xml_get_doc(const char *mbs_xml_name);
106 
115 
132 xmlNodePtr get_body_node(xmlNodePtr bodytree, const char *body_name);
133 
146 xmlNodePtr get_point_node(xmlNodePtr body_node, const char *point_name,
147  int allow_new, double coords_2d[2]);
148 
158 xmlNodePtr get_basebody_point(xmlDocPtr doc, const char *point_name, int allow_new);
159 
170 xmlNodePtr get_body_point(xmlDocPtr doc, const char *body_name, const char *point_name, int allow_new);
171 
181 xmlNodePtr get_links_node(xmlDocPtr doc, int create);
182 
193 
201 xmlNodePtr get_body_3Dshapes(xmlDocPtr doc, const char *body_name);
202 
212 xmlNodePtr get_inline_shape(xmlNodePtr shape3D_node, const char *shape_name,
213  int allow_creation);
214 
225 xmlNodePtr get_base_shape(xmlNodePtr shape3D_node, const char *shape_name,
226  int nature, int allow_creation);
227 
240 int mbs_info_update_inlines_xml(MbsLoader *mbs_loader, UpdateInline *up_in,
241  int allow_creation);
242 
255 int mbs_info_update_shapes_xml(MbsLoader *mbs_loader, UpdateShape *up_in,
256  int allow_new);
257 
271  int allow_new);
272 
286  int allow_new);
287 #endif
MbsLoader::opts
MbsLoadOptions * opts
Contains the options that must be used when loading the project.
Definition: mbs_load_struct.h:95
get_links_node
xmlNodePtr get_links_node(xmlDocPtr doc, int create)
Look for the node containing all the links.
Definition: mbs_xml_binder.c:1224
MbsInfoCuts::n_rod
int n_rod
Definition: mbs_infos_struct.h:249
MbsInfoBall::endpoint1
MbsInfoRefPoint * endpoint1
Definition: mbs_infos_struct.h:212
MbsInfos::cuts
MbsInfoCuts * cuts
Definition: mbs_infos_struct.h:429
UpdateExtForces::comp_rotation
int * comp_rotation
Definition: mbs_saver_struct.h:137
ExtForces_3D::color_y
int * color_y
Definition: mbs_saver_struct.h:114
mbs_info_user_IOs_xml_binder
int mbs_info_user_IOs_xml_binder(MbsInfoUserIOs *mbs_info_user_IOs, xmlNodePtr node, int mission, int verbose)
Read the user Input output variables list xml node with the infos.
Definition: mbs_xml_binder.c:2770
MBS_INFO_UPDATER
#define MBS_INFO_UPDATER
Definition: mbs_define.h:24
MbsInfoPoint::pt
double * pt
Array with the coordinates (x, y, z) of the point relative to the origin of the body expressed in the...
Definition: mbs_infos_struct.h:105
MbsInfoExtforce::name
char * name
Definition: mbs_infos_struct.h:83
mbs_new_info_body
MbsInfoBody * mbs_new_info_body(void)
Definition: mbs_loader_public.c:736
MbsInfoParameter::structure_name
char * structure_name
Name of the structure, filled if the parameter is a structure.
Definition: mbs_infos_struct.h:332
MbsInfoExtforce::Vit
int Vit
1 if the computation of the sensor linear velocity has been asked, 0 otherwise.
Definition: mbs_infos_struct.h:89
MbsInfoBall::endpoint2
MbsInfoRefPoint * endpoint2
Definition: mbs_infos_struct.h:213
MBS_INFO_FAILURE
#define MBS_INFO_FAILURE
Definition: mbs_define.h:32
MbsInfoBodytree
Definition: mbs_infos_struct.h:177
mbs_xmlNewDocNode_xyz
xmlNodePtr mbs_xmlNewDocNode_xyz(xmlDocPtr doc, xmlNsPtr ns, const xmlChar *name, const xmlChar *content, double value)
Definition: mbs_xml_binder.c:358
mbs_msg
void mbs_msg(const char *msg,...)
Send a message.
Definition: mbs_message.c:87
UpdateInline::scale
double * scale
Scale (x, y, z) of the inline, Set to NULL to not update it.
Definition: mbs_saver_struct.h:40
ExtForces_3D::color_z
int * color_z
Definition: mbs_saver_struct.h:115
set_double_xlm_node
int set_double_xlm_node(xmlNodePtr in_node, double value)
SET functions ///////////////////////.
Definition: mbs_xml_binder.c:168
get_base_shape
xmlNodePtr get_base_shape(xmlNodePtr shape3D_node, const char *shape_name, int nature, int allow_creation)
Look for the specified basic shape.
Definition: mbs_xml_binder.c:1079
MbsInfoRefPoint::bodyname
char * bodyname
Name of the body that bear the reference point (origin of the joint chain until first body encounter)...
Definition: mbs_infos_struct.h:52
MbsInfos::verbose
int verbose
Verbosity level (not yet implemented everywhere):
Definition: mbs_infos_struct.h:485
MbsLoader::loaded_structure
void * loaded_structure
Pointer to the loaded mbs file specific structure (related to file format).
Definition: mbs_load_struct.h:122
UpdateInline::prj_relative_url
int prj_relative_url
True (1) if the shape url (shape_url) start for project folder (without initial path separator).
Definition: mbs_saver_struct.h:47
MbsInfoRod::name
char * name
Definition: mbs_infos_struct.h:221
get_char_cpy
char * get_char_cpy(const char *fmt,...)
Copy the provided formatted string into a newly allocated memory.
Definition: useful_functions.c:235
mbs_info_mbs_linker
int mbs_info_mbs_linker(MbsInfos *mbs_info, int mission)
Definition: mbs_xml_binder.c:3102
MbsInfoParameter::value_list
double * value_list
Vector (index starting at 1) containing the values retrieved from the multibody file.
Definition: mbs_infos_struct.h:299
get_inline_shape
xmlNodePtr get_inline_shape(xmlNodePtr shape3D_node, const char *shape_name, int allow_creation)
Look for the specified inline shape.
Definition: mbs_xml_binder.c:1019
mbs_info_joint_xml_binder
int mbs_info_joint_xml_binder(MbsInfoJoint *mbs_info_joint, xmlNodePtr node, int mission, int verbose)
Definition: mbs_xml_binder.c:1426
MbsInfoParameter::name
char * name
Name of the parameter in the user model.
Definition: mbs_infos_struct.h:282
mbs_info_mbsDescR7_binder
int mbs_info_mbsDescR7_binder(MbsInfos *mbs_infos, xmlDocPtr doc, int mission)
Definition: mbs_xml_binder.c:2839
xmlNodeListGetString
static xmlChar * xmlNodeListGetString(xmlDocPtr doc, const xmlNode *list, int inLine)
Definition: mbs_xml.h:109
useful_functions.h
ExtForces_3D::show_x
int show_x
Definition: mbs_saver_struct.h:104
MbsInfoUserIOs::n_out
int n_out
Number of OUTPUT user IO in the system.
Definition: mbs_infos_struct.h:392
mbs_new_info_bodytree
MbsInfoBodytree * mbs_new_info_bodytree(void)
Definition: mbs_loader_public.c:792
UpdateInline::rotation
double * rotation
Rotation (around x, y, z) of the inline, Set to NULL to not update it.
Definition: mbs_saver_struct.h:42
xmlChar
unsigned char xmlChar
Definition: mbs_xml.h:39
mbs_info_mbsDescR7_binder
int mbs_info_mbsDescR7_binder(MbsInfos *mbs_infos, xmlDocPtr doc, int mission)
Definition: mbs_xml_binder.c:2839
ExtForces_3D::show_resultant
int show_resultant
Flags to activate (1), desactivate (0), or no modification (-1) to the visibility of the force global...
Definition: mbs_saver_struct.h:107
MbsInfoRefPoint
Structure defining the parent point of a body.
Definition: mbs_infos_struct.h:50
MbsInfoJoint::qdd0
double qdd0
Initial acceleration of the joint.
Definition: mbs_infos_struct.h:138
mbs_info_user_model_xml_binder
int mbs_info_user_model_xml_binder(MbsInfoUserModel *mbs_info_user_model, xmlNodePtr node, int mission)
Definition: mbs_xml_binder.c:2622
mbs_info_update_extforces_xml
int mbs_info_update_extforces_xml(MbsLoader *mbs_loader, UpdateExtForces *frc, int allow_new)
Update, or create this external force all next ExtFrc in the linked list.
Definition: mbs_xml_binder.c:3816
mbs_info_ref_point_xml_binder
int mbs_info_ref_point_xml_binder(MbsInfoRefPoint *mbs_info_ref_point, xmlNodePtr node, int mission)
Definition: mbs_xml_binder.c:1779
MbsInfos::base
MbsInfoBase * base
Definition: mbs_infos_struct.h:427
mbs_info_user_models_xml_binder
int mbs_info_user_models_xml_binder(MbsInfoUserModels *mbs_info_user_models, xmlNodePtr node, int mission, int verbose)
Definition: mbs_xml_binder.c:2672
mbs_info_sensor_xml_binder
int mbs_info_sensor_xml_binder(MbsInfoSensor *mbs_info_sensor, xmlNodePtr node, int mission)
Definition: mbs_xml_binder.c:1322
ExtForces_3D::scale
double scale
Scale of the arrow, use 0 to not update the diameter.
Definition: mbs_saver_struct.h:120
get_string_xml_attr
int get_string_xml_attr(xmlAttrPtr in_node, char **dest)
Definition: mbs_xml_binder.c:130
get_basebody_3Dshapes
xmlNodePtr get_basebody_3Dshapes(xmlDocPtr doc, int create)
Look for the node containing the 3D shape (x3D) of the base node.
Definition: mbs_xml_binder.c:618
MbsInfoBase::n_base_point
int n_base_point
Number of point of interest (extremities of joint bearing a sensor plus anchor point) defined on the ...
Definition: mbs_infos_struct.h:122
fill_all_joint_list
int fill_all_joint_list(MbsInfos *mbs_infos)
Fill the joints list with children parent...
Definition: mbs_loader_public.c:1500
UpdateShape::on_base
int on_base
True (1) if the shape is on the basebody.
Definition: mbs_saver_struct.h:61
xmlSetProp
static xmlAttrPtr xmlSetProp(xmlNodePtr node, const xmlChar *name, const xmlChar *value)
Definition: mbs_xml.h:162
mbs_info_coordinates_xml_binder
int mbs_info_coordinates_xml_binder(double *coords, xmlNodePtr node, int mission)
Binders /////////////////////////////.
Definition: mbs_xml_binder.c:1272
IGNORE_LOADED
@ IGNORE_LOADED
Definition: mbs_load_struct.h:91
mbs_new_info_solid
MbsInfoSolid * mbs_new_info_solid(void)
Definition: mbs_loader_public.c:923
string_xml_node
int string_xml_node(xmlNodePtr node, char **text, int mission)
Definition: mbs_xml_binder.c:277
KEEP_LOADED
@ KEEP_LOADED
Definition: mbs_load_struct.h:91
xmlFreeDoc
static void xmlFreeDoc(xmlDocPtr cur)
Definition: mbs_xml.h:217
mbs_error_msg
void mbs_error_msg(int err, const char *msg,...)
Send an error message.
Definition: mbs_message.c:131
_MBS_ERR_LOW_FILES
#define _MBS_ERR_LOW_FILES
Low Level error number Error during opening/writing files = -9.
Definition: mbs_errors_names.h:157
MbsInfoUserIOs::user_IO_list
MbsInfoUserIO ** user_IO_list
The detail of each user IO in the system.
Definition: mbs_infos_struct.h:394
UpdateExtForces::torque_3d
ExtForces_3D * torque_3d
Determine 3D force visualization parameters, set to null to not modify.
Definition: mbs_saver_struct.h:140
mbs_info_cuts_xml_binder
int mbs_info_cuts_xml_binder(MbsInfoCuts *mbs_info_cuts, xmlNodePtr node, int mission)
Definition: mbs_xml_binder.c:2252
MbsInfoJoint
This structure contains all informations about a joint.
Definition: mbs_infos_struct.h:130
MbsInfoCuts
Definition: mbs_infos_struct.h:246
UpdateShape::visible
int visible
Flag to show the shape (1) or hide it (0). Set to -1 to not update it.
Definition: mbs_saver_struct.h:92
new_char_xlm_node
xmlNodePtr new_char_xlm_node(xmlDocPtr doc, xmlNsPtr ns, const xmlChar *name, const xmlChar *content, const char *text)
Definition: mbs_xml_binder.c:349
xmlParseFile
static xmlDocPtr xmlParseFile(const char *filename)
Definition: mbs_xml.h:199
mbs_define.h
MbsInfoExtforce::Omp
int Omp
1 if the computation of the sensor angular acceleration has been asked, 0 otherwise.
Definition: mbs_infos_struct.h:93
mbs_binder_private.h
mbs_info_rod_xml_binder
int mbs_info_rod_xml_binder(MbsInfoRod *mbs_info_rod, xmlNodePtr node, int mission)
Definition: mbs_xml_binder.c:2149
xmlNsPtr
xmlNs * xmlNsPtr
Definition: mbs_xml.h:37
MbsInfoExtforce::Om
int Om
1 if the computation of the sensor angular velocity has been asked, 0 otherwise.
Definition: mbs_infos_struct.h:90
ExtForces_3D::show
int show
Definition: mbs_saver_struct.h:103
mbs_info_joint_xml_binder
int mbs_info_joint_xml_binder(MbsInfoJoint *mbs_info_joint, xmlNodePtr node, int mission, int verbose)
Definition: mbs_xml_binder.c:1426
mbs_strcmp
int mbs_strcmp(const char *__s1, const char *__s2)
Compare two char with strcmp.
Definition: useful_functions.c:568
MbsInfoExtforce::parent_point
MbsInfoRefPoint * parent_point
parent point of the sensor (NULL if it is a parent joint)
Definition: mbs_infos_struct.h:84
MbsInfoParameter::d_value
MbsInfoDData ** d_value
d_data for the value.
Definition: mbs_infos_struct.h:321
MbsInfoBase::gravity
double * gravity
Array with the component (x, y, z) of the gravity vector expressed in the inertial frame.
Definition: mbs_infos_struct.h:121
MbsInfoCuts::n_ball
int n_ball
Definition: mbs_infos_struct.h:248
XML_LOADED
@ XML_LOADED
Definition: mbs_load_struct.h:91
get_body_node
xmlNodePtr get_body_node(xmlNodePtr bodytree, const char *body_name)
Look for the specified body node in the tree.
Definition: mbs_xml_binder.c:558
MbsInfoBody::mass
double mass
Mass of the body.
Definition: mbs_infos_struct.h:168
xmlEncodeEntitiesReentrant
static xmlChar * xmlEncodeEntitiesReentrant(xmlDocPtr doc, const xmlChar *input)
Definition: mbs_xml.h:126
mbs_xml_get_doc
xmlDocPtr mbs_xml_get_doc(const char *mbs_xml_name)
Load an xml file to memory.
Definition: mbs_xml_binder.c:2968
cmp_string_xml_attr
int cmp_string_xml_attr(xmlAttrPtr in_node, const char *string)
other functions /////////////////////
Definition: mbs_xml_binder.c:420
get_bodytree_node
xmlNodePtr get_bodytree_node(xmlDocPtr doc)
Look for the bodytree node in the document.
Definition: mbs_xml_binder.c:521
xmlDocPtr
xmlDoc * xmlDocPtr
Definition: mbs_xml.h:28
mbs_info_body_xml_binder
int mbs_info_body_xml_binder(MbsInfoBody *mbs_info_body, xmlNodePtr node, int mission, int verbose)
Definition: mbs_xml_binder.c:1853
mbs_new_info_parameter
MbsInfoParameter * mbs_new_info_parameter(void)
Definition: mbs_loader_public.c:1083
mbs_info_user_IOs_xml_binder
int mbs_info_user_IOs_xml_binder(MbsInfoUserIOs *mbs_info_user_IOs, xmlNodePtr node, int mission, int verbose)
Read the user Input output variables list xml node with the infos.
Definition: mbs_xml_binder.c:2770
XML_ATTRIBUTE_NODE
@ XML_ATTRIBUTE_NODE
Definition: mbs_xml.h:47
mbs_new_info_sensor
MbsInfoSensor * mbs_new_info_sensor(void)
Definition: mbs_loader_public.c:535
mbs_xml_free_clean
void * mbs_xml_free_clean(xmlDocPtr doc)
Free the xml document and clean the xml library parser.
Definition: mbs_xml_binder.c:3036
MbsInfoUserIO::size
int size
Number of values in the user IO.
Definition: mbs_infos_struct.h:375
MbsInfoSensor::Acc
int Acc
1 if the computation of the sensor linear acceleration has been asked, 0 otherwise....
Definition: mbs_infos_struct.h:71
mbs_warning_msg
void mbs_warning_msg(const char *msg,...)
Send a warning message.
Definition: mbs_message.c:100
mbs_info_parameter_xml_binder
int mbs_info_parameter_xml_binder(MbsInfoParameter *mbs_info_parameter, xmlNodePtr node, int mission)
Definition: mbs_xml_binder.c:2424
mbs_xml_get_doc
xmlDocPtr mbs_xml_get_doc(const char *mbs_xml_name)
Load an xml file to memory.
Definition: mbs_xml_binder.c:2968
MbsInfos
Definition: mbs_infos_struct.h:425
UpdateExtForces::next
struct UpdateExtForces * next
Pointer to next force to be updated.
Definition: mbs_saver_struct.h:142
UpdateExtForces::comp_jacobian
int * comp_jacobian
Flag (0/1) determining informations to compute.
Definition: mbs_saver_struct.h:137
UpdateExtForces::on_base
int on_base
True (1) if the shape is on the basebody.
Definition: mbs_saver_struct.h:129
mbs_info_joint_list_xml_binder
int mbs_info_joint_list_xml_binder(MbsInfoJoint **joint_list, xmlNodePtr node, int mission, int verbose)
Definition: mbs_xml_binder.c:1633
MbsInfoUserIO::type
int type
Nature of the user IO:
Definition: mbs_infos_struct.h:373
UpdateInline::position
double * position
Position (x, y, z) of the inline, Set to NULL to not update it.
Definition: mbs_saver_struct.h:38
UpdateExtForces
Define modifications to be done on external forces, or new to add.
Definition: mbs_saver_struct.h:127
mbs_info_base_xml_binder
int mbs_info_base_xml_binder(MbsInfoBase *mbs_info_base, xmlNodePtr node, int mission)
Definition: mbs_xml_binder.c:1801
MbsInfoPoint::name
char * name
Name of the point.
Definition: mbs_infos_struct.h:103
UpdateExtForces::comp_acceleration
int * comp_acceleration
Definition: mbs_saver_struct.h:137
get_basebody_point
xmlNodePtr get_basebody_point(xmlDocPtr doc, const char *point_name, int allow_new)
Look for the specified point node on the base.
Definition: mbs_xml_binder.c:1160
mbs_info_user_IO_xml_binder
int mbs_info_user_IO_xml_binder(MbsInfoUserIO *mbs_info_user_IO, xmlNodePtr node, int mission)
Definition: mbs_xml_binder.c:2723
compare_char_xml_node
int compare_char_xml_node(xmlNodePtr in_node, const char *text)
COMPARE functions ///////////////////.
Definition: mbs_xml_binder.c:240
MbsInfoPoint::sensor
MbsInfoSensor * sensor
Pointer to a sensor structure if a sensor is defined on the point.
Definition: mbs_infos_struct.h:107
mbs_info_ball_xml_binder
int mbs_info_ball_xml_binder(MbsInfoBall *mbs_info_ball, xmlNodePtr node, int mission)
Definition: mbs_xml_binder.c:2091
mbs_info_extforce_xml_binder
int mbs_info_extforce_xml_binder(MbsInfoExtforce *mbs_info_extforce, xmlNodePtr node, int mission)
Definition: mbs_xml_binder.c:1376
mbs_xml_free_clean
void * mbs_xml_free_clean(xmlDocPtr doc)
Free the xml document and clean the xml library parser.
Definition: mbs_xml_binder.c:3036
mbs_info_update_linkforce_xml
int mbs_info_update_linkforce_xml(MbsLoader *mbs_loader, UpdateLinkForces *lnk, int allow_new)
Update, or create the provided link force.
Definition: mbs_xml_binder.c:4277
get_body_point
xmlNodePtr get_body_point(xmlDocPtr doc, const char *body_name, const char *point_name, int allow_new)
Look for the specified point node on the specified body.
Definition: mbs_xml_binder.c:1187
MbsInfoBase::base_point_list
MbsInfoPoint ** base_point_list
Array of pointers to the MDS_point_strct describing each point of the MBS.
Definition: mbs_infos_struct.h:123
MbsInfoJoint::name
char * name
Name of the joint.
Definition: mbs_infos_struct.h:132
mbs_info_rod_xml_binder
int mbs_info_rod_xml_binder(MbsInfoRod *mbs_info_rod, xmlNodePtr node, int mission)
Definition: mbs_xml_binder.c:2149
xmlNodePtr
xmlNode * xmlNodePtr
Definition: mbs_xml.h:31
MbsInfoSolid
Definition: mbs_infos_struct.h:235
mbs_new_info_user_IO
MbsInfoUserIO * mbs_new_info_user_IO(void)
Definition: mbs_loader_public.c:1221
mbs_new_info_joint
MbsInfoJoint * mbs_new_info_joint(void)
Definition: mbs_loader_public.c:691
MbsInfoCuts::rod_list
MbsInfoRod ** rod_list
Definition: mbs_infos_struct.h:253
MbsInfoUserModel
Definition: mbs_infos_struct.h:347
xmlKeepBlanksDefault
static int xmlKeepBlanksDefault(int val)
Definition: mbs_xml.h:190
get_body_node
xmlNodePtr get_body_node(xmlNodePtr bodytree, const char *body_name)
Look for the specified body node in the tree.
Definition: mbs_xml_binder.c:558
MbsInfoUserModel::parameter_list
MbsInfoParameter ** parameter_list
Definition: mbs_infos_struct.h:352
MbsInfoBody::point_list
MbsInfoPoint ** point_list
Array of pointers to the MDS_point_strct describing each point of current body.
Definition: mbs_infos_struct.h:173
UpdateInline::next
struct UpdateInline * next
Pointer to next inline to be updated.
Definition: mbs_saver_struct.h:52
UpdateShape::height
double * height
Height, except for SHAPE_BOX and SHAPE_SPHERE, of the shape.
Definition: mbs_saver_struct.h:80
ExtForces_3D::show_y
int show_y
Definition: mbs_saver_struct.h:105
mbs_new_info_user_IOs
MbsInfoUserIOs * mbs_new_info_user_IOs(void)
Definition: mbs_loader_public.c:1241
mbs_new_info_ball
MbsInfoBall * mbs_new_info_ball(void)
Definition: mbs_loader_public.c:853
get_bodytree_node
xmlNodePtr get_bodytree_node(xmlDocPtr doc)
Look for the bodytree node in the document.
Definition: mbs_xml_binder.c:521
mbs_info_bodytree_xml_binder
int mbs_info_bodytree_xml_binder(MbsInfoBodytree *mbs_info_bodytree, xmlNodePtr node, int mission, int verbose)
Definition: mbs_xml_binder.c:2035
UpdateInline::shape_name
char * shape_name
Name of the shape in the shape list.
Definition: mbs_saver_struct.h:31
mbs_info_mbs_linker
int mbs_info_mbs_linker(MbsInfos *mbs_info, int mission)
Definition: mbs_xml_binder.c:3102
MbsInfoBody::inertia
double * inertia
Array with the inertia tensor (Ixx, Ixy, Ixz, Iyy, Iyz, Izz) of the body relative to the center of ma...
Definition: mbs_infos_struct.h:170
mbs_info_init_and_binderXML
int mbs_info_init_and_binderXML(MbsInfos *mbs_infos, const char *mbs_xml_name, int mission)
Definition: mbs_xml_binder.c:3184
MbsInfoJoint::actuated
int actuated
For inverse dynamic only: 1 if actuated, 0 otherwise.
Definition: mbs_infos_struct.h:140
mbs_info_cuts_xml_binder
int mbs_info_cuts_xml_binder(MbsInfoCuts *mbs_info_cuts, xmlNodePtr node, int mission)
Definition: mbs_xml_binder.c:2252
MbsInfoExtforce::Pos
int Pos
1 if the computation of the sensor position has been asked, 0 otherwise.
Definition: mbs_infos_struct.h:87
UpdateExtForces::comp_velocity
int * comp_velocity
Definition: mbs_saver_struct.h:137
MbsInfoExtforce::Jdqd
int Jdqd
1 if the computation of the sensor jdqd term has been asked, 0 otherwise. Mutually exclusive with Acc...
Definition: mbs_infos_struct.h:92
xmlErrorPtr
xmlError * xmlErrorPtr
Definition: mbs_xml.h:42
MbsInfoBall::name
char * name
Definition: mbs_infos_struct.h:210
get_body_3Dshapes
xmlNodePtr get_body_3Dshapes(xmlDocPtr doc, const char *body_name)
Look for the node containing the 3D shape (x3D) of the specified body.
Definition: mbs_xml_binder.c:884
MbsInfos::sensor_list
MbsInfoSensor ** sensor_list
Pointer to a list of sensor.
Definition: mbs_infos_struct.h:474
MbsInfoParameter::type
int type
Type of the parameter between 1 and 7.
Definition: mbs_infos_struct.h:285
mbs_adapt_joint_nature
int mbs_adapt_joint_nature(MbsInfoJoint *joint_info, int verbose)
Check the symbols definition and changes the nature to locked if compatible.
Definition: mbs_loader_public.c:1651
MbsInfoJoint::qd0
double qd0
Initial velocity of the joint.
Definition: mbs_infos_struct.h:137
MbsInfoUserModel::description
char * description
Description of the user model.
Definition: mbs_infos_struct.h:350
mbs_info_sensor_xml_binder
int mbs_info_sensor_xml_binder(MbsInfoSensor *mbs_info_sensor, xmlNodePtr node, int mission)
Definition: mbs_xml_binder.c:1322
mbs_info_coordinates_xml_binder
int mbs_info_coordinates_xml_binder(double *coordinates_pointer, xmlNodePtr node, int mission)
Binders /////////////////////////////.
Definition: mbs_xml_binder.c:1272
MbsInfos::user_IOs
MbsInfoUserIOs * user_IOs
Definition: mbs_infos_struct.h:432
MbsInfoParameter
Description of a user model parameter loaded from the mbs file.
Definition: mbs_infos_struct.h:280
mbs_new_info_links
MbsInfoLinks * mbs_new_info_links(void)
Definition: mbs_loader_public.c:1039
mbs_info_solid_xml_binder
int mbs_info_solid_xml_binder(MbsInfoSolid *mbs_info_solid, xmlNodePtr node, int mission)
Definition: mbs_xml_binder.c:2194
MbsInfoSensor::Om
int Om
1 if the computation of the sensor angular velocity has been asked, 0 otherwise.
Definition: mbs_infos_struct.h:70
MbsInfoParameter::structure_header
char * structure_header
Header name with path (relative or absolute) of header describing a structure parameter.
Definition: mbs_infos_struct.h:334
mbs_msg_v
void mbs_msg_v(int v_opt, int v_lvl, const char *msg,...)
Send a message only of the message level is lower than the verbosity option.
Definition: mbs_message.c:143
MbsLoader
Definition: mbs_load_struct.h:93
MbsInfoParameter::val_ptr
void * val_ptr
Pointer to the memory storing the value.
Definition: mbs_infos_struct.h:305
mbs_infos_struct.h
MSG_ERR
#define MSG_ERR
Definition: mbs_xml_binder.c:18
get_inline_shape
xmlNodePtr get_inline_shape(xmlNodePtr shape3D_node, const char *shape_name, int allow_creation)
Look for the specified inline shape.
Definition: mbs_xml_binder.c:1019
MbsInfoUserModel::n_parameter
int n_parameter
Definition: mbs_infos_struct.h:351
MbsInfoSensor::reference_joint
char * reference_joint
joint of the reference frame - relative sensor (NULL if the sensor is relative to the base)....
Definition: mbs_infos_struct.h:65
mbs_info_update_shapes_xml
int mbs_info_update_shapes_xml(MbsLoader *mbs_loader, UpdateShape *up_in, int allow_new)
Update, or create this 3D shape and all next 3D shapes in the linked list.
Definition: mbs_xml_binder.c:3500
MbsInfoExtforce::Acc
int Acc
1 if the computation of the sensor linear acceleration has been asked, 0 otherwise....
Definition: mbs_infos_struct.h:91
MbsInfoSolid::endpoint2
MbsInfoRefPoint * endpoint2
Definition: mbs_infos_struct.h:240
XML_COMMENT_NODE
@ XML_COMMENT_NODE
Definition: mbs_xml.h:53
get_base_shape
xmlNodePtr get_base_shape(xmlNodePtr shape3D_node, const char *shape_name, int nature, int allow_creation)
Look for the specified basic shape.
Definition: mbs_xml_binder.c:1079
MbsInfoJoint::type
int type
Joint type: T1=1, T2=2, T3=3, R1=4, R2=5, R3=6.
Definition: mbs_infos_struct.h:133
mbs_new_info_extforce
MbsInfoExtforce * mbs_new_info_extforce(void)
Definition: mbs_loader_public.c:566
UpdateShape::rotation
double * rotation
Rotation (around x, y, z) of the inline, Set to NULL to not update it.
Definition: mbs_saver_struct.h:87
mbs_new_info_d_data
MbsInfoDData * mbs_new_info_d_data(void)
Definition: mbs_loader_public.c:479
xmlFree
static void xmlFree(xmlChar *xml)
Definition: mbs_xml.h:118
MbsInfoSolid::ignore
int * ignore
Definition: mbs_infos_struct.h:242
MbsInfoUserIOs
Definition: mbs_infos_struct.h:385
UpdateExtForces::name
char * name
Name of the external force, should be unique.
Definition: mbs_saver_struct.h:135
new_double_xml_node
xmlNodePtr new_double_xml_node(xmlDocPtr doc, xmlNsPtr ns, const xmlChar *name, const xmlChar *content, double value)
Creation functions //////////////////.
Definition: mbs_xml_binder.c:340
get_double_xlm_node
double get_double_xlm_node(xmlNodePtr in_node)
Convert the node content value into a double.
Definition: mbs_xml_binder.c:54
inertia_xml_node
int inertia_xml_node(xmlNodePtr in_node, double in_array[6], int mission)
Definition: mbs_xml_binder.c:297
MbsInfoUserIO::name
char * name
Name of the user IO.
Definition: mbs_infos_struct.h:369
mbs_info_bodytree_xml_binder
int mbs_info_bodytree_xml_binder(MbsInfoBodytree *mbs_info_bodytree, xmlNodePtr node, int mission, int verbose)
Definition: mbs_xml_binder.c:2035
UpdateExtForces::comp_position
int * comp_position
Definition: mbs_saver_struct.h:137
MbsInfoUserIOs::n_user_IO
int n_user_IO
Number of user IO in the system.
Definition: mbs_infos_struct.h:388
UpdateShape::transparency
double transparency
Transparency (1 is invisible, 0 is fully visible) of the inline, Set to negative value to not update ...
Definition: mbs_saver_struct.h:89
UpdateInline::transparency
double transparency
Transparency (1 is invisible, 0 is fully visible) of the inline, Set to negative value to not update ...
Definition: mbs_saver_struct.h:44
MBS_INFO_INIT
#define MBS_INFO_INIT
Definition: mbs_define.h:27
mbs_info_update_linkforce_xml
int mbs_info_update_linkforce_xml(MbsLoader *mbs_loader, UpdateLinkForces *lnk, int allow_new)
Update, or create the provided link force.
Definition: mbs_xml_binder.c:4277
set_char_xlm_node
int set_char_xlm_node(xmlNodePtr in_node, const char *text)
Definition: mbs_xml_binder.c:181
mbs_load_struct.h
MbsInfoSolid::name
char * name
Definition: mbs_infos_struct.h:237
XML_ERR_INVALID_CHAR
#define XML_ERR_INVALID_CHAR
Definition: mbs_xml.h:97
UpdateShape::shape_nature
ShapeIds shape_nature
Indicate if the shape is a box, cylinder, cone or sphere:
Definition: mbs_saver_struct.h:68
mbs_new_info_base
MbsInfoBase * mbs_new_info_base(void)
Definition: mbs_loader_public.c:656
mbs_info_user_models_xml_binder
int mbs_info_user_models_xml_binder(MbsInfoUserModels *mbs_info_user_models, xmlNodePtr node, int mission, int verbose)
Definition: mbs_xml_binder.c:2672
MBS_VERBOSE_ERROR
#define MBS_VERBOSE_ERROR
Definition: mbs_define.h:45
get_string_xml_node
int get_string_xml_node(xmlNodePtr in_node, char **dest)
Definition: mbs_xml_binder.c:102
SHAPE_BOX
@ SHAPE_BOX
Definition: mbs_saver_struct.h:14
double_xml_node
int double_xml_node(xmlNodePtr node, double *value, int mission)
Redirecting functions ///////////////.
Definition: mbs_xml_binder.c:259
MbsInfos::n_sensor
int n_sensor
Number of sensor in the model.
Definition: mbs_infos_struct.h:448
MbsInfoBodytree::body_list
MbsInfoBody ** body_list
Definition: mbs_infos_struct.h:180
get_point_node
xmlNodePtr get_point_node(xmlNodePtr body_node, const char *point_name, int allow_new, double coords_2d[2])
Look for the specified point node in the body or base node.
Definition: mbs_xml_binder.c:687
MbsInfoBody::n_point
int n_point
Number of point defined on the body.
Definition: mbs_infos_struct.h:172
UpdateShape::radius
double * radius
Radius, except for SHAPE_BOX, of the shape. Set to NULL to not update it.
Definition: mbs_saver_struct.h:78
MbsInfoSensor::Pos
int Pos
1 if the computation of the sensor position has been asked, 0 otherwise.
Definition: mbs_infos_struct.h:67
MbsInfoBody
This structure contains all informations about a body.
Definition: mbs_infos_struct.h:158
mbs_info_links_xml_binder
int mbs_info_links_xml_binder(MbsInfoLinks *mbs_info_links, xmlNodePtr node, int mission)
Definition: mbs_xml_binder.c:2363
mbs_new_info_ref_point
MbsInfoRefPoint * mbs_new_info_ref_point(void)
Definition: mbs_loader_public.c:504
UpdateInline::on_base
int on_base
True (1) if the shape is on the basebody.
Definition: mbs_saver_struct.h:27
xmlDocGetRootElement
static xmlNodePtr xmlDocGetRootElement(const xmlDoc *doc)
Definition: mbs_xml.h:172
mbs_xml_binder_private.h
MbsInfoPoint::extforce
MbsInfoExtforce * extforce
Pointer to an external force sensor structure if it is defined on the point.
Definition: mbs_infos_struct.h:108
mbs_info_find_children_xml
xmlNodePtr mbs_info_find_children_xml(xmlNodePtr node, const char *name)
Return the children whose name matches.
Definition: mbs_xml_binder.c:457
mbs_info_parameter_xml_binder
int mbs_info_parameter_xml_binder(MbsInfoParameter *mbs_info_parameter, xmlNodePtr node, int mission)
Definition: mbs_xml_binder.c:2424
MbsLoader::mbs_infos
MbsInfos * mbs_infos
Contains the multibody structure with more informations than used by computation.
Definition: mbs_load_struct.h:99
MbsInfoParameter::string_name
char * string_name
Pointer containing the string name (if type is 8). NULL otherwise.
Definition: mbs_infos_struct.h:303
MbsInfos::links
MbsInfoLinks * links
Definition: mbs_infos_struct.h:430
get_basebody_node
xmlNodePtr get_basebody_node(xmlDocPtr doc)
Look for the base node in the document.
Definition: mbs_xml_binder.c:484
find_xmlNodePtr
xmlNodePtr find_xmlNodePtr(xmlNodePtr node, char *name)
Definition: mbs_xml_binder.c:432
new_double_xml_node
xmlNodePtr new_double_xml_node(xmlDocPtr doc, xmlNsPtr ns, const xmlChar *name, const xmlChar *content, double value)
Create a new xml node containing a double.
Definition: mbs_xml_binder.c:340
mbs_message.h
get_point_node
xmlNodePtr get_point_node(xmlNodePtr body_node, const char *point_name, int allow_new, double coords_2d[2])
Look for the specified point node in the body or base node.
Definition: mbs_xml_binder.c:687
mbs_info_point_list_xml_binder
int mbs_info_point_list_xml_binder(MbsInfoPoint **mbs_info_point_list, xmlNodePtr node, int mission, char *body_name)
Definition: mbs_xml_binder.c:1730
mbs_xml_info_to_loader
int mbs_xml_info_to_loader(MbsLoader *mbs_loader, const char *mbs_xml_name)
Load and store the specified xml file into both MbsInfo and xmlDocPtr format.
Definition: mbs_xml_binder.c:3046
MbsInfoSensor::name
char * name
Name of the sensor.
Definition: mbs_infos_struct.h:62
mbs_info_base_xml_binder
int mbs_info_base_xml_binder(MbsInfoBase *mbs_info_base, xmlNodePtr node, int mission)
Definition: mbs_xml_binder.c:1801
get_inertia_comp_xml
int get_inertia_comp_xml(xmlNodePtr inertia, const char *component, double *target)
Get the value of the inertia component from the xml node.
Definition: mbs_xml_binder.c:90
mbs_info_links_xml_binder
int mbs_info_links_xml_binder(MbsInfoLinks *mbs_info_links, xmlNodePtr node, int mission)
Definition: mbs_xml_binder.c:2363
set_char_cpy
int set_char_cpy(char **dest, const char *fmt,...)
Set a copy the provided formatted string into a newly allocated memory.
Definition: useful_functions.c:250
xmlNodeSetContent
static void xmlNodeSetContent(xmlNodePtr cur, const xmlChar *content)
Definition: mbs_xml.h:135
mbs_info_link_xml_binder
int mbs_info_link_xml_binder(MbsInfoLink *mbs_info_link, xmlNodePtr node, int mission)
Definition: mbs_xml_binder.c:2329
MbsInfoCuts::n_solid
int n_solid
Definition: mbs_infos_struct.h:250
MbsInfoUserIO
Definition: mbs_infos_struct.h:366
UpdateInline::visible
int visible
Flag to show the shape (1) or hide it (0). Set to -1 to not update it.
Definition: mbs_saver_struct.h:50
MbsInfoBody::joint_parent
char * joint_parent
parent joint of the current body (NULL if it is a parent point)
Definition: mbs_infos_struct.h:163
get_int_xlm_attr
int get_int_xlm_attr(xmlAttrPtr in_node)
Definition: mbs_xml_binder.c:35
MbsInfoRod
Definition: mbs_infos_struct.h:219
MbsInfoParameter::n_value
int n_value
Number of values in the parameter.
Definition: mbs_infos_struct.h:297
set_inertia_comp_xml
int set_inertia_comp_xml(xmlNodePtr inertia, const char *component, double value)
Set the value of the inertia component into the xml node.
Definition: mbs_xml_binder.c:204
MbsInfoUserModels::n_user_model
int n_user_model
Definition: mbs_infos_struct.h:358
mbs_info_body_xml_binder
int mbs_info_body_xml_binder(MbsInfoBody *mbs_info_body, xmlNodePtr node, int mission, int verbose)
Definition: mbs_xml_binder.c:1853
MbsInfoBody::com
double * com
Array with the coordinate (x, y, z) of the center of mass of the body relative to the origin of the b...
Definition: mbs_infos_struct.h:169
MbsInfoSensor
This structure contains all information about a sensor defined on the MBS structure.
Definition: mbs_infos_struct.h:60
get_basebody_point
xmlNodePtr get_basebody_point(xmlDocPtr doc, const char *point_name, int allow_new)
Look for the specified point node on the base.
Definition: mbs_xml_binder.c:1160
MbsInfoJoint::symb_q
int symb_q
Flag to generate symbol for position.
Definition: mbs_infos_struct.h:146
MbsInfoDData
Definition: mbs_infos_struct.h:29
ExtForces_3D::position_at_end
int position_at_end
Put the end of the arrow on the sensor (1) or the beginning (0).
Definition: mbs_saver_struct.h:110
MbsInfoParameter::structure_lutfile
char * structure_lutfile
File and path (relative or absolute) to the file containing the Look-up-Table dats.
Definition: mbs_infos_struct.h:341
UpdateShape
Define modifications to be done on a basic shape.
Definition: mbs_saver_struct.h:59
XML_IO_LOAD_ERROR
#define XML_IO_LOAD_ERROR
Definition: mbs_xml.h:98
mbs_info_point_xml_binder
int mbs_info_point_xml_binder(MbsInfoPoint *mbs_info_point, xmlNodePtr node, int mission)
Definition: mbs_xml_binder.c:1666
MbsInfoJoint::nature
int nature
Nature of the joint: independent=1, dependent=2, driven=3, locked=4.
Definition: mbs_infos_struct.h:134
UpdateExtForces::point_name
char * point_name
Name of the point with the force.
Definition: mbs_saver_struct.h:133
MbsInfoBall::ignore
int * ignore
Definition: mbs_infos_struct.h:215
MbsInfoBase
Structure handling the informations defined on the base of the MBS.
Definition: mbs_infos_struct.h:119
MbsInfoSensor::Rot
int Rot
1 if the computation of the sensor rotation matrix has been asked, 0 otherwise.
Definition: mbs_infos_struct.h:68
MBS_INFO_CMP
#define MBS_INFO_CMP
Definition: mbs_define.h:28
mbs_new_info_point
MbsInfoPoint * mbs_new_info_point(void)
Definition: mbs_loader_public.c:595
get_string_xml_node_2
int get_string_xml_node_2(char **string_ptr, xmlNodePtr in_node)
Definition: mbs_xml_binder.c:154
MbsInfoPoint
This structure handle everything that a point on a MBS structure can handle (sensor,...
Definition: mbs_infos_struct.h:101
UpdateExtForces::body_name
char * body_name
Name of the body with the force, disregarded if on_base is true.
Definition: mbs_saver_struct.h:131
MBS_VERBOSE_WARNING
#define MBS_VERBOSE_WARNING
Definition: mbs_define.h:46
mbs_info_link_xml_binder
int mbs_info_link_xml_binder(MbsInfoLink *mbs_info_link, xmlNodePtr node, int mission)
Definition: mbs_xml_binder.c:2329
SHAPE_CONE
@ SHAPE_CONE
Definition: mbs_saver_struct.h:16
MbsInfoRefPoint::pointname
char * pointname
Name of the reference point on the previous body.
Definition: mbs_infos_struct.h:53
mbs_is_dir_or_file
int mbs_is_dir_or_file(const char *path)
Check if the path is valid and lead to a file or directory.
Definition: mbs_path.c:547
xmlGetLastError
static xmlErrorPtr xmlGetLastError(void)
Definition: mbs_xml.h:208
MbsInfoRod::endpoint1
MbsInfoRefPoint * endpoint1
Definition: mbs_infos_struct.h:223
MSG_PRE
#define MSG_PRE
Definition: mbs_xml_binder.c:19
MbsInfoCuts::solid_list
MbsInfoSolid ** solid_list
Definition: mbs_infos_struct.h:254
MbsInfoSolid::endpoint1
MbsInfoRefPoint * endpoint1
Definition: mbs_infos_struct.h:239
MbsInfos::bodytree
MbsInfoBodytree * bodytree
Definition: mbs_infos_struct.h:428
create_shape
xmlNodePtr create_shape(xmlNodePtr parent_node, const char *shape_name, char *shape_nature)
Definition: mbs_xml_binder.c:952
UpdateShape::scale
double * scale
Scale (x, y, z) of the shape, Set to NULL to not update it.
Definition: mbs_saver_struct.h:85
UpdateShape::position
double * position
Position (x, y, z) of the shape, Set to NULL to not update it.
Definition: mbs_saver_struct.h:83
mbs_info_solid_xml_binder
int mbs_info_solid_xml_binder(MbsInfoSolid *mbs_info_solid, xmlNodePtr node, int mission)
Definition: mbs_xml_binder.c:2194
mbs_info_init_and_binderXML
int mbs_info_init_and_binderXML(MbsInfos *mbs_infos, const char *mbs_xml_name, int mission)
Definition: mbs_xml_binder.c:3184
MbsLoadOptions::verbose
int verbose
Verbosity level (not yet implemented everywhere): Verbosity level propagated to other compatible modu...
Definition: mbs_load_struct.h:39
ExtForces_3D::color_resultant
int * color_resultant
Color of each arrow in RGB format.
Definition: mbs_saver_struct.h:116
mbs_info_update_inlines_xml
int mbs_info_update_inlines_xml(MbsLoader *mbs_loader, UpdateInline *up_in, int allow_new)
Update, or create this inline and all next inlines in the linked list.
Definition: mbs_xml_binder.c:3238
UpdateExtForces::force_3d
ExtForces_3D * force_3d
Definition: mbs_saver_struct.h:139
MbsInfoRod::length
double length
Definition: mbs_infos_struct.h:226
mbs_info_ref_point_xml_binder
int mbs_info_ref_point_xml_binder(MbsInfoRefPoint *mbs_info_ref_point, xmlNodePtr node, int mission)
Definition: mbs_xml_binder.c:1779
MbsInfoUserModels::user_model_list
MbsInfoUserModel ** user_model_list
Definition: mbs_infos_struct.h:359
ExtForces_3D::color_x
int * color_x
Definition: mbs_saver_struct.h:113
mbs_info_find_children_xml
xmlNodePtr mbs_info_find_children_xml(xmlNodePtr node, const char *name)
Return the children whose name matches.
Definition: mbs_xml_binder.c:457
mbs_new_info_user_model
MbsInfoUserModel * mbs_new_info_user_model(void)
Definition: mbs_loader_public.c:1154
SHAPE_CYLINDER
@ SHAPE_CYLINDER
Definition: mbs_saver_struct.h:15
MbsInfoCuts::ball_list
MbsInfoBall ** ball_list
Definition: mbs_infos_struct.h:252
mbs_new_info_cuts
MbsInfoCuts * mbs_new_info_cuts(void)
Definition: mbs_loader_public.c:956
MbsInfoBall
Definition: mbs_infos_struct.h:208
MbsInfoBody::joint_list
MbsInfoJoint ** joint_list
Array of pointers to the MDS_joint_strct describing each joint leaving the body.
Definition: mbs_infos_struct.h:166
MbsInfoSensor::parent_point
MbsInfoRefPoint * parent_point
parent point of the sensor (NULL if it is a parent joint)
Definition: mbs_infos_struct.h:63
MbsInfoExtforce::Rot
int Rot
1 if the computation of the sensor rotation matrix has been asked, 0 otherwise.
Definition: mbs_infos_struct.h:88
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:1071
mbs_new_info_user_models
MbsInfoUserModels * mbs_new_info_user_models(void)
Definition: mbs_loader_public.c:1188
mbs_path.h
xmlNewDocNode
static xmlNodePtr xmlNewDocNode(xmlDocPtr doc, xmlNsPtr ns, const xmlChar *name, const xmlChar *content)
Definition: mbs_xml.h:143
xmlAddPrevSibling
static xmlNodePtr xmlAddPrevSibling(xmlNodePtr cur, xmlNodePtr elem)
Definition: mbs_xml.h:181
get_basebody_node
xmlNodePtr get_basebody_node(xmlDocPtr doc)
Look for the base node in the document.
Definition: mbs_xml_binder.c:484
get_links_node
xmlNodePtr get_links_node(xmlDocPtr doc, int create)
Look for the node containing all the links.
Definition: mbs_xml_binder.c:1224
MbsInfoParameter::description
char * description
Description of the parameter in the user model.
Definition: mbs_infos_struct.h:283
MbsInfoBodytree::n_body
int n_body
Definition: mbs_infos_struct.h:179
get_int_xlm_node
int get_int_xlm_node(xmlNodePtr in_node)
GET functions ///////////////////////.
Definition: mbs_xml_binder.c:24
SHAPE_NONE
@ SHAPE_NONE
Definition: mbs_saver_struct.h:13
xmlUnlinkNode
static void xmlUnlinkNode(xmlNodePtr cur)
Definition: mbs_xml.h:233
MbsLoader::loaded_nature
int loaded_nature
Flag to specifying either if the deep mbs file specific structure must be kept in memory (before load...
Definition: mbs_load_struct.h:119
MbsInfoRod::endpoint2
MbsInfoRefPoint * endpoint2
Definition: mbs_infos_struct.h:224
MBS_INFO_SUCCESS
#define MBS_INFO_SUCCESS
Definition: mbs_define.h:30
UpdateShape::shape_name
char * shape_name
Name of the shape in the shape list.
Definition: mbs_saver_struct.h:65
MbsInfos::user_models
MbsInfoUserModels * user_models
Definition: mbs_infos_struct.h:431
MbsInfoJoint::q0
double q0
Initial position of the joint.
Definition: mbs_infos_struct.h:136
UpdateShape::next
struct UpdateShape * next
Pointer to next shape to be updated.
Definition: mbs_saver_struct.h:94
MBS_INFO_READER
#define MBS_INFO_READER
Definition: mbs_define.h:23
mbs_saver_struct.h
Declare saver structure and enumeration.
xmlAddChild
static xmlNodePtr xmlAddChild(xmlNodePtr parent, xmlNodePtr cur)
Definition: mbs_xml.h:153
mbs_info_joint_list_xml_binder
int mbs_info_joint_list_xml_binder(MbsInfoJoint **joint_list, xmlNodePtr node, int mission, int verbose)
Definition: mbs_xml_binder.c:1633
MbsInfoJoint::symb_qdd
int symb_qdd
Flag to generate symbol for acceleration.
Definition: mbs_infos_struct.h:148
mbs_info_update_shapes_xml
int mbs_info_update_shapes_xml(MbsLoader *mbs_loader, UpdateShape *up_in, int allow_new)
Update, or create this 3D shape and all next 3D shapes in the linked list.
Definition: mbs_xml_binder.c:3500
get_basebody_3Dshapes
xmlNodePtr get_basebody_3Dshapes(xmlDocPtr doc, int create)
Look for the node containing the 3D shape (x3D) of the base node.
Definition: mbs_xml_binder.c:618
MbsInfos::extforce_list
MbsInfoExtforce ** extforce_list
Pointer to a list of external force sensor
Definition: mbs_infos_struct.h:476
MbsInfoBase::base_body_name
char * base_body_name
baseBodyName as defined in the base body in mbs/json file
Definition: mbs_infos_struct.h:124
ExtForces_3D::show_z
int show_z
Definition: mbs_saver_struct.h:106
mbs_info_update_extforces_xml
int mbs_info_update_extforces_xml(MbsLoader *mbs_loader, UpdateExtForces *frc, int allow_new)
Update, or create this external force all next ExtFrc in the linked list.
Definition: mbs_xml_binder.c:3816
BAD_CAST
#define BAD_CAST
Definition: mbs_xml.h:96
UpdateInline::body_name
char * body_name
Name of the body with the shape, disregarded if on_base is true.
Definition: mbs_saver_struct.h:29
MbsInfoUserModel::name
char * name
Definition: mbs_infos_struct.h:349
mbs_info_extforce_xml_binder
int mbs_info_extforce_xml_binder(MbsInfoExtforce *mbs_info_extforce, xmlNodePtr node, int mission)
Definition: mbs_xml_binder.c:1376
MbsInfoExtforce::Jac
int Jac
1 if the computation of the sensor Jacobian ( ) has been asked, 0 otherwise.
Definition: mbs_infos_struct.h:94
MbsInfoBody::name
char * name
Name of the body.
Definition: mbs_infos_struct.h:160
get_body_point
xmlNodePtr get_body_point(xmlDocPtr doc, const char *body_name, const char *point_name, int allow_new)
Look for the specified point node on the specified body.
Definition: mbs_xml_binder.c:1187
MBS_INFO_COUNTER
#define MBS_INFO_COUNTER
Definition: mbs_define.h:26
MbsInfoParameter::flag_PRJPATH
int flag_PRJPATH
Flag to indicate that the path to the data file start from the project path (stored as "PRJPATH" in m...
Definition: mbs_infos_struct.h:339
MBS_INFO_WARNING
#define MBS_INFO_WARNING
Definition: mbs_define.h:31
mbs_info_ball_xml_binder
int mbs_info_ball_xml_binder(MbsInfoBall *mbs_info_ball, xmlNodePtr node, int mission)
Definition: mbs_xml_binder.c:2091
UpdateShape::body_name
char * body_name
Name of the body with the shape, disregarded if on_base is true.
Definition: mbs_saver_struct.h:63
MbsInfoSensor::Jdqd
int Jdqd
1 if the computation of the sensor jdqd term has been asked, 0 otherwise. Mutually exclusive with Acc...
Definition: mbs_infos_struct.h:72
MbsInfos::mbsname
char * mbsname
Name of the project in the multibody system file.
Definition: mbs_infos_struct.h:438
MbsInfos::padversion
char * padversion
Version number of the MBsysPAD that last modified the file.
Definition: mbs_infos_struct.h:440
mbs_info_point_list_xml_binder
int mbs_info_point_list_xml_binder(MbsInfoPoint **point_list, xmlNodePtr node, int mission, char *body_name)
Definition: mbs_xml_binder.c:1730
MbsInfos::n_extforce
int n_extforce
Number of external force in the model.
Definition: mbs_infos_struct.h:453
UpdateShape::size
double * size
Size, SHAPE_BOX only, along x, y, z. Set to NULL to not update it.
Definition: mbs_saver_struct.h:76
UpdateInline
Define modification to be done on a inline.
Definition: mbs_saver_struct.h:25
mbs_xmlAddNew_com
xmlNodePtr mbs_xmlAddNew_com(xmlNodePtr parent)
Definition: mbs_xml_binder.c:372
mbs_new_info_link
MbsInfoLink * mbs_new_info_link(void)
Definition: mbs_loader_public.c:1009
MbsInfoBody::point_parent
MbsInfoRefPoint * point_parent
Description of the parent point of the current body. (NULL if it is a parent joint)
Definition: mbs_infos_struct.h:162
MbsInfoUserIOs::n_in
int n_in
Number of INPUT user IO in the system.
Definition: mbs_infos_struct.h:390
xmlSaveFormatFile
static int xmlSaveFormatFile(const char *filename, xmlDocPtr cur, int format)
Definition: mbs_xml.h:100
mbs_info_update_inlines_xml
int mbs_info_update_inlines_xml(MbsLoader *mbs_loader, UpdateInline *up_in, int allow_creation)
Update, or create this inline and all next inlines in the linked list.
Definition: mbs_xml_binder.c:3238
mbs_xml.h
This file define/declare required function type to use XML in MBsysC.
mbs_new_info_rod
MbsInfoRod * mbs_new_info_rod(void)
Definition: mbs_loader_public.c:885
xmlAttrPtr
xmlAttr * xmlAttrPtr
Definition: mbs_xml.h:34
SHAPE_SPHERE
@ SHAPE_SPHERE
Definition: mbs_saver_struct.h:17
ExtForces_3D::diameter
double diameter
Diameter of the arrow, use 0 to not update the diameter.
Definition: mbs_saver_struct.h:119
mbs_info_point_xml_binder
int mbs_info_point_xml_binder(MbsInfoPoint *mbs_info_point, xmlNodePtr node, int mission)
Definition: mbs_xml_binder.c:1666
MbsInfoUserModels
Definition: mbs_infos_struct.h:356
xmlFreeNode
static void xmlFreeNode(xmlNodePtr cur)
Definition: mbs_xml.h:225
mbs_xml_info_to_loader
int mbs_xml_info_to_loader(MbsLoader *mbs_loader, const char *mbs_xml_name)
Load and store the specified xml file into both MbsInfo and xmlDocPtr format.
Definition: mbs_xml_binder.c:3046
MbsInfoSensor::Omp
int Omp
1 if the computation of the sensor angular acceleration has been asked, 0 otherwise.
Definition: mbs_infos_struct.h:73
XML_ELEMENT_NODE
@ XML_ELEMENT_NODE
Definition: mbs_xml.h:46
mbs_xmlNewDocNode_attr_rgb
xmlNodePtr mbs_xmlNewDocNode_attr_rgb(xmlDocPtr doc, xmlNsPtr ns, const xmlChar *name, const xmlChar *content, char *R, char *G, char *B)
Definition: mbs_xml_binder.c:390
mbs_info_user_model_xml_binder
int mbs_info_user_model_xml_binder(MbsInfoUserModel *mbs_info_user_model, xmlNodePtr node, int mission)
Definition: mbs_xml_binder.c:2622
MbsInfoJoint::symb_qd
int symb_qd
Flag to generate symbol for velocity.
Definition: mbs_infos_struct.h:147
get_body_3Dshapes
xmlNodePtr get_body_3Dshapes(xmlDocPtr doc, const char *body_name)
Look for the node containing the 3D shape (x3D) of the specified body.
Definition: mbs_xml_binder.c:884
mbs_errors_names.h
MbsInfoSensor::Vit
int Vit
1 if the computation of the sensor linear velocity has been asked, 0 otherwise.
Definition: mbs_infos_struct.h:69
MbsInfoExtforce
This structure contains all information about an external force sensor defined on the MBS structure.
Definition: mbs_infos_struct.h:81
UpdateInline::shape_url
char * shape_url
Path to the shape file.
Definition: mbs_saver_struct.h:34
mbs_xmlNewDocNode_inertia
xmlNodePtr mbs_xmlNewDocNode_inertia(xmlDocPtr doc, const xmlChar *name)
Definition: mbs_xml_binder.c:402
MbsInfoSensor::Jac
int Jac
1 if the computation of the sensor Jacobian ( ) has been asked, 0 otherwise.
Definition: mbs_infos_struct.h:74
MbsInfoBody::n_joint
int n_joint
Number of joints leaving the body.
Definition: mbs_infos_struct.h:165