|
85 |
uint32_t m_nIfaces; ///< number interfaces |
85 |
uint32_t m_nIfaces; ///< number interfaces |
86 |
bool m_chan; ///< channel |
86 |
bool m_chan; ///< channel |
87 |
bool m_pcap; ///< PCAP |
87 |
bool m_pcap; ///< PCAP |
|
|
88 |
bool m_ascii; ///< ASCII |
88 |
std::string m_stack; ///< stack |
89 |
std::string m_stack; ///< stack |
89 |
std::string m_root; ///< root |
90 |
std::string m_root; ///< root |
90 |
/// List of network nodes |
91 |
/// List of network nodes |
|
116 |
m_nIfaces (1), |
117 |
m_nIfaces (1), |
117 |
m_chan (true), |
118 |
m_chan (true), |
118 |
m_pcap (false), |
119 |
m_pcap (false), |
|
|
120 |
m_ascii (false), |
119 |
m_stack ("ns3::Dot11sStack"), |
121 |
m_stack ("ns3::Dot11sStack"), |
120 |
m_root ("ff:ff:ff:ff:ff:ff") |
122 |
m_root ("ff:ff:ff:ff:ff:ff") |
121 |
{ |
123 |
{ |
|
135 |
cmd.AddValue ("interfaces", "Number of radio interfaces used by each mesh point", m_nIfaces); |
137 |
cmd.AddValue ("interfaces", "Number of radio interfaces used by each mesh point", m_nIfaces); |
136 |
cmd.AddValue ("channels", "Use different frequency channels for different interfaces", m_chan); |
138 |
cmd.AddValue ("channels", "Use different frequency channels for different interfaces", m_chan); |
137 |
cmd.AddValue ("pcap", "Enable PCAP traces on interfaces", m_pcap); |
139 |
cmd.AddValue ("pcap", "Enable PCAP traces on interfaces", m_pcap); |
|
|
140 |
cmd.AddValue ("ascii", "Enable Ascii traces on interfaces", m_ascii); |
138 |
cmd.AddValue ("stack", "Type of protocol stack. ns3::Dot11sStack by default", m_stack); |
141 |
cmd.AddValue ("stack", "Type of protocol stack. ns3::Dot11sStack by default", m_stack); |
139 |
cmd.AddValue ("root", "Mac address of root mesh point in HWMP", m_root); |
142 |
cmd.AddValue ("root", "Mac address of root mesh point in HWMP", m_root); |
140 |
|
143 |
|
141 |
cmd.Parse (argc, argv); |
144 |
cmd.Parse (argc, argv); |
142 |
NS_LOG_DEBUG ("Grid:" << m_xSize << "*" << m_ySize); |
145 |
NS_LOG_DEBUG ("Grid:" << m_xSize << "*" << m_ySize); |
143 |
NS_LOG_DEBUG ("Simulation time: " << m_totalTime << " s"); |
146 |
NS_LOG_DEBUG ("Simulation time: " << m_totalTime << " s"); |
|
|
147 |
if (m_ascii) |
148 |
{ |
149 |
PacketMetadata::Enable (); |
150 |
} |
144 |
} |
151 |
} |
145 |
void |
152 |
void |
146 |
MeshTest::CreateNodes () |
153 |
MeshTest::CreateNodes () |
|
195 |
mobility.Install (nodes); |
202 |
mobility.Install (nodes); |
196 |
if (m_pcap) |
203 |
if (m_pcap) |
197 |
wifiPhy.EnablePcapAll (std::string ("mp-")); |
204 |
wifiPhy.EnablePcapAll (std::string ("mp-")); |
|
|
205 |
if (m_ascii) |
206 |
{ |
207 |
AsciiTraceHelper ascii; |
208 |
wifiPhy.EnableAsciiAll (ascii.CreateFileStream ("mesh.tr")); |
209 |
} |
198 |
} |
210 |
} |
199 |
void |
211 |
void |
200 |
MeshTest::InstallInternetStack () |
212 |
MeshTest::InstallInternetStack () |