Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fixed licence and copyright. No more reference to da GRAS possee or the
[simgrid.git] / src / include / surf / trace_mgr.h
1 /*      $Id$     */
2
3 /* Copyright (c) 2004 Arnaud Legrand. All rights reserved.                  */
4
5 /* This program is free software; you can redistribute it and/or modify it
6  * under the terms of the license (GNU LGPL) which comes with this package. */
7
8 #ifndef _SURF_TMGR_H
9 #define _SURF_TMGR_H
10
11 #include "xbt/heap.h"
12 #include "xbt/dynar.h"
13 #include "surf/maxmin.h"
14
15 typedef struct tmgr_history *tmgr_history_t;
16 typedef struct tmgr_trace *tmgr_trace_t;
17 typedef struct tmgr_trace_event *tmgr_trace_event_t;
18
19 /* Creation functions */
20 tmgr_history_t tmgr_history_new(void);
21 void tmgr_history_free(tmgr_history_t history);
22
23 tmgr_trace_t tmgr_trace_new(const char *filename);
24 void tmgr_trace_free(tmgr_trace_t trace);
25
26 tmgr_trace_event_t tmgr_history_add_trace(tmgr_history_t history, tmgr_trace_t trace,
27                                           xbt_heap_float_t start_time, int offset,
28                                           void *resource);
29
30 /* Access functions */
31 xbt_heap_float_t tmgr_history_next_date(tmgr_history_t history);
32 tmgr_trace_event_t tmgr_history_get_next_event_leq(tmgr_history_t history,
33                                                  xbt_heap_float_t date,
34                                                  xbt_maxmin_float_t * value,
35                                                  void **resource);
36
37 void tmgr_finalize(void);
38
39 #endif                          /* _SURF_TMGR_H */