Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
ns3: much more debug info, and restore the SetCloseCallbacks that is actually needed
[simgrid.git] / src / surf / network_ns3.cpp
index 9d75c4d..f8a827e 100644 (file)
@@ -232,6 +232,9 @@ void NetworkNS3Model::updateActionsState(double now, double delta)
       socket_to_destroy.push_back(ns3Socket);
       XBT_DEBUG("Destroy socket %p of action %p", ns3Socket.c_str(), action);
       action->finish(Action::State::done);
+    } else {
+      XBT_DEBUG("Socket %p sent %d bytes out of %d (%d remaining)", ns3Socket.c_str(), sgFlow->sentBytes_,
+                sgFlow->totalBytes_, sgFlow->remaining_);
     }
   }
 
@@ -410,7 +413,7 @@ void ns3_add_cluster(const char* id, double bw, double lat) {
 
   xbt_assert(Nodes.GetN() <= 65000, "Cluster with NS3 is limited to 65000 nodes");
   ns3::CsmaHelper csma;
-  csma.SetDeviceAttribute("DataRate", ns3::DataRateValue(ns3::DataRate(bw * 8))); // NS3 takes bps, but we provide Bps
+  csma.SetChannelAttribute("DataRate", ns3::DataRateValue(ns3::DataRate(bw * 8))); // NS3 takes bps, but we provide Bps
   csma.SetChannelAttribute("Delay", ns3::TimeValue(ns3::Seconds(lat)));
   ns3::NetDeviceContainer devices = csma.Install(Nodes);
   XBT_DEBUG("Create CSMA");