Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
OK, now clean structures are used for my objects. Forget about my uggly
[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 typedef struct tmgr_trace_event *tmgr_trace_event_t;
16
17 /* Creation functions */
18 tmgr_history_t tmgr_history_new(void);
19 void tmgr_history_free(tmgr_history_t history);
20
21 tmgr_trace_t tmgr_trace_new(const char *filename);
22 void tmgr_trace_free(tmgr_trace_t trace);
23
24 tmgr_trace_event_t tmgr_history_add_trace(tmgr_history_t history, tmgr_trace_t trace,
25                                           xbt_heap_float_t start_time, int offset,
26                                           void *resource);
27
28 /* Access functions */
29 xbt_heap_float_t tmgr_history_next_date(tmgr_history_t history);
30 tmgr_trace_event_t tmgr_history_get_next_event_leq(tmgr_history_t history,
31                                                  xbt_heap_float_t date,
32                                                  xbt_maxmin_float_t * value,
33                                                  void **resource);
34
35 #endif                          /* _SURF_TMGR_H */