|
int | set_output_to_mbs (MbsData *mbs_data, int verbosity) |
| Set the address of this buffers in MbsData to expose memory + synchronize verbosity. More...
|
|
int | set_mbs_to_output (MbsData *mbs_data) |
| Set the value of this buffers from MbsData to use another module memory. More...
|
|
void | reset_flag_output () |
| reset the flag_output to 0. Useful when running several simulation in a row with different save2file settings. More...
|
|
void | init_set_output (int max_nb_curves) |
| initialize the static auto_output structure More...
|
|
int | define_output_vector (char *label, int size) |
| set needed information to handle the specified vector name in the auto_output structure. More...
|
|
void | free_set_output () |
| release memory of auto_output More...
|
|
int | set_output (double value, char *label) |
| function called by the user to output the time evolution of a value More...
|
|
int | set_output_vector (double *vector, char *label) |
| function called by the user to output the time evolution of a whole vector. More...
|
|
int | set_output_vector_from_id (double *vector, char *label, int output_id) |
| function called by the user to output the time evolution of a whole vector. It is very similar to set_output_vector, with the output_id (starting at zero) of the vector that is known This allow to run the set_output function faster. By calling this function with an unknown vector (i.e. output_id = -1, the function will search for the correct index by itself - slower) More...
|
|
int | set_output_partial_vector_from_id (double *vector, char *label, int output_id, int start, int number) |
| Set part of a vector into a buffer (from its id). More...
|
|
int | set_output_value (double value, int val_index, char *label) |
| function called by the user to output the time evolution of a value in a vector. More...
|
|
int | set_output_value_from_id (double value, int val_index, char *label, int output_id) |
|
double | get_output_value (int index) |
| get the output value corresponding to the requested index More...
|
|
char * | get_output_label (int index) |
| get the output label corresponding to the requested index More...
|
|
char * | get_output_vector_label (int index) |
| get the output vector label corresponding to the requested index More...
|
|
int | get_output_vector_size (int index) |
| get the output vector size corresponding to the requested index More...
|
|
int | get_output_nb () |
| get the number of user inputs More...
|
|
int | get_output_vector_nb () |
| get the number of user vector inputs More...
|
|
int | get_output_nb_new () |
| get the number of new user inputs More...
|
|
double * | get_output_vector_ptr (int index) |
| get the pointer to the output vector at the requested index More...
|
|
void | set_output_nb_new (int nb) |
| set the number of new user inputs More...
|
|
Define functions called by the user to output his own variables.
- Date
- 20/12/2023
- Author
- Robotran Team
int set_output_partial_vector_from_id |
( |
double * |
vector, |
|
|
char * |
label, |
|
|
int |
output_id, |
|
|
int |
start, |
|
|
int |
number |
|
) |
| |
Set part of a vector into a buffer (from its id).
The behavior is the same as set_output_vector_from_id() except that only the specified number of values are saved stating at the specified index. The starting index refer to the buffer indexing. The values are taken from the beginning of the provided array.
In the default MBsysC behavior, if the function fails, the current module will stop.
- Parameters
-
[in] | vector | Pointer to the vector with values to be send to buffer. |
[in] | label | Current output label, NULL can be provided (no coherence check). |
[in] | output_id | Index of the output vector, starting at zero (if not known, -1). |
[in] | start | Index in the buffer array to start to save the provided vector. The value must be strictly positive and fit in the buffer size. The first index is 0. |
[in] | number | Number of value to be saved from the vector to the buffer. If this number exceed the size of the vector , an undefined behavior occurs. If start + number exceed the buffer size, an error is raised. |
- Returns
- The status, negative in case of error.
int set_output_vector |
( |
double * |
vector, |
|
|
char * |
label |
|
) |
| |
function called by the user to output the time evolution of a whole vector.
In the default MBsysC behavior, if the function fails, the current module will stop.
If you redirected the mbs_error_msg() via mbs_set_error_msg_fct_ptr() to a function that does not stop the process you can set MbsData::flag_stop to 1 to prevent further computation. If you let it continue, the vector is not saved.
- Parameters
-
[in] | vector | pointer to the current outputs vector |
[in] | label | current output label |
- Returns
- The status, negative in case of error.
int set_output_vector_from_id |
( |
double * |
vector, |
|
|
char * |
label, |
|
|
int |
output_id |
|
) |
| |
function called by the user to output the time evolution of a whole vector. It is very similar to set_output_vector, with the output_id (starting at zero) of the vector that is known This allow to run the set_output function faster. By calling this function with an unknown vector (i.e. output_id = -1, the function will search for the correct index by itself - slower)
In the default MBsysC behavior, if the function fails, the current module will stop.
If you redirected the mbs_error_msg() via mbs_set_error_msg_fct_ptr() to a function that does not stop the process you can set MbsData::flag_stop to 1 to prevent further computation. If you let it continue, the vector is not saved.
- Parameters
-
[in] | vector | pointer to the current outputs vector |
[in] | label | current output label (NULL if not known) |
[in] | output_id | id of the output vector, starting at zero (if not known, -1) |
- Returns
- The status, negative in case of error.