DSDV Manet example. More...
 Collaboration diagram for DsdvManetExample:
 Collaboration diagram for DsdvManetExample:| Public Member Functions | |
| DsdvManetExample () | |
| void | CaseRun (uint32_t nWifis, uint32_t nSinks, double totalTime, std::string rate, std::string phyMode, uint32_t nodeSpeed, uint32_t periodicUpdateInterval, uint32_t settlingTime, double dataStart, bool printRoutes, std::string CSVfileName) | 
| Run function.  More... | |
| Private Member Functions | |
| void | CheckThroughput () | 
| Check network throughput.  More... | |
| void | CreateDevices (std::string tr_name) | 
| Create and initialize all devices.  More... | |
| void | CreateNodes () | 
| Create and initialize all nodes.  More... | |
| void | InstallApplications () | 
| Create data sinks and sources.  More... | |
| void | InstallInternetStack (std::string tr_name) | 
| Create network.  More... | |
| void | ReceivePacket (Ptr< Socket > socket) | 
| Packet receive function.  More... | |
| void | SetupMobility () | 
| Setup mobility model.  More... | |
| Ptr< Socket > | SetupPacketReceive (Ipv4Address addr, Ptr< Node > node) | 
| Setup packet receivers.  More... | |
| Private Attributes | |
| uint32_t | bytesTotal | 
| total bytes received by all nodes  More... | |
| NetDeviceContainer | devices | 
| the collection of devices  More... | |
| Ipv4InterfaceContainer | interfaces | 
| the collection of interfaces  More... | |
| std::string | m_CSVfileName | 
| CSV file name.  More... | |
| double | m_dataStart | 
| time to start data transmissions (seconds)  More... | |
| uint32_t | m_nodeSpeed | 
| mobility speed  More... | |
| uint32_t | m_nSinks | 
| number of receiver nodes  More... | |
| uint32_t | m_nWifis | 
| total number of nodes  More... | |
| uint32_t | m_periodicUpdateInterval | 
| routing update interval  More... | |
| std::string | m_phyMode | 
| remote station manager data mode  More... | |
| bool | m_printRoutes | 
| print routing table  More... | |
| std::string | m_rate | 
| network bandwidth  More... | |
| uint32_t | m_settlingTime | 
| routing setting time  More... | |
| double | m_totalTime | 
| total simulation time (in seconds)  More... | |
| NodeContainer | nodes | 
| the collection of nodes  More... | |
| uint32_t | packetsReceived | 
| total packets received by all nodes  More... | |
DSDV Manet example.
Definition at line 56 of file dsdv-manet.cc.
| DsdvManetExample::DsdvManetExample | ( | ) | 
Definition at line 191 of file dsdv-manet.cc.
| void DsdvManetExample::CaseRun | ( | uint32_t | nWifis, | 
| uint32_t | nSinks, | ||
| double | totalTime, | ||
| std::string | rate, | ||
| std::string | phyMode, | ||
| uint32_t | nodeSpeed, | ||
| uint32_t | periodicUpdateInterval, | ||
| uint32_t | settlingTime, | ||
| double | dataStart, | ||
| bool | printRoutes, | ||
| std::string | CSVfileName | ||
| ) | 
Run function.
| nWifis | The total number of nodes | 
| nSinks | The total number of receivers | 
| totalTime | The total simulation time | 
| rate | The network speed | 
| phyMode | The physical mode | 
| nodeSpeed | The node speed | 
| periodicUpdateInterval | The routing update interval | 
| settlingTime | The routing update settling time | 
| dataStart | The data transmission start time | 
| printRoutes | print the routes if true | 
| CSVfileName | The CSV file name | 
Definition at line 238 of file dsdv-manet.cc.
References CheckThroughput(), CreateDevices(), CreateNodes(), InstallApplications(), InstallInternetStack(), m_CSVfileName, m_dataStart, m_nodeSpeed, m_nSinks, m_nWifis, m_periodicUpdateInterval, m_phyMode, m_printRoutes, m_rate, m_settlingTime, m_totalTime, ns3::Seconds(), and SetupMobility().
 Here is the call graph for this function:
 Here is the call graph for this function:| 
 | private | 
