Bugzilla – Bug 2055
TxBuffer and RxBuffer traces don't work
Last modified: 2015-01-31 18:51:34 UTC
TxBuffer and Rx buffer have both a TraceSource, but: 1) they don't work, and 2) they can not be hooked properly. Point 1 is because they are derived from Object, but they are missing a CreateObject (they are used as normal member variables). Point 2 is because they're private, not aggregated and not accessible (no public method to them). We have 2 possible solutions: Solution 1: Change them to be derived from ObjectBase. However the problem of accessing their TracedValues remains. One may promote them to be public and move the TraceSource to TcpSocketBase. Dunno about other options. Solution 2: Change them to be Ptr<> and add a pointer-accessor in TcpSocketBase. In this way the Config store will be able to find them.
Created attachment 1964 [details] Option2 fix This is the patch according to option 2. The trace sources can be accessed by something like: Config::ConnectWithoutContext ("/NodeList/1/$ns3::TcpL4Protocol/SocketList/0/TxBuffer/UnackSequence", MakeCallback (&UnackSequenceTracer));
pushed the patch in changeset 11195:0c5e9bfa1b48