Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
SURF: Unify the types of models in a uniq s_surf_model_t (using an union) +reindent...
[simgrid.git] / src / surf / network_private.h
index 9b1ee76..cccfd92 100644 (file)
@@ -13,8 +13,8 @@
 #include "xbt/dict.h"
 
 typedef struct network_link_CM02 {
-  surf_model_t model;  /* Any such object, added in a trace
-                                  should start by this field!!! */
+  surf_model_t model;           /* Any such object, added in a trace
+                                   should start by this field!!! */
   xbt_dict_t properties;
   /* Using this object with the public part of
      model does not make sense */
@@ -38,6 +38,7 @@ typedef struct surf_action_network_CM02 {
   s_surf_action_t generic_action;
   double latency;
   double lat_current;
+  double weight;
   lmm_variable_t variable;
   double rate;
   int suspended;
@@ -49,7 +50,7 @@ extern int card_number;
 extern link_CM02_t **routing_table;
 extern int *routing_table_size;
 
-#define ROUTE(i,j) routing_table[(i)+(j)*card_number]
-#define ROUTE_SIZE(i,j) routing_table_size[(i)+(j)*card_number]
+#define ROUTE(i,j) routing_table[(i)+(j)*host_number]
+#define ROUTE_SIZE(i,j) routing_table_size[(i)+(j)*host_number]
 
-#endif                         /* _SURF_NETWORK_PRIVATE_H */
+#endif /* _SURF_NETWORK_PRIVATE_H */