src/wifi/model/wifi-phy.cc
changeset 11348 ded786322135
parent 11332 8ea5c08711a3
child 11424 a9e97645e2bb
--- a/src/wifi/model/wifi-phy.cc	Sat May 02 22:21:58 2015 +0200
+++ b/src/wifi/model/wifi-phy.cc	Sun May 03 16:06:01 2015 +0200
@@ -584,6 +584,16 @@
     + GetPayloadDuration (size, txvector, preamble, frequency, packetType, incFlag);
   return duration;
 }
+Time
+WifiPhy::CalculatePlcpDuration (WifiTxVector txvector, WifiPreamble preamble)
+{
+  WifiMode payloadMode=txvector.GetMode();
+  Time duration = GetPlcpPreambleDuration (payloadMode, preamble)
+    + GetPlcpHeaderDuration (payloadMode, preamble)
+    + GetPlcpHtSigHeaderDuration (preamble)
+    + GetPlcpHtTrainingSymbolDuration (preamble, txvector);
+  return duration;
+}
 
 void
 WifiPhy::NotifyTxBegin (Ptr<const Packet> packet)