wifi: Use PHY instead of PLCP

PLCP is no longer used in IEEE 802.11-2016.
The attribute WifiPhy/ShortPlcpPreambleSupported has been left unchanged.
This commit is contained in:
Rediet
2020-03-23 13:25:39 +01:00
committed by Rediet (Orange)
parent 8f2c64c74d
commit e1fdd22d6e
15 changed files with 222 additions and 222 deletions

View File

@@ -42,7 +42,7 @@
//
// The example compares first g only and mixed b/g cases with various configurations depending on the following parameters:
// - protection mode that is configured on the AP;
// - whether short PLCP is supported by the 802.11b station;
// - whether short PPDU format is supported by the 802.11b station;
// - whether short slot time is supported by both the 802.11g station and the AP.
//
// The example then compares HT only and mixed HT/non-HT cases with various configurations depending on the following parameters:
@@ -75,7 +75,7 @@ struct Parameters
bool enableErpProtection;
std::string erpProtectionMode;
bool enableShortSlotTime;
bool enableShortPlcpPreamble;
bool enableShortPhyPreamble;
WifiPhyStandard apType;
bool apSupportsGreenfield;
bool rifsSupported;
@@ -121,7 +121,7 @@ Experiment::Run (Parameters params)
<< "\n\t enableErpProtection=" << params.enableErpProtection
<< "\n\t erpProtectionMode=" << params.erpProtectionMode
<< "\n\t enableShortSlotTime=" << params.enableShortSlotTime
<< "\n\t enableShortPlcpPreamble=" << params.enableShortPlcpPreamble
<< "\n\t enableShortPhyPreamble=" << params.enableShortPhyPreamble
<< "\n\t apType=" << apTypeString
<< "\n\t apSupportsGreenfield=" << params.apSupportsGreenfield
<< "\n\t rifsSupported=" << params.rifsSupported
@@ -177,8 +177,8 @@ Experiment::Run (Parameters params)
"Ssid", SsidValue (ssid),
"ShortSlotTimeSupported", BooleanValue (params.enableShortSlotTime));
// Configure the PLCP preamble type: long or short
phy.Set ("ShortPlcpPreambleSupported", BooleanValue (params.enableShortPlcpPreamble));
// Configure the PHY preamble type: long or short
phy.Set ("ShortPlcpPreambleSupported", BooleanValue (params.enableShortPhyPreamble));
NetDeviceContainer bStaDevice;
bStaDevice = wifi.Install (phy, mac, wifiBStaNodes);
@@ -399,7 +399,7 @@ int main (int argc, char *argv[])
params.enableErpProtection = false;
params.erpProtectionMode = "Cts-To-Self";
params.enableShortSlotTime = false;
params.enableShortPlcpPreamble = false;
params.enableShortPhyPreamble = false;
params.apType = WIFI_PHY_STANDARD_80211g;
params.apSupportsGreenfield = false;
params.rifsSupported = false;
@@ -440,7 +440,7 @@ int main (int argc, char *argv[])
params.testName = "g only with short slot time enabled";
params.enableErpProtection = false;
params.enableShortSlotTime = true;
params.enableShortPlcpPreamble = false;
params.enableShortPhyPreamble = false;
params.nWifiB = 0;
throughput = experiment.Run (params);
if (verifyResults && (throughput < 29 || throughput > 30))
@@ -453,7 +453,7 @@ int main (int argc, char *argv[])
params.testName = "Mixed b/g with all g features disabled";
params.enableErpProtection = false;
params.enableShortSlotTime = false;
params.enableShortPlcpPreamble = false;
params.enableShortPhyPreamble = false;
params.nWifiB = 1;
throughput = experiment.Run (params);
if (verifyResults && (throughput < 22.5 || throughput > 23.5))
@@ -466,7 +466,7 @@ int main (int argc, char *argv[])
params.testName = "Mixed b/g with short plcp preamble enabled";
params.enableErpProtection = false;
params.enableShortSlotTime = false;
params.enableShortPlcpPreamble = true;
params.enableShortPhyPreamble = true;
params.nWifiB = 1;
throughput = experiment.Run (params);
if (verifyResults && (throughput < 22.5 || throughput > 23.5))
@@ -480,7 +480,7 @@ int main (int argc, char *argv[])
params.enableErpProtection = true;
params.erpProtectionMode = "Rts-Cts";
params.enableShortSlotTime = false;
params.enableShortPlcpPreamble = false;
params.enableShortPhyPreamble = false;
params.nWifiB = 1;
throughput = experiment.Run (params);
if (verifyResults && (throughput < 19 || throughput > 20))
@@ -493,7 +493,7 @@ int main (int argc, char *argv[])
params.testName = "Mixed b/g with short plcp preamble enabled using RTS-CTS protection";
params.enableErpProtection = true;
params.enableShortSlotTime = false;
params.enableShortPlcpPreamble = true;
params.enableShortPhyPreamble = true;
params.nWifiB = 1;
throughput = experiment.Run (params);
if (verifyResults && (throughput < 19 || throughput > 20))
@@ -507,7 +507,7 @@ int main (int argc, char *argv[])
params.enableErpProtection = true;
params.erpProtectionMode = "Cts-To-Self";
params.enableShortSlotTime = false;
params.enableShortPlcpPreamble = false;
params.enableShortPhyPreamble = false;
params.nWifiB = 1;
throughput = experiment.Run (params);
if (verifyResults && (throughput < 20.5 || throughput > 21.5))
@@ -520,7 +520,7 @@ int main (int argc, char *argv[])
params.testName = "Mixed b/g with short plcp preamble enabled using CTS-TO-SELF protection";
params.enableErpProtection = true;
params.enableShortSlotTime = false;
params.enableShortPlcpPreamble = true;
params.enableShortPhyPreamble = true;
params.nWifiB = 1;
throughput = experiment.Run (params);
if (verifyResults && (throughput < 20.5 || throughput > 21.5))
@@ -533,7 +533,7 @@ int main (int argc, char *argv[])
params.testName = "HT GF not supported";
params.enableErpProtection = false;
params.enableShortSlotTime = false;
params.enableShortPlcpPreamble = false;
params.enableShortPhyPreamble = false;
params.apType = WIFI_PHY_STANDARD_80211n_2_4GHZ;
params.apSupportsGreenfield = false;
params.nWifiB = 0;
@@ -555,7 +555,7 @@ int main (int argc, char *argv[])
params.testName = "HT only with GF used";
params.enableErpProtection = false;
params.enableShortSlotTime = false;
params.enableShortPlcpPreamble = false;
params.enableShortPhyPreamble = false;
params.apType = WIFI_PHY_STANDARD_80211n_2_4GHZ;
params.apSupportsGreenfield = true;
params.nWifiB = 0;
@@ -577,7 +577,7 @@ int main (int argc, char *argv[])
params.testName = "HT only with GF allowed but disabled by protection";
params.enableErpProtection = false;
params.enableShortSlotTime = false;
params.enableShortPlcpPreamble = false;
params.enableShortPhyPreamble = false;
params.apType = WIFI_PHY_STANDARD_80211n_2_4GHZ;
params.apSupportsGreenfield = true;
params.nWifiB = 0;
@@ -599,7 +599,7 @@ int main (int argc, char *argv[])
params.testName = "HT only with GF not supported by the receiver";
params.enableErpProtection = false;
params.enableShortSlotTime = false;
params.enableShortPlcpPreamble = false;
params.enableShortPhyPreamble = false;
params.apType = WIFI_PHY_STANDARD_80211n_2_4GHZ;
params.apSupportsGreenfield = false;
params.nWifiB = 0;
@@ -621,7 +621,7 @@ int main (int argc, char *argv[])
params.testName = "Mixed HT/non-HT with GF enabled";
params.enableErpProtection = false;
params.enableShortSlotTime = false;
params.enableShortPlcpPreamble = false;
params.enableShortPhyPreamble = false;
params.apType = WIFI_PHY_STANDARD_80211n_2_4GHZ;
params.apSupportsGreenfield = true;
params.nWifiB = 0;
@@ -643,7 +643,7 @@ int main (int argc, char *argv[])
params.testName = "HT only with RIFS enabled";
params.enableErpProtection = false;
params.enableShortSlotTime = false;
params.enableShortPlcpPreamble = false;
params.enableShortPhyPreamble = false;
params.apType = WIFI_PHY_STANDARD_80211n_2_4GHZ;
params.apSupportsGreenfield = false;
params.rifsSupported = true;
@@ -667,7 +667,7 @@ int main (int argc, char *argv[])
params.testName = "Mixed HT/non-HT with RIFS enabled but not forbidden";
params.enableErpProtection = false;
params.enableShortSlotTime = false;
params.enableShortPlcpPreamble = false;
params.enableShortPhyPreamble = false;
params.apType = WIFI_PHY_STANDARD_80211n_2_4GHZ;
params.apSupportsGreenfield = false;
params.rifsSupported = true;
@@ -691,7 +691,7 @@ int main (int argc, char *argv[])
params.testName = "Mixed HT/non-HT with RIFS enabled but forbidden";
params.enableErpProtection = false;
params.enableShortSlotTime = false;
params.enableShortPlcpPreamble = false;
params.enableShortPhyPreamble = false;
params.apType = WIFI_PHY_STANDARD_80211n_2_4GHZ;
params.apSupportsGreenfield = false;
params.rifsSupported = true;

View File

