Robotran C Documentation
mbs_json.h
Go to the documentation of this file.
1 
10 #ifndef MBS_JSON_h
11 #define MBS_JSON_h
12 
13 #include "json.h"
14 #include "mbs_data.h"
15 
25 
33 int count_json_elements(JsonNode* node);
34 
48 int mbs_json_double(JsonNode *node, double *val_ptr, char *key, int read_write,
49  int allow_missing);
50 
62 int mbs_json_get_double(JsonNode* node, double *val_ptr);
63 
75 int mbs_json_set_double(JsonNode *node, double value);
76 
91 int mbs_json_string(JsonNode *node, char **str_ptr, const char *key, int mission,
92  int allow_missing);
93 
107 int mbs_json_get_string(JsonNode *node, char **str_ptr);
108 
120 int mbs_json_set_string(JsonNode *node, const char *string);
121 
141 int mbs_json_array(JsonNode *node, double **tab_ptr, int *size, const char *key,
142  int mission, int allow_missing);
143 
159 JsonNode* mbs_json_add_array(JsonNode *root_node, double *array, int size,
160  const char *key, int *err);
161 
179 int mbs_json_tab(JsonNode *node, double ***tab_ptr, int size_1, int size_2, const char *key, int mission);
180 
194 int mbs_json_bool(JsonNode *node, int *val_ptr, char *key, int mission, int allow_missing);
195 
210 int mbs_json_get_bool(JsonNode* node, int *val_ptr);
211 
223 int mbs_json_set_bool(JsonNode *node, int value);
224 
238 int mbs_json_int(JsonNode *node, int *val_ptr, char *key, int read_write, int allow_missing);
239 
251 int mbs_json_get_int(JsonNode* node, int *val_ptr);
252 
264 int mbs_json_set_int(JsonNode *node, int value);
265 
287 JsonNode *mbs_json_save_mbs(MbsData *mbs_data, char *filename, int flag_q, int flag_qd,
288  int flag_qdd, int flag_mass, int *err);
289 
290 JsonNode* load_and_create_json(const char* mbs_json_filename, int* err);
291 #endif
MbsData::qrot
int * qrot
Array with the indices of the rotational articulations (incremental values)
Definition: mbs_data.h:281
json_stringify
char * json_stringify(const JsonNode *node, const char *space)
Definition: json.cc:428
re_copy_dvec_0
double * re_copy_dvec_0(double *src, int s_nx, double *dest, int d_nx)
Copy an array of double into another, reallocate the destination if required.
Definition: mbs_1D_array.c:1044
MBS_INFO_UPDATER
#define MBS_INFO_UPDATER
Definition: mbs_define.h:24
MBS_INFO_FAILURE
#define MBS_INFO_FAILURE
Definition: mbs_define.h:31
mbs_msg
void mbs_msg(const char *msg,...)
Send a message.
Definition: mbs_message.c:87
MbsData::xfidpt
int * xfidpt
Array of the points defined as force application points.
Definition: mbs_data.h:363
mbs_json_int
int mbs_json_int(JsonNode *node, int *val_ptr, char *key, int read_write, int allow_missing)
Link between integer value and the specific key of a Json node or the current node.
Definition: mbs_json.c:789
print_dvec_0
void print_dvec_0(double *vec, int l_v)
print a (x sized) vector of doubles in console, starting with index 0
Definition: mbs_1D_array.c:1093
mbs_json_array
int mbs_json_array(JsonNode *node, double **tab_ptr, int *size, const char *key, int mission, int allow_missing)
Link an array (1D) value and the specific key of a Json node or the current node.
Definition: mbs_json.c:412
mbs_json_tab
int mbs_json_tab(JsonNode *node, double ***tab_ptr, int size_1, int size_2, const char *key, int mission)
Link between array (2D) value and the specific key of a Json node or the current node.
Definition: mbs_json.c:566
get_char_cpy
char * get_char_cpy(const char *fmt,...)
Copy the provided formatted string into a newly allocated memory.
Definition: useful_functions.c:196
MbsData::Ncons
int Ncons
Number of algebraic constraints.
Definition: mbs_data.h:317
Functions::user
struct Functions::@5 user
MbsData::qd
double * qd
Array with the current values of the generalized velocities.
Definition: mbs_data.h:285
mbs_json_double
int mbs_json_double(JsonNode *node, double *val_ptr, char *key, int read_write, int allow_missing)
Link between double value and the specific key of a Json node or the current node.
Definition: mbs_json.c:138
json_decode
JsonNode * json_decode(const char *json)
Definition: json.cc:394
mbs_json_set_double
int mbs_json_set_double(JsonNode *node, double value)
Set a double into a node.
Definition: mbs_json.c:246
MbsData::qa
int * qa
Array with the indices of actuated articulations (only for inverse dynamic).
Definition: mbs_data.h:277
MbsData::dt0
double dt0
Initial value of the integration step size [s]. For dirdyn and invdyn only. This parameter is set fro...
Definition: mbs_data.h:309
count_json_array_elements
int count_json_array_elements(JsonNode *node)
Counts the number of element in the Json array.
Definition: mbs_json.c:14
MbsData::m
double * m
Array containing the mass of each body.
Definition: mbs_data.h:252
MbsData::DonePart
int DonePart
Flag that indicates if the coordinate partitioning module has been executed (default: 0=not done; 1=d...
Definition: mbs_data.h:392
MbsData::user_IO
UserIO * user_IO
Definition: mbs_data.h:378
useful_functions.h
MbsData::tsim
double tsim
The time value.
Definition: mbs_data.h:305
MbsData::nqrot
int nqrot
Number of rotational joint (R1, R2 or R3)
Definition: mbs_data.h:269
MbsData::Nlink3D
int Nlink3D
Number of 3D links.
Definition: mbs_data.h:337
JsonNode::children
struct JsonNode::@9::@11 children
MbsData::mbs_filename
char * mbs_filename
Path to mbs file including the file with the extension (.mbs)
Definition: mbs_data.h:409
load_and_create_json
JsonNode * load_and_create_json(const char *mbs_json_filename, int *err)
Definition: mbs_json.c:44
mbs_compute_sin_cos_q_all
void mbs_compute_sin_cos_q_all(MbsData *s)
Compute the sine and cosine of the q_sin and q_cos, for all the rotational joints.
Definition: mbs_trigo.c:94
MbsData::nqv
int nqv
Number of dependent articulations.
Definition: mbs_data.h:267
Functions::mbs_new_user_model
mbs_new_user_model_ptr mbs_new_user_model
Definition: mbs_data.h:124
MbsData::DoneEquil
int DoneEquil
Flag that indicates if the equilibrium module has been executed (default: 0=not done; 1=done).
Definition: mbs_data.h:393
mbs_data.h
MbsData::qc
int * qc
Array with the indices of driven (locked and driven) articulations.
Definition: mbs_data.h:272
MbsData::ux0
double * ux0
Array with the initial values of the user variables.
Definition: mbs_data.h:386
mbs_copy_data
void mbs_copy_data(MbsData *s, MbsData *s_copy)
Copy all fields between two MBSdata structures.
Definition: mbs_data.c:101
MbsData::nqu
int nqu
Number of independent articulations.
Definition: mbs_data.h:262
get_dvec_0
double * get_dvec_0(int l_v)
create (with memory allocation) a vector (length l_v) of doubles, starting at index 0
Definition: mbs_1D_array.c:955
_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
mbs_json_set_int
int mbs_json_set_int(JsonNode *node, int value)
Set an integer into a node.
Definition: mbs_json.c:902
JsonNode::bool_
bool bool_
Definition: json.h:53
mbs_json_set_bool
int mbs_json_set_bool(JsonNode *node, int value)
Set a bool (int) into a node.
Definition: mbs_json.c:749
MbsData::njoint
int njoint
Number of joints in the system.
Definition: mbs_data.h:259
mbs_json_get_string
int mbs_json_get_string(JsonNode *node, char **str_ptr)
Get the node value content a double.
Definition: mbs_json.c:329
MbsData::tf
double tf
Final time of the simulation [s]. For dirdyn and invdyn only. This parameter is set from dirdyn/invyn...
Definition: mbs_data.h:308
MbsData::npt
int npt
Number of anchor points.
Definition: mbs_data.h:249
mbs_define.h
mbs_json_tab
int mbs_json_tab(JsonNode *node, double ***tab_ptr, int size_1, int size_2, const char *key, int mission)
Link between array (2D) value and the specific key of a Json node or the current node.
Definition: mbs_json.c:566
json_foreach
#define json_foreach(i, object_or_array)
Definition: json.h:100
mbs_reset_joints_kine
void mbs_reset_joints_kine(MbsData *s)
Reset joints kinematics (q, qd, qdd) of a MbsData structure to initial values.
Definition: mbs_data.c:231
MbsData::n_ball
int n_ball
Number of ball constraint in the system.
Definition: mbs_data.h:313
print_dmat_0
void print_dmat_0(double **mat, int nb_r, int nb_c)
print a [nb_r times nb_c] matrix of doubles in console, starting with index 0
Definition: mbs_matrix.c:509
mbs_json_get_int
int mbs_json_get_int(JsonNode *node, int *val_ptr)
Get the node value content an integer.
Definition: mbs_json.c:847
Functions::mbs_save_um
mbs_save_um_ptr mbs_save_um
Definition: mbs_data.h:146
mbs_json_set_bool
int mbs_json_set_bool(JsonNode *node, int value)
Set a bool (int) into a node.
Definition: mbs_json.c:749
mbs_compare_data
int mbs_compare_data(MbsData *s1, MbsData *s2, int accelred)
Compare two MbsData.
Definition: mbs_data.c:540
JSON_OBJECT
@ JSON_OBJECT
Definition: json.h:36
mbs_matrix.h
mbs_warning_msg
void mbs_warning_msg(const char *msg,...)
Send a warning message.
Definition: mbs_message.c:100
mbs_json_get_int
int mbs_json_get_int(JsonNode *node, int *val_ptr)
Get the node value content an integer.
Definition: mbs_json.c:847
MbsData::Nux
int Nux
Number of user variable.
Definition: mbs_data.h:387
copy_dvec_1
void copy_dvec_1(double *vec_src, double *vec_dest)
Copy the content of a vector (of size specified in vec_src[0]) of doubles to a second vector,...
Definition: mbs_1D_array.c:991
MbsData::flag_jac_position
int flag_jac_position
Flag to compute the Jacobian of the constraint for position or velocity solution.
Definition: mbs_data.h:398
MbsData::jac_user
double ** jac_user
Jacobian of constraints [nqv x njoint] (starting at 1), only used in symbolic accelred,...
Definition: mbs_data.h:328
MbsData::zero_division_thrs
double zero_division_thrs
Value from which a warning is raised if a division by zero (or close to) occurs. Default=1....
Definition: mbs_data.h:407
MbsData::DoneModal
int DoneModal
Flag that indicates if the modal module has been executed (default: 0=not done; 1=done).
Definition: mbs_data.h:394
JsonNode::next
JsonNode * next
Definition: json.h:45
code_dmat_1
int code_dmat_1(FILE *file_out, double **values, const char *name, int n_row, int n_col)
Write C-code to allocate and fill an array of arrays of doubles.
Definition: mbs_matrix.c:772
mbs_1D_array.h
MbsData::flag_optim_symb_sin_cos
int flag_optim_symb_sin_cos
allow the "optimisation" of the computation of the sine/cosine in the symbolic files....
Definition: mbs_data.h:295
mbs_json_set_int
int mbs_json_set_int(JsonNode *node, int value)
Set an integer into a node.
Definition: mbs_json.c:902
MbsData::SWr
double ** SWr
Array of Swr vector for each external forces.
Definition: mbs_data.h:364
MbsData::q_cos
double * q_cos
Array with the cosine values of the generalized coordinates, if rotational (if translational,...
Definition: mbs_data.h:294
MbsData::hu
int * hu
Array with the indices of independent constraints.
Definition: mbs_data.h:280
mbs_json_add_array
JsonNode * mbs_json_add_array(JsonNode *root_node, double *array, int size, const char *key, int *err)
Add or replace the array in the specified children of the root node.
Definition: mbs_json.c:500
MbsData::Nxfrc
int Nxfrc
Number of points where an external force is applied into a body.
Definition: mbs_data.h:362
_MBS_ERR_MOD_SPEC_19
#define _MBS_ERR_MOD_SPEC_19
Generic error number Module specific errors range from -11 to -19 please read the error message a...
Definition: mbs_errors_names.h:220
json_append_element
void json_append_element(JsonNode *array, JsonNode *element)
Definition: json.cc:632
MbsData::qd0
double * qd0
Array with the initial values of the generalized velocities.
Definition: mbs_data.h:289
same_ivec_0
int same_ivec_0(int *v1, int *v2, int size)
Compare if two vector are the same.
Definition: mbs_1D_array.c:922
mbs_reset_data
void mbs_reset_data(MbsData *s)
Reset all fields of a MbsData structure to initial values.
Definition: mbs_data.c:242
mbs_json_save_mbs
JsonNode * mbs_json_save_mbs(MbsData *mbs_data, char *filename, int flag_q, int flag_qd, int flag_qdd, int flag_mass, int *err)
Save the speficied status of the mbs in a json configuration node and file.
Definition: mbs_json.c:942
json_validate
bool json_validate(const char *json)
Definition: json.cc:471
mbs_json_bool
int mbs_json_bool(JsonNode *node, int *val_ptr, char *key, int mission, int allow_missing)
Link between bool value (int) and the specific key of a Json node or the current node.
Definition: mbs_json.c:644
Functions::mbs_print_user_IO
mbs_print_user_IO_ptr mbs_print_user_IO
Print the current UserIO values.
Definition: mbs_data.h:152
MbsData::Nlink
int Nlink
Number of forces acting between two points of the system (force law implemented in user_LinkForces())...
Definition: mbs_data.h:336
json_mkobject
JsonNode * json_mkobject(void)
Definition: json.cc:587
mbs_json_get_bool
int mbs_json_get_bool(JsonNode *node, int *val_ptr)
Get the node value content a bool as int.
Definition: mbs_json.c:697
mbs_json_get_string
int mbs_json_get_string(JsonNode *node, char **str_ptr)
Get the node value content a double.
Definition: mbs_json.c:329
MbsData::flag_safety_checks
int flag_safety_checks
Flag to activate safety checks everywhere in mbsysc core. Faster computation if this flag is put to 0...
Definition: mbs_data.h:406
mbs_json_string
int mbs_json_string(JsonNode *node, char **str_ptr, const char *key, int mission, int allow_missing)
Link between string value and the specific key of a Json node.
Definition: mbs_json.c:284
code_dvec_1
int code_dvec_1(FILE *file_out, double *values, const char *name, int size)
Write C-code to allocate and fill an array of double.
Definition: mbs_1D_array.c:1190
MbsData::MAX_NR_ITER
int MAX_NR_ITER
Maximal number of iterations for NR procedure, default 100.
Definition: mbs_data.h:320
MbsData::Nuserc
int Nuserc
Number of user constraints.
Definition: mbs_data.h:318
MbsData::Fl
double * Fl
Array with the current values of the forces on each link (see: user_LinkForces()).
Definition: mbs_data.h:340
MbsData::qu
int * qu
Array with the indices of the independent articulations (free)
Definition: mbs_data.h:271
JsonNode
Definition: json.h:41
JSON_NUMBER
@ JSON_NUMBER
Definition: json.h:34
MbsData::NRerr
double NRerr
Maximal error on constraint allowed in Newton-Raphson algorithm, default 1.0e-9.
Definition: mbs_data.h:319
MbsData::trq
double ** trq
Matrix with the components of the resultant external torques (pure torque and couple produced by forc...
Definition: mbs_data.h:300
print_dvec_1
void print_dvec_1(double *vec)
print a vector (of size specified in vec[0]) of doubles in console, starting with index 1
Definition: mbs_1D_array.c:1250
MbsData::qv
int * qv
Array with the indices of the dependent articulations .
Definition: mbs_data.h:279
MbsData::Qc
double * Qc
Array with the value of joint force introduced in driven joint to respect the user function.
Definition: mbs_data.h:332
MbsData::Nloopc
int Nloopc
Number of loop constraints.
Definition: mbs_data.h:316
mbs_json_add_array
JsonNode * mbs_json_add_array(JsonNode *root_node, double *array, int size, const char *key, int *err)
Add or replace the array in the specified children of the root node.
Definition: mbs_json.c:500
JsonNode::key
char * key
Definition: json.h:48
MbsData::Zd
double * Zd
Array with the current values of the speed (spreading) between of the points of a link (see: user_Lin...
Definition: mbs_data.h:339
code_ivec_1
int code_ivec_1(FILE *file_out, int *values, const char *name, int size)
Write C-code to allocate and fill an array of integers.
Definition: mbs_1D_array.c:656
MbsData::Qq
double * Qq
Array with the values of the joint forces.
Definition: mbs_data.h:301
count_json_elements
int count_json_elements(JsonNode *node)
Counts the number of element in the json node.
Definition: mbs_json.c:28
MbsData::q
double * q
Array with the current values of the generalized coordinates.
Definition: mbs_data.h:284
mbs_json_bool
int mbs_json_bool(JsonNode *node, int *val_ptr, char *key, int mission, int allow_missing)
Link between bool value (int) and the specific key of a Json node or the current node.
Definition: mbs_json.c:644
MbsData::In
double ** In
Array containing the inertia tensor component of each body (in the body fixed frame,...
Definition: mbs_data.h:253
MbsData::Nsensor
int Nsensor
< Array of l3DWr vector for each 3D link forces.
Definition: mbs_data.h:359
MbsData::project_path
char * project_path
Path to the mbs project folder.
Definition: mbs_data.h:411
mbs_json_set_string
int mbs_json_set_string(JsonNode *node, const char *string)
Set a double into a node.
Definition: mbs_json.c:376
json_find_element
JsonNode * json_find_element(JsonNode *array, int index)
Definition: json.cc:490
MbsData::nqdriven
int nqdriven
Number of driven articulations.
Definition: mbs_data.h:265
mbs_trigo.h
This header defines the functions for trigonometric handling in MBsysC integrator in C.
MbsData::fct
Functions fct
Structure to store the pointer to the project-specific functions.
Definition: mbs_data.h:414
mbs_json_int
int mbs_json_int(JsonNode *node, int *val_ptr, char *key, int mission, int allow_missing)
Link between integer value and the specific key of a Json node or the current node.
Definition: mbs_json.c:789
JSON_STRING
@ JSON_STRING
Definition: json.h:33
MbsData::frc
double ** frc
Matrix with the components of the resultant external forces (in the body fixed frame) applied to the ...
Definition: mbs_data.h:299
MbsData::nqc
int nqc
Number of driven articulations, it includes qlocked and qdriven.
Definition: mbs_data.h:263
MbsData::l3DWr
double ** l3DWr
Definition: mbs_data.h:342
json_mknumber
JsonNode * json_mknumber(double n)
Definition: json.cc:575
MbsData::user_model
UserModel * user_model
Structure containing all user model, this structure is specific for each project.
Definition: mbs_data.h:375
mbs_message.h
re_copy_ivec_0
int * re_copy_ivec_0(int *src, int s_nx, int *dest, int d_nx)
Copy an array of int into another, reallocate the destination if required.
Definition: mbs_1D_array.c:520
same_dvec_0
int same_dvec_0(double *v1, double *v2, int size)
Compare if two vector of floats are the same.
Definition: mbs_1D_array.c:1413
Functions::mbs_print_user_model
mbs_print_user_model_ptr mbs_print_user_model
Definition: mbs_data.h:143
MbsData::dpt
double ** dpt
Array containing the coordinate of all anchor points (3+1 lines, npt+1 columns).
Definition: mbs_data.h:250
mbs_json_string
int mbs_json_string(JsonNode *node, char **str_ptr, const char *key, int mission, int allow_missing)
Link between string value and the specific key of a Json node.
Definition: mbs_json.c:284
MbsData::mbs_name
char * mbs_name
Name of the mbs project as it is stored in the xml file.
Definition: mbs_data.h:412
json_append_member
void json_append_member(JsonNode *object, const char *key, JsonNode *value)
Definition: json.cc:648
MbsData::q0
double * q0
Array with the initial values of the generalized coordinates.
Definition: mbs_data.h:288
mbs_print_data
void mbs_print_data(MbsData *s)
Definition: mbs_data.c:14
_MBS_ERR_MOD_SPEC_18
#define _MBS_ERR_MOD_SPEC_18
Genericerror number Module specific errors range from -11 to -19 please read the error message an...
Definition: mbs_errors_names.h:214
MbsData
Definition: mbs_data.h:246
MbsData::n_solid
int n_solid
Number of solid constraint in the system.
Definition: mbs_data.h:312
MbsData::n_rod
int n_rod
Number of rod constraint in the system.
Definition: mbs_data.h:314
MbsData::qlocked
int * qlocked
Array with the indices of locked articulations.
Definition: mbs_data.h:273
MbsData::Qa
double * Qa
Array of active joint forces (in case of simulink,invdyna,equil,linearization,...)
Definition: mbs_data.h:302
re_copy_dmat_0
double ** re_copy_dmat_0(double **src, int s_nx, int s_ny, double **dest, int d_nx, int d_ny)
Copy a 2D array of double into another, reallocate the destination if required.
Definition: mbs_matrix.c:428
JsonNode::tag
JsonTag tag
Definition: json.h:50
MbsData::Nuser_model
int Nuser_model
Number of declared user models in MBsysPad.
Definition: mbs_data.h:374
MbsData::build_path
char * build_path
Path to the build folder.
Definition: mbs_data.h:410
zeros_dvec_1
void zeros_dvec_1(double *vec)
set all the element of a vector of doubles to zero, starting with index 1
Definition: mbs_1D_array.c:1393
mbs_json_get_double
int mbs_json_get_double(JsonNode *node, double *val_ptr)
Get the node value content a double.
Definition: mbs_json.c:194
MbsData::process
int process
Flag that indicate which module is currently running (1=partitioning, 2=equilibrium,...
Definition: mbs_data.h:396
MbsData::nbody
int nbody
Number of bodies in the system.
Definition: mbs_data.h:257
MbsData::l
double ** l
Array containing the center of mass coordinates (in the body fixed frame, one column per body includi...
Definition: mbs_data.h:251
mbs_write_data
int mbs_write_data(MbsData *s, char *filename, char *function_name)
Write a source with a function allocating and setting a MbsData copy of the provided.
Definition: mbs_data.c:260
MbsData::t0
double t0
Initial time of the simulation [s]. For dirdyn and invdyn only. This parameter is set from dirdyn/inv...
Definition: mbs_data.h:307
JSON_NULL
@ JSON_NULL
Definition: json.h:31
mbs_json_save_mbs
JsonNode * mbs_json_save_mbs(MbsData *mbs_data, char *filename, int flag_q, int flag_qd, int flag_qdd, int flag_mass, int *err)
Save the speficied status of the mbs in a json configuration node and file.
Definition: mbs_json.c:942
json.h
mbs_basename
char * mbs_basename(const char *path, int verbose)
mbs_basename returns the trailing part of the path (UNIX and MAC).
Definition: mbs_path.c:359
mbs_json_set_string
int mbs_json_set_string(JsonNode *node, const char *string)
Set a double into a node.
Definition: mbs_json.c:376
json_delete
void json_delete(JsonNode *node)
Definition: json.cc:445
MbsData::Z
double * Z
Array with the current values of the distances between of the points of a link (see: user_LinkForces(...
Definition: mbs_data.h:338
MbsData::g
double g[3+1]
The 3 gravity components.
Definition: mbs_data.h:255
MbsData::flag_stop
int flag_stop
stop the simulation. For dirdyn, equil, invdyn and solvekin only.
Definition: mbs_data.h:397
mbs_json_double
int mbs_json_double(JsonNode *node, double *val_ptr, char *key, int mission, int allow_missing)
Link between double value and the specific key of a Json node or the current node.
Definition: mbs_json.c:138
mbs_path.h
mbs_json_get_bool
int mbs_json_get_bool(JsonNode *node, int *val_ptr)
Get the node value content a bool as int.
Definition: mbs_json.c:697
copy_dvec_0
void copy_dvec_0(double *vec_src, double *vec_dest, int l_v)
Copy the content of a vector (of sizel_v) of doubles to a second vector, starting with index 0.
Definition: mbs_1D_array.c:981
MBS_INFO_SUCCESS
#define MBS_INFO_SUCCESS
Definition: mbs_define.h:29
MbsData::qdriven
int * qdriven
Array with the indices of driven articulations.
Definition: mbs_data.h:275
MbsData::lambda
double * lambda
Array with the values of the Lagrange Multipliers related to the constraints.
Definition: mbs_data.h:321
MBS_INFO_READER
#define MBS_INFO_READER
Definition: mbs_define.h:23
MbsData::uxd
double * uxd
Array with the values of the time derivatives of the user variables.
Definition: mbs_data.h:385
JsonNode::string_
char * string_
Definition: json.h:56
MbsData::q_sin
double * q_sin
Array with the sine values of the generalized coordinates, if rotational (if translational,...
Definition: mbs_data.h:293
MbsData::qdd0
double * qdd0
Array with the initial values of the generalized acceleration.
Definition: mbs_data.h:290
JSON_ARRAY
@ JSON_ARRAY
Definition: json.h:35
JsonNode::parent
JsonNode * parent
Definition: json.h:44
MbsData::nqa
int nqa
Number of actuated articulations.
Definition: mbs_data.h:266
mbs_json_get_double
int mbs_json_get_double(JsonNode *node, double *val_ptr)
Get the node value content a double.
Definition: mbs_json.c:194
same_dmat_0
int same_dmat_0(double **a, double **b, int x, int y)
Compare if two 2D arrays of floats are the same.
Definition: mbs_matrix.c:1148
JSON_BOOL
@ JSON_BOOL
Definition: json.h:32
MbsData::nqlocked
int nqlocked
Number of locked articulations.
Definition: mbs_data.h:264
Functions::mbs_save_user_IO
mbs_save_user_IO_ptr mbs_save_user_IO
Save the current UserIO values into a file stream.
Definition: mbs_data.h:159
MbsData::qdd
double * qdd
Array with the current values of the generalized acceleration.
Definition: mbs_data.h:286
MBS_INFO_WARNING
#define MBS_INFO_WARNING
Definition: mbs_define.h:30
MbsData::jdqd_user
double * jdqd_user
Vector of jdqd for user constraints [nqv] (starting at 1), only used in symbolic accelred,...
Definition: mbs_data.h:329
JsonNode::number_
double number_
Definition: json.h:59
print_ivec_0
void print_ivec_0(int *vec, int l_v)
print a (l_v sized) vector of integers in console, starting with index 0
Definition: mbs_1D_array.c:569
count_json_elements
int count_json_elements(JsonNode *node)
Counts the number of element in the json node.
Definition: mbs_json.c:28
mbs_json_array
int mbs_json_array(JsonNode *node, double **tab_ptr, int *size, const char *key, int mission, int allow_missing)
Link an array (1D) value and the specific key of a Json node or the current node.
Definition: mbs_json.c:412
MbsData::udd
double * udd
For axelle red: array with the values of the acceleration of independent coordinate.
Definition: mbs_data.h:390
MbsData::ux
double * ux
Array with the values of the user variables.
Definition: mbs_data.h:384
mbs_json_set_double
int mbs_json_set_double(JsonNode *node, double value)
Set a double into a node.
Definition: mbs_json.c:246
count_json_array_elements
int count_json_array_elements(JsonNode *node)
Counts the number of element in the Json array.
Definition: mbs_json.c:14
mbs_stricmp
int mbs_stricmp(const char *__s1, const char *__s2)
Compare two char with _stricmp (convert strings to lower case, ignoring case sensitive).
Definition: useful_functions.c:404
mbs_json.h
MbsData::nhu
int nhu
Number of independent constraints.
Definition: mbs_data.h:268
MbsData::lrod
double * lrod
Array with the length of each rod.
Definition: mbs_data.h:315
MBS_VERBOSE_ALL
#define MBS_VERBOSE_ALL
Definition: mbs_define.h:46
json_mkarray
JsonNode * json_mkarray(void)
Definition: json.cc:582
MbsData::n_user_IO
int n_user_IO
Definition: mbs_data.h:377
mbs_errors_names.h
json_check
bool json_check(const JsonNode *node, char errmsg[256])
Definition: json.cc:1481
load_and_create_json
JsonNode * load_and_create_json(const char *mbs_json_filename, int *err)
Definition: mbs_json.c:44
json_find_member
JsonNode * json_find_member(JsonNode *object, const char *name)
Definition: json.cc:511