Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
populate s4u::mailbox
[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 #ifdef __cplusplus
11
12 namespace simgrid {
13   namespace s4u {
14     class As;
15     class Host;
16     class Mailbox;
17   }
18   namespace surf {
19     class Resource;
20     class Cpu;
21     class NetCard;
22     class Link;
23   }
24   namespace trace_mgr {
25     class trace;
26     class future_evt_set;
27   }
28 }
29
30 typedef simgrid::s4u::As simgrid_As;
31 typedef simgrid::s4u::Host simgrid_Host;
32 typedef simgrid::s4u::Mailbox simgrid_Mailbox;
33 typedef simgrid::surf::Cpu surf_Cpu;
34 typedef simgrid::surf::NetCard surf_NetCard;
35 typedef simgrid::surf::Link Link;
36 typedef simgrid::surf::Resource surf_Resource;
37 typedef simgrid::trace_mgr::trace tmgr_Trace;
38
39 #else
40
41 typedef struct simgrid_As   simgrid_As;
42 typedef struct simgrid_Host simgrid_Host;
43 typedef struct simgrid_Mailbox simgrid_Mailbox;
44 typedef struct surf_Cpu surf_Cpu;
45 typedef struct surf_NetCard surf_NetCard;
46 typedef struct surf_Resource surf_Resource;
47 typedef struct Link Link;
48 typedef struct Trace tmgr_Trace;
49 #endif
50
51 typedef simgrid_As *AS_t;
52 typedef simgrid_Host* sg_host_t;
53 typedef simgrid_Mailbox* sg_mbox_t;
54
55 typedef surf_Cpu *surf_cpu_t;
56 typedef surf_NetCard *sg_netcard_t;
57 typedef surf_Resource *sg_resource_t;
58
59 // Types which are in fact dictelmt:
60 typedef struct s_xbt_dictelm *sg_storage_t;
61
62 typedef tmgr_Trace *tmgr_trace_t; /**< Opaque structure defining an availability trace */
63
64 typedef enum {
65   SURF_LINK_FULLDUPLEX = 2,
66   SURF_LINK_SHARED = 1,
67   SURF_LINK_FATPIPE = 0
68 } e_surf_link_sharing_policy_t;
69
70 typedef enum {
71   SURF_TRACE_CONNECT_KIND_HOST_AVAIL = 4,
72   SURF_TRACE_CONNECT_KIND_SPEED = 3,
73   SURF_TRACE_CONNECT_KIND_LINK_AVAIL = 2,
74   SURF_TRACE_CONNECT_KIND_BANDWIDTH = 1,
75   SURF_TRACE_CONNECT_KIND_LATENCY = 0
76 } e_surf_trace_connect_kind_t;
77
78 typedef enum {
79   SURF_PROCESS_ON_FAILURE_DIE = 1,
80   SURF_PROCESS_ON_FAILURE_RESTART = 0
81 } e_surf_process_on_failure_t;
82
83
84 /** @ingroup m_datatypes_management_details
85  * @brief Type for any simgrid size
86  */
87 typedef unsigned long long sg_size_t;
88
89 /** @ingroup m_datatypes_management_details
90  * @brief Type for any simgrid offset
91  */
92 typedef long long sg_offset_t;
93
94 #endif