X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/0bac7d0f735ac8ba47a46e1db4f6d7a7164fe0f2..14dbe48f4f9623cf72fc207b7c2041b9f611972a:/include/simgrid/forward.h diff --git a/include/simgrid/forward.h b/include/simgrid/forward.h index 434abff5dd..54210ac56e 100644 --- a/include/simgrid/forward.h +++ b/include/simgrid/forward.h @@ -12,41 +12,43 @@ #ifdef __cplusplus namespace simgrid { -class Host; + namespace s4u { + class Host; + } + namespace surf { + class Resource; + class Cpu; + class NetCard; + class As; + class Link; + } + namespace trace_mgr { + class future_evt_set; + } } -namespace simgrid { -namespace surf { - -class Cpu; -class RoutingEdge; -class As; -class Link; - -} -} - -typedef simgrid::Host simgrid_Host; -typedef simgrid::surf::Cpu surf_Cpu; -typedef simgrid::surf::RoutingEdge surf_RoutingEdge; +typedef simgrid::s4u::Host simgrid_Host; typedef simgrid::surf::As surf_As; +typedef simgrid::surf::Cpu surf_Cpu; +typedef simgrid::surf::NetCard surf_NetCard; typedef simgrid::surf::Link Link; +typedef simgrid::surf::Resource surf_Resource; #else typedef struct simgrid_Host simgrid_Host; -typedef struct surf_Cpu surf_Cpu; -typedef struct surf_RoutingEdge surf_RoutingEdge; typedef struct surf_As surf_As; +typedef struct surf_Cpu surf_Cpu; +typedef struct surf_NetCard surf_NetCard; +typedef struct surf_Resource surf_Resource; typedef struct Link Link; - #endif typedef simgrid_Host* sg_host_t; -typedef surf_Cpu *surf_cpu_t; -typedef surf_RoutingEdge *routing_edge_t; -typedef surf_RoutingEdge *sg_routing_edge_t; typedef surf_As *AS_t; +typedef surf_Cpu *surf_cpu_t; +typedef surf_NetCard *sg_netcard_t; +typedef surf_Resource *sg_resource_t; // Types which are in fact dictelmt: typedef xbt_dictelm_t sg_storage_t; @@ -55,13 +57,6 @@ typedef struct tmgr_trace *tmgr_trace_t; /**< Opaque structure defining an avail typedef void *sg_routing_link_t; /* FIXME:The actual type is model-dependent so use void* instead*/ -/** @ingroup SURF_interface -* @brief Defines whether a given resource is working or not */ -typedef enum { - SURF_RESOURCE_ON = 1, /**< Up & ready */ - SURF_RESOURCE_OFF = 0 /**< Down & broken */ -} e_surf_resource_state_t; - typedef enum { SURF_LINK_FULLDUPLEX = 2, SURF_LINK_SHARED = 1, @@ -70,7 +65,7 @@ typedef enum { typedef enum { SURF_TRACE_CONNECT_KIND_HOST_AVAIL = 4, - SURF_TRACE_CONNECT_KIND_POWER = 3, + SURF_TRACE_CONNECT_KIND_SPEED = 3, SURF_TRACE_CONNECT_KIND_LINK_AVAIL = 2, SURF_TRACE_CONNECT_KIND_BANDWIDTH = 1, SURF_TRACE_CONNECT_KIND_LATENCY = 0 @@ -115,14 +110,14 @@ typedef struct { int core_amount; double speed_scale; tmgr_trace_t speed_trace; - e_surf_resource_state_t initial_state; + int initiallyOn; tmgr_trace_t state_trace; const char* coord; xbt_dict_t properties; } s_sg_platf_host_cbarg_t, *sg_platf_host_cbarg_t; #define SG_PLATF_HOST_INITIALIZER { \ - NULL, 0, 1, 1, 1., NULL, SURF_RESOURCE_ON, NULL, \ + NULL, 0, 1, 1, 1., NULL, 1/*ON*/, NULL, \ NULL, NULL \ } @@ -147,14 +142,14 @@ typedef struct { tmgr_trace_t bandwidth_trace; double latency; tmgr_trace_t latency_trace; - e_surf_resource_state_t state; + int initiallyOn; tmgr_trace_t state_trace; e_surf_link_sharing_policy_t policy; xbt_dict_t properties; } s_sg_platf_link_cbarg_t, *sg_platf_link_cbarg_t; #define SG_PLATF_LINK_INITIALIZER {\ - NULL, 0., NULL, 0., NULL, SURF_RESOURCE_ON, \ + NULL, 0., NULL, 0., NULL, 1/*ON*/, \ NULL, SURF_LINK_SHARED, NULL \ } @@ -177,8 +172,8 @@ typedef struct s_sg_platf_route_cbarg { int symmetrical; const char *src; const char *dst; - sg_routing_edge_t gw_src; - sg_routing_edge_t gw_dst; + sg_netcard_t gw_src; + sg_netcard_t gw_dst; xbt_dynar_t link_list; } s_sg_platf_route_cbarg_t; @@ -249,7 +244,7 @@ typedef struct { sg_size_t size; } s_sg_platf_storage_type_cbarg_t, *sg_platf_storage_type_cbarg_t; -#define SG_PLATF_STORAGE_TYPE_INITIALIZER {NULL,NULL,NULL,NULL,NULL,NULL} +#define SG_PLATF_STORAGE_TYPE_INITIALIZER {NULL,NULL,NULL,NULL,NULL,NULL,0} typedef struct { const char* type_id;