|
Robotran C Documentation
|
Go to the documentation of this file.
126 MbsBuffer*
mbs_new_buffer(
char* filename,
char* anim_name,
int nx,
int size,
int id,
char* buf_format,
int save_anim,
int save_visu,
double anim_period);
char * buf_format
Format of the buffer output.
Definition: mbs_buffer.h:79
char * filename
the name of the text file associated to this buffer
Definition: mbs_buffer.h:64
@ BUFFER_QQ
Definition: mbs_buffer.h:21
int id
ID of the buffer.
Definition: mbs_buffer.h:76
@ BUFFER_LINK3D
Definition: mbs_buffer.h:23
void mbs_msg(const char *msg,...)
Send a message.
Definition: mbs_message.c:87
double last_t
the time corresponding to 'last_x'
Definition: mbs_buffer.h:58
char * get_char_cpy(const char *fmt,...)
Copy the provided formatted string into a newly allocated memory.
Definition: useful_functions.c:196
@ BUFFER_LINK_F
Definition: mbs_buffer.h:22
void set_output_nb_new(int nb)
set the number of new user inputs
Definition: set_output.c:361
int mbs_anim_write(MbsBuffer *b)
Write the content of the q buffer as anim file to the disk.
Definition: mbs_buffer.c:457
@ BUFFER_VISU
Definition: mbs_buffer.h:22
double * tx
the array in which the time and the value are saved.
Definition: mbs_buffer.h:52
buffer used to store the user variables to output
Definition: mbs_buffer.h:92
@ BUFFER_UX
Definition: mbs_buffer.h:21
#define _MBS_ERR_LOW_FILES
Low Level error number Error during opening/writing files = -9.
Definition: mbs_errors_names.h:157
@ BUFFER_X
Definition: mbs_buffer.h:23
double anim_period
time interval between two recorded values in .anim file
Definition: mbs_buffer.h:34
int mbs_buffer_write(MbsBuffer *b)
Write the content of the buffer to disk.
Definition: mbs_buffer.c:389
int size
the size of the buffer (i.e.
Definition: mbs_buffer.h:70
double ** X
the tabular (2 dimensions) in which the values are stored
Definition: mbs_buffer.h:96
@ BUFFER_LAMBDA
Definition: mbs_buffer.h:23
@ BUFFER_QD
Definition: mbs_buffer.h:21
@ BUFFER_QC
Definition: mbs_buffer.h:22
int mbs_buffer_save(MbsBuffer *b, double t, double *x)
Save the given array to the specified buffer with the specified time.
Definition: mbs_buffer.c:254
@ BUFFER_LINK_Z
Definition: mbs_buffer.h:22
int get_output_nb_new()
get the number of new user inputs
Definition: set_output.c:342
int size
the size of the buffer (i.e. the number of different value of the array that can be stored)
Definition: mbs_buffer.h:102
char * respath
path for the results
Definition: mbs_buffer.h:108
int mbs_growing_buffer_write(MbsGrowingBuffer *b)
write the content of the growing buffer to disk
Definition: mbs_buffer.c:599
@ BUFFER_QDD
Definition: mbs_buffer.h:21
char * get_output_label(int index)
get the output label corresponding to the requested index
Definition: set_output.c:294
int nx
the size of the array that is tracked by this buffer
Definition: mbs_buffer.h:73
char ** names
the names of the user variables to save
Definition: mbs_buffer.h:98
@ BUFFER_OTHER
Definition: mbs_buffer.h:23
int mbs_buffer_save(MbsBuffer *b, double t, double *x)
Save the given array to the specified buffer with the specified time.
Definition: mbs_buffer.c:254
@ BUFFER_Q
Definition: mbs_buffer.h:21
int max_nx
maximal size for nx
Definition: mbs_buffer.h:106
@ BUFFER_UXD
Definition: mbs_buffer.h:21
double * t
the array in which the time value corresponding to each value of the array are stored
Definition: mbs_buffer.h:94
Definition: mbs_buffer.h:46
int mbs_growing_buffer_save(MbsGrowingBuffer *b, double t)
Save the given values of auto_output to the specified buffer with the specified time.
Definition: mbs_buffer.c:295
void mbs_delete_buffer(MbsBuffer *b)
Free memory of the specified MbsBuffer.
Definition: mbs_buffer.c:206
void mbs_delete_growing_buffer(MbsGrowingBuffer *b)
release memory for growing buffer
Definition: mbs_buffer.c:230
double * last_x
the array in which the last values of 'x' are stored
Definition: mbs_buffer.h:55
@ BUFFER_LINK_ZD
Definition: mbs_buffer.h:22
double get_output_value(int index)
get the output value corresponding to the requested index
Definition: set_output.c:284
#define TIME_ID(i)
Macro to get the id in tx array corresponding to index (assuming b->nx exist)
Definition: mbs_buffer.c:23
int mbs_growing_buffer_write(MbsGrowingBuffer *b)
write the content of the growing buffer to disk
Definition: mbs_buffer.c:599
void mbs_delete_buffer(MbsBuffer *b)
Free memory of the specified MbsBuffer.
Definition: mbs_buffer.c:206
int flag_no_print
flag: 1 if it was not yet printed
Definition: mbs_buffer.h:61
void mbs_delete_growing_buffer(MbsGrowingBuffer *b)
release memory for growing buffer
Definition: mbs_buffer.c:230
@ BUFFER_F
Definition: mbs_buffer.h:23
MbsGrowingBuffer * mbs_new_growing_buffer(int max_nx, int size, const char *respath)
create a new growing buffer for the user inputs to save
Definition: mbs_buffer.c:144
set_output function called by the user to output his own variables
int get_output_nb()
get the number of user inputs
Definition: set_output.c:324
int index
indicate the index to which next values must be written
Definition: mbs_buffer.h:100
animationR .anim file info
Definition: mbs_buffer.h:29
MbsBuffer * mbs_new_buffer(char *filename, char *anim_name, int nx, int size, int id, char *buf_format, int save_anim, int save_visu, double anim_period)
Allocate and initialize a MbsBuffer structure.
Definition: mbs_buffer.c:27
double last_print_t
last time printed in the .anim file
Definition: mbs_buffer.h:35
@ BUFFER_R
Definition: mbs_buffer.h:23
int save_anim
1 to save the anim file, 0 otherwise (only valid if 'save2file' is set to 1)
Definition: mbs_buffer.h:31
int mbs_growing_buffer_save(MbsGrowingBuffer *b, double t)
Save the given values of auto_output to the specified buffer with the specified time.
Definition: mbs_buffer.c:295
MbsGrowingBuffer * mbs_new_growing_buffer(int max_nx, int size, const char *respath)
create a new growing buffer for the user inputs to save
Definition: mbs_buffer.c:144
@ BUFFER_QA
Definition: mbs_buffer.h:23
int mbs_anim_write(MbsBuffer *b)
Write the content of the q buffer as anim file to the disk.
Definition: mbs_buffer.c:457
int save_visu
1 to save the visu file (as in 'user_realtime_visu.c'), 0 otherwise (only valid if 'save2file' is set...
Definition: mbs_buffer.h:32
MbsBuffer * mbs_new_buffer(char *filename, char *anim_name, int nx, int size, int id, char *buf_format, int save_anim, int save_visu, double anim_period)
Allocate and initialize a MbsBuffer structure.
Definition: mbs_buffer.c:27
char * filename
anim file name
Definition: mbs_buffer.h:37
int index
indicate the index to which next values must be written
Definition: mbs_buffer.h:67
int mbs_buffer_write(MbsBuffer *b)
Write the content of the buffer to disk.
Definition: mbs_buffer.c:389
int nx
the current size of the array that is tracked by this buffer
Definition: mbs_buffer.h:104
AnimInfo * anim
info for the .anim file
Definition: mbs_buffer.h:82