Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
The code deal with <ASroute> in the exact same way than <route>. Disturbing
[simgrid.git] / include / simgrid / forward.h
1 /* Copyright (c) 2004-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 SG_PLATF_TYPES_H
8 #define SG_PLATF_TYPES_H
9
10 #include <xbt.h>
11
12 #ifdef __cplusplus
13
14 namespace simgrid {
15   namespace s4u {
16     class Host;
17   }
18   namespace surf {
19     class Resource;
20     class Cpu;
21     class NetCard;
22     class As;
23     class Link;
24   }
25   namespace trace_mgr {
26     class future_evt_set;
27   }
28 }
29
30 typedef simgrid::s4u::Host simgrid_Host;
31 typedef simgrid::surf::As surf_As;
32 typedef simgrid::surf::Cpu surf_Cpu;
33 typedef simgrid::surf::NetCard surf_NetCard;
34 typedef simgrid::surf::Link Link;
35 typedef simgrid::surf::Resource surf_Resource;
36
37 #else
38
39 typedef struct simgrid_Host simgrid_Host;
40 typedef struct surf_As surf_As;
41 typedef struct surf_Cpu surf_Cpu;
42 typedef struct surf_NetCard surf_NetCard;
43 typedef struct surf_Resource surf_Resource;
44 typedef struct Link Link;
45 #endif
46
47 typedef simgrid_Host* sg_host_t;
48 typedef surf_As *AS_t;
49 typedef surf_Cpu *surf_cpu_t;
50 typedef surf_NetCard *sg_netcard_t;
51 typedef surf_Resource *sg_resource_t;
52
53 // Types which are in fact dictelmt:
54 typedef xbt_dictelm_t sg_storage_t;
55
56 typedef struct tmgr_trace *tmgr_trace_t; /**< Opaque structure defining an availability trace */
57
58 typedef void *sg_routing_link_t; /* FIXME:The actual type is model-dependent so use void* instead*/
59
60 typedef enum {
61   SURF_LINK_FULLDUPLEX = 2,
62   SURF_LINK_SHARED = 1,
63   SURF_LINK_FATPIPE = 0
64 } e_surf_link_sharing_policy_t;
65
66 typedef enum {
67   SURF_TRACE_CONNECT_KIND_HOST_AVAIL = 4,
68   SURF_TRACE_CONNECT_KIND_SPEED = 3,
69   SURF_TRACE_CONNECT_KIND_LINK_AVAIL = 2,
70   SURF_TRACE_CONNECT_KIND_BANDWIDTH = 1,
71   SURF_TRACE_CONNECT_KIND_LATENCY = 0
72 } e_surf_trace_connect_kind_t;
73
74 typedef enum {
75   SURF_PROCESS_ON_FAILURE_DIE = 1,
76   SURF_PROCESS_ON_FAILURE_RESTART = 0
77 } e_surf_process_on_failure_t;
78
79
80 /** @ingroup m_datatypes_management_details
81  * @brief Type for any simgrid size
82  */
83 typedef unsigned long long sg_size_t;
84
85 /** @ingroup m_datatypes_management_details
86  * @brief Type for any simgrid offset
87  */
88 typedef long long sg_offset_t;
89
90 #endif