- XBT_DEBUG("\tAdd PTP from %d to %d bw:'%s' lat:'%s'", srcNum, dstNum, bw, lat);
- pointToPoint.SetDeviceAttribute ("DataRate", ns3::StringValue (bw));
- pointToPoint.SetChannelAttribute ("Delay", ns3::StringValue (lat));
+ XBT_DEBUG("\tAdd PTP from %d to %d bw:'%f Bps' lat:'%fs'", srcNum, dstNum, bw, lat);
+ pointToPoint.SetDeviceAttribute("DataRate", ns3::DataRateValue(ns3::DataRate(bw*8)));// NS3 takes bps, but we provide Bps
+ pointToPoint.SetChannelAttribute("Delay", ns3::TimeValue(ns3::Seconds(lat)));
+
+ std::string filename = simgrid::xbt::string_printf("link-%d-%d.tr", srcNum, dstNum);
+ ns3::AsciiTraceHelper ascii;
+ pointToPoint.EnableAsciiAll(ascii.CreateFileStream(filename));
+ pointToPoint.EnablePcapAll ("tcp-bulk-send", false);