Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge pull request #2 from mquinson/master
[simgrid.git] / include / simgrid / jedule / jedule_events.h
1 /* Copyright (c) 2010-2012, 2014-2015. 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 JEDULE_EVENTS_H_
8 #define JEDULE_EVENTS_H_
9
10 #include "simgrid_config.h"
11
12 #include "xbt/dynar.h"
13 #include "xbt/dict.h"
14
15 #include "simgrid/jedule/jedule_platform.h"
16
17
18 #ifdef HAVE_JEDULE
19
20 SG_BEGIN_DECL()
21
22 struct jed_event {
23   int event_id;
24   char *name;
25   double start_time;
26   double end_time;
27   char *type;
28   xbt_dynar_t resource_subsets;
29   xbt_dynar_t characteristics_list; /* just a list of names (strings) */
30   xbt_dict_t info_hash;     /* key/value pairs */
31 };
32
33 typedef struct jed_event s_jed_event_t, *jed_event_t;
34
35 /************************************************************/
36
37 void create_jed_event(jed_event_t *event, char *name, double start_time, double end_time, const char *type);
38
39 void jed_event_free(jed_event_t event);
40
41 void jed_event_add_resources(jed_event_t event, xbt_dynar_t host_selection);
42
43 void jed_event_add_characteristic(jed_event_t event, char *characteristic);
44
45 void jed_event_add_info(jed_event_t event, char *key, char *value);
46
47 SG_END_DECL()
48
49 #endif
50
51 #endif /* JEDULE_EVENTS_H_ */