Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
dd5e09ebf192288f0bf5fbec0c8c7bf61f17f007
[simgrid.git] / src / surf / trace_mgr_private.h
1 /* Copyright (c) 2004, 2007, 2009, 2010. The SimGrid Team.
2  * All rights reserved.                                                     */
3
4 /* This program is free software; you can redistribute it and/or modify it
5  * under the terms of the license (GNU LGPL) which comes with this package. */
6
7 #ifndef _SURF_TMGR_PRIVATE_H
8 #define _SURF_TMGR_PRIVATE_H
9
10 #include "xbt/swag.h"
11 #include "xbt/heap.h"
12 #include "surf/trace_mgr.h"
13
14 typedef struct tmgr_event {
15   double delta;
16   double value;
17 } s_tmgr_event_t, *tmgr_event_t;
18
19 enum e_trace_type {
20   e_trace_list, e_trace_uniform, e_trace_exponential, e_trace_weibull
21 };
22
23 typedef struct tmgr_trace {
24   enum e_trace_type type;
25   union {
26     struct {
27       xbt_dynar_t event_list;
28     } s_list;
29     struct {
30       double alpha;
31       double beta;
32       s_tmgr_event_t next_event;
33       /* and probably other things */
34     } s_uniform;
35     struct {
36       double lambda;
37       s_tmgr_event_t next_event;
38       /* and probably other things */
39     } s_exponential;
40     struct {
41       double lambda;
42       double k;
43       s_tmgr_event_t next_event;
44       /* and probably other things */
45     } s_weibull;
46   };
47 } s_tmgr_trace_t;
48
49
50 typedef struct tmgr_trace_event {
51   tmgr_trace_t trace;
52   unsigned int idx;
53   void *model;
54   int free_me;
55 } s_tmgr_trace_event_t;
56
57 typedef struct tmgr_history {
58   xbt_heap_t heap;
59 } s_tmgr_history_t;
60
61 #endif                          /* _SURF_TMGR_PRIVATE_H */