Bugzilla – Bug 805
WifiPhy PhyTxEnd trace not working
Last modified: 2010-04-16 14:05:50 UTC
Created attachment 751 [details] Simulation based on wifi-simple-adhoc-grid.cc where the callback method PhyTxEnd never gets activated. The callback for the trace PhyTxEnd is never activated, therefore not producing any result when a transmission ends. Example simulation (based on wifi-simple-adhoc-grid.cc) where such happens is attached.
This is as designed. Not all of the standard trace sources are required to have implementations that work. They are standard trace names that a model author can choose to implement. For example, see csma-net-device.cc: #if 0 // Not currently implemented in this device .AddTraceSource ("PhyRxBegin", "Trace source indicating a packet has begun being received by the device", MakeTraceSourceAccessor (&CsmaNetDevice::m_phyRxBeginTrace)) #endif However, if the device does not implement a source, it should probably remove the code or do the same as the csma device and ifdef them out with a comment. That way the trace sources don't misleadingly end up in the documentation.
Craig is right. Furthermore, with wifi there is a base class for the PHY (WifiPhy). The trace sources are defined by this base class, to preserve naming compatibility among implementations. Unfortunately, the only official implementation to date is YansWifiPhy, which by design does not generate a "TxEnd" event. I do not think that it is practical to modify YansWifiPhy so that it generates the requested trace. However, we should do something to avoid disappointing users like it happened to jvilela. Possible solutions IMHO: 1) we do as Craig says, and we #ifdef the trace declaration, until somebody comes up with a new device that uses it 2) we add a comment to the trace declaration (in WifiPhy) saying that this trace is unused by the only WifiPhy implementation currently available (YansWifiPhy) any comments? I would go for 2).
changeset 6217 8f7571fea7cf