101 #include "ns3/aodv-module.h"
102 #include "ns3/applications-module.h"
103 #include "ns3/config-store-module.h"
104 #include "ns3/core-module.h"
105 #include "ns3/dsdv-module.h"
106 #include "ns3/dsr-module.h"
107 #include "ns3/flow-monitor-module.h"
108 #include "ns3/integer.h"
109 #include "ns3/internet-module.h"
110 #include "ns3/itu-r-1411-los-propagation-loss-model.h"
111 #include "ns3/mobility-module.h"
112 #include "ns3/network-module.h"
113 #include "ns3/ocb-wifi-mac.h"
114 #include "ns3/olsr-module.h"
115 #include "ns3/wave-bsm-helper.h"
116 #include "ns3/wave-helper.h"
117 #include "ns3/wave-mac-helper.h"
118 #include "ns3/wifi-80211p-helper.h"
119 #include "ns3/yans-wifi-helper.h"
153 uint32_t GetCumulativeRxBytes()
const;
159 uint32_t GetRxPkts()
const;
165 uint32_t GetCumulativeRxPkts()
const;
172 void IncRxBytes(uint32_t rxBytes);
183 void SetRxBytes(uint32_t rxBytes);
189 void SetRxPkts(uint32_t rxPkts);
195 uint32_t GetTxBytes()
const;
201 uint32_t GetCumulativeTxBytes()
const;
207 uint32_t GetTxPkts()
const;
213 uint32_t GetCumulativeTxPkts()
const;
219 void IncTxBytes(uint32_t txBytes);
230 void SetTxBytes(uint32_t txBytes);
236 void SetTxPkts(uint32_t txPkts);
251 m_cumulativeRxBytes(0),
253 m_cumulativeRxPkts(0),
255 m_cumulativeTxBytes(0),
257 m_cumulativeTxPkts(0)
485 : m_TotalSimTime(300.01),
489 m_routingTables(false),
520 TypeId tid = TypeId::LookupByName(
"ns3::UdpSocketFactory");
552 Ipv4RoutingHelper::PrintRoutingTableAllAt(rtt, rtw);
560 Ipv4RoutingHelper::PrintRoutingTableAllAt(rtt, rtw);
606 addressAdhoc.
SetBase(
"10.1.0.0",
"255.255.0.0");
607 adhocTxInterfaces = addressAdhoc.
Assign(d);
621 for (uint32_t i = 0; i <
m_nSinks; i++)
646 static inline std::string
649 std::ostringstream oss;
653 if (InetSocketAddress::IsMatchingType(srcAddress))
656 oss <<
" received one packet from " << addr.
GetIpv4();
660 oss <<
" received one packet!";
670 while ((packet = socket->
RecvFrom(srcAddress)))
673 uint32_t RxRoutingBytes = packet->
GetSize();
687 uint32_t pktBytes = packet->
GetSize();
844 void Simulate(
int argc,
char** argv);
1036 if (!configFilename.empty())
1199 std::string context,
1266 m_CSVfileName(
"vanet-routing.output.csv"),
1267 m_CSVfileName2(
"vanet-routing.output2.csv"),
1269 m_protocolName(
"protocol"),
1271 m_traceMobility(false),
1277 m_lossModelName(
""),
1278 m_phyMode(
"OfdmRate6MbpsBW10MHz"),
1282 m_logFile(
"low99-ct-unterstrass-1day.filt.7.adj.log"),
1285 m_TotalSimTime(300.01),
1287 m_phyModeB(
"DsssRate11Mbps"),
1288 m_trName(
"vanet-routing-compare"),
1291 m_wavePacketSize(200),
1292 m_waveInterval(0.1),
1295 m_gpsAccuracyNs(40),
1297 m_routingTables(false),
1298 m_asciiTrace(false),
1300 m_loadConfigFilename(
"load-config.txt"),
1301 m_saveConfigFilename(
""),
1305 m_txSafetyRange1(50.0),
1306 m_txSafetyRange2(100.0),
1307 m_txSafetyRange3(150.0),
1308 m_txSafetyRange4(200.0),
1309 m_txSafetyRange5(250.0),
1310 m_txSafetyRange6(300.0),
1311 m_txSafetyRange7(350.0),
1312 m_txSafetyRange8(400.0),
1313 m_txSafetyRange9(450.0),
1314 m_txSafetyRange10(500.0),
1317 m_cumulativeBsmCaptureStart(0)
1338 ns3::MakeUintegerChecker<uint32_t>());
1342 "Number of sink nodes for routing non-BSM traffic",
1344 ns3::MakeUintegerChecker<uint32_t>());
1348 "Enable trace mobility",
1356 ns3::MakeUintegerChecker<uint32_t>());
1360 "Propagation Loss Model",
1362 ns3::MakeUintegerChecker<uint32_t>());
1366 "Fast Fading Model",
1368 ns3::MakeUintegerChecker<uint32_t>());
1372 "802.11 mode (0=802.11a;1=802.11p)",
1374 ns3::MakeUintegerChecker<uint32_t>());
1378 "Mobility mode 0=random waypoint;1=mobility trace file",
1380 ns3::MakeUintegerChecker<uint32_t>());
1384 "Number of nodes (vehicles)",
1386 ns3::MakeUintegerChecker<uint32_t>());
1390 "Node speed (m/s) for RWP model",
1392 ns3::MakeUintegerChecker<uint32_t>());
1396 "Node pause time (s) for RWP model",
1398 ns3::MakeUintegerChecker<uint32_t>());
1402 "Size in bytes of WAVE BSM",
1404 ns3::MakeUintegerChecker<uint32_t>());
1416 ns3::MakeUintegerChecker<uint32_t>());
1420 "Dump routing tables at t=5 seconds",
1432 "Generate PCAP files",
1438 "VRCcumulativeBsmCaptureStart",
1439 "Simulation start time for capturing cumulative BSM",
1445 "BSM range for PDR inclusion",
1447 ns3::MakeDoubleChecker<double>());
1451 "BSM range for PDR inclusion",
1453 ns3::MakeDoubleChecker<double>());
1457 "BSM range for PDR inclusion",
1459 ns3::MakeDoubleChecker<double>());
1463 "BSM range for PDR inclusion",
1465 ns3::MakeDoubleChecker<double>());
1469 "BSM range for PDR inclusion",
1471 ns3::MakeDoubleChecker<double>());
1475 "BSM range for PDR inclusion",
1477 ns3::MakeDoubleChecker<double>());
1481 "BSM range for PDR inclusion",
1483 ns3::MakeDoubleChecker<double>());
1487 "BSM range for PDR inclusion",
1489 ns3::MakeDoubleChecker<double>());
1493 "BSM range for PDR inclusion",
1495 ns3::MakeDoubleChecker<double>());
1499 "BSM range for PDR inclusion",
1501 ns3::MakeDoubleChecker<double>());
1505 "Transmission power dBm",
1507 ns3::MakeDoubleChecker<double>());
1511 "Total simulation time (s)",
1513 ns3::MakeDoubleChecker<double>());
1517 "Interval (s) between WAVE BSMs",
1519 ns3::MakeDoubleChecker<double>());
1523 "GPS sync accuracy (ns)",
1525 ns3::MakeDoubleChecker<double>());
1529 "Tx May Delay (ms)",
1531 ns3::MakeDoubleChecker<double>());
1535 "CSV filename (for time series data)",
1541 "CSV filename 2 (for overall simulation scenario results)",
1547 "PHY mode (802.11p)",
1554 "Mobility trace filename",
1555 ns3::StringValue(
"./src/wave/examples/low99-ct-unterstrass-1day.filt.7.adj.mob"),
1572 "PHY mode (802.11a)",
1642 Config::Connect(
"/NodeList/*/DeviceList/*/$ns3::WaveNetDevice/PhyEntities/*/State/Tx",
1644 Config::Connect(
"/NodeList/*/DeviceList/*/$ns3::WaveNetDevice/PhyEntities/*/PhyTxDrop",
1646 Config::Connect(
"/NodeList/*/DeviceList/*/$ns3::WaveNetDevice/PhyEntities/*/PhyRxDrop",
1653 Config::Connect(
"/NodeList/*/DeviceList/*/$ns3::WifiNetDevice/Phy/PhyTxDrop",
1655 Config::Connect(
"/NodeList/*/DeviceList/*/$ns3::WifiNetDevice/Phy/PhyRxDrop",
1678 std::ostringstream oss;
1680 oss <<
"/NodeList/*/ApplicationList/*/$ns3::OnOffApplication/Tx";
1716 double averageRoutingGoodputKbps = 0.0;
1718 averageRoutingGoodputKbps = (((double)totalBytesTotal * 8.0) /
m_TotalSimTime) / 1000.0;
1724 uint32_t totalAppBytes = cumulativeWaveBsmBytes + cumulativeRoutingBytes;
1727 double mac_phy_oh = 0.0;
1728 if (totalPhyBytes > 0)
1730 mac_phy_oh = (double)(totalPhyBytes - totalAppBytes) / (double)totalPhyBytes;
1735 NS_LOG_UNCOND(
"BSM_PDR1=" << bsm_pdr1 <<
" BSM_PDR2=" << bsm_pdr2
1736 <<
" BSM_PDR3=" << bsm_pdr3 <<
" BSM_PDR4=" << bsm_pdr4
1737 <<
" BSM_PDR5=" << bsm_pdr5 <<
" BSM_PDR6=" << bsm_pdr6
1738 <<
" BSM_PDR7=" << bsm_pdr7 <<
" BSM_PDR8=" << bsm_pdr8
1739 <<
" BSM_PDR9=" << bsm_pdr9 <<
" BSM_PDR10=" << bsm_pdr10
1740 <<
" Goodput=" << averageRoutingGoodputKbps
1741 <<
"Kbps MAC/PHY-oh=" << mac_phy_oh);
1746 out << bsm_pdr1 <<
"," << bsm_pdr2 <<
"," << bsm_pdr3 <<
"," << bsm_pdr4 <<
"," << bsm_pdr5
1747 <<
"," << bsm_pdr6 <<
"," << bsm_pdr7 <<
"," << bsm_pdr8 <<
"," << bsm_pdr9 <<
","
1748 << bsm_pdr10 <<
"," << averageRoutingGoodputKbps <<
"," << mac_phy_oh <<
"" << std::endl;
1764 Simulator::Destroy();
1770 std::string context,
1773 Vector pos =
mobility->GetPosition();
1774 Vector vel =
mobility->GetVelocity();
1782 WaveBsmHelper::GetNodesMoving()[nodeId] = 1;
1788 *os <<
Simulator::Now() <<
" POS: x=" << pos.x <<
", y=" << pos.y <<
", z=" << pos.z
1789 <<
"; VEL:" << vel.x <<
", y=" << vel.y <<
", z=" << vel.z << std::endl;
1797 double kbps = (bytesTotal * 8.0) / 1000;
1798 double wavePDR = 0.0;
1801 if (wavePktsSent > 0)
1804 wavePDR = (double)wavePktsReceived / (
double)wavePktsSent;
1824 uint32_t totalAppBytes = cumulativeWaveBsmBytes + cumulativeRoutingBytes;
1827 double mac_phy_oh = 0.0;
1828 if (totalPhyBytes > 0)
1830 mac_phy_oh = (double)(totalPhyBytes - totalAppBytes) / (double)totalPhyBytes;
1838 <<
" BSM_PDR1=" << wavePDR2_2 <<
" BSM_PDR3=" << wavePDR3_2
1839 <<
" BSM_PDR4=" << wavePDR4_2 <<
" BSM_PDR5=" << wavePDR5_2
1840 <<
" BSM_PDR6=" << wavePDR6_2 <<
" BSM_PDR7=" << wavePDR7_2
1841 <<
" BSM_PDR8=" << wavePDR8_2 <<
" BSM_PDR9=" << wavePDR9_2
1842 <<
" BSM_PDR10=" << wavePDR10_2 <<
" Goodput=" << kbps
1848 << wavePktsReceived <<
"," << wavePDR <<
"," << waveExpectedRxPktCount <<
","
1849 << waveRxPktInRangeCount <<
"," << wavePDR1_2 <<
"," << wavePDR2_2 <<
"," << wavePDR3_2
1850 <<
"," << wavePDR4_2 <<
"," << wavePDR5_2 <<
"," << wavePDR6_2 <<
"," << wavePDR7_2 <<
","
1851 << wavePDR8_2 <<
"," << wavePDR9_2 <<
"," << wavePDR10_2 <<
"," << mac_phy_oh <<
""
1860 for (
int index = 1; index <= 10; index++)
1869 for (
int index = 1; index <= 10; index++)
1893 GlobalValue::GetValueByName(
"VRCport", uintegerValue);
1895 GlobalValue::GetValueByName(
"VRCnSinks", uintegerValue);
1897 GlobalValue::GetValueByName(
"VRCtraceMobility", booleanValue);
1899 GlobalValue::GetValueByName(
"VRCprotocol", uintegerValue);
1901 GlobalValue::GetValueByName(
"VRClossModel", uintegerValue);
1903 GlobalValue::GetValueByName(
"VRCfading", uintegerValue);
1905 GlobalValue::GetValueByName(
"VRC80211mode", uintegerValue);
1907 GlobalValue::GetValueByName(
"VRCmobility", uintegerValue);
1909 GlobalValue::GetValueByName(
"VRCnNodes", uintegerValue);
1911 GlobalValue::GetValueByName(
"VRCnodeSpeed", uintegerValue);
1913 GlobalValue::GetValueByName(
"VRCnodePause", uintegerValue);
1915 GlobalValue::GetValueByName(
"VRCwavePacketSize", uintegerValue);
1917 GlobalValue::GetValueByName(
"VRCverbose", booleanValue);
1919 GlobalValue::GetValueByName(
"VRCscenario", uintegerValue);
1921 GlobalValue::GetValueByName(
"VRCroutingTables", booleanValue);
1923 GlobalValue::GetValueByName(
"VRCasciiTrace", booleanValue);
1925 GlobalValue::GetValueByName(
"VRCpcap", booleanValue);
1927 GlobalValue::GetValueByName(
"VRCcumulativeBsmCaptureStart", timeValue);
1930 GlobalValue::GetValueByName(
"VRCtxSafetyRange1", doubleValue);
1932 GlobalValue::GetValueByName(
"VRCtxSafetyRange2", doubleValue);
1934 GlobalValue::GetValueByName(
"VRCtxSafetyRange3", doubleValue);
1936 GlobalValue::GetValueByName(
"VRCtxSafetyRange4", doubleValue);
1938 GlobalValue::GetValueByName(
"VRCtxSafetyRange5", doubleValue);
1940 GlobalValue::GetValueByName(
"VRCtxSafetyRange6", doubleValue);
1942 GlobalValue::GetValueByName(
"VRCtxSafetyRange7", doubleValue);
1944 GlobalValue::GetValueByName(
"VRCtxSafetyRange8", doubleValue);
1946 GlobalValue::GetValueByName(
"VRCtxSafetyRange9", doubleValue);
1948 GlobalValue::GetValueByName(
"VRCtxSafetyRange10", doubleValue);
1950 GlobalValue::GetValueByName(
"VRCtxp", doubleValue);
1952 GlobalValue::GetValueByName(
"VRCtotalTime", doubleValue);
1954 GlobalValue::GetValueByName(
"VRCwaveInterval", doubleValue);
1956 GlobalValue::GetValueByName(
"VRCgpsAccuracyNs", doubleValue);
1958 GlobalValue::GetValueByName(
"VRCtxMaxDelayMs", doubleValue);
1961 GlobalValue::GetValueByName(
"VRCCSVfileName", stringValue);
1963 GlobalValue::GetValueByName(
"VRCCSVfileName2", stringValue);
1965 GlobalValue::GetValueByName(
"VRCphyMode", stringValue);
1967 GlobalValue::GetValueByName(
"VRCtraceFile", stringValue);
1969 GlobalValue::GetValueByName(
"VRClogFile", stringValue);
1971 GlobalValue::GetValueByName(
"VRCrate", stringValue);
1973 GlobalValue::GetValueByName(
"VRCphyModeB", stringValue);
1975 GlobalValue::GetValueByName(
"VRCtrName", stringValue);
2030 GlobalValue::GetValueByName(
"VRCtrName", stringValue);
2038 double txDist1 = 50.0;
2039 double txDist2 = 100.0;
2040 double txDist3 = 150.0;
2041 double txDist4 = 200.0;
2042 double txDist5 = 250.0;
2043 double txDist6 = 300.0;
2044 double txDist7 = 350.0;
2045 double txDist8 = 350.0;
2046 double txDist9 = 350.0;
2047 double txDist10 = 350.0;
2050 cmd.AddValue(
"CSVfileName",
"The name of the CSV output file name",
m_CSVfileName);
2051 cmd.AddValue(
"CSVfileName2",
"The name of the CSV output file name2",
m_CSVfileName2);
2053 cmd.AddValue(
"nodes",
"Number of nodes (i.e. vehicles)",
m_nNodes);
2054 cmd.AddValue(
"sinks",
"Number of routing sinks",
m_nSinks);
2055 cmd.AddValue(
"txp",
"Transmit power (dB), e.g. txp=7.5",
m_txp);
2057 cmd.AddValue(
"protocol",
"1=OLSR;2=AODV;3=DSDV;4=DSR",
m_protocol);
2058 cmd.AddValue(
"lossModel",
"1=Friis;2=ItuR1411Los;3=TwoRayGround;4=LogDistance",
m_lossModel);
2059 cmd.AddValue(
"fading",
"0=None;1=Nakagami;(buildings=1 overrides)",
m_fading);
2061 cmd.AddValue(
"80211Mode",
"1=802.11p; 2=802.11b; 3=WAVE-PHY",
m_80211mode);
2062 cmd.AddValue(
"traceFile",
"Ns2 movement trace file",
m_traceFile);
2069 cmd.AddValue(
"verbose",
"Enable verbose output",
m_verbose);
2072 cmd.AddValue(
"scenario",
"1=synthetic, 2=playback-trace",
m_scenario);
2076 cmd.AddValue(
"txdist1",
"Expected BSM tx range, m", txDist1);
2077 cmd.AddValue(
"txdist2",
"Expected BSM tx range, m", txDist2);
2078 cmd.AddValue(
"txdist3",
"Expected BSM tx range, m", txDist3);
2079 cmd.AddValue(
"txdist4",
"Expected BSM tx range, m", txDist4);
2080 cmd.AddValue(
"txdist5",
"Expected BSM tx range, m", txDist5);
2081 cmd.AddValue(
"txdist6",
"Expected BSM tx range, m", txDist6);
2082 cmd.AddValue(
"txdist7",
"Expected BSM tx range, m", txDist7);
2083 cmd.AddValue(
"txdist8",
"Expected BSM tx range, m", txDist8);
2084 cmd.AddValue(
"txdist9",
"Expected BSM tx range, m", txDist9);
2085 cmd.AddValue(
"txdist10",
"Expected BSM tx range, m", txDist10);
2088 cmd.AddValue(
"routingTables",
"Whether to dump routing tables at t=5 seconds",
m_routingTables);
2089 cmd.AddValue(
"asciiTrace",
"Whether to dump ASCII Trace data",
m_asciiTrace);
2090 cmd.AddValue(
"pcap",
"Whether to create PCAP files for all nodes",
m_pcap);
2093 cmd.AddValue(
"exp",
"Experiment",
m_exp);
2094 cmd.AddValue(
"BsmCaptureStart",
2095 "Start time to begin capturing pkts for cumulative Bsm",
2097 cmd.Parse(argc, argv);
2116 cmd.Parse(argc, argv);
2143 Packet::EnablePrinting();
2173 WaveBsmHelper::GetNodesMoving().resize(
m_nNodes, 0);
2180 pos.
SetTypeId(
"ns3::RandomBoxPositionAllocator");
2181 pos.
Set(
"X",
StringValue(
"ns3::UniformRandomVariable[Min=0.0|Max=1500.0]"));
2182 pos.
Set(
"Y",
StringValue(
"ns3::UniformRandomVariable[Min=0.0|Max=300.0]"));
2184 pos.
Set(
"Z",
StringValue(
"ns3::UniformRandomVariable[Min=1.0|Max=2.0]"));
2189 std::stringstream ssSpeed;
2190 ssSpeed <<
"ns3::UniformRandomVariable[Min=0.0|Max=" <<
m_nodeSpeed <<
"]";
2191 std::stringstream ssPause;
2192 ssPause <<
"ns3::ConstantRandomVariable[Constant=" <<
m_nodePause <<
"]";
2198 "PositionAllocator",
2205 WaveBsmHelper::GetNodesMoving().resize(
m_nNodes, 1);
2236 NS_LOG_ERROR(
"Invalid propagation loss model specified. Values must be [1-4], where "
2237 "1=Friis;2=ItuR1411Los;3=TwoRayGround;4=LogDistance");
2292 WaveHelper waveHelper = WaveHelper::Default();
2296 Wifi80211pHelper::EnableLogComponents();
2298 WaveHelper::EnableLogComponents();
2306 wifi.SetRemoteStationManager(
"ns3::ConstantRateWifiManager",
2334 wifiMac.
SetType(
"ns3::AdhocWifiMac");
2371 int chAccessMode = 0;
2436 m_traceFile =
"src/wave/examples/low99-ct-unterstrass-1day.filt.7.adj.mob";
2437 m_logFile =
"low99-ct-unterstrass-1day.filt.7.adj.log";
2453 out <<
"SimulationSecond,"
2455 <<
"PacketsReceived,"
2457 <<
"RoutingProtocol,"
2458 <<
"TransmissionPower,"
2460 <<
"WavePtksReceived,"
2462 <<
"ExpectedWavePktsReceived,"
2463 <<
"ExpectedWavePktsInCoverageReceived,"
2474 <<
"MacPhyOverhead" << std::endl;
2488 <<
"AverageRoutingGoodputKbps,"
2489 <<
"MacPhyOverhead" << std::endl;
2494 main(
int argc,
char* argv[])
The ConfigStoreHelper class simplifies config-store raw text load and save.
void SaveConfig(std::string configFilename)
Saves a configuration to a given named config-store raw text configuration file.
ConfigStoreHelper()
Constructor.
void LoadConfig(std::string configFilename)
Loads a saved config-store raw text configuration from a given named file.
The RoutingHelper class generates routing data between nodes (vehicles) and uses the RoutingStats cla...
void Install(NodeContainer &c, NetDeviceContainer &d, Ipv4InterfaceContainer &i, double totalTime, int protocol, uint32_t nSinks, bool routingTables)
Installs routing functionality on nodes and their devices and interfaces.
uint32_t m_protocol
routing protocol; 0=NONE, 1=OLSR, 2=AODV, 3=DSDV, 4=DSR
bool m_routingTables
dump routing table (at t=5 sec). 0=No, 1=Yes
double m_TotalSimTime
seconds
void SetLogging(bool log)
Enable/disable logging.
void SetupRoutingMessages(NodeContainer &c, Ipv4InterfaceContainer &adhocTxInterfaces)
Sets up routing messages on the nodes and their interfaces.
Ptr< Socket > SetupRoutingPacketReceive(Ipv4Address addr, Ptr< Node > node)
Sets up a routing packet for transmission.
RoutingHelper()
Constructor.
void SetupRoutingProtocol(NodeContainer &c)
Sets up the protocol protocol on the nodes.
void AssignIpAddresses(NetDeviceContainer &d, Ipv4InterfaceContainer &adhocTxInterfaces)
Assigns IPv4 addresses to net devices and their interfaces.
RoutingStats routingStats
routing statistics
uint32_t m_nSinks
number of sink nodes (< all nodes)
~RoutingHelper() override
Destructor.
RoutingStats & GetRoutingStats()
Returns the RoutingStats instance.
std::string m_protocolName
protocol name
static TypeId GetTypeId()
Get class TypeId.
void OnOffTrace(std::string context, Ptr< const Packet > packet)
Trace the receipt of an on-off-application generated packet.
void ReceiveRoutingPacket(Ptr< Socket > socket)
Process a received routing packet.
The RoutingStats class manages collects statistics on routing data (application-data packet and byte ...
uint32_t m_cumulativeRxBytes
cumulative receive bytes
uint32_t m_RxBytes
receive bytes
void IncRxBytes(uint32_t rxBytes)
Increments the number of (application-data) bytes received, not including MAC/PHY overhead.
uint32_t GetRxBytes() const
Returns the number of bytes received.
uint32_t m_cumulativeTxPkts
cumulative transmit packets
void IncRxPkts()
Increments the count of packets received.
uint32_t m_TxPkts
transmit packets
void IncTxPkts()
Increment the count of packets transmitted.
uint32_t GetCumulativeTxPkts() const
Returns the cumulative number of packets transmitted.
uint32_t m_cumulativeRxPkts
cumulative receive packets
void SetRxPkts(uint32_t rxPkts)
Sets the number of packets received.
void IncTxBytes(uint32_t txBytes)
Increment the number of bytes transmitted.
void SetTxPkts(uint32_t txPkts)
Sets the number of packets transmitted.
uint32_t m_RxPkts
receive packets
RoutingStats()
Constructor.
void SetTxBytes(uint32_t txBytes)
Sets the number of bytes transmitted.
uint32_t GetCumulativeTxBytes() const
Returns the cumulative number of bytes transmitted.
uint32_t m_cumulativeTxBytes
cumulative transmit bytes
uint32_t GetRxPkts() const
Returns the count of packets received.
uint32_t GetCumulativeRxPkts() const
Returns the cumulative count of packets received.
uint32_t GetTxBytes() const
Returns the number of bytes transmitted.
uint32_t GetCumulativeRxBytes() const
Returns the cumulative number of bytes received.
uint32_t GetTxPkts() const
Returns the number of packets transmitted.
uint32_t m_TxBytes
transmit bytes
void SetRxBytes(uint32_t rxBytes)
Sets the number of bytes received.
The VanetRoutingExperiment class implements a wifi app that allows VANET routing experiments to be si...
std::string m_logFile
log file
std::string m_trName
trace file name
bool m_asciiTrace
ascii trace
void ConfigureDefaults()
Configure default attributes.
std::string m_CSVfileName
CSV file name.
VanetRoutingExperiment()
Constructor.
double m_txSafetyRange6
range 6
uint32_t m_mobility
mobility
double m_txSafetyRange8
range 8
double m_waveInterval
seconds
void SetDefaultAttributeValues() override
Sets default attribute values.
void ConfigureApplications() override
Configure applications.
double m_txSafetyRange5
range 5
double m_txSafetyRange1
range 1
int64_t m_streamIndex
used to get consistent random numbers across scenarios
std::string m_saveConfigFilename
save config file name
void ProcessOutputs() override
Process outputs.
void SetupRoutingMessages()
Set up generation of packets to be routed through the vehicular network.
std::string m_loadConfigFilename
load config file name
std::string m_protocolName
protocol name
double m_txSafetyRange7
range 7
double m_txSafetyRange3
range 3
void SetupScenario()
Set up a prescribed scenario.
void Run()
Run the simulation.
NetDeviceContainer m_adhocTxDevices
adhoc transmit devices
void ParseCommandLineArguments(int argc, char **argv) override
Process command line arguments.
WaveBsmHelper m_waveBsmHelper
helper
Ptr< WifiPhyStats > m_wifiPhyStats
wifi phy statistics
uint32_t m_lossModel
loss model
std::vector< double > m_txSafetyRanges
list of ranges
void CommandSetup(int argc, char **argv)
Run the simulation.
double m_txSafetyRange10
range 10
std::string m_traceFile
trace file
Time m_cumulativeBsmCaptureStart
capture start
void ConfigureMobility() override
Configure mobility.
std::string m_phyModeB
phy mode
void CheckThroughput()
Checks the throughput and outputs summary to CSV file1.
std::string m_CSVfileName2
CSV file name.
static void CourseChange(std::ostream *os, std::string context, Ptr< const MobilityModel > mobility)
Course change function.
void SetupAdhocDevices()
Set up the adhoc devices.
void SetupLogging()
Set up logging.
double m_txMaxDelayMs
transmit maximum delay
void ConfigureDevices() override
Configure devices.
double m_gpsAccuracyNs
GPS accuracy.
void ConfigureChannels() override
Configure channels.
std::string m_lossModelName
loss model name
double m_txSafetyRange4
range 4
void ConfigureTracing() override
Configure tracing.
uint32_t m_wavePacketSize
bytes
bool m_routingTables
routing tables
uint32_t m_80211mode
80211 mode
NodeContainer m_adhocTxNodes
adhoc transmit nodes
uint32_t m_nSinks
number of sinks
uint32_t m_protocol
protocol
void SetupLogFile()
Set up log file.
void SetupWaveMessages()
Set up generation of IEEE 1609 WAVE messages, as a Basic Safety Message (BSM).
uint32_t m_nNodes
number of nodes
double m_TotalSimTime
total sim time
void RunSimulation() override
Run the simulation.
void SetupAdhocMobilityNodes()
Set up the adhoc mobility nodes.
double m_txSafetyRange9
range 9
bool m_traceMobility
trace mobility
void SetConfigFromGlobals()
Set up configuration parameter from the global variables.
void WriteCsvHeader()
Write the header line to the CSV file1.
double m_txSafetyRange2
range 2
void ConfigureNodes() override
Configure nodes.
Ipv4InterfaceContainer m_adhocTxInterfaces
adhoc transmit interfaces
uint32_t m_scenario
scenario
void SetGlobalsFromConfig()
Set up the global variables from the configuration parameters.
std::ofstream m_os
output stream
std::string m_phyMode
phy mode
Ptr< RoutingHelper > m_routingHelper
routing helper
The WifiApp class enforces program flow for ns-3 wifi applications.
void Simulate(int argc, char **argv)
Enacts simulation of an ns-3 wifi application.
virtual void ConfigureChannels()
Configure channels.
virtual void ParseCommandLineArguments(int argc, char **argv)
Process command line arguments.
virtual void RunSimulation()
Run the simulation.
virtual void ConfigureNodes()
Configure nodes.
virtual void ConfigureTracing()
Configure tracing.
virtual void ConfigureApplications()
Configure applications.
virtual ~WifiApp()
Destructor.
virtual void ConfigureMobility()
Configure mobility.
virtual void ConfigureDevices()
Configure devices.
virtual void SetDefaultAttributeValues()
Sets default attribute values.
virtual void ProcessOutputs()
Process outputs.
The WifiPhyStats class collects Wifi MAC/PHY statistics.
void PhyTxDrop(std::string context, Ptr< const Packet > packet)
Callback signature for Phy/TxDrop.
uint32_t m_phyTxBytes
phy transmit bytes
static TypeId GetTypeId()
Gets the class TypeId.
WifiPhyStats()
Constructor.
void PhyTxTrace(std::string context, Ptr< const Packet > packet, WifiMode mode, WifiPreamble preamble, uint8_t txPower)
Callback signature for Phy/Tx trace.
uint32_t GetTxBytes() const
Returns the number of bytes that have been transmitted (this includes MAC/PHY overhead)
~WifiPhyStats() override
Destructor.
void PhyRxDrop(std::string context, Ptr< const Packet > packet, WifiPhyRxfailureReason reason)
Callback signature for Phy/RxDrop.
uint32_t m_phyTxPkts
phy transmit packets
a polymophic address class
AttributeValue implementation for Address.
Helper class that adds AODV routing to nodes.
holds a vector of ns3::Application pointers.
void Start(Time start) const
Start all of the Applications in this container at the start time given as a parameter.
void Stop(Time stop) const
Arrange for all of the Applications in this container to Stop() at the Time given as a parameter.
void EnableAsciiAll(std::string prefix)
Enable ascii trace output on each device (which is of the appropriate type) in the set of all nodes c...
Manage ASCII trace files for device models.
Ptr< OutputStreamWrapper > CreateFileStream(std::string filename, std::ios::openmode filemode=std::ios::out)
Create and initialize an output stream object we'll use to write the traced bits.
AttributeValue implementation for Boolean.
Parse command-line arguments.
Introspection did not find any typical Config paths.
void ConfigureDefaults()
Configure the default values.
This class can be used to hold variables of floating point type such as 'double' or 'float'.
Helper class that adds DSDV routing to nodes.
DSR helper class to manage creation of DSR routing instance and to insert it on a node as a sublayer ...
Helper class that adds DSR routing to nodes.
void Install(DsrHelper &dsrHelper, NodeContainer nodes)
Install routing to the nodes.
Hold a so-called 'global value'.
bool SetValue(const AttributeValue &value)
Set the value of this GlobalValue.
Ipv4Address GetIpv4() const
aggregate IP/TCP/UDP functionality to existing Nodes.
void Install(std::string nodeName) const
Aggregate implementations of the ns3::Ipv4, ns3::Ipv6, ns3::Udp, and ns3::Tcp classes onto the provid...
void SetRoutingHelper(const Ipv4RoutingHelper &routing)
A helper class to make life easier while doing simple IPv4 address assignment in scripts.
void SetBase(Ipv4Address network, Ipv4Mask mask, Ipv4Address base="0.0.0.1")
Set the base network number, network mask and base address.
Ipv4InterfaceContainer Assign(const NetDeviceContainer &c)
Assign IP addresses to the net devices specified in the container based on the current network prefix...
Ipv4 addresses are stored in host order in this class.
holds a vector of std::pair of Ptr<Ipv4> and interface index.
Ipv4Address GetAddress(uint32_t i, uint32_t j=0) const
Helper class that adds ns3::Ipv4ListRouting objects.
static void PrintRoutingTableAllAt(Time printTime, Ptr< OutputStreamWrapper > stream, Time::Unit unit=Time::S)
prints the routing tables of all nodes at a particular time.
Helper class used to assign positions and mobility models to nodes.
int64_t AssignStreams(NodeContainer c, int64_t stream)
Assign a fixed random variable stream number to the random variables used by the mobility models on t...
void Install(Ptr< Node > node) const
"Layout" a single node according to the current position allocator type.
void SetMobilityModel(std::string type, Ts &&... args)
void SetPositionAllocator(Ptr< PositionAllocator > allocator)
Set the position allocator which will be used to allocate the initial position of every node initiali...
holds a vector of ns3::NetDevice pointers
keep track of a set of node pointers.
void Create(uint32_t n)
Create n nodes and append pointers to them to the end of this NodeContainer.
Ptr< Node > Get(uint32_t i) const
Get the Ptr<Node> stored in this container at a given index.
Nqos Wave Mac Helper class.
Helper class which can read ns-2 movement files and configure nodes mobility.
void Install() const
Read the ns2 trace file and configure the movement patterns of all nodes contained in the global ns3:...
Instantiate subclasses of ns3::Object.
Ptr< Object > Create() const
Create an Object instance of the configured TypeId.
void Set(const std::string &name, const AttributeValue &value, Args &&... args)
Set an attribute to be set during construction.
void SetTypeId(TypeId tid)
Set the TypeId of the Objects to be created by this factory.
A base class which provides memory management and object aggregation.
Ptr< T > GetObject() const
Get a pointer to the requested aggregated Object.
Helper class that adds OLSR routing to nodes.
A helper to make it easier to instantiate an ns3::OnOffApplication on a set of nodes.
ApplicationContainer Install(NodeContainer c) const
Install an ns3::OnOffApplication on each node of the input container configured with all the attribut...
void SetAttribute(std::string name, const AttributeValue &value)
Helper function used to set the underlying application attributes.
uint32_t GetSize() const
Returns the the size in bytes of the packet (including the zero-filled initial payload).
void EnablePcapAll(std::string prefix, bool promiscuous=false)
Enable pcap output on each device (which is of the appropriate type) in the set of all nodes created ...
Hold objects of type Ptr<T>.
Allocate a set of positions.
Qos Wave Mac Helper class.
void SetStream(int64_t stream)
Specifies the stream number for the RngStream.
virtual Ptr< Node > GetNode() const =0
Return the node this socket is associated with.
virtual Ptr< Packet > RecvFrom(uint32_t maxSize, uint32_t flags, Address &fromAddress)=0
Read a single packet from the socket and retrieve the sender address.
Hold variables of type string.
Simulation virtual time values and global simulation resolution.
TimeWithUnit As(const Unit unit=Time::AUTO) const
Attach a unit to a Time, to facilitate output in a specific unit.
AttributeValue implementation for Time.
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Hold an unsigned integer type.
The WaveBsmHelper class manages IEEE 1609 WAVE (Wireless Access in Vehicular Environments) Basic Safe...
ApplicationContainer Install(Ipv4InterfaceContainer i) const
Install an ns3::BsmApplication on each node of the input container configured with all the attributes...
Ptr< WaveBsmStats > GetWaveBsmStats()
Returns the WaveBsmStats instance.
int64_t AssignStreams(NodeContainer c, int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model.
helps to create WaveNetDevice objects
virtual NetDeviceContainer Install(const WifiPhyHelper &phy, const WifiMacHelper &mac, NodeContainer c) const
void SetRemoteStationManager(std::string type, Ts &&... args)
helps to create wifi 802.11p objects of WifiNetDevice class
NetDeviceContainer Install(const WifiPhyHelper &phy, const WifiMacHelper &macHelper, NodeContainer c) const override
helps to create WifiNetDevice objects
void SetRemoteStationManager(std::string type, Args &&... args)
Helper function used to set the station manager.
create MAC layers for a ns3::WifiNetDevice.
void SetType(std::string type, Args &&... args)
represent a single transmission mode
void SetPcapDataLinkType(SupportedPcapDataLinkTypes dlt)
Set the data link type of PCAP traces to be used.
void Set(std::string name, const AttributeValue &v)
To trace WaveNetDevice, we have to overwrite the trace functions of class YansWifiPhyHelper.
manage and create wifi channel objects for the YANS model.
void SetPropagationDelay(std::string name, Ts &&... args)
void AddPropagationLoss(std::string name, Ts &&... args)
Ptr< YansWifiChannel > Create() const
Make it easy to create and manage PHY objects for the YANS model.
void SetChannel(Ptr< YansWifiChannel > channel)
void experiment(std::string queue_disc_type)
Ptr< const AttributeChecker > MakeBooleanChecker()
Ptr< const AttributeChecker > MakeStringChecker()
void SetDefault(std::string name, const AttributeValue &value)
void Connect(std::string path, const CallbackBase &cb)
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
#define NS_LOG_ERROR(msg)
Use NS_LOG to output a message of level LOG_ERROR.
#define NS_LOG_UNCOND(msg)
Output the requested message unconditionally.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
auto MakeBoundCallback(R(*fnPtr)(Args...), BArgs &&... bargs)
Make Callbacks with varying number of bound arguments.
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Time Now()
create an ns3::Time instance which contains the current simulation time.
Time Seconds(double value)
Construct a Time in the indicated unit.
Time MilliSeconds(uint64_t value)
Construct a Time in the indicated unit.
WifiPhyRxfailureReason
Enumeration of the possible reception failure reasons.
WifiPreamble
The type of preamble to be used by an IEEE 802.11 transmission.
void(* Time)(Time oldValue, Time newValue)
TracedValue callback signature for Time.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
void LogComponentEnable(const std::string &name, LogLevel level)
Enable the logging output associated with that log component.
Callback< R, Args... > MakeCallback(R(T::*memPtr)(Args...), OBJ objPtr)
Build Callbacks for class method members which take varying numbers of arguments and potentially retu...
Ptr< const AttributeChecker > MakeTimeChecker(const Time min, const Time max)
Helper to make a Time checker with bounded range.
@ LOG_LEVEL_DEBUG
LOG_DEBUG and above.
static ns3::GlobalValue g_port("VRCport", "Port", ns3::UintegerValue(9), ns3::MakeUintegerChecker< uint32_t >())
Port.
static ns3::GlobalValue g_traceMobility("VRCtraceMobility", "Enable trace mobility", ns3::BooleanValue(false), ns3::MakeBooleanChecker())
Trace mobility 1=yes;0=no.
static ns3::GlobalValue g_asciiTrace("VRCasciiTrace", "Dump ASCII trace", ns3::BooleanValue(false), ns3::MakeBooleanChecker())
Dump ASCII trace 0=no;1=yes.
static ns3::GlobalValue g_txMaxDelayMs("VRCtxMaxDelayMs", "Tx May Delay (ms)", ns3::DoubleValue(10), ns3::MakeDoubleChecker< double >())
Tx May Delay (ms)
static ns3::GlobalValue g_CSVfileName2("VRCCSVfileName2", "CSV filename 2 (for overall simulation scenario results)", ns3::StringValue("vanet-routing.output2.csv"), ns3::MakeStringChecker())
CSV filename 2 (for overall simulation scenario results)
static ns3::GlobalValue g_txSafetyRange10("VRCtxSafetyRange10", "BSM range for PDR inclusion", ns3::DoubleValue(500.0), ns3::MakeDoubleChecker< double >())
BSM range for PDR inclusion.
static ns3::GlobalValue g_verbose("VRCverbose", "Enable verbose", ns3::BooleanValue(false), ns3::MakeBooleanChecker())
Verbose 0=no;1=yes.
static ns3::GlobalValue g_fading("VRCfading", "Fast Fading Model", ns3::UintegerValue(0), ns3::MakeUintegerChecker< uint32_t >())
Fast Fading Model.
static ns3::GlobalValue g_wavePacketSize("VRCwavePacketSize", "Size in bytes of WAVE BSM", ns3::UintegerValue(200), ns3::MakeUintegerChecker< uint32_t >())
Size in bytes of WAVE BSM.
static ns3::GlobalValue g_gpsAccuracyNs("VRCgpsAccuracyNs", "GPS sync accuracy (ns)", ns3::DoubleValue(40), ns3::MakeDoubleChecker< double >())
GPS sync accuracy (ns)
static ns3::GlobalValue g_protocol("VRCprotocol", "Routing protocol", ns3::UintegerValue(2), ns3::MakeUintegerChecker< uint32_t >())
Routing protocol.
static ns3::GlobalValue g_scenario("VRCscenario", "Scenario", ns3::UintegerValue(1), ns3::MakeUintegerChecker< uint32_t >())
Scenario.
static ns3::GlobalValue g_nodeSpeed("VRCnodeSpeed", "Node speed (m/s) for RWP model", ns3::UintegerValue(20), ns3::MakeUintegerChecker< uint32_t >())
Node speed (m/s) for RWP model.
static ns3::GlobalValue g_cumulativeBsmCaptureStart("VRCcumulativeBsmCaptureStart", "Simulation start time for capturing cumulative BSM", ns3::TimeValue(Seconds(0)), ns3::MakeTimeChecker())
Simulation start time for capturing cumulative BSM.
static ns3::GlobalValue g_80211mode("VRC80211mode", "802.11 mode (0=802.11a;1=802.11p)", ns3::UintegerValue(1), ns3::MakeUintegerChecker< uint32_t >())
802.11 mode (0=802.11a;1=802.11p)
static ns3::GlobalValue g_totalTime("VRCtotalTime", "Total simulation time (s)", ns3::DoubleValue(300.01), ns3::MakeDoubleChecker< double >())
Total simulation time (s)
static ns3::GlobalValue g_nNodes("VRCnNodes", "Number of nodes (vehicles)", ns3::UintegerValue(156), ns3::MakeUintegerChecker< uint32_t >())
Number of nodes (vehicles)
static ns3::GlobalValue g_rate("VRCrate", "Data rate", ns3::StringValue("2048bps"), ns3::MakeStringChecker())
Data rate.
static std::string PrintReceivedRoutingPacket(Ptr< Socket > socket, Ptr< Packet > packet, Address srcAddress)
Print a received routing packet on a string.
static ns3::GlobalValue g_txSafetyRange1("VRCtxSafetyRange1", "BSM range for PDR inclusion", ns3::DoubleValue(50.0), ns3::MakeDoubleChecker< double >())
BSM range for PDR inclusion.
static ns3::GlobalValue g_mobility("VRCmobility", "Mobility mode 0=random waypoint;1=mobility trace file", ns3::UintegerValue(1), ns3::MakeUintegerChecker< uint32_t >())
Mobility mode 0=random waypoint;1=mobility trace file.
static ns3::GlobalValue g_txSafetyRange4("VRCtxSafetyRange4", "BSM range for PDR inclusion", ns3::DoubleValue(200.0), ns3::MakeDoubleChecker< double >())
BSM range for PDR inclusion.
static ns3::GlobalValue g_nodePause("VRCnodePause", "Node pause time (s) for RWP model", ns3::UintegerValue(0), ns3::MakeUintegerChecker< uint32_t >())
Node pause time (s) for RWP model.
static ns3::GlobalValue g_txSafetyRange2("VRCtxSafetyRange2", "BSM range for PDR inclusion", ns3::DoubleValue(100.0), ns3::MakeDoubleChecker< double >())
BSM range for PDR inclusion.
static ns3::GlobalValue g_txSafetyRange7("VRCtxSafetyRange7", "BSM range for PDR inclusion", ns3::DoubleValue(350.0), ns3::MakeDoubleChecker< double >())
BSM range for PDR inclusion.
static ns3::GlobalValue g_traceFile("VRCtraceFile", "Mobility trace filename", ns3::StringValue("./src/wave/examples/low99-ct-unterstrass-1day.filt.7.adj.mob"), ns3::MakeStringChecker())
Mobility trace filename.
static ns3::GlobalValue g_logFile("VRClogFile", "Log filename", ns3::StringValue("low99-ct-unterstrass-1day.filt.7.adj.log"), ns3::MakeStringChecker())
Log filename.
static ns3::GlobalValue g_trName("VRCtrName", "Trace name", ns3::StringValue("vanet-routing-compare"), ns3::MakeStringChecker())
Trace name)
static ns3::GlobalValue g_txSafetyRange5("VRCtxSafetyRange5", "BSM range for PDR inclusion", ns3::DoubleValue(250.0), ns3::MakeDoubleChecker< double >())
BSM range for PDR inclusion.
static ns3::GlobalValue g_pcap("VRCpcap", "Generate PCAP files", ns3::BooleanValue(false), ns3::MakeBooleanChecker())
Generate PCAP files 0=no;1=yes.
static ns3::GlobalValue g_txp("VRCtxp", "Transmission power dBm", ns3::DoubleValue(7.5), ns3::MakeDoubleChecker< double >())
Transmission power dBm.
static ns3::GlobalValue g_CSVfileName("VRCCSVfileName", "CSV filename (for time series data)", ns3::StringValue("vanet-routing.output.csv"), ns3::MakeStringChecker())
CSV filename (for time series data)
static ns3::GlobalValue g_txSafetyRange6("VRCtxSafetyRange6", "BSM range for PDR inclusion", ns3::DoubleValue(300.0), ns3::MakeDoubleChecker< double >())
BSM range for PDR inclusion.
static ns3::GlobalValue g_nSinks("VRCnSinks", "Number of sink nodes for routing non-BSM traffic", ns3::UintegerValue(10), ns3::MakeUintegerChecker< uint32_t >())
Number of sink nodes for routing non-BSM traffic.
static ns3::GlobalValue g_txSafetyRange3("VRCtxSafetyRange3", "BSM range for PDR inclusion", ns3::DoubleValue(150.0), ns3::MakeDoubleChecker< double >())
BSM range for PDR inclusion.
static ns3::GlobalValue g_phyModeB("VRCphyModeB", "PHY mode (802.11a)", ns3::StringValue("DsssRate11Mbps"), ns3::MakeStringChecker())
PHY mode (802.11a)
static ns3::GlobalValue g_waveInterval("VRCwaveInterval", "Interval (s) between WAVE BSMs", ns3::DoubleValue(0.1), ns3::MakeDoubleChecker< double >())
Interval (s) between WAVE BSMs.
static ns3::GlobalValue g_phyMode("VRCphyMode", "PHY mode (802.11p)", ns3::StringValue("OfdmRate6MbpsBW10MHz"), ns3::MakeStringChecker())
PHY mode (802.11p)
static ns3::GlobalValue g_txSafetyRange8("VRCtxSafetyRange8", "BSM range for PDR inclusion", ns3::DoubleValue(400.0), ns3::MakeDoubleChecker< double >())
BSM range for PDR inclusion.
static ns3::GlobalValue g_txSafetyRange9("VRCtxSafetyRange9", "BSM range for PDR inclusion", ns3::DoubleValue(450.0), ns3::MakeDoubleChecker< double >())
BSM range for PDR inclusion.
static ns3::GlobalValue g_routingTables("VRCroutingTables", "Dump routing tables at t=5 seconds", ns3::BooleanValue(false), ns3::MakeBooleanChecker())
Dump routing tables at t=5 seconds 0=no;1=yes.
static ns3::GlobalValue g_lossModel("VRClossModel", "Propagation Loss Model", ns3::UintegerValue(3), ns3::MakeUintegerChecker< uint32_t >())
Propagation Loss Model.
std::map< Mac48Address, uint64_t > packetsReceived
Map that stores the total packets received per STA (and addressed to that STA)
uint32_t pktSize
packet size used for the simulation (in bytes)
std::vector< uint64_t > GetRxBytes(bool udp, const ApplicationContainer &serverApp, uint32_t payloadSize)
Ptr< PacketSink > sink
Pointer to the packet sink application.