@@ -251,7 +251,7 @@ ApWifiMac::GetShortSlotTimeEnabled (void) const
bool
ApWifiMac::GetShortPreambleEnabled (void) const
{
if (GetErpSupported () || m_phy->GetShortPlcpPreambleSupported ())
if (GetErpSupported () || m_phy->GetShortPhyPreambleSupported ())
{
for (std::list<Mac48Address>::const_iterator i = m_nonErpStations.begin (); i != m_nonErpStations.end (); i++)
{
@@ -1118,7 +1118,7 @@ ApWifiMac::Receive (Ptr<WifiMacQueueItem> mpdu)
MgtAssocRequestHeader assocReq;
packet->PeekHeader (assocReq);
CapabilityInformation capabilities = assocReq.GetCapabilities ();
m_stationManager->AddSupportedPlcpPreamble (from, capabilities.IsShortPreamble ());
m_stationManager->AddSupportedPhyPreamble (from, capabilities.IsShortPreamble ());
SupportedRates rates = assocReq.GetSupportedRates ();
bool problem = false;
bool isHtStation = false;
@@ -1314,7 +1314,7 @@ ApWifiMac::Receive (Ptr<WifiMacQueueItem> mpdu)
MgtReassocRequestHeader reassocReq;
packet->PeekHeader (reassocReq);
CapabilityInformation capabilities = reassocReq.GetCapabilities ();
m_stationManager->AddSupportedPlcpPreamble (from, capabilities.IsShortPreamble ());
m_stationManager->AddSupportedPhyPreamble (from, capabilities.IsShortPreamble ());
SupportedRates rates = reassocReq.GetSupportedRates ();
bool problem = false;
bool isHtStation = false;

View File

@@ -123,7 +123,7 @@ public:
/**
* Determine whether short preamble should be enabled or not in the BSS.
* Typically, true is returned only when the AP and all associated
* stations support short PLCP preamble.
* stations support short PHY preamble.
*
* \returns whether short preamble should be enabled or not in the BSS.
*/

View File

@@ -61,7 +61,7 @@ public:
*
* Note that both a WifiMode and a WifiTxVector (which contains a WifiMode)
* are passed into this method. The WifiTxVector may be from a signal that
* contains multiple modes (e.g. PLCP header sent differently from PLCP
* contains multiple modes (e.g. PHY header sent differently from PHY
* payload). Consequently, the mode parameter is what the method uses
* to calculate the chunk error rate, and the txVector is used for
* other information as needed.

View File

@@ -319,12 +319,12 @@ InterferenceHelper::CalculatePayloadPer (Ptr<const Event> event, NiChanges *ni,
Time previous = j->first;
WifiMode payloadMode = event->GetTxVector ().GetMode ();
WifiPreamble preamble = txVector.GetPreambleType ();
Time plcpHeaderStart = j->first + WifiPhy::GetPlcpPreambleDuration (txVector); //PPDU start time + preamble
Time plcpHsigHeaderStart = plcpHeaderStart + WifiPhy::GetPlcpHeaderDuration (txVector); //PPDU start time + preamble + L-SIG
Time plcpTrainingSymbolsStart = plcpHsigHeaderStart + WifiPhy::GetPlcpHtSigHeaderDuration (preamble) + WifiPhy::GetPlcpSigA1Duration (preamble) + WifiPhy::GetPlcpSigA2Duration (preamble); //PPDU start time + preamble + L-SIG + HT-SIG or SIG-A
Time plcpPayloadStart = plcpTrainingSymbolsStart + WifiPhy::GetPlcpTrainingSymbolDuration (txVector) + WifiPhy::GetPlcpSigBDuration (preamble); //PPDU start time + preamble + L-SIG + HT-SIG or SIG-A + Training + SIG-B
Time windowStart = plcpPayloadStart + window.first;
Time windowEnd = plcpPayloadStart + window.second;
Time phyHeaderStart = j->first + WifiPhy::GetPhyPreambleDuration (txVector); //PPDU start time + preamble
Time phyLSigHeaderEnd = phyHeaderStart + WifiPhy::GetPhyHeaderDuration (txVector); //PPDU start time + preamble + L-SIG
Time phyTrainingSymbolsStart = phyLSigHeaderEnd + WifiPhy::GetPhyHtSigHeaderDuration (preamble) + WifiPhy::GetPhySigA1Duration (preamble) + WifiPhy::GetPhySigA2Duration (preamble); //PPDU start time + preamble + L-SIG + HT-SIG or SIG-A
Time phyPayloadStart = phyTrainingSymbolsStart + WifiPhy::GetPhyTrainingSymbolDuration (txVector) + WifiPhy::GetPhySigBDuration (preamble); //PPDU start time + preamble + L-SIG + HT-SIG or SIG-A + Training + SIG-B
Time windowStart = phyPayloadStart + window.first;
Time windowEnd = phyPayloadStart + window.second;
double noiseInterferenceW = m_firstPower;
double powerW = event->GetRxPowerW ();
while (++j != ni->end ())
@@ -366,11 +366,11 @@ InterferenceHelper::CalculateNonHtPhyHeaderPer (Ptr<const Event> event, NiChange
auto j = ni->begin ();
Time previous = j->first;
WifiPreamble preamble = txVector.GetPreambleType ();
WifiMode headerMode = WifiPhy::GetPlcpHeaderMode (txVector);
Time plcpHeaderStart = j->first + WifiPhy::GetPlcpPreambleDuration (txVector); //PPDU start time + preamble
Time plcpHsigHeaderStart = plcpHeaderStart + WifiPhy::GetPlcpHeaderDuration (txVector); //PPDU start time + preamble + L-SIG
Time plcpTrainingSymbolsStart = plcpHsigHeaderStart + WifiPhy::GetPlcpHtSigHeaderDuration (preamble) + WifiPhy::GetPlcpSigA1Duration (preamble) + WifiPhy::GetPlcpSigA2Duration (preamble); //PPDU start time + preamble + L-SIG + HT-SIG or SIG-A
Time plcpPayloadStart = plcpTrainingSymbolsStart + WifiPhy::GetPlcpTrainingSymbolDuration (txVector) + WifiPhy::GetPlcpSigBDuration (preamble); //PPDU start time + preamble + L-SIG + HT-SIG or SIG-A + Training + SIG-B
WifiMode headerMode = WifiPhy::GetPhyHeaderMode (txVector);
Time phyHeaderStart = j->first + WifiPhy::GetPhyPreambleDuration (txVector); //PPDU start time + preamble
Time phyLSigHeaderEnd = phyHeaderStart + WifiPhy::GetPhyHeaderDuration (txVector); //PPDU start time + preamble + L-SIG
Time phyTrainingSymbolsStart = phyLSigHeaderEnd + WifiPhy::GetPhyHtSigHeaderDuration (preamble) + WifiPhy::GetPhySigA1Duration (preamble) + WifiPhy::GetPhySigA2Duration (preamble); //PPDU start time + preamble + L-SIG + HT-SIG or SIG-A
Time phyPayloadStart = phyTrainingSymbolsStart + WifiPhy::GetPhyTrainingSymbolDuration (txVector) + WifiPhy::GetPhySigBDuration (preamble); //PPDU start time + preamble + L-SIG + HT-SIG or SIG-A + Training + SIG-B
double noiseInterferenceW = m_firstPower;
double powerW = event->GetRxPowerW ();
while (++j != ni->end ())
@@ -380,47 +380,47 @@ InterferenceHelper::CalculateNonHtPhyHeaderPer (Ptr<const Event> event, NiChange
NS_ASSERT (current >= previous);
double snr = CalculateSnr (powerW, noiseInterferenceW, txVector.GetChannelWidth ());
//Case 1: previous and current after payload start
if (previous >= plcpPayloadStart)
if (previous >= phyPayloadStart)
{
psr *= 1;
NS_LOG_DEBUG ("Case 1 - previous and current after payload start: nothing to do");
}
//Case 2: previous is in training or in SIG-B: non-HT will not enter here since it didn't enter in the last two and they are all the same for non-HT
else if (previous >= plcpTrainingSymbolsStart)
else if (previous >= phyTrainingSymbolsStart)
{
NS_ASSERT ((preamble != WIFI_PREAMBLE_LONG) && (preamble != WIFI_PREAMBLE_SHORT));
psr *= 1;
NS_LOG_DEBUG ("Case 2 - previous is in training or in SIG-B: nothing to do");
}
//Case 3: previous is in HT-SIG or SIG-A: non-HT will not enter here since it didn't enter in the last two and they are all the same for non-HT
else if (previous >= plcpHsigHeaderStart)
else if (previous >= phyLSigHeaderEnd)
{
NS_ASSERT ((preamble != WIFI_PREAMBLE_LONG) && (preamble != WIFI_PREAMBLE_SHORT));
psr *= 1;
NS_LOG_DEBUG ("Case 3cii - previous is in HT-SIG or SIG-A: nothing to do");
}
//Case 4: previous in L-SIG: HT GF will not reach here because it will execute the previous if and exit
else if (previous >= plcpHeaderStart)
else if (previous >= phyHeaderStart)
{
NS_ASSERT (preamble != WIFI_PREAMBLE_HT_GF);
//Case 4a: current after payload start
if (current >= plcpPayloadStart)
if (current >= phyPayloadStart)
{
psr *= CalculateChunkSuccessRate (snr, plcpHsigHeaderStart - previous, headerMode, txVector);
psr *= CalculateChunkSuccessRate (snr, phyLSigHeaderEnd - previous, headerMode, txVector);
NS_LOG_DEBUG ("Case 4a - previous in L-SIG and current after payload start: mode=" << headerMode << ", psr=" << psr);
}
//Case 4b: current is in training or in SIG-B. non-HT will not come here since it went in previous if or if the previous if is not true this will be not true
else if (current >= plcpTrainingSymbolsStart)
else if (current >= phyTrainingSymbolsStart)
{
NS_ASSERT ((preamble != WIFI_PREAMBLE_LONG) && (preamble != WIFI_PREAMBLE_SHORT));
psr *= CalculateChunkSuccessRate (snr, plcpHsigHeaderStart - previous, headerMode, txVector);
psr *= CalculateChunkSuccessRate (snr, phyLSigHeaderEnd - previous, headerMode, txVector);
NS_LOG_DEBUG ("Case 4a - previous in L-SIG and current is in training or in SIG-B: mode=" << headerMode << ", psr=" << psr);
}
//Case 4c: current in HT-SIG or in SIG-A. non-HT will not come here since it went in previous if or if the previous if is not true this will be not true
else if (current >= plcpHsigHeaderStart)
else if (current >= phyLSigHeaderEnd)
{
NS_ASSERT ((preamble != WIFI_PREAMBLE_LONG) && (preamble != WIFI_PREAMBLE_SHORT));
psr *= CalculateChunkSuccessRate (snr, plcpHsigHeaderStart - previous, headerMode, txVector);
psr *= CalculateChunkSuccessRate (snr, phyLSigHeaderEnd - previous, headerMode, txVector);
NS_LOG_DEBUG ("Case 4ci - previous is in L-SIG and current in HT-SIG or in SIG-A: mode=" << headerMode << ", psr=" << psr);
}
//Case 4d: current with previous in L-SIG
@@ -434,30 +434,30 @@ InterferenceHelper::CalculateNonHtPhyHeaderPer (Ptr<const Event> event, NiChange
else
{
//Case 5a: current after payload start
if (current >= plcpPayloadStart)
if (current >= phyPayloadStart)
{
psr *= CalculateChunkSuccessRate (snr, plcpHsigHeaderStart - plcpHeaderStart, headerMode, txVector);
psr *= CalculateChunkSuccessRate (snr, phyLSigHeaderEnd - phyHeaderStart, headerMode, txVector);
NS_LOG_DEBUG ("Case 5aii - previous is in the preamble and current is after payload start: mode=" << headerMode << ", psr=" << psr);
}
//Case 5b: current is in training or in SIG-B. non-HT will not come here since it went in previous if or if the previous if is not true this will be not true
else if (current >= plcpTrainingSymbolsStart)
else if (current >= phyTrainingSymbolsStart)
{
NS_ASSERT ((preamble != WIFI_PREAMBLE_LONG) && (preamble != WIFI_PREAMBLE_SHORT));
psr *= CalculateChunkSuccessRate (snr, plcpHsigHeaderStart - plcpHeaderStart, headerMode, txVector);
psr *= CalculateChunkSuccessRate (snr, phyLSigHeaderEnd - phyHeaderStart, headerMode, txVector);
NS_LOG_DEBUG ("Case 5b - previous is in the preamble and current is in training or in SIG-B: mode=" << headerMode << ", psr=" << psr);
}
//Case 5c: current in HT-SIG or in SIG-A. non-HT will not come here since it went in previous if or if the previous if is not true this will be not true
else if (current >= plcpHsigHeaderStart)
else if (current >= phyLSigHeaderEnd)
{
NS_ASSERT ((preamble != WIFI_PREAMBLE_LONG) && (preamble != WIFI_PREAMBLE_SHORT));
psr *= CalculateChunkSuccessRate (snr, plcpHsigHeaderStart - plcpHeaderStart, headerMode, txVector);
psr *= CalculateChunkSuccessRate (snr, phyLSigHeaderEnd - phyHeaderStart, headerMode, txVector);
NS_LOG_DEBUG ("Case 5b - previous is in the preamble and current in HT-SIG or in SIG-A: mode=" << headerMode << ", psr=" << psr);
}
//Case 5d: current is in L-SIG.
else if (current >= plcpHeaderStart)
else if (current >= phyHeaderStart)
{
NS_ASSERT (preamble != WIFI_PREAMBLE_HT_GF);
psr *= CalculateChunkSuccessRate (snr, current - plcpHeaderStart, headerMode, txVector);
psr *= CalculateChunkSuccessRate (snr, current - phyHeaderStart, headerMode, txVector);
NS_LOG_DEBUG ("Case 5d - previous is in the preamble and current is in L-SIG: mode=" << headerMode << ", psr=" << psr);
}
}
@@ -482,24 +482,24 @@ InterferenceHelper::CalculateHtPhyHeaderPer (Ptr<const Event> event, NiChanges *
WifiMode mcsHeaderMode;
if (preamble == WIFI_PREAMBLE_HT_MF || preamble == WIFI_PREAMBLE_HT_GF)
{
//mode for PLCP header fields sent with HT modulation
mcsHeaderMode = WifiPhy::GetHtPlcpHeaderMode ();
//mode for PHY header fields sent with HT modulation
mcsHeaderMode = WifiPhy::GetHtPhyHeaderMode ();
}
else if (preamble == WIFI_PREAMBLE_VHT_SU || preamble == WIFI_PREAMBLE_VHT_MU)
{
//mode for PLCP header fields sent with VHT modulation
mcsHeaderMode = WifiPhy::GetVhtPlcpHeaderMode ();
//mode for PHY header fields sent with VHT modulation
mcsHeaderMode = WifiPhy::GetVhtPhyHeaderMode ();
}
else if (preamble == WIFI_PREAMBLE_HE_SU || preamble == WIFI_PREAMBLE_HE_MU)
{
//mode for PLCP header fields sent with HE modulation
mcsHeaderMode = WifiPhy::GetHePlcpHeaderMode ();
//mode for PHY header fields sent with HE modulation
mcsHeaderMode = WifiPhy::GetHePhyHeaderMode ();
}
WifiMode headerMode = WifiPhy::GetPlcpHeaderMode (txVector);
Time plcpHeaderStart = j->first + WifiPhy::GetPlcpPreambleDuration (txVector); //PPDU start time + preamble
Time plcpHsigHeaderStart = plcpHeaderStart + WifiPhy::GetPlcpHeaderDuration (txVector); //PPDU start time + preamble + L-SIG
Time plcpTrainingSymbolsStart = plcpHsigHeaderStart + WifiPhy::GetPlcpHtSigHeaderDuration (preamble) + WifiPhy::GetPlcpSigA1Duration (preamble) + WifiPhy::GetPlcpSigA2Duration (preamble); //PPDU start time + preamble + L-SIG + HT-SIG or SIG-A
Time plcpPayloadStart = plcpTrainingSymbolsStart + WifiPhy::GetPlcpTrainingSymbolDuration (txVector) + WifiPhy::GetPlcpSigBDuration (preamble); //PPDU start time + preamble + L-SIG + HT-SIG or SIG-A + Training + SIG-B
WifiMode headerMode = WifiPhy::GetPhyHeaderMode (txVector);
Time phyHeaderStart = j->first + WifiPhy::GetPhyPreambleDuration (txVector); //PPDU start time + preamble
Time phyLSigHeaderEnd = phyHeaderStart + WifiPhy::GetPhyHeaderDuration (txVector); //PPDU start time + preamble + L-SIG
Time phyTrainingSymbolsStart = phyLSigHeaderEnd + WifiPhy::GetPhyHtSigHeaderDuration (preamble) + WifiPhy::GetPhySigA1Duration (preamble) + WifiPhy::GetPhySigA2Duration (preamble); //PPDU start time + preamble + L-SIG + HT-SIG or SIG-A
Time phyPayloadStart = phyTrainingSymbolsStart + WifiPhy::GetPhyTrainingSymbolDuration (txVector) + WifiPhy::GetPhySigBDuration (preamble); //PPDU start time + preamble + L-SIG + HT-SIG or SIG-A + Training + SIG-B
double noiseInterferenceW = m_firstPower;
double powerW = event->GetRxPowerW ();
while (++j != ni->end ())
@@ -509,19 +509,19 @@ InterferenceHelper::CalculateHtPhyHeaderPer (Ptr<const Event> event, NiChanges *
NS_ASSERT (current >= previous);
double snr = CalculateSnr (powerW, noiseInterferenceW, txVector.GetChannelWidth ());
//Case 1: previous and current after payload start: nothing to do
if (previous >= plcpPayloadStart)
if (previous >= phyPayloadStart)
{
psr *= 1;
NS_LOG_DEBUG ("Case 1 - previous and current after payload start: nothing to do");
}
//Case 2: previous is in training or in SIG-B: non-HT will not enter here since it didn't enter in the last two and they are all the same for non-HT
else if (previous >= plcpTrainingSymbolsStart)
else if (previous >= phyTrainingSymbolsStart)
{
NS_ASSERT ((preamble != WIFI_PREAMBLE_LONG) && (preamble != WIFI_PREAMBLE_SHORT));
//Case 2a: current after payload start
if (current >= plcpPayloadStart)
if (current >= phyPayloadStart)
{
psr *= CalculateChunkSuccessRate (snr, plcpPayloadStart - previous, mcsHeaderMode, txVector);
psr *= CalculateChunkSuccessRate (snr, phyPayloadStart - previous, mcsHeaderMode, txVector);
NS_LOG_DEBUG ("Case 2a - previous is in training or in SIG-B and current after payload start: mode=" << mcsHeaderMode << ", psr=" << psr);
}
//Case 2b: current is in training or in SIG-B
@@ -532,42 +532,42 @@ InterferenceHelper::CalculateHtPhyHeaderPer (Ptr<const Event> event, NiChanges *
}
}
//Case 3: previous is in HT-SIG or SIG-A: non-HT will not enter here since it didn't enter in the last two and they are all the same for non-HT
else if (previous >= plcpHsigHeaderStart)
else if (previous >= phyLSigHeaderEnd)
{
NS_ASSERT ((preamble != WIFI_PREAMBLE_LONG) && (preamble != WIFI_PREAMBLE_SHORT));
//Case 3a: current after payload start
if (current >= plcpPayloadStart)
if (current >= phyPayloadStart)
{
psr *= CalculateChunkSuccessRate (snr, plcpPayloadStart - plcpTrainingSymbolsStart, mcsHeaderMode, txVector);
psr *= CalculateChunkSuccessRate (snr, phyPayloadStart - phyTrainingSymbolsStart, mcsHeaderMode, txVector);
//Case 3ai: VHT or HE format
if (preamble == WIFI_PREAMBLE_VHT_SU || preamble == WIFI_PREAMBLE_HE_SU || preamble == WIFI_PREAMBLE_VHT_MU || preamble == WIFI_PREAMBLE_HE_MU)
{
//SIG-A is sent using non-HT OFDM modulation
psr *= CalculateChunkSuccessRate (snr, plcpTrainingSymbolsStart - previous, headerMode, txVector);
psr *= CalculateChunkSuccessRate (snr, phyTrainingSymbolsStart - previous, headerMode, txVector);
NS_LOG_DEBUG ("Case 3ai - previous is in SIG-A and current after payload start: mcs mode=" << mcsHeaderMode << ", non-HT mode=" << headerMode << ", psr=" << psr);
}
//Case 3aii: HT formats
else
{
psr *= CalculateChunkSuccessRate (snr, plcpTrainingSymbolsStart - previous, mcsHeaderMode, txVector);
psr *= CalculateChunkSuccessRate (snr, phyTrainingSymbolsStart - previous, mcsHeaderMode, txVector);
NS_LOG_DEBUG ("Case 3aii - previous is in HT-SIG and current after payload start: mode=" << mcsHeaderMode << ", psr=" << psr);
}
}
//Case 3b: current is in training or in SIG-B
else if (current >= plcpTrainingSymbolsStart)
else if (current >= phyTrainingSymbolsStart)
{
psr *= CalculateChunkSuccessRate (snr, current - plcpTrainingSymbolsStart, mcsHeaderMode, txVector);
psr *= CalculateChunkSuccessRate (snr, current - phyTrainingSymbolsStart, mcsHeaderMode, txVector);
//Case 3bi: VHT or HE format
if (preamble == WIFI_PREAMBLE_VHT_SU || preamble == WIFI_PREAMBLE_HE_SU || preamble == WIFI_PREAMBLE_VHT_MU || preamble == WIFI_PREAMBLE_HE_MU)
{
//SIG-A is sent using non-HT OFDM modulation
psr *= CalculateChunkSuccessRate (snr, plcpTrainingSymbolsStart - previous, headerMode, txVector);
psr *= CalculateChunkSuccessRate (snr, phyTrainingSymbolsStart - previous, headerMode, txVector);
NS_LOG_DEBUG ("Case 3bi - previous is in SIG-A and current is in training or in SIG-B: mode=" << headerMode << ", psr=" << psr);
}
//Case 3bii: HT formats
else
{
psr *= CalculateChunkSuccessRate (snr, plcpTrainingSymbolsStart - previous, mcsHeaderMode, txVector);
psr *= CalculateChunkSuccessRate (snr, phyTrainingSymbolsStart - previous, mcsHeaderMode, txVector);
NS_LOG_DEBUG ("Case 3bii - previous is in HT-SIG and current is in HT training: mode=" << mcsHeaderMode << ", psr=" << psr);
}
}
@@ -590,11 +590,11 @@ InterferenceHelper::CalculateHtPhyHeaderPer (Ptr<const Event> event, NiChanges *
}
}
//Case 4: previous in L-SIG: HT GF will not reach here because it will execute the previous if and exit
else if (previous >= plcpHeaderStart)
else if (previous >= phyHeaderStart)
{
NS_ASSERT (preamble != WIFI_PREAMBLE_HT_GF);
//Case 4a: current after payload start
if (current >= plcpPayloadStart)
if (current >= phyPayloadStart)
{
//Case 4ai: non-HT format
if (preamble == WIFI_PREAMBLE_LONG || preamble == WIFI_PREAMBLE_SHORT)
@@ -605,49 +605,49 @@ InterferenceHelper::CalculateHtPhyHeaderPer (Ptr<const Event> event, NiChanges *
//Case 4aii: VHT or HE format
else if (preamble == WIFI_PREAMBLE_VHT_SU || preamble == WIFI_PREAMBLE_HE_SU || preamble == WIFI_PREAMBLE_VHT_MU || preamble == WIFI_PREAMBLE_HE_MU)
{
psr *= CalculateChunkSuccessRate (snr, plcpPayloadStart - plcpTrainingSymbolsStart, mcsHeaderMode, txVector);
psr *= CalculateChunkSuccessRate (snr, plcpTrainingSymbolsStart - plcpHsigHeaderStart, headerMode, txVector);
psr *= CalculateChunkSuccessRate (snr, phyPayloadStart - phyTrainingSymbolsStart, mcsHeaderMode, txVector);
psr *= CalculateChunkSuccessRate (snr, phyTrainingSymbolsStart - phyLSigHeaderEnd, headerMode, txVector);
NS_LOG_DEBUG ("Case 4aii - previous is in L-SIG and current after payload start: mcs mode=" << mcsHeaderMode << ", non-HT mode=" << headerMode << ", psr=" << psr);
}
//Case 4aiii: HT mixed format
else
{
psr *= CalculateChunkSuccessRate (snr, plcpPayloadStart - plcpHsigHeaderStart, mcsHeaderMode, txVector);
psr *= CalculateChunkSuccessRate (snr, phyPayloadStart - phyLSigHeaderEnd, mcsHeaderMode, txVector);
NS_LOG_DEBUG ("Case 4aiii - previous in L-SIG and current after payload start: mcs mode=" << mcsHeaderMode << ", psr=" << psr);
}
}
//Case 4b: current is in training or in SIG-B. non-HT will not come here since it went in previous if or if the previous if is not true this will be not true
else if (current >= plcpTrainingSymbolsStart)
else if (current >= phyTrainingSymbolsStart)
{
NS_ASSERT ((preamble != WIFI_PREAMBLE_LONG) && (preamble != WIFI_PREAMBLE_SHORT));
//Case 4bi: VHT or HE format
if (preamble == WIFI_PREAMBLE_VHT_SU || preamble == WIFI_PREAMBLE_HE_SU || preamble == WIFI_PREAMBLE_VHT_MU || preamble == WIFI_PREAMBLE_HE_MU)
{
psr *= CalculateChunkSuccessRate (snr, current - plcpTrainingSymbolsStart, mcsHeaderMode, txVector);
psr *= CalculateChunkSuccessRate (snr, plcpTrainingSymbolsStart - plcpHsigHeaderStart, headerMode, txVector);
psr *= CalculateChunkSuccessRate (snr, current - phyTrainingSymbolsStart, mcsHeaderMode, txVector);
psr *= CalculateChunkSuccessRate (snr, phyTrainingSymbolsStart - phyLSigHeaderEnd, headerMode, txVector);
NS_LOG_DEBUG ("Case 4bi - previous is in L-SIG and current in training or in SIG-B: mcs mode=" << mcsHeaderMode << ", non-HT mode=" << headerMode << ", psr=" << psr);
}
//Case 4bii: HT mixed format
else
{
psr *= CalculateChunkSuccessRate (snr, current - plcpHsigHeaderStart, mcsHeaderMode, txVector);
psr *= CalculateChunkSuccessRate (snr, current - phyLSigHeaderEnd, mcsHeaderMode, txVector);
NS_LOG_DEBUG ("Case 4bii - previous in L-SIG and current in HT training: mcs mode=" << mcsHeaderMode << ", psr=" << psr);
}
}
//Case 4c: current in HT-SIG or in SIG-A. Non-HT will not come here since it went in previous if or if the previous if is not true this will be not true
else if (current >= plcpHsigHeaderStart)
else if (current >= phyLSigHeaderEnd)
{
NS_ASSERT ((preamble != WIFI_PREAMBLE_LONG) && (preamble != WIFI_PREAMBLE_SHORT));
//Case 4ci: VHT format
if (preamble == WIFI_PREAMBLE_VHT_SU || preamble == WIFI_PREAMBLE_HE_SU || preamble == WIFI_PREAMBLE_VHT_MU || preamble == WIFI_PREAMBLE_HE_MU)
{
psr *= CalculateChunkSuccessRate (snr, current - plcpHsigHeaderStart, headerMode, txVector);
psr *= CalculateChunkSuccessRate (snr, current - phyLSigHeaderEnd, headerMode, txVector);
NS_LOG_DEBUG ("Case 4ci - previous is in L-SIG and current in SIG-A: mode=" << headerMode << ", psr=" << psr);
}
//Case 4cii: HT mixed format
else
{
psr *= CalculateChunkSuccessRate (snr, current - plcpHsigHeaderStart, mcsHeaderMode, txVector);
psr *= CalculateChunkSuccessRate (snr, current - phyLSigHeaderEnd, mcsHeaderMode, txVector);
NS_LOG_DEBUG ("Case 4cii - previous in L-SIG and current in HT-SIG: mcs mode=" << mcsHeaderMode << ", psr=" << psr);
}
}
@@ -662,7 +662,7 @@ InterferenceHelper::CalculateHtPhyHeaderPer (Ptr<const Event> event, NiChanges *
else
{
//Case 5a: current after payload start
if (current >= plcpPayloadStart)
if (current >= phyPayloadStart)
{
//Case 5ai: non-HT format (No HT-SIG or Training Symbols)
if (preamble == WIFI_PREAMBLE_LONG || preamble == WIFI_PREAMBLE_SHORT)
@@ -673,54 +673,54 @@ InterferenceHelper::CalculateHtPhyHeaderPer (Ptr<const Event> event, NiChanges *
//Case 5aii: VHT or HE format
else if (preamble == WIFI_PREAMBLE_VHT_SU || preamble == WIFI_PREAMBLE_HE_SU || preamble == WIFI_PREAMBLE_VHT_MU || preamble == WIFI_PREAMBLE_HE_MU)
{
psr *= CalculateChunkSuccessRate (snr, plcpPayloadStart - plcpTrainingSymbolsStart, mcsHeaderMode, txVector);
psr *= CalculateChunkSuccessRate (snr, plcpTrainingSymbolsStart - plcpHsigHeaderStart, headerMode, txVector);
psr *= CalculateChunkSuccessRate (snr, phyPayloadStart - phyTrainingSymbolsStart, mcsHeaderMode, txVector);
psr *= CalculateChunkSuccessRate (snr, phyTrainingSymbolsStart - phyLSigHeaderEnd, headerMode, txVector);
NS_LOG_DEBUG ("Case 5aii - previous is in the preamble and current is after payload start: mcs mode=" << mcsHeaderMode << ", non-HT mode=" << headerMode << ", psr=" << psr);
}
//Case 5aiii: HT formats
else
{
psr *= CalculateChunkSuccessRate (snr, plcpPayloadStart - plcpHsigHeaderStart, mcsHeaderMode, txVector);
psr *= CalculateChunkSuccessRate (snr, phyPayloadStart - phyLSigHeaderEnd, mcsHeaderMode, txVector);
NS_LOG_DEBUG ("Case 5aiii - previous is in the preamble and current is after payload start: mcs mode=" << mcsHeaderMode << ", non-HT mode=" << headerMode << ", psr=" << psr);
}
}
//Case 5b: current is in training or in SIG-B. Non-HT will not come here since it went in previous if or if the previous if is not true this will be not true
else if (current >= plcpTrainingSymbolsStart)
else if (current >= phyTrainingSymbolsStart)
{
NS_ASSERT ((preamble != WIFI_PREAMBLE_LONG) && (preamble != WIFI_PREAMBLE_SHORT));
//Case 5bi: VHT or HE format
if (preamble == WIFI_PREAMBLE_VHT_SU || preamble == WIFI_PREAMBLE_HE_SU || preamble == WIFI_PREAMBLE_VHT_MU || preamble == WIFI_PREAMBLE_HE_MU)
{
psr *= CalculateChunkSuccessRate (snr, current - plcpTrainingSymbolsStart, mcsHeaderMode, txVector);
psr *= CalculateChunkSuccessRate (snr, plcpTrainingSymbolsStart - plcpHsigHeaderStart, headerMode, txVector);
psr *= CalculateChunkSuccessRate (snr, current - phyTrainingSymbolsStart, mcsHeaderMode, txVector);
psr *= CalculateChunkSuccessRate (snr, phyTrainingSymbolsStart - phyLSigHeaderEnd, headerMode, txVector);
NS_LOG_DEBUG ("Case 5bi - previous is in the preamble and current in training or in SIG-B: mcs mode=" << mcsHeaderMode << ", non-HT mode=" << headerMode << ", psr=" << psr);
}
//Case 5bii: HT mixed format
else
{
psr *= CalculateChunkSuccessRate (snr, current - plcpHsigHeaderStart, mcsHeaderMode, txVector);
psr *= CalculateChunkSuccessRate (snr, current - phyLSigHeaderEnd, mcsHeaderMode, txVector);
NS_LOG_DEBUG ("Case 5bii - previous is in the preamble and current in HT training: mcs mode=" << mcsHeaderMode << ", psr=" << psr);
}
}
//Case 5c: current in HT-SIG or in SIG-A. Non-HT will not come here since it went in previous if or if the previous if is not true this will be not true
else if (current >= plcpHsigHeaderStart)
else if (current >= phyLSigHeaderEnd)
{
NS_ASSERT ((preamble != WIFI_PREAMBLE_LONG) && (preamble != WIFI_PREAMBLE_SHORT));
//Case 5ci: VHT or HE format
if (preamble == WIFI_PREAMBLE_VHT_SU || preamble == WIFI_PREAMBLE_HE_SU || preamble == WIFI_PREAMBLE_VHT_MU || preamble == WIFI_PREAMBLE_HE_MU)
{
psr *= CalculateChunkSuccessRate (snr, current - plcpHsigHeaderStart, headerMode, txVector);
psr *= CalculateChunkSuccessRate (snr, current - phyLSigHeaderEnd, headerMode, txVector);
NS_LOG_DEBUG ("Case 5ci - previous is in preamble and current in SIG-A: mode=" << headerMode << ", psr=" << psr);
}
//Case 5cii: HT formats
else
{
psr *= CalculateChunkSuccessRate (snr, current - plcpHsigHeaderStart, mcsHeaderMode, txVector);
psr *= CalculateChunkSuccessRate (snr, current - phyLSigHeaderEnd, mcsHeaderMode, txVector);
NS_LOG_DEBUG ("Case 5cii - previous in preamble and current in HT-SIG: mcs mode=" << mcsHeaderMode << ", psr=" << psr);
}
}
//Case 5d: current is in L-SIG. HT-GF will not come here
else if (current >= plcpHeaderStart)
else if (current >= phyHeaderStart)
{
NS_ASSERT (preamble != WIFI_PREAMBLE_HT_GF);
psr *= 1;
@@ -776,7 +776,7 @@ InterferenceHelper::CalculateNonHtPhyHeaderSnrPer (Ptr<Event> event) const
noiseInterferenceW,
event->GetTxVector ().GetChannelWidth ());
/* calculate the SNIR at the start of the PLCP header and accumulate
/* calculate the SNIR at the start of the PHY header and accumulate
* all SNIR changes in the SNIR vector.
*/
double per = CalculateNonHtPhyHeaderPer (event, &ni);
@@ -796,7 +796,7 @@ InterferenceHelper::CalculateHtPhyHeaderSnrPer (Ptr<Event> event) const
noiseInterferenceW,
event->GetTxVector ().GetChannelWidth ());
/* calculate the SNIR at the start of the PLCP header and accumulate
/* calculate the SNIR at the start of the PHY header and accumulate
* all SNIR changes in the SNIR vector.
*/
double per = CalculateHtPhyHeaderPer (event, &ni);

View File

@@ -196,7 +196,7 @@ public:
* this class.
*
* \param event the event corresponding to the first time the corresponding PPDU arrives
* \param relativeMpduStartStop the time window (pair of start and end times) of PLCP payload to focus on
* \param relativeMpduStartStop the time window (pair of start and end times) of PHY payload to focus on
*
* \return struct of SNR and PER (with PER being evaluated over the provided time window)
*/
@@ -335,13 +335,13 @@ private:
*/
double CalculatePayloadChunkSuccessRate (double snir, Time duration, WifiTxVector txVector) const;
/**
* Calculate the error rate of the given PLCP payload only in the provided time
* window (thus enabling per MPDU PER information). The PLCP payload can be divided into
* Calculate the error rate of the given PHY payload only in the provided time
* window (thus enabling per MPDU PER information). The PHY payload can be divided into
* multiple chunks (e.g. due to interference from other transmissions).
*
* \param event the event
* \param ni the NiChanges
* \param window time window (pair of start and end times) of PLCP payload to focus on
* \param window time window (pair of start and end times) of PHY payload to focus on
*
* \return the error rate of the payload
*/

View File

@@ -319,7 +319,7 @@ MinstrelHtWifiManager::CalculateMpduTxDuration (Ptr<WifiPhy> phy, uint8_t stream
txvector.SetStbc (0);
txvector.SetMode (mode);
txvector.SetPreambleType (WIFI_PREAMBLE_HT_MF);
return WifiPhy::CalculatePlcpPreambleAndHeaderDuration (txvector)
return WifiPhy::CalculatePhyPreambleAndHeaderDuration (txvector)
+ WifiPhy::GetPayloadDuration (m_frameLength, txvector, phy->GetFrequency (), mpduType);
}

View File

@@ -1132,7 +1132,7 @@ CapabilityInformation
StaWifiMac::GetCapabilities (void) const
{
CapabilityInformation capabilities;
capabilities.SetShortPreamble (m_phy->GetShortPlcpPreambleSupported () || GetErpSupported ());
capabilities.SetShortPreamble (m_phy->GetShortPhyPreambleSupported () || GetErpSupported ());
capabilities.SetShortSlotTime (GetShortSlotTimeSupported () && GetErpSupported ());
if (GetPcfSupported ())
{

View File

@@ -299,12 +299,12 @@ WifiPhy::GetTypeId (void)
MakeBooleanChecker (),
TypeId::DEPRECATED, "Use the HtConfiguration instead")
.AddAttribute ("ShortPlcpPreambleSupported",
"Whether or not short PLCP preamble is supported."
"Whether or not short PHY preamble is supported."
"This parameter is only valuable for 802.11b STAs and APs."
"Note: 802.11g APs and STAs always support short PLCP preamble.",
"Note: 802.11g APs and STAs always support short PHY preamble.",
BooleanValue (false),
MakeBooleanAccessor (&WifiPhy::GetShortPlcpPreambleSupported,
&WifiPhy::SetShortPlcpPreambleSupported),
MakeBooleanAccessor (&WifiPhy::GetShortPhyPreambleSupported,
&WifiPhy::SetShortPhyPreambleSupported),
MakeBooleanChecker ())
.AddAttribute ("FrameCaptureModel",
"Ptr to an object that implements the frame capture model",
@@ -386,7 +386,7 @@ WifiPhy::WifiPhy ()
: m_txMpduReferenceNumber (0xffffffff),
m_rxMpduReferenceNumber (0xffffffff),
m_endRxEvent (),
m_endPlcpRxEvent (),
m_endPhyRxEvent (),
m_endPreambleDetectionEvent (),
m_standard (WIFI_PHY_STANDARD_UNSPECIFIED),
m_isConstructed (false),
@@ -419,7 +419,7 @@ WifiPhy::DoDispose (void)
{
NS_LOG_FUNCTION (this);
m_endRxEvent.Cancel ();
m_endPlcpRxEvent.Cancel ();
m_endPhyRxEvent.Cancel ();
m_endPreambleDetectionEvent.Cancel ();
m_device = 0;
m_mobility = 0;
@@ -708,14 +708,14 @@ WifiPhy::GetGuardInterval (void) const
}
void
WifiPhy::SetShortPlcpPreambleSupported (bool enable)
WifiPhy::SetShortPhyPreambleSupported (bool enable)
{
NS_LOG_FUNCTION (this << enable);
m_shortPreamble = enable;
}
bool
WifiPhy::GetShortPlcpPreambleSupported (void) const
WifiPhy::GetShortPhyPreambleSupported (void) const
{
return m_shortPreamble;
}
@@ -1559,7 +1559,7 @@ WifiPhy::DoChannelSwitch (uint8_t nch)
{
case WifiPhyState::RX:
NS_LOG_DEBUG ("drop packet because of channel switching while reception");
m_endPlcpRxEvent.Cancel ();
m_endPhyRxEvent.Cancel ();
m_endRxEvent.Cancel ();
m_endPreambleDetectionEvent.Cancel ();
goto switchChannel;
@@ -1619,7 +1619,7 @@ WifiPhy::DoFrequencySwitch (uint16_t frequency)
{
case WifiPhyState::RX:
NS_LOG_DEBUG ("drop packet because of channel/frequency switching while reception");
m_endPlcpRxEvent.Cancel ();
m_endPhyRxEvent.Cancel ();
m_endRxEvent.Cancel ();
m_endPreambleDetectionEvent.Cancel ();
goto switchFrequency;
@@ -1702,7 +1702,7 @@ WifiPhy::SetOffMode (void)
NS_LOG_FUNCTION (this);
m_powerRestricted = false;
m_channelAccessRequested = false;
m_endPlcpRxEvent.Cancel ();
m_endPhyRxEvent.Cancel ();
m_endRxEvent.Cancel ();
m_endPreambleDetectionEvent.Cancel ();
m_state->SwitchToOff ();
@@ -1770,19 +1770,19 @@ WifiPhy::ResumeFromOff (void)
}
WifiMode
WifiPhy::GetHtPlcpHeaderMode ()
WifiPhy::GetHtPhyHeaderMode ()
{
return WifiPhy::GetHtMcs0 ();
}
WifiMode
WifiPhy::GetVhtPlcpHeaderMode ()
WifiPhy::GetVhtPhyHeaderMode ()
{
return WifiPhy::GetVhtMcs0 ();
}
WifiMode
WifiPhy::GetHePlcpHeaderMode ()
WifiPhy::GetHePhyHeaderMode ()
{
return WifiPhy::GetHeMcs0 ();
}
@@ -1794,7 +1794,7 @@ WifiPhy::GetPreambleDetectionDuration (void)
}
Time
WifiPhy::GetPlcpTrainingSymbolDuration (WifiTxVector txVector)
WifiPhy::GetPhyTrainingSymbolDuration (WifiTxVector txVector)
{
uint8_t Ndltf, Neltf;
//We suppose here that STBC = 0.
@@ -1843,7 +1843,7 @@ WifiPhy::GetPlcpTrainingSymbolDuration (WifiTxVector txVector)
}
Time
WifiPhy::GetPlcpHtSigHeaderDuration (WifiPreamble preamble)
WifiPhy::GetPhyHtSigHeaderDuration (WifiPreamble preamble)
{
switch (preamble)
{
@@ -1858,7 +1858,7 @@ WifiPhy::GetPlcpHtSigHeaderDuration (WifiPreamble preamble)
}
Time
WifiPhy::GetPlcpSigA1Duration (WifiPreamble preamble)
WifiPhy::GetPhySigA1Duration (WifiPreamble preamble)
{
switch (preamble)
{
@@ -1875,7 +1875,7 @@ WifiPhy::GetPlcpSigA1Duration (WifiPreamble preamble)
}
Time
WifiPhy::GetPlcpSigA2Duration (WifiPreamble preamble)
WifiPhy::GetPhySigA2Duration (WifiPreamble preamble)
{
switch (preamble)
{
@@ -1892,7 +1892,7 @@ WifiPhy::GetPlcpSigA2Duration (WifiPreamble preamble)
}
Time
WifiPhy::GetPlcpSigBDuration (WifiPreamble preamble)
WifiPhy::GetPhySigBDuration (WifiPreamble preamble)
{
switch (preamble)
{
@@ -1906,7 +1906,7 @@ WifiPhy::GetPlcpSigBDuration (WifiPreamble preamble)
}
WifiMode
WifiPhy::GetPlcpHeaderMode (WifiTxVector txVector)
WifiPhy::GetPhyHeaderMode (WifiTxVector txVector)
{
WifiPreamble preamble = txVector.GetPreambleType ();
switch (preamble)
@@ -1926,9 +1926,9 @@ WifiPhy::GetPlcpHeaderMode (WifiTxVector txVector)
return WifiPhy::GetOfdmRate3MbpsBW10MHz ();
case 20:
default:
//(Section 18.3.2 "PLCP frame format"; IEEE Std 802.11-2012)
//actually this is only the first part of the PlcpHeader,
//because the last 16 bits of the PlcpHeader are using the
//(Section 17.3.2 "PPDU frame format"; IEEE Std 802.11-2016)
//actually this is only the first part of the PhyHeader,
//because the last 16 bits of the PhyHeader are using the
//same mode of the payload
return WifiPhy::GetOfdmRate6Mbps ();
}
@@ -1940,12 +1940,12 @@ WifiPhy::GetPlcpHeaderMode (WifiTxVector txVector)
{
if (preamble == WIFI_PREAMBLE_LONG || txVector.GetMode () == WifiPhy::GetDsssRate1Mbps ())
{
//(Section 16.2.3 "PLCP field definitions" and Section 17.2.2.2 "Long PPDU format"; IEEE Std 802.11-2012)
//(Section 16.2.3 "PPDU field definitions" and Section 16.2.2.2 "Long PPDU format"; IEEE Std 802.11-2016)
return WifiPhy::GetDsssRate1Mbps ();
}
else
{
//(Section 17.2.2.3 "Short PPDU format"; IEEE Std 802.11-2012)
//(Section 16.2.2.3 "Short PPDU format"; IEEE Std 802.11-2016)
return WifiPhy::GetDsssRate2Mbps ();
}
}
@@ -1970,7 +1970,7 @@ WifiPhy::GetPlcpHeaderMode (WifiTxVector txVector)
}
Time
WifiPhy::GetPlcpHeaderDuration (WifiTxVector txVector)
WifiPhy::GetPhyHeaderDuration (WifiTxVector txVector)
{
WifiPreamble preamble = txVector.GetPreambleType ();
switch (txVector.GetPreambleType ())
@@ -1986,18 +1986,18 @@ WifiPhy::GetPlcpHeaderDuration (WifiTxVector txVector)
{
case 20:
default:
//(Section 18.3.3 "PLCP preamble (SYNC))" and Figure 18-4 "OFDM training structure"; IEEE Std 802.11-2012)
//also (Section 18.3.2.4 "Timing related parameters" Table 18-5 "Timing-related parameters"; IEEE Std 802.11-2012)
//(Section 17.3.3 "PHY preamble (SYNC))" and Figure 17-4 "OFDM training structure"; IEEE Std 802.11-2016)
//also (Section 17.3.2.4 "Timing related parameters" Table 17-5 "Timing-related parameters"; IEEE Std 802.11-2016)
//We return the duration of the SIGNAL field only, since the
//SERVICE field (which strictly speaking belongs to the PLCP
//header, see Section 18.3.2 and Figure 18-1) is sent using the
//SERVICE field (which strictly speaking belongs to the PHY
//header, see Section 17.3.2 and Figure 17-1) is sent using the
//payload mode.
return MicroSeconds (4);
case 10:
//(Section 18.3.2.4 "Timing related parameters" Table 18-5 "Timing-related parameters"; IEEE Std 802.11-2012)
//(Section 17.3.2.4 "Timing related parameters" Table 17-5 "Timing-related parameters"; IEEE Std 802.11-2016)
return MicroSeconds (8);
case 5:
//(Section 18.3.2.4 "Timing related parameters" Table 18-5 "Timing-related parameters"; IEEE Std 802.11-2012)
//(Section 17.3.2.4 "Timing related parameters" Table 17-5 "Timing-related parameters"; IEEE Std 802.11-2016)
return MicroSeconds (16);
}
}
@@ -2008,12 +2008,12 @@ WifiPhy::GetPlcpHeaderDuration (WifiTxVector txVector)
{
if ((preamble == WIFI_PREAMBLE_SHORT) && (txVector.GetMode ().GetDataRate (22) > 1000000))
{
//(Section 17.2.2.3 "Short PPDU format" and Figure 17-2 "Short PPDU format"; IEEE Std 802.11-2012)
//(Section 16.2.2.3 "Short PPDU format" and Figure 16-2 "Short PPDU format"; IEEE Std 802.11-2016)
return MicroSeconds (24);
}
else
{
//(Section 17.2.2.2 "Long PPDU format" and Figure 17-1 "Short PPDU format"; IEEE Std 802.11-2012)
//(Section 16.2.2.2 "Long PPDU format" and Figure 16-1 "Short PPDU format"; IEEE Std 802.11-2016)
return MicroSeconds (48);
}
}
@@ -2048,7 +2048,7 @@ WifiPhy::GetStartOfPacketDuration (WifiTxVector txVector)
}
Time
WifiPhy::GetPlcpPreambleDuration (WifiTxVector txVector)
WifiPhy::GetPhyPreambleDuration (WifiTxVector txVector)
{
WifiPreamble preamble = txVector.GetPreambleType ();
switch (txVector.GetPreambleType ())
@@ -2064,16 +2064,16 @@ WifiPhy::GetPlcpPreambleDuration (WifiTxVector txVector)
{
case 20:
default:
//(Section 18.3.3 "PLCP preamble (SYNC))" Figure 18-4 "OFDM training structure"
//also Section 18.3.2.3 "Modulation-dependent parameters" Table 18-4 "Modulation-dependent parameters"; IEEE Std 802.11-2012)
//(Section 17.3.3 "PHY preamble (SYNC))" Figure 17-4 "OFDM training structure"
//also Section 17.3.2.3 "Modulation-dependent parameters" Table 17-4 "Modulation-dependent parameters"; IEEE Std 802.11-2016)
return MicroSeconds (16);
case 10:
//(Section 18.3.3 "PLCP preamble (SYNC))" Figure 18-4 "OFDM training structure"
//also Section 18.3.2.3 "Modulation-dependent parameters" Table 18-4 "Modulation-dependent parameters"; IEEE Std 802.11-2012)
//(Section 17.3.3 "PHY preamble (SYNC))" Figure 17-4 "OFDM training structure"
//also Section 17.3.2.3 "Modulation-dependent parameters" Table 17-4 "Modulation-dependent parameters"; IEEE Std 802.11-2016)
return MicroSeconds (32);
case 5:
//(Section 18.3.3 "PLCP preamble (SYNC))" Figure 18-4 "OFDM training structure"
//also Section 18.3.2.3 "Modulation-dependent parameters" Table 18-4 "Modulation-dependent parameters"; IEEE Std 802.11-2012)
//(Section 17.3.3 "PHY preamble (SYNC))" Figure 17-4 "OFDM training structure"
//also Section 17.3.2.3 "Modulation-dependent parameters" Table 17-4 "Modulation-dependent parameters"; IEEE Std 802.11-2016)
return MicroSeconds (64);
}
}
@@ -2395,23 +2395,23 @@ WifiPhy::GetPayloadDuration (uint32_t size, WifiTxVector txVector, uint16_t freq
}
Time
WifiPhy::CalculatePlcpPreambleAndHeaderDuration (WifiTxVector txVector)
WifiPhy::CalculatePhyPreambleAndHeaderDuration (WifiTxVector txVector)
{
WifiPreamble preamble = txVector.GetPreambleType ();
Time duration = GetPlcpPreambleDuration (txVector)
+ GetPlcpHeaderDuration (txVector)
+ GetPlcpHtSigHeaderDuration (preamble)
+ GetPlcpSigA1Duration (preamble)
+ GetPlcpSigA2Duration (preamble)
+ GetPlcpTrainingSymbolDuration (txVector)
+ GetPlcpSigBDuration (preamble);
Time duration = GetPhyPreambleDuration (txVector)
+ GetPhyHeaderDuration (txVector)
+ GetPhyHtSigHeaderDuration (preamble)
+ GetPhySigA1Duration (preamble)
+ GetPhySigA2Duration (preamble)
+ GetPhyTrainingSymbolDuration (txVector)
+ GetPhySigBDuration (preamble);
return duration;
}
Time
WifiPhy::CalculateTxDuration (uint32_t size, WifiTxVector txVector, uint16_t frequency)
{
Time duration = CalculatePlcpPreambleAndHeaderDuration (txVector)
Time duration = CalculatePhyPreambleAndHeaderDuration (txVector)
+ GetPayloadDuration (size, txVector, frequency);
return duration;
}
@@ -2568,9 +2568,9 @@ WifiPhy::Send (Ptr<const WifiPsdu> psdu, WifiTxVector txVector)
{
m_endPreambleDetectionEvent.Cancel ();
}
if (m_endPlcpRxEvent.IsRunning ())
if (m_endPhyRxEvent.IsRunning ())
{
m_endPlcpRxEvent.Cancel ();
m_endPhyRxEvent.Cancel ();
}
if (m_endRxEvent.IsRunning ())
{
@@ -2620,7 +2620,7 @@ WifiPhy::StartReceiveHeader (Ptr<Event> event, Time headerPayloadDuration)
{
NS_LOG_FUNCTION (this << *event << headerPayloadDuration);
NS_ASSERT (!IsStateRx ());
NS_ASSERT (m_endPlcpRxEvent.IsExpired ());
NS_ASSERT (m_endPhyRxEvent.IsExpired ());
InterferenceHelper::SnrPer snrPer = m_interference.CalculateNonHtPhyHeaderSnrPer (event);
double snr = snrPer.snr;
@@ -2637,14 +2637,14 @@ WifiPhy::StartReceiveHeader (Ptr<Event> event, Time headerPayloadDuration)
if ((txVector.GetMode ().GetModulationClass () == WIFI_MOD_CLASS_HT) && (txVector.GetPreambleType () == WIFI_PREAMBLE_HT_GF))
{
//No non-HT PHY header for HT GF
Time remainingPreambleHeaderDuration = CalculatePlcpPreambleAndHeaderDuration (txVector) - GetPreambleDetectionDuration ();
m_endPlcpRxEvent = Simulator::Schedule (remainingPreambleHeaderDuration, &WifiPhy::StartReceivePayload, this, event);
Time remainingPreambleHeaderDuration = CalculatePhyPreambleAndHeaderDuration (txVector) - GetPreambleDetectionDuration ();
m_endPhyRxEvent = Simulator::Schedule (remainingPreambleHeaderDuration, &WifiPhy::StartReceivePayload, this, event);
}
else
{
//Schedule end of non-HT PHY header
Time remainingPreambleAndNonHtHeaderDuration = GetPlcpPreambleDuration (txVector) + GetPlcpHeaderDuration (txVector) - GetPreambleDetectionDuration ();
m_endPlcpRxEvent = Simulator::Schedule (remainingPreambleAndNonHtHeaderDuration, &WifiPhy::ContinueReceiveHeader, this, event);
Time remainingPreambleAndNonHtHeaderDuration = GetPhyPreambleDuration (txVector) + GetPhyHeaderDuration (txVector) - GetPreambleDetectionDuration ();
m_endPhyRxEvent = Simulator::Schedule (remainingPreambleAndNonHtHeaderDuration, &WifiPhy::ContinueReceiveHeader, this, event);
}
}
else
@@ -2664,7 +2664,7 @@ WifiPhy::ContinueReceiveHeader (Ptr<Event> event)
{
NS_LOG_FUNCTION (this << *event);
NS_ASSERT (IsStateRx ());
NS_ASSERT (m_endPlcpRxEvent.IsExpired ());
NS_ASSERT (m_endPhyRxEvent.IsExpired ());
InterferenceHelper::SnrPer snrPer;
snrPer = m_interference.CalculateNonHtPhyHeaderSnrPer (event);
@@ -2673,8 +2673,8 @@ WifiPhy::ContinueReceiveHeader (Ptr<Event> event)
{
NS_LOG_DEBUG ("Received non-HT PHY header");
WifiTxVector txVector = event->GetTxVector ();
Time remainingPreambleHeaderDuration = CalculatePlcpPreambleAndHeaderDuration (txVector) - GetPlcpPreambleDuration (txVector) - GetPlcpHeaderDuration (txVector);
m_endPlcpRxEvent = Simulator::Schedule (remainingPreambleHeaderDuration, &WifiPhy::StartReceivePayload, this, event);
Time remainingPreambleHeaderDuration = CalculatePhyPreambleAndHeaderDuration (txVector) - GetPhyPreambleDuration (txVector) - GetPhyHeaderDuration (txVector);
m_endPhyRxEvent = Simulator::Schedule (remainingPreambleHeaderDuration, &WifiPhy::StartReceivePayload, this, event);
}
else //non-HT PHY header reception failed
{
@@ -2801,7 +2801,7 @@ WifiPhy::StartReceivePayload (Ptr<Event> event)
{
NS_LOG_FUNCTION (this << *event);
NS_ASSERT (IsStateRx ());
NS_ASSERT (m_endPlcpRxEvent.IsExpired ());
NS_ASSERT (m_endPhyRxEvent.IsExpired ());
NS_ASSERT (m_endRxEvent.IsExpired ());
WifiTxVector txVector = event->GetTxVector ();
WifiMode txMode = txVector.GetMode ();
@@ -2818,7 +2818,7 @@ WifiPhy::StartReceivePayload (Ptr<Event> event)
//If we are here, this means non-HT PHY header was already successfully received
canReceivePayload = true;
}
if (canReceivePayload) //PLCP reception succeeded
if (canReceivePayload) //PHY reception succeeded
{
if (txVector.GetNss () > GetMaxSupportedRxSpatialStreams ())
{
@@ -2837,7 +2837,7 @@ WifiPhy::StartReceivePayload (Ptr<Event> event)
}
else
{
Time payloadDuration = event->GetEndTime () - event->GetStartTime () - CalculatePlcpPreambleAndHeaderDuration (txVector);
Time payloadDuration = event->GetEndTime () - event->GetStartTime () - CalculatePhyPreambleAndHeaderDuration (txVector);
m_endRxEvent = Simulator::Schedule (payloadDuration, &WifiPhy::EndReceive, this, event);
NS_LOG_DEBUG ("Receiving payload");
if (txMode.GetModulationClass () == WIFI_MOD_CLASS_HE)
@@ -2850,7 +2850,7 @@ WifiPhy::StartReceivePayload (Ptr<Event> event)
return;
}
}
else //PLCP reception failed
else //PHY reception failed
{
NS_LOG_DEBUG ("Drop packet because HT PHY header reception failed");
NotifyRxDrop (event->GetPsdu (), SIG_A_FAILURE);
@@ -4043,9 +4043,9 @@ WifiPhy::AbortCurrentReception (WifiPhyRxfailureReason reason)
{
m_endPreambleDetectionEvent.Cancel ();
}
if (m_endPlcpRxEvent.IsRunning ())
if (m_endPhyRxEvent.IsRunning ())
{
m_endPlcpRxEvent.Cancel ();
m_endPhyRxEvent.Cancel ();
}
if (m_endRxEvent.IsRunning ())
{

View File

@@ -270,9 +270,9 @@ public:
/**
* \param txVector the transmission parameters used for this packet
*
* \return the total amount of time this PHY will stay busy for the transmission of the PLCP preamble and PLCP header.
* \return the total amount of time this PHY will stay busy for the transmission of the PHY preamble and PHY header.
*/
static Time CalculatePlcpPreambleAndHeaderDuration (WifiTxVector txVector);
static Time CalculatePhyPreambleAndHeaderDuration (WifiTxVector txVector);
/**
*
* \return the preamble detection duration, which is the time correlation needs to detect the start of an incoming frame.
@@ -283,62 +283,62 @@ public:
*
* \return the training symbol duration
*/
static Time GetPlcpTrainingSymbolDuration (WifiTxVector txVector);
static Time GetPhyTrainingSymbolDuration (WifiTxVector txVector);
/**
* \return the WifiMode used for the transmission of the HT-SIG and the HT training fields
* in Mixed Format and Greenfield format PLCP header
* in Mixed Format and Greenfield format PHY header
*/
static WifiMode GetHtPlcpHeaderMode ();
static WifiMode GetHtPhyHeaderMode ();
/**
* \return the WifiMode used for the transmission of the VHT-STF, VHT-LTF and VHT-SIG-B fields
*/
static WifiMode GetVhtPlcpHeaderMode ();
static WifiMode GetVhtPhyHeaderMode ();
/**
* \return the WifiMode used for the transmission of the HE-STF, HE-LTF and HE-SIG-B fields
*/
static WifiMode GetHePlcpHeaderMode ();
static WifiMode GetHePhyHeaderMode ();
/**
* \param preamble the type of preamble
*
* \return the duration of the HT-SIG in Mixed Format and Greenfield format PLCP header
* \return the duration of the HT-SIG in Mixed Format and Greenfield format PHY header
*/
static Time GetPlcpHtSigHeaderDuration (WifiPreamble preamble);
static Time GetPhyHtSigHeaderDuration (WifiPreamble preamble);
/**
* \param preamble the type of preamble
*
* \return the duration of the SIG-A1 in PLCP header
* \return the duration of the SIG-A1 in PHY header
*/
static Time GetPlcpSigA1Duration (WifiPreamble preamble);
static Time GetPhySigA1Duration (WifiPreamble preamble);
/**
* \param preamble the type of preamble
*
* \return the duration of the SIG-A2 in PLCP header
* \return the duration of the SIG-A2 in PHY header
*/
static Time GetPlcpSigA2Duration (WifiPreamble preamble);
static Time GetPhySigA2Duration (WifiPreamble preamble);
/**
* \param preamble the type of preamble
*
* \return the duration of the SIG-B in PLCP header
* \return the duration of the SIG-B in PHY header
*/
static Time GetPlcpSigBDuration (WifiPreamble preamble);
static Time GetPhySigBDuration (WifiPreamble preamble);
/**
* \param txVector the transmission parameters used for this packet
*
* \return the WifiMode used for the transmission of the PLCP header
* \return the WifiMode used for the transmission of the PHY header
*/
static WifiMode GetPlcpHeaderMode (WifiTxVector txVector);
static WifiMode GetPhyHeaderMode (WifiTxVector txVector);
/**
* \param txVector the transmission parameters used for this packet
*
* \return the duration of the PLCP header
* \return the duration of the PHY header
*/
static Time GetPlcpHeaderDuration (WifiTxVector txVector);
static Time GetPhyHeaderDuration (WifiTxVector txVector);
/**
* \param txVector the transmission parameters used for this packet
*
* \return the duration of the PLCP preamble
* \return the duration of the PHY preamble
*/
static Time GetPlcpPreambleDuration (WifiTxVector txVector);
static Time GetPhyPreambleDuration (WifiTxVector txVector);
/**
* \param size the number of bytes in the packet to send
* \param txVector the TXVECTOR used for the transmission of this packet
@@ -1528,17 +1528,17 @@ public:
*/
bool GetGreenfield (void) const;
/**
* Enable or disable short PLCP preamble.
* Enable or disable short PHY preamble.
*
* \param preamble sets whether short PLCP preamble is supported or not
* \param preamble sets whether short PHY preamble is supported or not
*/
void SetShortPlcpPreambleSupported (bool preamble);
void SetShortPhyPreambleSupported (bool preamble);
/**
* Return whether short PLCP preamble is supported.
* Return whether short PHY preamble is supported.
*
* \returns if short PLCP preamble is supported or not
* \returns if short PHY preamble is supported or not
*/
bool GetShortPlcpPreambleSupported (void) const;
bool GetShortPhyPreambleSupported (void) const;
/**
* Sets the error rate model.
@@ -1671,7 +1671,7 @@ protected:
uint32_t m_rxMpduReferenceNumber; //!< A-MPDU reference number to identify all received subframes belonging to the same received A-MPDU
EventId m_endRxEvent; //!< the end of receive event
EventId m_endPlcpRxEvent; //!< the end of PLCP receive event
EventId m_endPhyRxEvent; //!< the end of PHY receive event
EventId m_endPreambleDetectionEvent; //!< the end of preamble detection event
@@ -1968,7 +1968,7 @@ private:
bool m_greenfield; //!< Flag if GreenField format is supported (deprecated)
bool m_shortGuardInterval; //!< Flag if HT/VHT short guard interval is supported (deprecated)
bool m_shortPreamble; //!< Flag if short PLCP preamble is supported
bool m_shortPreamble; //!< Flag if short PHY preamble is supported
Time m_guardInterval; //!< Supported HE guard interval (deprecated)

View File

@@ -49,7 +49,7 @@ WifiPpdu::WifiPpdu (Ptr<const WifiPsdu> psdu, WifiTxVector txVector, Time ppduDu
case WIFI_MOD_CLASS_HR_DSSS:
{
m_dsssSig.SetRate (txVector.GetMode ().GetDataRate (22));
Time psduDuration = ppduDuration - WifiPhy::CalculatePlcpPreambleAndHeaderDuration (txVector);
Time psduDuration = ppduDuration - WifiPhy::CalculatePhyPreambleAndHeaderDuration (txVector);
m_dsssSig.SetLength (psduDuration.GetMicroSeconds ());
break;
}
@@ -83,7 +83,7 @@ WifiPpdu::WifiPpdu (Ptr<const WifiPsdu> psdu, WifiTxVector txVector, Time ppduDu
m_vhtSig.SetMuFlag (m_preamble == WIFI_PREAMBLE_VHT_MU);
m_vhtSig.SetChannelWidth (m_channelWidth);
m_vhtSig.SetShortGuardInterval (txVector.GetGuardInterval () == 400);
uint32_t nSymbols = (static_cast<double> ((ppduDuration - WifiPhy::CalculatePlcpPreambleAndHeaderDuration (txVector)).GetNanoSeconds ()) / (3200 + txVector.GetGuardInterval ()));
uint32_t nSymbols = (static_cast<double> ((ppduDuration - WifiPhy::CalculatePhyPreambleAndHeaderDuration (txVector)).GetNanoSeconds ()) / (3200 + txVector.GetGuardInterval ()));
if (txVector.GetGuardInterval () == 400)
{
m_vhtSig.SetShortGuardIntervalDisambiguation ((nSymbols % 10) == 9);
@@ -535,7 +535,7 @@ WifiPpdu::GetTxDuration (void) const
{
case WIFI_MOD_CLASS_DSSS:
case WIFI_MOD_CLASS_HR_DSSS:
ppduDuration = MicroSeconds (m_dsssSig.GetLength ()) + WifiPhy::CalculatePlcpPreambleAndHeaderDuration (txVector);
ppduDuration = MicroSeconds (m_dsssSig.GetLength ()) + WifiPhy::CalculatePhyPreambleAndHeaderDuration (txVector);
break;
case WIFI_MOD_CLASS_OFDM:
case WIFI_MOD_CLASS_ERP_OFDM:
@@ -547,7 +547,7 @@ WifiPpdu::GetTxDuration (void) const
case WIFI_MOD_CLASS_VHT:
{
Time tSymbol = NanoSeconds (3200 + txVector.GetGuardInterval ());
Time preambleDuration = WifiPhy::CalculatePlcpPreambleAndHeaderDuration (txVector);
Time preambleDuration = WifiPhy::CalculatePhyPreambleAndHeaderDuration (txVector);
Time calculatedDuration = MicroSeconds (((ceil (static_cast<double> (m_lSig.GetLength () + 3) / 3)) * 4) + 20);
uint32_t nSymbols = floor (static_cast<double> ((calculatedDuration - preambleDuration).GetNanoSeconds ()) / tSymbol.GetNanoSeconds ());
if (m_vhtSig.GetShortGuardInterval () && m_vhtSig.GetShortGuardIntervalDisambiguation ())
@@ -560,7 +560,7 @@ WifiPpdu::GetTxDuration (void) const
case WIFI_MOD_CLASS_HE:
{
Time tSymbol = NanoSeconds (12800 + txVector.GetGuardInterval ());
Time preambleDuration = WifiPhy::CalculatePlcpPreambleAndHeaderDuration (txVector);
Time preambleDuration = WifiPhy::CalculatePhyPreambleAndHeaderDuration (txVector);
uint8_t sigExtension = 0;
if (Is2_4Ghz (m_frequency))
{

View File

@@ -347,7 +347,7 @@ WifiRemoteStationManager::GetFragmentationThreshold (void) const
}
void
WifiRemoteStationManager::AddSupportedPlcpPreamble (Mac48Address address, bool isShortPreambleSupported)
WifiRemoteStationManager::AddSupportedPhyPreamble (Mac48Address address, bool isShortPreambleSupported)
{
NS_LOG_FUNCTION (this << address << isShortPreambleSupported);
NS_ASSERT (!address.IsGroup ());

View File

@@ -328,13 +328,13 @@ public:
*/
bool GetUseGreenfieldProtection (void) const;
/**
* Enable or disable short PLCP preambles.
* Enable or disable short PHY preambles.
*
* \param enable enable or disable short PLCP preambles
* \param enable enable or disable short PHY preambles
*/
void SetShortPreambleEnabled (bool enable);
/**
* Return whether the device uses short PLCP preambles.
* Return whether the device uses short PHY preambles.
*
* \return true if short PHY preambles are enabled,
* false otherwise
@@ -1331,7 +1331,7 @@ private:
bool m_useNonErpProtection; //!< flag if protection for non-ERP stations against ERP transmissions is enabled
bool m_useNonHtProtection; //!< flag if protection for non-HT stations against HT transmissions is enabled
bool m_useGreenfieldProtection; //!< flag if protection for stations that do not support HT Greenfield format is enabled
bool m_shortPreambleEnabled; //!< flag if short PLCP preamble is enabled
bool m_shortPreambleEnabled; //!< flag if short PHY preamble is enabled
bool m_shortSlotTimeEnabled; //!< flag if short slot time is enabled
bool m_rifsPermitted; //!< flag if RIFS is enabled
ProtectionMode m_erpProtectionMode; //!< Protection mode for ERP stations when non-ERP stations are detected

View File

@@ -31,8 +31,8 @@ namespace ns3 {
/**
* This class mimics the TXVECTOR which is to be
* passed to the PHY in order to define the parameters which are to be
* used for a transmission. See IEEE 802.11-2007 15.2.6 "Transmit PLCP",
* and also 15.4.4.2 "PMD_SAP peer-to-peer service primitive
* used for a transmission. See IEEE 802.11-2016 16.2.5 "Transmit PHY",
* and also 8.3.4.1 "PHY SAP peer-to-peer service primitive
* parameters".
*
* If this class is constructed with the constructor that takes no
@@ -50,7 +50,7 @@ namespace ns3 {
* appropriately.
*
* \note the above reference is valid for the DSSS PHY only (clause
* 15). TXVECTOR is defined also for the other PHYs, however they
* 16). TXVECTOR is defined also for the other PHYs, however they
* don't include the TXPWRLVL explicitly in the TXVECTOR. This is
* somewhat strange, since all PHYs actually have a
* PMD_TXPWRLVL.request primitive. We decide to include the power

View File

@@ -49,7 +49,7 @@ private:
* Check if the payload tx duration returned by InterferenceHelper
* corresponds to a known value of the pay
*
* @param size size of payload in octets (includes everything after the PLCP header)
* @param size size of payload in octets (includes everything after the PHY header)
* @param payloadMode the WifiMode used for the transmission
* @param channelWidth the channel width used for the transmission (in MHz)
* @param guardInterval the guard interval duration used for the transmission (in nanoseconds)
@@ -64,7 +64,7 @@ private:
* Check if the overall tx duration returned by InterferenceHelper
* corresponds to a known value of the pay
*
* @param size size of payload in octets (includes everything after the PLCP header)
* @param size size of payload in octets (includes everything after the PHY header)
* @param payloadMode the WifiMode used for the transmission
* @param channelWidth the channel width used for the transmission (in MHz)
* @param guardInterval the guard interval duration used for the transmission (in nanoseconds)
@@ -212,7 +212,7 @@ TxDurationTest::DoRun (void)
NS_TEST_EXPECT_MSG_EQ (retval, true, "an 802.11b CCK duration failed");
//Similar, but we add PLCP preamble and header durations
//Similar, but we add PHY preamble and header durations
//and we test different rates.
//The payload durations for modes other than 11mbb have been
//calculated by hand according to IEEE Std 802.11-2007 18.2.3.5