|
Robotran C Documentation
|
Go to the documentation of this file.
7 #ifndef MBS_INFO_XML_BINDER_PRIVATE_h
8 #define MBS_INFO_XML_BINDER_PRIVATE_h
50 int mission,
int verbose);
67 const xmlChar *content,
double value);
147 int allow_new,
double coords_2d[2]);
226 int nature,
int allow_creation);
MbsLoadOptions * opts
Contains the options that must be used when loading the project.
Definition: mbs_load_struct.h:95
xmlNodePtr get_links_node(xmlDocPtr doc, int create)
Look for the node containing all the links.
Definition: mbs_xml_binder.c:1224
int n_rod
Definition: mbs_infos_struct.h:249
MbsInfoRefPoint * endpoint1
Definition: mbs_infos_struct.h:212
MbsInfoCuts * cuts
Definition: mbs_infos_struct.h:429
int * comp_rotation
Definition: mbs_saver_struct.h:137
int * color_y
Definition: mbs_saver_struct.h:114
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
#define MBS_INFO_UPDATER
Definition: mbs_define.h:24
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
char * name
Definition: mbs_infos_struct.h:83
MbsInfoBody * mbs_new_info_body(void)
Definition: mbs_loader_public.c:736
char * structure_name
Name of the structure, filled if the parameter is a structure.
Definition: mbs_infos_struct.h:332
int Vit
1 if the computation of the sensor linear velocity has been asked, 0 otherwise.
Definition: mbs_infos_struct.h:89
MbsInfoRefPoint * endpoint2
Definition: mbs_infos_struct.h:213
#define MBS_INFO_FAILURE
Definition: mbs_define.h:32
Definition: mbs_infos_struct.h:177
xmlNodePtr mbs_xmlNewDocNode_xyz(xmlDocPtr doc, xmlNsPtr ns, const xmlChar *name, const xmlChar *content, double value)
Definition: mbs_xml_binder.c:358
void mbs_msg(const char *msg,...)
Send a message.
Definition: mbs_message.c:87
double * scale
Scale (x, y, z) of the inline, Set to NULL to not update it.
Definition: mbs_saver_struct.h:40
int * color_z
Definition: mbs_saver_struct.h:115
int set_double_xlm_node(xmlNodePtr in_node, double value)
SET functions ///////////////////////.
Definition: mbs_xml_binder.c:168
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
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
int verbose
Verbosity level (not yet implemented everywhere):
Definition: mbs_infos_struct.h:485
void * loaded_structure
Pointer to the loaded mbs file specific structure (related to file format).
Definition: mbs_load_struct.h:122
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
char * name
Definition: mbs_infos_struct.h:221
char * get_char_cpy(const char *fmt,...)
Copy the provided formatted string into a newly allocated memory.
Definition: useful_functions.c:235
int mbs_info_mbs_linker(MbsInfos *mbs_info, int mission)
Definition: mbs_xml_binder.c:3102
double * value_list
Vector (index starting at 1) containing the values retrieved from the multibody file.
Definition: mbs_infos_struct.h:299
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
int mbs_info_joint_xml_binder(MbsInfoJoint *mbs_info_joint, xmlNodePtr node, int mission, int verbose)
Definition: mbs_xml_binder.c:1426
char * name
Name of the parameter in the user model.
Definition: mbs_infos_struct.h:282
int mbs_info_mbsDescR7_binder(MbsInfos *mbs_infos, xmlDocPtr doc, int mission)
Definition: mbs_xml_binder.c:2839
static xmlChar * xmlNodeListGetString(xmlDocPtr doc, const xmlNode *list, int inLine)
Definition: mbs_xml.h:109
int show_x
Definition: mbs_saver_struct.h:104
int n_out
Number of OUTPUT user IO in the system.
Definition: mbs_infos_struct.h:392
MbsInfoBodytree * mbs_new_info_bodytree(void)
Definition: mbs_loader_public.c:792
double * rotation
Rotation (around x, y, z) of the inline, Set to NULL to not update it.
Definition: mbs_saver_struct.h:42
unsigned char xmlChar
Definition: mbs_xml.h:39
int mbs_info_mbsDescR7_binder(MbsInfos *mbs_infos, xmlDocPtr doc, int mission)
Definition: mbs_xml_binder.c:2839
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
Structure defining the parent point of a body.
Definition: mbs_infos_struct.h:50
double qdd0
Initial acceleration of the joint.
Definition: mbs_infos_struct.h:138
char * first_body
Definition: mbs_saver_struct.h:154
int mbs_info_user_model_xml_binder(MbsInfoUserModel *mbs_info_user_model, xmlNodePtr node, int mission)
Definition: mbs_xml_binder.c:2622
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
int mbs_info_ref_point_xml_binder(MbsInfoRefPoint *mbs_info_ref_point, xmlNodePtr node, int mission)
Definition: mbs_xml_binder.c:1779
MbsInfoBase * base
Definition: mbs_infos_struct.h:427
int mbs_info_user_models_xml_binder(MbsInfoUserModels *mbs_info_user_models, xmlNodePtr node, int mission, int verbose)
Definition: mbs_xml_binder.c:2672
int mbs_info_sensor_xml_binder(MbsInfoSensor *mbs_info_sensor, xmlNodePtr node, int mission)
Definition: mbs_xml_binder.c:1322
double scale
Scale of the arrow, use 0 to not update the diameter.
Definition: mbs_saver_struct.h:120
int get_string_xml_attr(xmlAttrPtr in_node, char **dest)
Definition: mbs_xml_binder.c:130
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
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
int fill_all_joint_list(MbsInfos *mbs_infos)
Fill the joints list with children parent...
Definition: mbs_loader_public.c:1500
int on_base
True (1) if the shape is on the basebody.
Definition: mbs_saver_struct.h:61
static xmlAttrPtr xmlSetProp(xmlNodePtr node, const xmlChar *name, const xmlChar *value)
Definition: mbs_xml.h:162
int mbs_info_coordinates_xml_binder(double *coords, xmlNodePtr node, int mission)
Binders /////////////////////////////.
Definition: mbs_xml_binder.c:1272
@ IGNORE_LOADED
Definition: mbs_load_struct.h:91
MbsInfoSolid * mbs_new_info_solid(void)
Definition: mbs_loader_public.c:923
int string_xml_node(xmlNodePtr node, char **text, int mission)
Definition: mbs_xml_binder.c:277
@ KEEP_LOADED
Definition: mbs_load_struct.h:91
static void xmlFreeDoc(xmlDocPtr cur)
Definition: mbs_xml.h:217
void mbs_error_msg(int err, const char *msg,...)
Send an error message.
Definition: mbs_message.c:131
#define _MBS_ERR_LOW_FILES
Low Level error number Error during opening/writing files = -9.
Definition: mbs_errors_names.h:157
MbsInfoUserIO ** user_IO_list
The detail of each user IO in the system.
Definition: mbs_infos_struct.h:394
ExtForces_3D * torque_3d
Determine 3D force visualization parameters, set to null to not modify.
Definition: mbs_saver_struct.h:140
int mbs_info_cuts_xml_binder(MbsInfoCuts *mbs_info_cuts, xmlNodePtr node, int mission)
Definition: mbs_xml_binder.c:2252
This structure contains all informations about a joint.
Definition: mbs_infos_struct.h:130
Definition: mbs_infos_struct.h:246
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
xmlNodePtr new_char_xlm_node(xmlDocPtr doc, xmlNsPtr ns, const xmlChar *name, const xmlChar *content, const char *text)
Definition: mbs_xml_binder.c:349
static xmlDocPtr xmlParseFile(const char *filename)
Definition: mbs_xml.h:199
int Omp
1 if the computation of the sensor angular acceleration has been asked, 0 otherwise.
Definition: mbs_infos_struct.h:93
int mbs_info_rod_xml_binder(MbsInfoRod *mbs_info_rod, xmlNodePtr node, int mission)
Definition: mbs_xml_binder.c:2149
xmlNs * xmlNsPtr
Definition: mbs_xml.h:37
int Om
1 if the computation of the sensor angular velocity has been asked, 0 otherwise.
Definition: mbs_infos_struct.h:90
int show
Definition: mbs_saver_struct.h:103
int mbs_info_joint_xml_binder(MbsInfoJoint *mbs_info_joint, xmlNodePtr node, int mission, int verbose)
Definition: mbs_xml_binder.c:1426
int mbs_strcmp(const char *__s1, const char *__s2)
Compare two char with strcmp.
Definition: useful_functions.c:568
MbsInfoRefPoint * parent_point
parent point of the sensor (NULL if it is a parent joint)
Definition: mbs_infos_struct.h:84
MbsInfoDData ** d_value
d_data for the value.
Definition: mbs_infos_struct.h:321
double * gravity
Array with the component (x, y, z) of the gravity vector expressed in the inertial frame.
Definition: mbs_infos_struct.h:121
int n_ball
Definition: mbs_infos_struct.h:248
@ XML_LOADED
Definition: mbs_load_struct.h:91
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
double mass
Mass of the body.
Definition: mbs_infos_struct.h:168
static xmlChar * xmlEncodeEntitiesReentrant(xmlDocPtr doc, const xmlChar *input)
Definition: mbs_xml.h:126
xmlDocPtr mbs_xml_get_doc(const char *mbs_xml_name)
Load an xml file to memory.
Definition: mbs_xml_binder.c:2968
int cmp_string_xml_attr(xmlAttrPtr in_node, const char *string)
other functions /////////////////////
Definition: mbs_xml_binder.c:420
int visible
Flag to modify the visibility in the 3D view.
Definition: mbs_saver_struct.h:164
xmlNodePtr get_bodytree_node(xmlDocPtr doc)
Look for the bodytree node in the document.
Definition: mbs_xml_binder.c:521
xmlDoc * xmlDocPtr
Definition: mbs_xml.h:28
char * second_point
The second attachment point, body name and point name.
Definition: mbs_saver_struct.h:159
int mbs_info_body_xml_binder(MbsInfoBody *mbs_info_body, xmlNodePtr node, int mission, int verbose)
Definition: mbs_xml_binder.c:1853
MbsInfoParameter * mbs_new_info_parameter(void)
Definition: mbs_loader_public.c:1083
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
Definition: mbs_xml.h:47
MbsInfoSensor * mbs_new_info_sensor(void)
Definition: mbs_loader_public.c:535
void * mbs_xml_free_clean(xmlDocPtr doc)
Free the xml document and clean the xml library parser.
Definition: mbs_xml_binder.c:3036
int size
Number of values in the user IO.
Definition: mbs_infos_struct.h:375
int Acc
1 if the computation of the sensor linear acceleration has been asked, 0 otherwise....
Definition: mbs_infos_struct.h:71
void mbs_warning_msg(const char *msg,...)
Send a warning message.
Definition: mbs_message.c:100
int mbs_info_parameter_xml_binder(MbsInfoParameter *mbs_info_parameter, xmlNodePtr node, int mission)
Definition: mbs_xml_binder.c:2424
xmlDocPtr mbs_xml_get_doc(const char *mbs_xml_name)
Load an xml file to memory.
Definition: mbs_xml_binder.c:2968
Definition: mbs_infos_struct.h:425
struct UpdateExtForces * next
Pointer to next force to be updated.
Definition: mbs_saver_struct.h:142
int * comp_jacobian
Flag (0/1) determining informations to compute.
Definition: mbs_saver_struct.h:137
int on_base
True (1) if the shape is on the basebody.
Definition: mbs_saver_struct.h:129
int mbs_info_joint_list_xml_binder(MbsInfoJoint **joint_list, xmlNodePtr node, int mission, int verbose)
Definition: mbs_xml_binder.c:1633
int type
Nature of the user IO:
Definition: mbs_infos_struct.h:373
double * position
Position (x, y, z) of the inline, Set to NULL to not update it.
Definition: mbs_saver_struct.h:38
Define modifications to be done on external forces, or new to add.
Definition: mbs_saver_struct.h:127
int mbs_info_base_xml_binder(MbsInfoBase *mbs_info_base, xmlNodePtr node, int mission)
Definition: mbs_xml_binder.c:1801
char * name
Name of the point.
Definition: mbs_infos_struct.h:103
int * comp_acceleration
Definition: mbs_saver_struct.h:137
char * name
Definition: mbs_infos_struct.h:260
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
int mbs_info_user_IO_xml_binder(MbsInfoUserIO *mbs_info_user_IO, xmlNodePtr node, int mission)
Definition: mbs_xml_binder.c:2723
int compare_char_xml_node(xmlNodePtr in_node, const char *text)
COMPARE functions ///////////////////.
Definition: mbs_xml_binder.c:240
MbsInfoSensor * sensor
Pointer to a sensor structure if a sensor is defined on the point.
Definition: mbs_infos_struct.h:107
int mbs_info_ball_xml_binder(MbsInfoBall *mbs_info_ball, xmlNodePtr node, int mission)
Definition: mbs_xml_binder.c:2091
int mbs_info_extforce_xml_binder(MbsInfoExtforce *mbs_info_extforce, xmlNodePtr node, int mission)
Definition: mbs_xml_binder.c:1376
void * mbs_xml_free_clean(xmlDocPtr doc)
Free the xml document and clean the xml library parser.
Definition: mbs_xml_binder.c:3036
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
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
MbsInfoPoint ** base_point_list
Array of pointers to the MDS_point_strct describing each point of the MBS.
Definition: mbs_infos_struct.h:123
char * second_body
Definition: mbs_saver_struct.h:159
char * name
Name of the joint.
Definition: mbs_infos_struct.h:132
int mbs_info_rod_xml_binder(MbsInfoRod *mbs_info_rod, xmlNodePtr node, int mission)
Definition: mbs_xml_binder.c:2149
xmlNode * xmlNodePtr
Definition: mbs_xml.h:31
Definition: mbs_infos_struct.h:235
MbsInfoUserIO * mbs_new_info_user_IO(void)
Definition: mbs_loader_public.c:1221
MbsInfoJoint * mbs_new_info_joint(void)
Definition: mbs_loader_public.c:691
MbsInfoRod ** rod_list
Definition: mbs_infos_struct.h:253
Definition: mbs_infos_struct.h:347
static int xmlKeepBlanksDefault(int val)
Definition: mbs_xml.h:190
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
MbsInfoParameter ** parameter_list
Definition: mbs_infos_struct.h:352
MbsInfoPoint ** point_list
Array of pointers to the MDS_point_strct describing each point of current body.
Definition: mbs_infos_struct.h:173
struct UpdateInline * next
Pointer to next inline to be updated.
Definition: mbs_saver_struct.h:52
MbsInfoRefPoint * endpoint1
Definition: mbs_infos_struct.h:262
double * height
Height, except for SHAPE_BOX and SHAPE_SPHERE, of the shape.
Definition: mbs_saver_struct.h:80
int show_y
Definition: mbs_saver_struct.h:105
MbsInfoUserIOs * mbs_new_info_user_IOs(void)
Definition: mbs_loader_public.c:1241
MbsInfoBall * mbs_new_info_ball(void)
Definition: mbs_loader_public.c:853
xmlNodePtr get_bodytree_node(xmlDocPtr doc)
Look for the bodytree node in the document.
Definition: mbs_xml_binder.c:521
int mbs_info_bodytree_xml_binder(MbsInfoBodytree *mbs_info_bodytree, xmlNodePtr node, int mission, int verbose)
Definition: mbs_xml_binder.c:2035
char * shape_name
Name of the shape in the shape list.
Definition: mbs_saver_struct.h:31
int mbs_info_mbs_linker(MbsInfos *mbs_info, int mission)
Definition: mbs_xml_binder.c:3102
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
int mbs_info_init_and_binderXML(MbsInfos *mbs_infos, const char *mbs_xml_name, int mission)
Definition: mbs_xml_binder.c:3184
int actuated
For inverse dynamic only: 1 if actuated, 0 otherwise.
Definition: mbs_infos_struct.h:140
int mbs_info_cuts_xml_binder(MbsInfoCuts *mbs_info_cuts, xmlNodePtr node, int mission)
Definition: mbs_xml_binder.c:2252
int Pos
1 if the computation of the sensor position has been asked, 0 otherwise.
Definition: mbs_infos_struct.h:87
int * comp_velocity
Definition: mbs_saver_struct.h:137
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
xmlError * xmlErrorPtr
Definition: mbs_xml.h:42
char * name
Definition: mbs_infos_struct.h:210
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
MbsInfoSensor ** sensor_list
Pointer to a list of sensor.
Definition: mbs_infos_struct.h:474
int type
Type of the parameter between 1 and 7.
Definition: mbs_infos_struct.h:285
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
double qd0
Initial velocity of the joint.
Definition: mbs_infos_struct.h:137
char * description
Description of the user model.
Definition: mbs_infos_struct.h:350
int mbs_info_sensor_xml_binder(MbsInfoSensor *mbs_info_sensor, xmlNodePtr node, int mission)
Definition: mbs_xml_binder.c:1322
int mbs_info_coordinates_xml_binder(double *coordinates_pointer, xmlNodePtr node, int mission)
Binders /////////////////////////////.
Definition: mbs_xml_binder.c:1272
MbsInfoUserIOs * user_IOs
Definition: mbs_infos_struct.h:432
Description of a user model parameter loaded from the mbs file.
Definition: mbs_infos_struct.h:280
MbsInfoLinks * mbs_new_info_links(void)
Definition: mbs_loader_public.c:1039
int mbs_info_solid_xml_binder(MbsInfoSolid *mbs_info_solid, xmlNodePtr node, int mission)
Definition: mbs_xml_binder.c:2194
int Om
1 if the computation of the sensor angular velocity has been asked, 0 otherwise.
Definition: mbs_infos_struct.h:70
char * structure_header
Header name with path (relative or absolute) of header describing a structure parameter.
Definition: mbs_infos_struct.h:334
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
Definition: mbs_load_struct.h:93
void * val_ptr
Pointer to the memory storing the value.
Definition: mbs_infos_struct.h:305
#define MSG_ERR
Definition: mbs_xml_binder.c:18
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
int n_parameter
Definition: mbs_infos_struct.h:351
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
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
int Acc
1 if the computation of the sensor linear acceleration has been asked, 0 otherwise....
Definition: mbs_infos_struct.h:91
MbsInfoRefPoint * endpoint2
Definition: mbs_infos_struct.h:240
@ XML_COMMENT_NODE
Definition: mbs_xml.h:53
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
int type
Joint type: T1=1, T2=2, T3=3, R1=4, R2=5, R3=6.
Definition: mbs_infos_struct.h:133
MbsInfoExtforce * mbs_new_info_extforce(void)
Definition: mbs_loader_public.c:566
double * rotation
Rotation (around x, y, z) of the inline, Set to NULL to not update it.
Definition: mbs_saver_struct.h:87
MbsInfoDData * mbs_new_info_d_data(void)
Definition: mbs_loader_public.c:479
static void xmlFree(xmlChar *xml)
Definition: mbs_xml.h:118
int * ignore
Definition: mbs_infos_struct.h:242
Definition: mbs_infos_struct.h:385
char * name
Name of the external force, should be unique.
Definition: mbs_saver_struct.h:135
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
double get_double_xlm_node(xmlNodePtr in_node)
Convert the node content value into a double.
Definition: mbs_xml_binder.c:54
int inertia_xml_node(xmlNodePtr in_node, double in_array[6], int mission)
Definition: mbs_xml_binder.c:297
char * name
Name of the user IO.
Definition: mbs_infos_struct.h:369
int mbs_info_bodytree_xml_binder(MbsInfoBodytree *mbs_info_bodytree, xmlNodePtr node, int mission, int verbose)
Definition: mbs_xml_binder.c:2035
int * comp_position
Definition: mbs_saver_struct.h:137
int n_user_IO
Number of user IO in the system.
Definition: mbs_infos_struct.h:388
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
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
#define MBS_INFO_INIT
Definition: mbs_define.h:27
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
int set_char_xlm_node(xmlNodePtr in_node, const char *text)
Definition: mbs_xml_binder.c:181
MbsInfoLink ** link_list
Definition: mbs_infos_struct.h:270
char * name
Definition: mbs_infos_struct.h:237
#define XML_ERR_INVALID_CHAR
Definition: mbs_xml.h:97
Definition: mbs_infos_struct.h:267
ShapeIds shape_nature
Indicate if the shape is a box, cylinder, cone or sphere:
Definition: mbs_saver_struct.h:68
MbsInfoBase * mbs_new_info_base(void)
Definition: mbs_loader_public.c:656
int mbs_info_user_models_xml_binder(MbsInfoUserModels *mbs_info_user_models, xmlNodePtr node, int mission, int verbose)
Definition: mbs_xml_binder.c:2672
#define MBS_VERBOSE_ERROR
Definition: mbs_define.h:45
int get_string_xml_node(xmlNodePtr in_node, char **dest)
Definition: mbs_xml_binder.c:102
@ SHAPE_BOX
Definition: mbs_saver_struct.h:14
int double_xml_node(xmlNodePtr node, double *value, int mission)
Redirecting functions ///////////////.
Definition: mbs_xml_binder.c:259
int n_sensor
Number of sensor in the model.
Definition: mbs_infos_struct.h:448
MbsInfoBody ** body_list
Definition: mbs_infos_struct.h:180
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
int n_point
Number of point defined on the body.
Definition: mbs_infos_struct.h:172
double * radius
Radius, except for SHAPE_BOX, of the shape. Set to NULL to not update it.
Definition: mbs_saver_struct.h:78
int Pos
1 if the computation of the sensor position has been asked, 0 otherwise.
Definition: mbs_infos_struct.h:67
This structure contains all informations about a body.
Definition: mbs_infos_struct.h:158
int mbs_info_links_xml_binder(MbsInfoLinks *mbs_info_links, xmlNodePtr node, int mission)
Definition: mbs_xml_binder.c:2363
MbsInfoRefPoint * mbs_new_info_ref_point(void)
Definition: mbs_loader_public.c:504
int on_base
True (1) if the shape is on the basebody.
Definition: mbs_saver_struct.h:27
Definition: mbs_infos_struct.h:258
static xmlNodePtr xmlDocGetRootElement(const xmlDoc *doc)
Definition: mbs_xml.h:172
MbsInfoExtforce * extforce
Pointer to an external force sensor structure if it is defined on the point.
Definition: mbs_infos_struct.h:108
xmlNodePtr mbs_info_find_children_xml(xmlNodePtr node, const char *name)
Return the children whose name matches.
Definition: mbs_xml_binder.c:457
int mbs_info_parameter_xml_binder(MbsInfoParameter *mbs_info_parameter, xmlNodePtr node, int mission)
Definition: mbs_xml_binder.c:2424
MbsInfos * mbs_infos
Contains the multibody structure with more informations than used by computation.
Definition: mbs_load_struct.h:99
char * string_name
Pointer containing the string name (if type is 8). NULL otherwise.
Definition: mbs_infos_struct.h:303
MbsInfoLinks * links
Definition: mbs_infos_struct.h:430
xmlNodePtr get_basebody_node(xmlDocPtr doc)
Look for the base node in the document.
Definition: mbs_xml_binder.c:484
xmlNodePtr find_xmlNodePtr(xmlNodePtr node, char *name)
Definition: mbs_xml_binder.c:432
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
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
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
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
char * name
Name of the sensor.
Definition: mbs_infos_struct.h:62
int mbs_info_base_xml_binder(MbsInfoBase *mbs_info_base, xmlNodePtr node, int mission)
Definition: mbs_xml_binder.c:1801
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
int mbs_info_links_xml_binder(MbsInfoLinks *mbs_info_links, xmlNodePtr node, int mission)
Definition: mbs_xml_binder.c:2363
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
static void xmlNodeSetContent(xmlNodePtr cur, const xmlChar *content)
Definition: mbs_xml.h:135
int mbs_info_link_xml_binder(MbsInfoLink *mbs_info_link, xmlNodePtr node, int mission)
Definition: mbs_xml_binder.c:2329
int n_solid
Definition: mbs_infos_struct.h:250
Definition: mbs_infos_struct.h:366
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
char * joint_parent
parent joint of the current body (NULL if it is a parent point)
Definition: mbs_infos_struct.h:163
int get_int_xlm_attr(xmlAttrPtr in_node)
Definition: mbs_xml_binder.c:35
Definition: mbs_infos_struct.h:219
int n_value
Number of values in the parameter.
Definition: mbs_infos_struct.h:297
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
int n_user_model
Definition: mbs_infos_struct.h:358
int mbs_info_body_xml_binder(MbsInfoBody *mbs_info_body, xmlNodePtr node, int mission, int verbose)
Definition: mbs_xml_binder.c:1853
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
This structure contains all information about a sensor defined on the MBS structure.
Definition: mbs_infos_struct.h:60
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
int symb_q
Flag to generate symbol for position.
Definition: mbs_infos_struct.h:146
Definition: mbs_infos_struct.h:29
int position_at_end
Put the end of the arrow on the sensor (1) or the beginning (0).
Definition: mbs_saver_struct.h:110
char * structure_lutfile
File and path (relative or absolute) to the file containing the Look-up-Table dats.
Definition: mbs_infos_struct.h:341
Define modifications to be done on a basic shape.
Definition: mbs_saver_struct.h:59
#define XML_IO_LOAD_ERROR
Definition: mbs_xml.h:98
int mbs_info_point_xml_binder(MbsInfoPoint *mbs_info_point, xmlNodePtr node, int mission)
Definition: mbs_xml_binder.c:1666
char * first_point
The first attachment point, body name and point name.
Definition: mbs_saver_struct.h:154
int nature
Nature of the joint: independent=1, dependent=2, driven=3, locked=4.
Definition: mbs_infos_struct.h:134
char * point_name
Name of the point with the force.
Definition: mbs_saver_struct.h:133
int * ignore
Definition: mbs_infos_struct.h:215
Structure handling the informations defined on the base of the MBS.
Definition: mbs_infos_struct.h:119
int Rot
1 if the computation of the sensor rotation matrix has been asked, 0 otherwise.
Definition: mbs_infos_struct.h:68
#define MBS_INFO_CMP
Definition: mbs_define.h:28
MbsInfoPoint * mbs_new_info_point(void)
Definition: mbs_loader_public.c:595
int get_string_xml_node_2(char **string_ptr, xmlNodePtr in_node)
Definition: mbs_xml_binder.c:154
This structure handle everything that a point on a MBS structure can handle (sensor,...
Definition: mbs_infos_struct.h:101
char * body_name
Name of the body with the force, disregarded if on_base is true.
Definition: mbs_saver_struct.h:131
#define MBS_VERBOSE_WARNING
Definition: mbs_define.h:46
int mbs_info_link_xml_binder(MbsInfoLink *mbs_info_link, xmlNodePtr node, int mission)
Definition: mbs_xml_binder.c:2329
@ SHAPE_CONE
Definition: mbs_saver_struct.h:16
char * pointname
Name of the reference point on the previous body.
Definition: mbs_infos_struct.h:53
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
static xmlErrorPtr xmlGetLastError(void)
Definition: mbs_xml.h:208
MbsInfoRefPoint * endpoint1
Definition: mbs_infos_struct.h:223
#define MSG_PRE
Definition: mbs_xml_binder.c:19
MbsInfoSolid ** solid_list
Definition: mbs_infos_struct.h:254
MbsInfoRefPoint * endpoint1
Definition: mbs_infos_struct.h:239
MbsInfoBodytree * bodytree
Definition: mbs_infos_struct.h:428
xmlNodePtr create_shape(xmlNodePtr parent_node, const char *shape_name, char *shape_nature)
Definition: mbs_xml_binder.c:952
double * scale
Scale (x, y, z) of the shape, Set to NULL to not update it.
Definition: mbs_saver_struct.h:85
double * position
Position (x, y, z) of the shape, Set to NULL to not update it.
Definition: mbs_saver_struct.h:83
int mbs_info_solid_xml_binder(MbsInfoSolid *mbs_info_solid, xmlNodePtr node, int mission)
Definition: mbs_xml_binder.c:2194
int mbs_info_init_and_binderXML(MbsInfos *mbs_infos, const char *mbs_xml_name, int mission)
Definition: mbs_xml_binder.c:3184
int verbose
Verbosity level (not yet implemented everywhere): Verbosity level propagated to other compatible modu...
Definition: mbs_load_struct.h:39
char * name
Name of the linkforce, should be unique.
Definition: mbs_saver_struct.h:151
int * color_resultant
Color of each arrow in RGB format.
Definition: mbs_saver_struct.h:116
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
ExtForces_3D * force_3d
Definition: mbs_saver_struct.h:139
double length
Definition: mbs_infos_struct.h:226
int mbs_info_ref_point_xml_binder(MbsInfoRefPoint *mbs_info_ref_point, xmlNodePtr node, int mission)
Definition: mbs_xml_binder.c:1779
MbsInfoUserModel ** user_model_list
Definition: mbs_infos_struct.h:359
int * color_x
Definition: mbs_saver_struct.h:113
xmlNodePtr mbs_info_find_children_xml(xmlNodePtr node, const char *name)
Return the children whose name matches.
Definition: mbs_xml_binder.c:457
MbsInfoUserModel * mbs_new_info_user_model(void)
Definition: mbs_loader_public.c:1154
@ SHAPE_CYLINDER
Definition: mbs_saver_struct.h:15
MbsInfoBall ** ball_list
Definition: mbs_infos_struct.h:252
MbsInfoCuts * mbs_new_info_cuts(void)
Definition: mbs_loader_public.c:956
Definition: mbs_infos_struct.h:208
MbsInfoJoint ** joint_list
Array of pointers to the MDS_joint_strct describing each joint leaving the body.
Definition: mbs_infos_struct.h:166
MbsInfoRefPoint * parent_point
parent point of the sensor (NULL if it is a parent joint)
Definition: mbs_infos_struct.h:63
int Rot
1 if the computation of the sensor rotation matrix has been asked, 0 otherwise.
Definition: mbs_infos_struct.h:88
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
MbsInfoUserModels * mbs_new_info_user_models(void)
Definition: mbs_loader_public.c:1188
static xmlNodePtr xmlNewDocNode(xmlDocPtr doc, xmlNsPtr ns, const xmlChar *name, const xmlChar *content)
Definition: mbs_xml.h:143
static xmlNodePtr xmlAddPrevSibling(xmlNodePtr cur, xmlNodePtr elem)
Definition: mbs_xml.h:181
xmlNodePtr get_basebody_node(xmlDocPtr doc)
Look for the base node in the document.
Definition: mbs_xml_binder.c:484
xmlNodePtr get_links_node(xmlDocPtr doc, int create)
Look for the node containing all the links.
Definition: mbs_xml_binder.c:1224
char * description
Description of the parameter in the user model.
Definition: mbs_infos_struct.h:283
int n_body
Definition: mbs_infos_struct.h:179
int get_int_xlm_node(xmlNodePtr in_node)
GET functions ///////////////////////.
Definition: mbs_xml_binder.c:24
@ SHAPE_NONE
Definition: mbs_saver_struct.h:13
static void xmlUnlinkNode(xmlNodePtr cur)
Definition: mbs_xml.h:233
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
MbsInfoRefPoint * endpoint2
Definition: mbs_infos_struct.h:224
#define MBS_INFO_SUCCESS
Definition: mbs_define.h:30
char * shape_name
Name of the shape in the shape list.
Definition: mbs_saver_struct.h:65
MbsInfoUserModels * user_models
Definition: mbs_infos_struct.h:431
double q0
Initial position of the joint.
Definition: mbs_infos_struct.h:136
struct UpdateShape * next
Pointer to next shape to be updated.
Definition: mbs_saver_struct.h:94
#define MBS_INFO_READER
Definition: mbs_define.h:23
Declare saver structure and enumeration.
static xmlNodePtr xmlAddChild(xmlNodePtr parent, xmlNodePtr cur)
Definition: mbs_xml.h:153
int mbs_info_joint_list_xml_binder(MbsInfoJoint **joint_list, xmlNodePtr node, int mission, int verbose)
Definition: mbs_xml_binder.c:1633
int symb_qdd
Flag to generate symbol for acceleration.
Definition: mbs_infos_struct.h:148
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
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
MbsInfoExtforce ** extforce_list
Pointer to a list of external force sensor
Definition: mbs_infos_struct.h:476
char * base_body_name
baseBodyName as defined in the base body in mbs/json file
Definition: mbs_infos_struct.h:124
int show_z
Definition: mbs_saver_struct.h:106
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
#define BAD_CAST
Definition: mbs_xml.h:96
char * body_name
Name of the body with the shape, disregarded if on_base is true.
Definition: mbs_saver_struct.h:29
char * name
Definition: mbs_infos_struct.h:349
int mbs_info_extforce_xml_binder(MbsInfoExtforce *mbs_info_extforce, xmlNodePtr node, int mission)
Definition: mbs_xml_binder.c:1376
int Jac
1 if the computation of the sensor Jacobian ( ) has been asked, 0 otherwise.
Definition: mbs_infos_struct.h:94
MbsInfoLink ** link3D_list
Definition: mbs_infos_struct.h:273
char * name
Name of the body.
Definition: mbs_infos_struct.h:160
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
Define modifications to be done on link force (1D), or new to add.
Definition: mbs_saver_struct.h:149
#define MBS_INFO_COUNTER
Definition: mbs_define.h:26
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
#define MBS_INFO_WARNING
Definition: mbs_define.h:31
int mbs_info_ball_xml_binder(MbsInfoBall *mbs_info_ball, xmlNodePtr node, int mission)
Definition: mbs_xml_binder.c:2091
char * body_name
Name of the body with the shape, disregarded if on_base is true.
Definition: mbs_saver_struct.h:63
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
int n_link
Definition: mbs_infos_struct.h:269
char * mbsname
Name of the project in the multibody system file.
Definition: mbs_infos_struct.h:438
char * padversion
Version number of the MBsysPAD that last modified the file.
Definition: mbs_infos_struct.h:440
int mbs_info_point_list_xml_binder(MbsInfoPoint **point_list, xmlNodePtr node, int mission, char *body_name)
Definition: mbs_xml_binder.c:1730
int n_extforce
Number of external force in the model.
Definition: mbs_infos_struct.h:453
double * size
Size, SHAPE_BOX only, along x, y, z. Set to NULL to not update it.
Definition: mbs_saver_struct.h:76
Define modification to be done on a inline.
Definition: mbs_saver_struct.h:25
xmlNodePtr mbs_xmlAddNew_com(xmlNodePtr parent)
Definition: mbs_xml_binder.c:372
MbsInfoLink * mbs_new_info_link(void)
Definition: mbs_loader_public.c:1009
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
int n_in
Number of INPUT user IO in the system.
Definition: mbs_infos_struct.h:390
static int xmlSaveFormatFile(const char *filename, xmlDocPtr cur, int format)
Definition: mbs_xml.h:100
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
This file define/declare required function type to use XML in MBsysC.
MbsInfoRod * mbs_new_info_rod(void)
Definition: mbs_loader_public.c:885
xmlAttr * xmlAttrPtr
Definition: mbs_xml.h:34
@ SHAPE_SPHERE
Definition: mbs_saver_struct.h:17
double diameter
Diameter of the arrow, use 0 to not update the diameter.
Definition: mbs_saver_struct.h:119
int mbs_info_point_xml_binder(MbsInfoPoint *mbs_info_point, xmlNodePtr node, int mission)
Definition: mbs_xml_binder.c:1666
Definition: mbs_infos_struct.h:356
static void xmlFreeNode(xmlNodePtr cur)
Definition: mbs_xml.h:225
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
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
Definition: mbs_xml.h:46
int n_link3D
Definition: mbs_infos_struct.h:272
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
int mbs_info_user_model_xml_binder(MbsInfoUserModel *mbs_info_user_model, xmlNodePtr node, int mission)
Definition: mbs_xml_binder.c:2622
int symb_qd
Flag to generate symbol for velocity.
Definition: mbs_infos_struct.h:147
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
MbsInfoRefPoint * endpoint2
Definition: mbs_infos_struct.h:263
int Vit
1 if the computation of the sensor linear velocity has been asked, 0 otherwise.
Definition: mbs_infos_struct.h:69
This structure contains all information about an external force sensor defined on the MBS structure.
Definition: mbs_infos_struct.h:81
char * shape_url
Path to the shape file.
Definition: mbs_saver_struct.h:34
xmlNodePtr mbs_xmlNewDocNode_inertia(xmlDocPtr doc, const xmlChar *name)
Definition: mbs_xml_binder.c:402
int Jac
1 if the computation of the sensor Jacobian ( ) has been asked, 0 otherwise.
Definition: mbs_infos_struct.h:74
int n_joint
Number of joints leaving the body.
Definition: mbs_infos_struct.h:165