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 
10 #include "mbs_output_struct.h"
11 
12 // functions prototypes
13 AutoOutput* init_auto_output(int max_nb);
15 int define_auto_output_vector(AutoOutput *auto_output, char* label, int size);
16 int update_auto_output(AutoOutput *auto_output, double value, char* label);
17 int update_auto_output_vector(AutoOutput *auto_output, double* vector, char* label, int output_id);
18 
39  char *label, int output_id, int start,
40  int number);
41 
42 int update_auto_output_value(AutoOutput *auto_output, double value, int val_index, char* label, int output_id);
43 int index_output_string(AutoOutput *auto_output, char* label);
45 double get_output_value_auto(AutoOutput *auto_output, int index);
50 
51 #endif
AutoOutput::max_nb
int max_nb
Maximum number of user outputs allocated (max vectors and max scalar).
Definition: mbs_output_struct.h:23
AutoOutput
User output auto-update.
Definition: mbs_output_struct.h:17
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:219
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:518
mbs_msg
void mbs_msg(const char *msg,...)
Send a message.
Definition: mbs_message.c:87
auto_output
static AutoOutput * auto_output
Definition: set_output.c:21
mbs_output_struct.h
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:551
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:480
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:501
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:67
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:480
mbs_error_msg
void mbs_error_msg(int err, const char *msg,...)
Send an error message.
Definition: mbs_message.c:131
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
update_auto_output_partial_vector
int update_auto_output_partial_vector(AutoOutput *auto_output, double *vector, char *label, int output_id, int start, int number)
update auto_output when a 'set_output_partial_vector' is encountered.
Definition: auto_output.c:267
MSG_ERR
#define MSG_ERR
Definition: auto_output.c:16
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:551
update_auto_output_partial_vector
int update_auto_output_partial_vector(AutoOutput *auto_output, double *vector, char *label, int output_id, int start, int number)
update auto_output when a 'set_output_partial_vector' is encountered.
Definition: auto_output.c:267
AutoOutput::label_outputs_vector
char ** label_outputs_vector
Array with the current user outputs vector labels.
Definition: mbs_output_struct.h:28
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:166
mbs_warning_msg
void mbs_warning_msg(const char *msg,...)
Send a warning message.
Definition: mbs_message.c:100
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:568
free_char_tab
void free_char_tab(char **mat)
release memory for a matrix of chars
Definition: useful_functions.c:271
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:501
AutoOutput::y_outputs
double * y_outputs
Array with the current outputs values.
Definition: mbs_output_struct.h:31
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:67
AutoOutput::v_size
int * v_size
Array with the size of each outputs vector.
Definition: mbs_output_struct.h:36
AutoOutput::nb_new_outputs
int nb_new_outputs
Number of new user outputs discovered during this time step.
Definition: mbs_output_struct.h:39
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:405
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:219
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:518
init_auto_output
AutoOutput * init_auto_output(int max_nb)
initialize the AutoOutput structure
Definition: auto_output.c:24
AutoOutput::out_vector_nb
int out_vector_nb
Current number of user outputs vectors.
Definition: mbs_output_struct.h:21
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:405
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:535
AutoOutput::label_outputs
char ** label_outputs
Array with the current user outputs labels.
Definition: mbs_output_struct.h:26
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:175
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:535
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:568
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:130
AutoOutput::out_nb
int out_nb
Current number of user outputs.
Definition: mbs_output_struct.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:166
AutoOutput::v_outputs
double ** v_outputs
Array with the current outputs vector.
Definition: mbs_output_struct.h:34
mbs_message.h
MSG_PRE
#define MSG_PRE
Definition: auto_output.c:17
free_auto_output
void free_auto_output(AutoOutput *auto_output)
release memory for AutoOutput
Definition: auto_output.c:130
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:971
init_auto_output
AutoOutput * init_auto_output(int max_nb)
initialize the AutoOutput structure
Definition: auto_output.c:24
index_output_string
int index_output_string(AutoOutput *auto_output, char *label)
get index for a output with its label
Definition: auto_output.c:459
index_output_string
int index_output_string(AutoOutput *auto_output, char *label)
get index for a output with its label
Definition: auto_output.c:459