Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
fix the prototype of s4u::Host::processes() to not return a swag of smx_actors
[simgrid.git] / include / xbt / replay.h
1 /* xbt/replay_reader.h -- Tools to parse a replay file                */
2
3 /* Copyright (c) 2010, 2012-2015. The SimGrid Team.
4  * All rights reserved.                                                     */
5
6 /* This program is free software; you can redistribute it and/or modify it
7  * under the terms of the license (GNU LGPL) which comes with this package. */
8
9 #ifndef XBT_REPLAY_H
10 #define XBT_REPLAY_H
11
12 #include "xbt/dict.h"
13
14 #include <stdio.h>
15
16 SG_BEGIN_DECL()
17
18 typedef struct s_replay_reader *xbt_replay_reader_t;
19 typedef void (*action_fun) (const char *const *args);
20
21 XBT_PUBLIC_DATA(xbt_dict_t) xbt_action_funs;
22 XBT_PUBLIC_DATA(xbt_dict_t) xbt_action_queues;
23
24 /* To split the file if a unique one is given (specific variable for the other case live in runner()) */
25 XBT_PUBLIC_DATA(FILE *) xbt_action_fp;
26
27 XBT_PUBLIC(xbt_replay_reader_t) xbt_replay_reader_new(const char*filename);
28 XBT_PUBLIC(const char **) xbt_replay_reader_get(xbt_replay_reader_t reader);
29 XBT_PUBLIC(void) xbt_replay_reader_free(xbt_replay_reader_t *reader);
30
31 XBT_PUBLIC(void) xbt_replay_action_register(const char *action_name, action_fun function);
32 XBT_PUBLIC(int) xbt_replay_action_runner(int argc, char *argv[]);
33
34 XBT_PUBLIC(int) _xbt_replay_is_active();
35 XBT_PUBLIC(int) _xbt_replay_action_init();
36 XBT_PUBLIC(void) _xbt_replay_action_exit();
37
38 SG_END_DECL()
39
40 #endif /* XBT_REPLAY_H */