Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
generateDotFile, to generate dot files for fat trees
[simgrid.git] / src / surf / network_constant.cpp
index 0ffebc5..c331629 100644 (file)
@@ -1,3 +1,9 @@
+/* Copyright (c) 2013-2014. The SimGrid Team.
+ * All rights reserved.                                                     */
+
+/* This program is free software; you can redistribute it and/or modify it
+ * under the terms of the license (GNU LGPL) which comes with this package. */
+
 #include "network_constant.hpp"
 #include "surf/random_mgr.h"
 
@@ -52,7 +58,7 @@ void NetworkConstantModel::updateActionsState(double /*now*/, double delta)
        action = static_cast<NetworkConstantActionPtr>(&*it);
     if (action->m_latency > 0) {
       if (action->m_latency > delta) {
-        double_update(&(action->m_latency), delta);
+        double_update(&(action->m_latency), delta, sg_surf_precision);
       } else {
         action->m_latency = 0.0;
       }
@@ -82,6 +88,7 @@ ActionPtr NetworkConstantModel::communicate(RoutingEdgePtr src, RoutingEdgePtr d
   NetworkConstantActionPtr action = new NetworkConstantAction(this, size, sg_latency_factor);
   XBT_OUT();
 
+  surf_callback_emit(networkCommunicateCallbacks, action, src, dst, size, rate);
   return action;
 }