Robotran C Documentation
auto_output.h
Go to the documentation of this file.
1 
7 #ifndef _AUTO_OUTPUT_H_
8 #define _AUTO_OUTPUT_H_
9 
12 typedef struct AutoOutput
13 {
14  int out_nb;
16  int max_nb;
17 
18  char **label_outputs;
20 
21  double *y_outputs;
22 
23  double **v_outputs;
24  int *v_size;
25 
27 
28 } AutoOutput;
29 
30 // functions prototypes
31 AutoOutput* init_auto_output(int max_nb);
33 int define_auto_output_vector(AutoOutput *auto_output, char* label, int size);
34 int update_auto_output(AutoOutput *auto_output, double value, char* label);
35 int update_auto_output_vector(AutoOutput *auto_output, double* vector, char* label, int output_id);
36 int update_auto_output_value(AutoOutput *auto_output, double value, int val_index, char* label, int output_id);
37 int index_output_string(AutoOutput *auto_output, char* label);
39 double get_output_value_auto(AutoOutput *auto_output, int index);
44 
45 #endif
AutoOutput::max_nb
int max_nb
maximum number of user outputs (max vectors and max scalar)
Definition: auto_output.h:16
AutoOutput
User output auto-update.
Definition: auto_output.h:12
update_auto_output_vector
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
Definition: auto_output.c:189
get_output_vector_ptr_auto
double * get_output_vector_ptr_auto(AutoOutput *auto_output, int index)
get the pointer to the output vector at the requested index
Definition: auto_output.c:359
auto_output
static AutoOutput * auto_output
Definition: set_output.c:7
get_output_vector_label_auto
char * get_output_vector_label_auto(AutoOutput *auto_output, int index)
get the output vector label corresponding to the requested index
Definition: auto_output.c:392
useful_functions.h
index_output_vector_string
int index_output_vector_string(AutoOutput *auto_output, char *label)
get index for a output vector with its label
Definition: auto_output.c:321
mbs_error_msg
void mbs_error_msg(char *msg,...)
Send an error message.
Definition: mbs_message.c:102
get_output_value_auto
double get_output_value_auto(AutoOutput *auto_output, int index)
get the output value corresponding to the requested index
Definition: auto_output.c:342
define_auto_output_vector
int define_auto_output_vector(AutoOutput *auto_output, char *label, int size)
set memory for a vector in AutoOutput
Definition: auto_output.c:54
index_output_vector_string
int index_output_vector_string(AutoOutput *auto_output, char *label)
get index for a output vector with its label
Definition: auto_output.c:321
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:880
get_output_vector_label_auto
char * get_output_vector_label_auto(AutoOutput *auto_output, int index)
get the output vector label corresponding to the requested index
Definition: auto_output.c:392
AutoOutput::label_outputs_vector
char ** label_outputs_vector
tabular with the current user outputs labels
Definition: auto_output.h:19
update_auto_output
int update_auto_output(AutoOutput *auto_output, double value, char *label)
update auto_output when a 'set_output' is encountered
Definition: auto_output.c:137
get_output_vector_size_auto
int get_output_vector_size_auto(AutoOutput *auto_output, int index)
get the output vector size corresponding to the requested index
Definition: auto_output.c:409
free_char_tab
void free_char_tab(char **mat)
release memory for a matrix of chars
Definition: useful_functions.c:217
get_output_value_auto
double get_output_value_auto(AutoOutput *auto_output, int index)
get the output value corresponding to the requested index
Definition: auto_output.c:342
AutoOutput::y_outputs
double * y_outputs
tabular with the current outputs values
Definition: auto_output.h:21
define_auto_output_vector
int define_auto_output_vector(AutoOutput *auto_output, char *label, int size)
set memory for a vector in AutoOutput
Definition: auto_output.c:54
AutoOutput::v_size
int * v_size
tabular with the size of each outputs vector
Definition: auto_output.h:24
AutoOutput::nb_new_outputs
int nb_new_outputs
number of new user outputs discovered during this time step
Definition: auto_output.h:26
mbs_msg
void mbs_msg(char *msg,...)
Send a message.
Definition: mbs_message.c:76
update_auto_output_value
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_i...
Definition: auto_output.c:247
update_auto_output_vector
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
Definition: auto_output.c:189
get_output_vector_ptr_auto
double * get_output_vector_ptr_auto(AutoOutput *auto_output, int index)
get the pointer to the output vector at the requested index
Definition: auto_output.c:359
init_auto_output
AutoOutput * init_auto_output(int max_nb)
initialize the AutoOutput structure
Definition: auto_output.c:13
AutoOutput::out_vector_nb
int out_vector_nb
current number of user outputs vectors
Definition: auto_output.h:15
update_auto_output_value
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_i...
Definition: auto_output.c:247
get_output_label_auto
char * get_output_label_auto(AutoOutput *auto_output, int index)
get the output label corresponding to the requested index
Definition: auto_output.c:376
AutoOutput::label_outputs
char ** label_outputs
tabular with the current user outputs labels
Definition: auto_output.h:18
get_char_tab
char ** get_char_tab(int nb_r, int nb_c)
create (with memory allocation) a [nb_r times nb_c] matrix of chars WARNING: only the first dimension...
Definition: useful_functions.c:170
get_output_label_auto
char * get_output_label_auto(AutoOutput *auto_output, int index)
get the output label corresponding to the requested index
Definition: auto_output.c:376
get_output_vector_size_auto
int get_output_vector_size_auto(AutoOutput *auto_output, int index)
get the output vector size corresponding to the requested index
Definition: auto_output.c:409
auto_output.h
functions used to automatically update the user output values
free_auto_output
void free_auto_output(AutoOutput *auto_output)
release memory for AutoOutput
Definition: auto_output.c:101
AutoOutput::out_nb
int out_nb
current number of user outputs
Definition: auto_output.h:14
update_auto_output
int update_auto_output(AutoOutput *auto_output, double value, char *label)
update auto_output when a 'set_output' is encountered
Definition: auto_output.c:137
AutoOutput::v_outputs
double ** v_outputs
tabular with the current outputs vector
Definition: auto_output.h:23
mbs_message.h
free_auto_output
void free_auto_output(AutoOutput *auto_output)
release memory for AutoOutput
Definition: auto_output.c:101
free_dvec_0
void free_dvec_0(double *vec)
release memory for a vector of doubles, starting at index 0
Definition: mbs_1D_array.c:896
init_auto_output
AutoOutput * init_auto_output(int max_nb)
initialize the AutoOutput structure
Definition: auto_output.c:13
index_output_string
int index_output_string(AutoOutput *auto_output, char *label)
get index for a output with its label
Definition: auto_output.c:300
mbs_warning_msg
void mbs_warning_msg(char *msg,...)
Send a warning message.
Definition: mbs_message.c:89
index_output_string
int index_output_string(AutoOutput *auto_output, char *label)
get index for a output with its label
Definition: auto_output.c:300