wifi: buffer occupancy trace (requirements and feature request)
Recently, on Zulip and ns-3-users, George Frangulea asked about supporting the 3GPP metric of buffer occupancy in our Wi-Fi model. Here is a quote from him:
Here is also the 3GPP definition of the buffer occupancy as a reference of what I want to achieve:
For DL-only coexistence evaluations:
Buffer occupancy of the i-th small cell/UE (Wi-Fi & LAA) = sum of the period of time during which the i-th small cell/UE has data to transmit including retransmissions (i.e., its queue is not empty) / total simulation time
This issue is to define requirements on a possible trace source to provide this metric. It seems to me that we might want some kind of 'BufferOccupancy' traced value (a traced integer in bytes or packets), on Wi-Fi NetDevice, that a trace sink could hook to.
The calculation of fraction of time could be done in the trace sink. It might also be helpful to define a helper method that hooks the net device traced value and makes this computation. If the latter, we should make the 'total simulation time' configurable because usually simulations have some warm up time that should be discarded.
Tests should cover MLO devices and the transmission of data on all access categories so that all queues are exercised, and should check that control and management frames are excluded from the calculation.