Check network throughput.
Definition at line 210 of file dsdv-manet.cc.
References bytesTotal, m_CSVfileName, m_nSinks, ns3::Now(), packetsReceived, and ns3::Seconds().
Referenced by CaseRun().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | private | 
Create and initialize all devices.
| tr_name | The trace file name | 
Definition at line 310 of file dsdv-manet.cc.
References ns3::YansWifiChannelHelper::AddPropagationLoss(), ns3::YansWifiChannelHelper::Create(), ns3::AsciiTraceHelper::CreateFileStream(), devices, ns3::AsciiTraceHelperForDevice::EnableAsciiAll(), ns3::PcapHelperForDevice::EnablePcapAll(), m_phyMode, nodes, ns3::YansWifiPhyHelper::SetChannel(), ns3::YansWifiChannelHelper::SetPropagationDelay(), ns3::WifiMacHelper::SetType(), third::wifi, and ns3::WIFI_PHY_STANDARD_80211b.
Referenced by CaseRun().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | private | 
Create and initialize all nodes.
Definition at line 281 of file dsdv-manet.cc.
References ns3::NodeContainer::Create(), m_nSinks, m_nWifis, nodes, and NS_ASSERT_MSG().
Referenced by CaseRun().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | private | 
Create data sinks and sources.
Definition at line 350 of file dsdv-manet.cc.
References ns3::NodeContainer::Get(), ns3::Ipv4InterfaceContainer::GetAddress(), ns3::Object::GetObject(), ns3::UniformRandomVariable::GetValue(), interfaces, m_dataStart, m_nSinks, m_nWifis, m_totalTime, nodes, port, ns3::Seconds(), ns3::OnOffHelper::SetAttribute(), SetupPacketReceive(), sink, ns3::ApplicationContainer::Start(), and ns3::ApplicationContainer::Stop().
Referenced by CaseRun().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | private | 
Create network.
| tr_name | The trace file name | 
Definition at line 331 of file dsdv-manet.cc.
References first::address, devices, interfaces, m_periodicUpdateInterval, m_printRoutes, m_settlingTime, nodes, ns3::Ipv4RoutingHelper::PrintRoutingTableAllAt(), ns3::Seconds(), ns3::DsdvHelper::Set(), and first::stack.
Referenced by CaseRun().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:Packet receive function.
| socket | The communication socket | 
Definition at line 198 of file dsdv-manet.cc.
References bytesTotal, ns3::Packet::GetSize(), ns3::Now(), NS_LOG_UNCOND, packetsReceived, and ns3::Socket::Recv().
Referenced by SetupPacketReceive().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | private | 
Setup mobility model.
Definition at line 289 of file dsdv-manet.cc.
References ns3::ObjectFactory::Create(), ns3::Object::GetObject(), m_nodeSpeed, third::mobility, nodes, ns3::ObjectFactory::Set(), and ns3::ObjectFactory::SetTypeId().
Referenced by CaseRun().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | private | 
Setup packet receivers.
| addr | the receiving IPv4 address | 
| node | the receiving node | 
Definition at line 225 of file dsdv-manet.cc.
References ns3::MakeCallback(), port, ReceivePacket(), and sink.
Referenced by InstallApplications().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | private | 
total bytes received by all nodes
Definition at line 96 of file dsdv-manet.cc.
Referenced by CheckThroughput(), and ReceivePacket().
| 
 | private | 
the collection of devices
Definition at line 102 of file dsdv-manet.cc.
Referenced by CreateDevices(), and InstallInternetStack().
| 
 | private | 
the collection of interfaces
Definition at line 103 of file dsdv-manet.cc.
Referenced by InstallApplications(), and InstallInternetStack().
| 
 | private | 
CSV file name.
Definition at line 99 of file dsdv-manet.cc.
Referenced by CaseRun(), and CheckThroughput().
| 
 | private | 
time to start data transmissions (seconds)
Definition at line 95 of file dsdv-manet.cc.
Referenced by CaseRun(), and InstallApplications().
| 
 | private | 
mobility speed
Definition at line 92 of file dsdv-manet.cc.
Referenced by CaseRun(), and SetupMobility().
| 
 | private | 
number of receiver nodes
Definition at line 88 of file dsdv-manet.cc.
Referenced by CaseRun(), CheckThroughput(), CreateNodes(), and InstallApplications().
| 
 | private | 
total number of nodes
Definition at line 87 of file dsdv-manet.cc.
Referenced by CaseRun(), CreateNodes(), and InstallApplications().
| 
 | private | 
routing update interval
Definition at line 93 of file dsdv-manet.cc.
Referenced by CaseRun(), and InstallInternetStack().
| 
 | private | 
remote station manager data mode
Definition at line 91 of file dsdv-manet.cc.
Referenced by CaseRun(), and CreateDevices().
| 
 | private | 
print routing table
Definition at line 98 of file dsdv-manet.cc.
Referenced by CaseRun(), and InstallInternetStack().
| 
 | private | 
| 
 | private | 
routing setting time
Definition at line 94 of file dsdv-manet.cc.
Referenced by CaseRun(), and InstallInternetStack().
| 
 | private | 
total simulation time (in seconds)
Definition at line 89 of file dsdv-manet.cc.
Referenced by CaseRun(), and InstallApplications().
| 
 | private | 
the collection of nodes
Definition at line 101 of file dsdv-manet.cc.
Referenced by CreateDevices(), CreateNodes(), InstallApplications(), InstallInternetStack(), and SetupMobility().
| 
 | private | 
total packets received by all nodes
Definition at line 97 of file dsdv-manet.cc.
Referenced by CheckThroughput(), and ReceivePacket().