traceConnectWithoutContext with application's tx

247 views
Skip to first unread message

Arthur Wulf White

unread,
Apr 30, 2014, 2:47:07 PM4/30/14
to ns-3-...@googlegroups.com
I have a BulkSendApplication and I want to count the packets going out..
I am doing this:

bulkapp->TraceConnectWithoutContext ("Tx", MakeCallback(&pktTrace));


This does not seem to work? What is the correct way to trace the outgoing traffic?

Thanks,

Arthur


Konstantinos

unread,
Apr 30, 2014, 2:59:49 PM4/30/14
to ns-3-...@googlegroups.com
What do you mean it does not work? Do you get an error or you do not get Tx triggered?

Konstantinos

unread,
Apr 30, 2014, 3:09:34 PM4/30/14
to ns-3-...@googlegroups.com
What is bulkapp? Is it the application or the application helper? 

For example, in the /examples/tcp/tcp-bulk-send.cc I tested the code below (after the application is installed on node):

  Ptr<BulkSendApplication> app = DynamicCast<BulkSendApplication> (nodes.Get(0)->GetApplication(0));
  app
->TraceConnectWithoutContext("Tx", MakeCallback(&TxTrace));

with
void TxTrace(Ptr<const Packet> p)
{
 NS_LOG_UNCOND
("tx packet");
}


and it works without any problem.

Regards,

K.

Arthur Wulf White

unread,
May 1, 2014, 8:03:43 AM5/1/14
to ns-3-...@googlegroups.com
Thanks!! I think I might had a tiny misunderstanding but this helped clear things up.
Reply all
Reply to author
Forward
Message has been deleted
0 new messages