Bugzilla – Bug 2887
Incorrect trace callback signature
Last modified: 2019-11-05 19:15:45 EST
Since AddTraceSource() doesn't valid the callback signature, I found some incorrect signature format in release 3.27. Correct format: ns3::TracedValueCallback::Uint32 src/internet/model/tcp-socket-base.cc: "ns3::TracedValue::Uint32Callback") src/internet/model/tcp-socket-base.cc: "ns3::TracedValue::Uint32Callback") src/wifi/model/edca-txop-n.cc: "ns3::TracedValue::Uint32Callback") src/wifi/model/edca-txop-n.cc: "ns3::TracedValue::Uint32Callback") Correct format: ns3::TracedValueCallback::Double src/internet/model/tcp-hybla.cc: "ns3::TracedValue::DoubleCallback") Correct format: ns3::Packet::TracedCallback src/spectrum/model/half-duplex-ideal-phy.cc: "ns3::Packet::TraceCallback") src/spectrum/model/half-duplex-ideal-phy.cc: "ns3::Packet::TraceCallback") src/spectrum/model/half-duplex-ideal-phy.cc: "ns3::Packet::TraceCallback") src/spectrum/model/half-duplex-ideal-phy.cc: "ns3::Packet::TraceCallback") src/spectrum/model/half-duplex-ideal-phy.cc: "ns3::Packet::TraceCallback") src/spectrum/model/half-duplex-ideal-phy.cc: "ns3::Packet::TraceCallback") Correct format: ns3::Time::TracedValueCallback::Time src/energy/model/rv-battery-model.cc: "ns3::Time::TracedValueCallback") src/internet/model/tcp-socket-base.cc: "ns3::Time::TracedValueCallback") src/internet/model/tcp-socket-base.cc: "ns3::Time::TracedValueCallback") src/traffic-control/model/queue-disc.cc: "ns3::Time::TracedValueCallback") src/stats/examples/time-probe-example.cc: "ns3::Time::TracedValueCallback") src/wifi/model/edca-txop-n.cc: "ns3::TracedValueCallback::Time") There might be more!
This one: ns3::Time::TracedValueCallback::Time should really be ns3::TracedValueCallback::Time as defined in nstime.h:719.
I'm fixing the ones Dizhi mentioned below; there are probably more. In particular, there are some new ones that need to be defined in the standard way (tcp-socket-base.cc). We probably need to audit all uses of TracedValue in our headers. > > Correct format: ns3::TracedValueCallback::Uint32 > src/internet/model/tcp-socket-base.cc: > "ns3::TracedValue::Uint32Callback") > src/internet/model/tcp-socket-base.cc: > "ns3::TracedValue::Uint32Callback") > src/wifi/model/edca-txop-n.cc: > "ns3::TracedValue::Uint32Callback") > src/wifi/model/edca-txop-n.cc: > "ns3::TracedValue::Uint32Callback") Fixed. But I have a question, there is a signature for a 'ns3::TracedCallback::Uint32Callback' with a comment that: // Uint32Callback appears to be the only one used at the moment. // Feel free to add typedef's for any other POD you need. The above that Dizhi listed should clearly be ns3::TracedValueCallback::Uint32, but once I fix those, I can't find other instances of that Uint32Callback in our codebase. Should 'ns3::TracedCallback::Uint32Callback' be removed (is it obsolete)?
`ns3::TracedCallback::Uint32Callback` is NOT obsolete: "$ns3::RegularWifiMac/Txop/BackoffTrace" uses it. Is this bug now complete?