examples: Set wifi data link type when PCAP file is generated
This commit is contained in:
@@ -173,8 +173,9 @@ main (int argc, char *argv[])
|
||||
|
||||
Simulator::Stop (Seconds (10.0));
|
||||
|
||||
if (tracing == true)
|
||||
if (tracing)
|
||||
{
|
||||
phy.SetPcapDataLinkType (WifiPhyHelper::DLT_IEEE802_11_RADIO);
|
||||
pointToPoint.EnablePcapAll ("third");
|
||||
phy.EnablePcap ("third", apDevices.Get (0));
|
||||
csma.EnablePcap ("third", csmaDevices.Get (0), true);
|
||||
|
||||
@@ -152,6 +152,7 @@ ns.internet.Ipv4GlobalRoutingHelper.PopulateRoutingTables()
|
||||
ns.core.Simulator.Stop(ns.core.Seconds(10.0))
|
||||
|
||||
if tracing == "True":
|
||||
phy.SetPcapDataLinkType (WifiPhyHelper::DLT_IEEE802_11_RADIO);
|
||||
pointToPoint.EnablePcapAll ("third")
|
||||
phy.EnablePcap ("third", apDevices.Get (0))
|
||||
csma.EnablePcap ("third", csmaDevices.Get (0), True)
|
||||
|
||||
@@ -156,6 +156,7 @@ main (int argc, char *argv[])
|
||||
wifi.SetRemoteStationManager ("ns3::ConstantRateWifiManager",
|
||||
"DataMode", StringValue ("OfdmRate54Mbps"));
|
||||
YansWifiPhyHelper wifiPhy;
|
||||
wifiPhy.SetPcapDataLinkType (WifiPhyHelper::DLT_IEEE802_11_RADIO);
|
||||
YansWifiChannelHelper wifiChannel = YansWifiChannelHelper::Default ();
|
||||
wifiPhy.SetChannel (wifiChannel.Create ());
|
||||
NetDeviceContainer backboneDevices = wifi.Install (wifiPhy, mac, backbone);
|
||||
|
||||
@@ -136,6 +136,7 @@ def main(argv):
|
||||
wifi.SetRemoteStationManager("ns3::ConstantRateWifiManager",
|
||||
"DataMode", ns.core.StringValue("OfdmRate54Mbps"))
|
||||
wifiPhy = ns.wifi.YansWifiPhyHelper()
|
||||
wifiPhy.SetPcapDataLinkType (WifiPhyHelper::DLT_IEEE802_11_RADIO);
|
||||
wifiChannel = ns.wifi.YansWifiChannelHelper.Default()
|
||||
wifiPhy.SetChannel(wifiChannel.Create())
|
||||
backboneDevices = wifi.Install(wifiPhy, mac, backbone)
|
||||
|
||||
@@ -74,6 +74,7 @@ int main (int argc, char * argv[])
|
||||
|
||||
YansWifiChannelHelper channel = YansWifiChannelHelper::Default ();
|
||||
YansWifiPhyHelper phy;
|
||||
phy.SetPcapDataLinkType (WifiPhyHelper::DLT_IEEE802_11_RADIO);
|
||||
phy.SetChannel (channel.Create ());
|
||||
|
||||
WifiHelper wifi;
|
||||
|
||||
@@ -90,6 +90,7 @@ void experiment (bool enableCtsRts, std::string wifiManager)
|
||||
// athstats.EnableAthstats(enableCtsRts ? "rtscts-athstats-node" : "basic-athstats-node" , nodes);
|
||||
|
||||
// uncomment the following to have pcap output
|
||||
// wifiPhy.SetPcapDataLinkType (WifiPhyHelper::DLT_IEEE802_11_RADIO);
|
||||
// wifiPhy.EnablePcap (enableCtsRts ? "rtscts-pcap-node" : "basic-pcap-node" , nodes);
|
||||
|
||||
|
||||
|
||||
@@ -140,7 +140,6 @@ Experiment::Run (Parameters params)
|
||||
channel.AddPropagationLoss ("ns3::RangePropagationLossModel");
|
||||
|
||||
YansWifiPhyHelper phy;
|
||||
phy.SetPcapDataLinkType (WifiPhyHelper::DLT_IEEE802_11_RADIO);
|
||||
phy.SetChannel (channel.Create ());
|
||||
|
||||
WifiHelper wifi;
|
||||
|
||||
@@ -521,6 +521,7 @@ Experiment::Run (const WifiHelper &wifi, const YansWifiPhyHelper &wifiPhy,
|
||||
|
||||
if (enablePcap)
|
||||
{
|
||||
phy.SetPcapDataLinkType (WifiPhyHelper::DLT_IEEE802_11_RADIO);
|
||||
phy.EnablePcapAll (GetOutputFileName ());
|
||||
}
|
||||
|
||||
|
||||
@@ -130,9 +130,6 @@ int main (int argc, char *argv[])
|
||||
wifi.SetStandard (WIFI_STANDARD_80211b);
|
||||
|
||||
YansWifiPhyHelper wifiPhy;
|
||||
// ns-3 supports RadioTap and Prism tracing extensions for 802.11b
|
||||
wifiPhy.SetPcapDataLinkType (WifiPhyHelper::DLT_IEEE802_11_RADIO);
|
||||
|
||||
wifiPhy.Set ("TxPowerStart", DoubleValue (txPowerStart));
|
||||
wifiPhy.Set ("TxPowerEnd", DoubleValue (txPowerEnd));
|
||||
wifiPhy.Set ("TxPowerLevels", UintegerValue (nTxPowerLevels));
|
||||
|
||||
@@ -492,6 +492,7 @@ int main (int argc, char *argv[])
|
||||
|
||||
if (enablePcap)
|
||||
{
|
||||
phy.SetPcapDataLinkType (WifiPhyHelper::DLT_IEEE802_11_RADIO);
|
||||
std::stringstream ss;
|
||||
ss << "wifi-spectrum-per-example-" << i;
|
||||
phy.EnablePcap (ss.str (), apDevice);
|
||||
|
||||
@@ -557,6 +557,7 @@ int main (int argc, char *argv[])
|
||||
|
||||
if (enablePcap)
|
||||
{
|
||||
phy.SetPcapDataLinkType (WifiPhyHelper::DLT_IEEE802_11_RADIO);
|
||||
std::stringstream ss;
|
||||
ss << "wifi-spectrum-per-example-" << i;
|
||||
phy.EnablePcap (ss.str (), apDevice);
|
||||
|
||||
@@ -648,6 +648,7 @@ int main (int argc, char *argv[])
|
||||
|
||||
if (enablePcap)
|
||||
{
|
||||
phy.SetPcapDataLinkType (WifiPhyHelper::DLT_IEEE802_11_RADIO);
|
||||
std::stringstream ss;
|
||||
ss << "wifi-spectrum-saturation-example-" << i;
|
||||
phy.EnablePcap (ss.str (), apDevice);
|
||||
|
||||
@@ -125,7 +125,6 @@ Issue211Test::DoRun (void)
|
||||
spectrumChannel->SetPropagationDelayModel (delayModel);
|
||||
|
||||
SpectrumWifiPhyHelper phy;
|
||||
phy.SetPcapDataLinkType (WifiPhyHelper::DLT_IEEE802_11_RADIO);
|
||||
phy.SetChannel (spectrumChannel);
|
||||
|
||||
WifiHelper wifi;
|
||||
|
||||
@@ -150,6 +150,7 @@ WifiMsduAggregatorThroughputTest::DoRun (void)
|
||||
// Enable tracing at the AP
|
||||
if (m_writeResults)
|
||||
{
|
||||
wifiPhy.SetPcapDataLinkType (WifiPhyHelper::DLT_IEEE802_11_RADIO);
|
||||
wifiPhy.EnablePcap ("wifi-amsdu-throughput", sta.Get (0)->GetId (), 0);
|
||||
}
|
||||
|
||||
|
||||
@@ -353,7 +353,6 @@ WifiPrimaryChannelsTest::DoSetup (void)
|
||||
spectrumChannel->SetPropagationDelayModel (delayModel);
|
||||
|
||||
SpectrumWifiPhyHelper phy;
|
||||
phy.SetPcapDataLinkType (WifiPhyHelper::DLT_IEEE802_11_RADIO);
|
||||
phy.SetChannel (spectrumChannel);
|
||||
phy.Set ("Frequency", UintegerValue (frequency)); // same frequency for all BSSes
|
||||
|
||||
|
||||
@@ -164,7 +164,6 @@ WifiTxopTest::DoRun (void)
|
||||
spectrumChannel->SetPropagationDelayModel (delayModel);
|
||||
|
||||
SpectrumWifiPhyHelper phy;
|
||||
phy.SetPcapDataLinkType (WifiPhyHelper::DLT_IEEE802_11_RADIO);
|
||||
phy.SetChannel (spectrumChannel);
|
||||
|
||||
Config::SetDefault ("ns3::QosFrameExchangeManager::PifsRecovery", BooleanValue (m_pifsRecovery));
|
||||
|
||||
Reference in New Issue
Block a user