Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
91aa8d9d159aeba22d609055c97cb160935b5f77
[simgrid.git] / src / include / surf / trace_mgr.h
1 /* Authors: Arnaud Legrand                                                  */
2
3 /* This program is free software; you can redistribute it and/or modify it
4    under the terms of the license (GNU LGPL) which comes with this package. */
5
6 #ifndef _SURF_TMGR_H
7 #define _SURF_TMGR_H
8
9 #include "xbt/heap.h"
10 #include "xbt/dynar.h"
11 #include "surf/maxmin.h"
12
13 typedef struct tmgr_history *tmgr_history_t;
14 typedef struct tmgr_trace *tmgr_trace_t;
15
16 /* Creation functions */
17 tmgr_history_t tmgr_history_new(void);
18 void tmgr_history_free(tmgr_history_t history);
19
20 tmgr_trace_t tmgr_trace_new(const char *filename);
21 void tmgr_trace_free(tmgr_trace_t trace);
22
23 void tmgr_history_add_trace(tmgr_history_t history, tmgr_trace_t trace,
24                             xbt_heap_float_t start_time, int offset,
25                             void *resource);
26
27 /* Access functions */
28 xbt_heap_float_t tmgr_history_next_date(tmgr_history_t history);
29 int tmgr_history_get_next_event_leq(tmgr_history_t history,
30                                     xbt_heap_float_t date,
31                                     xbt_maxmin_float_t * value,
32                                     void **resource);
33
34 #endif                          /* _SURF_TMGR_H */