Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
538d3783a9be72ae6c2fa1e365217b5145abcbb2
[simgrid.git] / include / simgrid / link.h
1 /* Public interface to the Link datatype                                    */
2
3 /* Copyright (c) 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 INCLUDE_SIMGRID_LINK_H_
10 #define INCLUDE_SIMGRID_LINK_H_
11
12
13 #ifdef __cplusplus
14
15 namespace simgrid {
16 namespace surf {
17
18 class Link;
19
20 }
21 }
22 typedef simgrid::surf::Link Link;
23
24 #else
25 typedef struct Link Link;
26 #endif
27
28
29
30 /* C interface */
31 SG_BEGIN_DECL()
32 XBT_PUBLIC(const char*) sg_link_name(Link *link);
33 XBT_PUBLIC(Link *) sg_link_by_name(const char *name);
34 XBT_PUBLIC(int) sg_link_is_shared(Link *link);
35 XBT_PUBLIC(double) sg_link_bandwidth(Link *link);
36 XBT_PUBLIC(double) sg_link_latency(Link *link);
37 XBT_PUBLIC(void*) sg_link_data(Link *link);
38 XBT_PUBLIC(void) sg_link_data_set(Link *link,void *data);
39 XBT_PUBLIC(int) sg_link_amount(void);
40 XBT_PUBLIC(Link**) sg_link_list(void);
41 XBT_PUBLIC(void) sg_link_exit(void);
42 SG_END_DECL()
43
44 #endif /* INCLUDE_SIMGRID_LINK_H_ */