- 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)));