19 #ifndef TRACE_HELPER_H
20 #define TRACE_HELPER_H
22 #include "ns3/assert.h"
23 #include "ns3/net-device-container.h"
24 #include "ns3/node-container.h"
25 #include "ns3/simulator.h"
26 #include "ns3/pcap-file-wrapper.h"
27 #include "ns3/output-stream-wrapper.h"
78 uint32_t interface,
bool useObjectNames =
true);
84 uint32_t dataLinkType, uint32_t snapLen = 65535, int32_t tzCorrection = 0);
94 template <
typename T>
void
99 NS_ASSERT_MSG (result ==
true,
"PcapHelper::HookDefaultSink(): Unable to hook \"" << tracename <<
"\"");
133 uint32_t interface,
bool useObjectNames =
true);
156 std::ios::openmode filemode = std::ios::out);
162 template <
typename T>
169 template <
typename T>
177 template <
typename T>
184 template <
typename T>
192 template <
typename T>
199 template <
typename T>
207 template <
typename T>
214 template <
typename T>
231 template <
typename T>
void
236 NS_ASSERT_MSG (result ==
true,
"AsciiTraceHelper::HookDefaultEnqueueSinkWithoutContext(): Unable to hook \""
237 << tracename <<
"\"");
240 template <
typename T>
void
244 std::string tracename,
249 NS_ASSERT_MSG (result ==
true,
"AsciiTraceHelper::HookDefaultEnqueueSinkWithContext(): Unable to hook \""
250 << tracename <<
"\"");
253 template <
typename T>
void
258 NS_ASSERT_MSG (result ==
true,
"AsciiTraceHelper::HookDefaultDropSinkWithoutContext(): Unable to hook \""
259 << tracename <<
"\"");
262 template <
typename T>
void
266 std::string tracename,
271 NS_ASSERT_MSG (result ==
true,
"AsciiTraceHelper::HookDefaultDropSinkWithContext(): Unable to hook \""
272 << tracename <<
"\"");
275 template <
typename T>
void
280 NS_ASSERT_MSG (result ==
true,
"AsciiTraceHelper::HookDefaultDequeueSinkWithoutContext(): Unable to hook \""
281 << tracename <<
"\"");
284 template <
typename T>
void
288 std::string tracename,
293 NS_ASSERT_MSG (result ==
true,
"AsciiTraceHelper::HookDefaultDequeueSinkWithContext(): Unable to hook \""
294 << tracename <<
"\"");
297 template <
typename T>
void
302 NS_ASSERT_MSG (result ==
true,
"AsciiTraceHelper::HookDefaultReceiveSinkWithoutContext(): Unable to hook \""
303 << tracename <<
"\"");
306 template <
typename T>
void
310 std::string tracename,
315 NS_ASSERT_MSG (result ==
true,
"AsciiTraceHelper::HookDefaultReceiveSinkWithContext(): Unable to hook \""
316 << tracename <<
"\"");
366 void EnablePcap (std::string prefix, std::string ndName,
bool promiscuous =
false,
bool explicitFilename =
false);
397 void EnablePcap (std::string prefix, uint32_t nodeid, uint32_t deviceid,
bool promiscuous =
false);
406 void EnablePcapAll (std::string prefix,
bool promiscuous =
false);
453 bool explicitFilename) = 0;
481 void EnableAscii (std::string prefix, std::string ndName,
bool explicitFilename =
false);
559 void EnableAscii (std::string prefix, uint32_t nodeid, uint32_t deviceid,
bool explicitFilename);
582 bool explicitFilename);