Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
routing cleanup: symbol renaming
[simgrid.git] / src / surf / network_cm02.cpp
index 1f2794f..6915a08 100644 (file)
@@ -158,8 +158,7 @@ NetworkCm02Model::NetworkCm02Model()
   :NetworkModel()
 {
   char *optim = xbt_cfg_get_string(_sg_cfg_set, "network/optim");
-  int select =
-      xbt_cfg_get_boolean(_sg_cfg_set, "network/maxmin_selective_update");
+  int select = xbt_cfg_get_boolean(_sg_cfg_set, "network/maxmin_selective_update");
 
   if (!strcmp(optim, "Full")) {
     p_updateMechanism = UM_FULL;
@@ -174,7 +173,7 @@ NetworkCm02Model::NetworkCm02Model()
   }
 
   if (!p_maxminSystem)
-  p_maxminSystem = lmm_system_new(m_selectiveUpdate);
+    p_maxminSystem = lmm_system_new(m_selectiveUpdate);
 
   routing_model_create(createLink("__loopback__",
                                 498000000, NULL, 0.000015, NULL,
@@ -345,12 +344,12 @@ Action *NetworkCm02Model::communicate(NetCard *src, NetCard *dst,
 
   xbt_dynar_t route = xbt_dynar_new(sizeof(NetCard*), NULL);
 
-  XBT_IN("(%s,%s,%g,%g)", src->getName(), dst->getName(), size, rate);
+  XBT_IN("(%s,%s,%g,%g)", src->name(), dst->name(), size, rate);
 
   routing_platf->getRouteAndLatency(src, dst, &route, &latency);
   xbt_assert(!xbt_dynar_is_empty(route) || latency,
              "You're trying to send data from %s to %s but there is no connecting path between these two hosts.",
-             src->getName(), dst->getName());
+             src->name(), dst->name());
 
   xbt_dynar_foreach(route, i, _link) {
   link = static_cast<NetworkCm02Link*>(_link);
@@ -407,7 +406,7 @@ Action *NetworkCm02Model::communicate(NetCard *src, NetCard *dst,
     link = *static_cast<NetworkCm02Link **>(xbt_dynar_get_ptr(route, 0));
     gapAppend(size, link, action);
     XBT_DEBUG("Comm %p: %s -> %s gap=%f (lat=%f)",
-              action, src->getName(), dst->getName(), action->m_senderGap,
+              action, src->name(), dst->name(), action->m_senderGap,
               action->m_latency);
   }
 
@@ -496,9 +495,11 @@ void NetworkCm02Link::apply_event(tmgr_trace_iterator_t triggered, double value)
   if (triggered == m_bandwidth.event) {
     updateBandwidth(value);
     tmgr_trace_event_unref(&m_bandwidth.event);
+
   } else if (triggered == m_latency.event) {
     updateLatency(value);
     tmgr_trace_event_unref(&m_latency.event);
+
   } else if (triggered == m_stateEvent) {
     if (value > 0)
       turnOn();