functions used to automatically update the user output values More...
Go to the source code of this file.
Classes | |
struct | AutoOutput |
User output auto-update. More... | |
Functions | |
AutoOutput * | init_auto_output (int max_nb) |
initialize the AutoOutput structure More... | |
void | free_auto_output (AutoOutput *auto_output) |
release memory for AutoOutput More... | |
int | define_auto_output_vector (AutoOutput *auto_output, char *label, int size) |
set memory for a vector in AutoOutput More... | |
int | update_auto_output (AutoOutput *auto_output, double value, char *label) |
update auto_output when a 'set_output' is encountered More... | |
int | update_auto_output_vector (AutoOutput *auto_output, double *vector, char *label, int output_id) |
update auto_output when a 'set_output_vector' is encountered More... | |
int | update_auto_output_value (AutoOutput *auto_output, double value, int val_index, char *label, int output_id) |
update auto_output when a 'set_output_value' is encountered It can take the label and/or the output_id as input. If the two are present, a check is done to assess these are coherent More... | |
int | index_output_string (AutoOutput *auto_output, char *label) |
get index for a output with its label More... | |
int | index_output_vector_string (AutoOutput *auto_output, char *label) |
get index for a output vector with its label More... | |
double | get_output_value_auto (AutoOutput *auto_output, int index) |
get the output value corresponding to the requested index More... | |
double * | get_output_vector_ptr_auto (AutoOutput *auto_output, int index) |
get the pointer to the output vector at the requested index More... | |
char * | get_output_label_auto (AutoOutput *auto_output, int index) |
get the output label corresponding to the requested index More... | |
char * | get_output_vector_label_auto (AutoOutput *auto_output, int index) |
get the output vector label corresponding to the requested index More... | |
int | get_output_vector_size_auto (AutoOutput *auto_output, int index) |
get the output vector size corresponding to the requested index More... | |
functions used to automatically update the user output values
int define_auto_output_vector | ( | AutoOutput * | auto_output, |
char * | label, | ||
int | size | ||
) |
set memory for a vector in AutoOutput
[out] | auto_output | AutoOutput structure to update |
[in] | size | number of element in the vector to output |
[in] | label | output vector label |
void free_auto_output | ( | AutoOutput * | auto_output | ) |
release memory for AutoOutput
[out] | auto_output | AutoOutput structure to free |
char* get_output_label_auto | ( | AutoOutput * | auto_output, |
int | index | ||
) |
get the output label corresponding to the requested index
[in] | auto_output | AutoOutput structure |
[in] | index | requested index |
double get_output_value_auto | ( | AutoOutput * | auto_output, |
int | index | ||
) |
get the output value corresponding to the requested index
[in] | auto_output | AutoOutput structure |
[in] | index | requested index |
char* get_output_vector_label_auto | ( | AutoOutput * | auto_output, |
int | index | ||
) |
get the output vector label corresponding to the requested index
[in] | auto_output | AutoOutput structure |
[in] | index | requested index |
double* get_output_vector_ptr_auto | ( | AutoOutput * | auto_output, |
int | index | ||
) |
get the pointer to the output vector at the requested index
[in] | auto_output | AutoOutput structure |
[in] | index | requested index |
int get_output_vector_size_auto | ( | AutoOutput * | auto_output, |
int | index | ||
) |
get the output vector size corresponding to the requested index
[in] | auto_output | AutoOutput structure |
[in] | index | requested index |
int index_output_string | ( | AutoOutput * | auto_output, |
char * | label | ||
) |
get index for a output with its label
[in] | auto_output | AutoOutput structure |
[in] | label | label of the output |
int index_output_vector_string | ( | AutoOutput * | auto_output, |
char * | label | ||
) |
get index for a output vector with its label
[in] | auto_output | AutoOutput structure |
[in] | label | label of the output vector |
AutoOutput* init_auto_output | ( | int | max_nb | ) |
initialize the AutoOutput structure
[in] | max_nb | maximum number of user outputs |
int update_auto_output | ( | AutoOutput * | auto_output, |
double | value, | ||
char * | label | ||
) |
update auto_output when a 'set_output' is encountered
[out] | auto_output | AutoOutput structure |
[in] | value | current output value |
[in] | label | current output label |
int update_auto_output_value | ( | AutoOutput * | auto_output, |
double | value, | ||
int | val_index, | ||
char * | label, | ||
int | output_id | ||
) |
update auto_output when a 'set_output_value' is encountered It can take the label and/or the output_id as input. If the two are present, a check is done to assess these are coherent
[out] | auto_output | AutoOutput structure |
[in] | value | current output value |
[in] | val_index | index of the value in the saved vector |
[in] | label | current output label (NULL if not known) |
[in] | output_id | id of the output vector (if not known, put it to -1 : the function will search for the correct index) |
int update_auto_output_vector | ( | AutoOutput * | auto_output, |
double * | vector, | ||
char * | label, | ||
int | output_id | ||
) |
update auto_output when a 'set_output_vector' is encountered
[out] | auto_output | AutoOutput structure |
[in] | vector | pointer to the current outputs vector |
[in] | label | current output label (NULL if not know) |
[in] | output_id | index of the output vector (if not known, put it to -1 : the function will search for the correct index) |