|
94 |
template <typename T> void |
94 |
template <typename T> void |
95 |
PcapHelper::HookDefaultSink (Ptr<T> object, std::string tracename, Ptr<PcapFileWrapper> file) |
95 |
PcapHelper::HookDefaultSink (Ptr<T> object, std::string tracename, Ptr<PcapFileWrapper> file) |
96 |
{ |
96 |
{ |
97 |
bool __attribute__ ((unused)) result = |
97 |
NS_ASSERT_ASSIGNMENT (bool result, |
98 |
object->TraceConnectWithoutContext (tracename.c_str (), MakeBoundCallback (&DefaultSink, file)); |
98 |
object->TraceConnectWithoutContext (tracename.c_str (), |
|
|
99 |
MakeBoundCallback (&DefaultSink, file))); |
99 |
NS_ASSERT_MSG (result == true, "PcapHelper::HookDefaultSink(): Unable to hook \"" << tracename << "\""); |
100 |
NS_ASSERT_MSG (result == true, "PcapHelper::HookDefaultSink(): Unable to hook \"" << tracename << "\""); |
100 |
} |
101 |
} |
101 |
|
102 |
|
|
231 |
template <typename T> void |
232 |
template <typename T> void |
232 |
AsciiTraceHelper::HookDefaultEnqueueSinkWithoutContext (Ptr<T> object, std::string tracename, Ptr<OutputStreamWrapper> file) |
233 |
AsciiTraceHelper::HookDefaultEnqueueSinkWithoutContext (Ptr<T> object, std::string tracename, Ptr<OutputStreamWrapper> file) |
233 |
{ |
234 |
{ |
234 |
bool __attribute__ ((unused)) result = |
235 |
NS_ASSERT_ASSIGNMENT (bool result, |
235 |
object->TraceConnectWithoutContext (tracename, MakeBoundCallback (&DefaultEnqueueSinkWithoutContext, file)); |
236 |
object->TraceConnectWithoutContext (tracename, |
|
|
237 |
MakeBoundCallback (&DefaultEnqueueSinkWithoutContext, file))); |
236 |
NS_ASSERT_MSG (result == true, "AsciiTraceHelper::HookDefaultEnqueueSinkWithoutContext(): Unable to hook \"" |
238 |
NS_ASSERT_MSG (result == true, "AsciiTraceHelper::HookDefaultEnqueueSinkWithoutContext(): Unable to hook \"" |
237 |
<< tracename << "\""); |
239 |
<< tracename << "\""); |
238 |
} |
240 |
} |
|
244 |
std::string tracename, |
246 |
std::string tracename, |
245 |
Ptr<OutputStreamWrapper> stream) |
247 |
Ptr<OutputStreamWrapper> stream) |
246 |
{ |
248 |
{ |
247 |
bool __attribute__ ((unused)) result = |
249 |
NS_ASSERT_ASSIGNMENT (bool result, |
248 |
object->TraceConnect (tracename, context, MakeBoundCallback (&DefaultEnqueueSinkWithContext, stream)); |
250 |
object->TraceConnect (tracename, |
|
|
251 |
context, |
252 |
MakeBoundCallback (&DefaultEnqueueSinkWithContext, stream))); |
249 |
NS_ASSERT_MSG (result == true, "AsciiTraceHelper::HookDefaultEnqueueSinkWithContext(): Unable to hook \"" |
253 |
NS_ASSERT_MSG (result == true, "AsciiTraceHelper::HookDefaultEnqueueSinkWithContext(): Unable to hook \"" |
250 |
<< tracename << "\""); |
254 |
<< tracename << "\""); |
251 |
} |
255 |
} |
|
253 |
template <typename T> void |
257 |
template <typename T> void |
254 |
AsciiTraceHelper::HookDefaultDropSinkWithoutContext (Ptr<T> object, std::string tracename, Ptr<OutputStreamWrapper> file) |
258 |
AsciiTraceHelper::HookDefaultDropSinkWithoutContext (Ptr<T> object, std::string tracename, Ptr<OutputStreamWrapper> file) |
255 |
{ |
259 |
{ |
256 |
bool __attribute__ ((unused)) result = |
260 |
NS_ASSERT_ASSIGNMENT (bool result, |
257 |
object->TraceConnectWithoutContext (tracename, MakeBoundCallback (&DefaultDropSinkWithoutContext, file)); |
261 |
object->TraceConnectWithoutContext (tracename, |
|
|
262 |
MakeBoundCallback (&DefaultDropSinkWithoutContext, file))); |
258 |
NS_ASSERT_MSG (result == true, "AsciiTraceHelper::HookDefaultDropSinkWithoutContext(): Unable to hook \"" |
263 |
NS_ASSERT_MSG (result == true, "AsciiTraceHelper::HookDefaultDropSinkWithoutContext(): Unable to hook \"" |
259 |
<< tracename << "\""); |
264 |
<< tracename << "\""); |
260 |
} |
265 |
} |
|
266 |
std::string tracename, |
271 |
std::string tracename, |
267 |
Ptr<OutputStreamWrapper> stream) |
272 |
Ptr<OutputStreamWrapper> stream) |
268 |
{ |
273 |
{ |
269 |
bool __attribute__ ((unused)) result = |
274 |
NS_ASSERT_ASSIGNMENT (bool result, |
270 |
object->TraceConnect (tracename, context, MakeBoundCallback (&DefaultDropSinkWithContext, stream)); |
275 |
object->TraceConnect (tracename, |
|
|
276 |
context, |
277 |
MakeBoundCallback (&DefaultDropSinkWithContext, stream))); |
271 |
NS_ASSERT_MSG (result == true, "AsciiTraceHelper::HookDefaultDropSinkWithContext(): Unable to hook \"" |
278 |
NS_ASSERT_MSG (result == true, "AsciiTraceHelper::HookDefaultDropSinkWithContext(): Unable to hook \"" |
272 |
<< tracename << "\""); |
279 |
<< tracename << "\""); |
273 |
} |
280 |
} |
|
275 |
template <typename T> void |
282 |
template <typename T> void |
276 |
AsciiTraceHelper::HookDefaultDequeueSinkWithoutContext (Ptr<T> object, std::string tracename, Ptr<OutputStreamWrapper> file) |
283 |
AsciiTraceHelper::HookDefaultDequeueSinkWithoutContext (Ptr<T> object, std::string tracename, Ptr<OutputStreamWrapper> file) |
277 |
{ |
284 |
{ |
278 |
bool __attribute__ ((unused)) result = |
285 |
NS_ASSERT_ASSIGNMENT (bool result, |
279 |
object->TraceConnectWithoutContext (tracename, MakeBoundCallback (&DefaultDequeueSinkWithoutContext, file)); |
286 |
object->TraceConnectWithoutContext (tracename, |
|
|
287 |
MakeBoundCallback (&DefaultDequeueSinkWithoutContext, file))); |
280 |
NS_ASSERT_MSG (result == true, "AsciiTraceHelper::HookDefaultDequeueSinkWithoutContext(): Unable to hook \"" |
288 |
NS_ASSERT_MSG (result == true, "AsciiTraceHelper::HookDefaultDequeueSinkWithoutContext(): Unable to hook \"" |
281 |
<< tracename << "\""); |
289 |
<< tracename << "\""); |
282 |
} |
290 |
} |
|
288 |
std::string tracename, |
296 |
std::string tracename, |
289 |
Ptr<OutputStreamWrapper> stream) |
297 |
Ptr<OutputStreamWrapper> stream) |
290 |
{ |
298 |
{ |
291 |
bool __attribute__ ((unused)) result = |
299 |
NS_ASSERT_ASSIGNMENT (bool result, |
292 |
object->TraceConnect (tracename, context, MakeBoundCallback (&DefaultDequeueSinkWithContext, stream)); |
300 |
object->TraceConnect (tracename, |
|
|
301 |
context, |
302 |
MakeBoundCallback (&DefaultDequeueSinkWithContext, stream))); |
293 |
NS_ASSERT_MSG (result == true, "AsciiTraceHelper::HookDefaultDequeueSinkWithContext(): Unable to hook \"" |
303 |
NS_ASSERT_MSG (result == true, "AsciiTraceHelper::HookDefaultDequeueSinkWithContext(): Unable to hook \"" |
294 |
<< tracename << "\""); |
304 |
<< tracename << "\""); |
295 |
} |
305 |
} |
|
297 |
template <typename T> void |
307 |
template <typename T> void |
298 |
AsciiTraceHelper::HookDefaultReceiveSinkWithoutContext (Ptr<T> object, std::string tracename, Ptr<OutputStreamWrapper> file) |
308 |
AsciiTraceHelper::HookDefaultReceiveSinkWithoutContext (Ptr<T> object, std::string tracename, Ptr<OutputStreamWrapper> file) |
299 |
{ |
309 |
{ |
300 |
bool __attribute__ ((unused)) result = |
310 |
NS_ASSERT_ASSIGNMENT (bool result, |
301 |
object->TraceConnectWithoutContext (tracename, MakeBoundCallback (&DefaultReceiveSinkWithoutContext, file)); |
311 |
object->TraceConnectWithoutContext (tracename, |
|
|
312 |
MakeBoundCallback (&DefaultReceiveSinkWithoutContext, file))); |
302 |
NS_ASSERT_MSG (result == true, "AsciiTraceHelper::HookDefaultReceiveSinkWithoutContext(): Unable to hook \"" |
313 |
NS_ASSERT_MSG (result == true, "AsciiTraceHelper::HookDefaultReceiveSinkWithoutContext(): Unable to hook \"" |
303 |
<< tracename << "\""); |
314 |
<< tracename << "\""); |
304 |
} |
315 |
} |
|
310 |
std::string tracename, |
321 |
std::string tracename, |
311 |
Ptr<OutputStreamWrapper> stream) |
322 |
Ptr<OutputStreamWrapper> stream) |
312 |
{ |
323 |
{ |
313 |
bool __attribute__ ((unused)) result = |
324 |
NS_ASSERT_ASSIGNMENT (bool result, |
314 |
object->TraceConnect (tracename, context, MakeBoundCallback (&DefaultReceiveSinkWithContext, stream)); |
325 |
object->TraceConnect (tracename, |
|
|
326 |
context, |
327 |
MakeBoundCallback (&DefaultReceiveSinkWithContext, stream))); |
315 |
NS_ASSERT_MSG (result == true, "AsciiTraceHelper::HookDefaultReceiveSinkWithContext(): Unable to hook \"" |
328 |
NS_ASSERT_MSG (result == true, "AsciiTraceHelper::HookDefaultReceiveSinkWithContext(): Unable to hook \"" |
316 |
<< tracename << "\""); |
329 |
<< tracename << "\""); |
317 |
} |
330 |
} |