View | Details | Raw Unified | Return to bug 2505
Collapse All | Expand All

(-)a/src/mesh/examples/mesh.cc (+12 lines)
 Lines 85-90    Link Here 
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
 Lines 116-121    Link Here 
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
{
 Lines 135-146    Link Here 
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 ()
 Lines 195-200    Link Here 
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 ()
(-)a/src/mesh/test/examples-to-run.py (-1 / +1 lines)
 Lines 8-14    Link Here 
8
#
8
#
9
# See test.py for more information.
9
# See test.py for more information.
10
cpp_examples = [
10
cpp_examples = [
11
    ("mesh", "True", "True"),
11
    ("mesh --ascii", "True", "True"),
12
]
12
]
13
13
14
# A list of Python examples to run in order to ensure that they remain
14
# A list of Python examples to run in order to ensure that they remain

Return to bug 2505