Public Member Functions | |
MeshTest () | |
Init test. | |
void | Configure (int argc, char **argv) |
Configure test from command line arguments. | |
int | Run () |
Run test. | |
Private Member Functions | |
void | CreateNodes () |
Create nodes and setup their mobility. | |
void | InstallApplication () |
Install applications. | |
void | InstallInternetStack () |
Install internet m_stack on nodes. | |
void | Report () |
Print mesh devices diagnostics. | |
Private Attributes | |
Ipv4InterfaceContainer | interfaces |
Addresses of interfaces: | |
bool | m_ascii |
ASCII. | |
bool | m_chan |
channel | |
uint32_t | m_nIfaces |
number interfaces | |
double | m_packetInterval |
packet interval | |
uint16_t | m_packetSize |
packet size | |
bool | m_pcap |
PCAP. | |
double | m_randomStart |
random start | |
std::string | m_root |
root | |
std::string | m_stack |
stack | |
double | m_step |
step | |
double | m_totalTime |
total time | |
int | m_xSize |
X size. | |
int | m_ySize |
Y size. | |
MeshHelper | mesh |
MeshHelper. Report is not static methods. | |
NetDeviceContainer | meshDevices |
List of all mesh point devices. | |
NodeContainer | nodes |
List of network nodes. | |
MeshTest class.
Definition at line 110 of file mesh-example.cc.
MeshTest::MeshTest | ( | ) |
Init test.
Definition at line 162 of file mesh-example.cc.
void MeshTest::Configure | ( | int | argc, |
char ** | argv ) |
Configure test from command line arguments.
argc | command line argument count |
argv | command line arguments |
Definition at line 180 of file mesh-example.cc.
References ns3::PacketMetadata::Enable(), m_ascii, m_chan, m_nIfaces, m_packetInterval, m_packetSize, m_pcap, m_randomStart, m_root, m_stack, m_step, m_totalTime, m_xSize, m_ySize, and NS_LOG_DEBUG.
|
private |
Create nodes and setup their mobility.
Definition at line 208 of file mesh-example.cc.
References ns3::MeshHelper::AssignStreams(), ns3::NodeContainer::Create(), ns3::YansWifiChannelHelper::Create(), ns3::AsciiTraceHelper::CreateFileStream(), ns3::MeshHelper::Default(), ns3::YansWifiChannelHelper::Default(), ns3::AsciiTraceHelperForDevice::EnableAsciiAll(), ns3::PcapHelperForDevice::EnablePcapAll(), ns3::MeshHelper::Install(), ns3::Mac48Address::IsBroadcast(), m_ascii, m_chan, m_nIfaces, m_pcap, m_randomStart, m_root, m_stack, m_step, m_xSize, m_ySize, mesh, meshDevices, nodes, ns3::Seconds(), ns3::YansWifiPhyHelper::SetChannel(), ns3::MeshHelper::SetMacType(), ns3::MeshHelper::SetNumberOfInterfaces(), ns3::MeshHelper::SetSpreadInterfaceChannels(), ns3::MeshHelper::SetStackInstaller(), ns3::MeshHelper::SPREAD_CHANNELS, and ns3::MeshHelper::ZERO_CHANNEL.
Referenced by Run().
|
private |
Install applications.
Definition at line 288 of file mesh-example.cc.
References ns3::NodeContainer::Get(), ns3::Ipv4InterfaceContainer::GetAddress(), interfaces, m_packetInterval, m_packetSize, m_totalTime, m_xSize, m_ySize, ns3::MakeCallback(), nodes, RxTrace(), ns3::Seconds(), and TxTrace().
Referenced by Run().
|
private |
Install internet m_stack on nodes.
Definition at line 278 of file mesh-example.cc.
References ns3::InternetStackHelper::Install(), interfaces, meshDevices, and nodes.
Referenced by Run().
|
private |
Print mesh devices diagnostics.
Definition at line 325 of file mesh-example.cc.
References ns3::NetDeviceContainer::Begin(), ns3::NetDeviceContainer::End(), mesh, meshDevices, and ns3::MeshHelper::Report().
Referenced by Run().
int MeshTest::Run | ( | ) |
Run test.
Definition at line 310 of file mesh-example.cc.
References CreateNodes(), ns3::Simulator::Destroy(), g_udpRxCount, g_udpTxCount, InstallApplication(), InstallInternetStack(), m_totalTime, Report(), ns3::Simulator::Run(), ns3::Simulator::Schedule(), ns3::Seconds(), and ns3::Simulator::Stop().
|
private |
Addresses of interfaces:
Definition at line 147 of file mesh-example.cc.
Referenced by InstallApplication(), and InstallInternetStack().
|
private |
ASCII.
Definition at line 139 of file mesh-example.cc.
Referenced by Configure(), and CreateNodes().
|
private |
channel
Definition at line 137 of file mesh-example.cc.
Referenced by Configure(), and CreateNodes().
|
private |
number interfaces
Definition at line 136 of file mesh-example.cc.
Referenced by Configure(), and CreateNodes().
|
private |
packet interval
Definition at line 134 of file mesh-example.cc.
Referenced by Configure(), and InstallApplication().
|
private |
packet size
Definition at line 135 of file mesh-example.cc.
Referenced by Configure(), and InstallApplication().
|
private |
|
private |
random start
Definition at line 132 of file mesh-example.cc.
Referenced by Configure(), and CreateNodes().
|
private |
|
private |
|
private |
|
private |
total time
Definition at line 133 of file mesh-example.cc.
Referenced by Configure(), InstallApplication(), and Run().
|
private |
X size.
Definition at line 129 of file mesh-example.cc.
Referenced by Configure(), CreateNodes(), and InstallApplication().
|
private |
Y size.
Definition at line 130 of file mesh-example.cc.
Referenced by Configure(), CreateNodes(), and InstallApplication().
|
private |
MeshHelper. Report is not static methods.
Definition at line 149 of file mesh-example.cc.
Referenced by CreateNodes(), and Report().
|
private |
List of all mesh point devices.
Definition at line 145 of file mesh-example.cc.
Referenced by CreateNodes(), InstallInternetStack(), and Report().
|
private |
List of network nodes.
Definition at line 143 of file mesh-example.cc.
Referenced by CreateNodes(), InstallApplication(), and InstallInternetStack().