auto_plot.h 884 Bytes
Newer Older
1
/*!
2
3
4
5
6
 * \author Nicolas Van der Noot
 * \file auto_plot.h
 * \brief functions used to automatically update the user curves plotted
 */

7
#ifdef REAL_TIME
8
9
10
11
12
13
14
15

#ifndef _AUTO_PLOT_H_
#define _AUTO_PLOT_H_

/*! \brief User curves to plot auto-update
 */
typedef struct AutoPlot
{
16
17
    int nb; //!< current number of curves to plot
    int max_nb; //!< maximum number of curves to plot
18

19
    char **label_curves; //!< tabular with the current curves labels
20

21
22
23
    double *y_curves; //!< tabular with the current values of the plots to curve

    int nb_new_curves; //!< number of new curves discovered during this time step
24
25
26
27
28
29

} AutoPlot;

// functions prototypes
AutoPlot* init_auto_plot(int max_nb);
void free_auto_plot(AutoPlot *auto_plot);
30
31
void update_auto_plot(AutoPlot *auto_plot, double value, const char* label);
int index_plot_string(AutoPlot *auto_plot, const char* label);
32

33

34
#endif
35
36

#endif