[Ns-developers] Mac layer 802.11n
mathieu.lacage at sophia.inria.fr
Mon Jan 5 05:09:18 PST 2009
It's nice to see work focused on adding full 802.11n support to ns-3 !
On Mon, 2008-12-29 at 14:41 +0100, Mirko Banchi wrote:
> Hi all,
> i'm writing from LART lab (University of Florence). We are working to
> 802.11n support for NS-3. We attached to this email a UML class diagram
I am too old to be very good at UML but I glanced through your diagram
(reading sample header files is easier for me).
0) It seems ok to add a QstaWifiMac and QapWifiMac class. I think that
your diagram shows that each of these would have 4 separate pointers for
4 separate instances of DcaTxopN: this also seems to make sense.
1) Real 802.11n transmission logic is fairly different from the DcaTxop
logic I think. Most notably, beyond frame aggregation, it also has to
make sure that a transmission does not start if it can't be completed in
the txop allocated by the AP (either an EDCA or an HCCA txop). As such,
I think that it would probably make sense to implement a separate class
EdcaTxop which does not derive from DcaTxop because I can't see much
shared code between the two.
2) The biggest implementation problem is deciding how to split the block
ack functionality between each class. The current code was designed to:
- allow all management frames to be created and handled at the MacHigh
- allow all control frames to be created and handled at the MacLow
Since block ack+req frames are control frames, if you want to follow the
design of the current code, you should implement the creation and
management of block ack+req frames at the MacLow layer. Of course, the
higher layers need to decide when to start a block ack during tx, they
need to know what needs retransmission, etc. To support this in a way
which meshes well with the current code, I would suggest to:
a) change the signature of MacLowTransmissionListener::GotAck to include
the sequence number of the packet we got an ack for:
virtual void GotAck (double snr, WifiMode txMode, uint16_t seq) = 0;
This method will be invoked by the MacLow class to notify the EdcaTxop
class of each packet whose bit is set in a received BlockAck.
b) add MacLowTransmissionListener::MissedAck to notify a listener that a
specific packet has been missed.
virtual void MissedAck (uint16_t seq) = 0;
c) add to MacLowTransmissionListener::MissedAck (void) that this method
is invoked if we missed an ack within ack timeout and that in case of
block ack transfers, this notifies that the tx side has not received a
blockack as requested by a block ack req.
d) add a MacLowTransmissionParameters::EnableBlockAck, MustWaitBlockAck,
and ACK_BLOCK_ACK to m_wait_ack:
void EnableBlockAck (void);
bool MustWaitBlockAck (void);
e) add MacLowTransmissionParameters::AddPacket and m_packets:
void AddPacket (Ptr<const Packet> packet,
const WifiMacHeader *hdr);
std::list<std::pair<Ptr<const Packet>, WifiMacHeader> > m_packets;
f) change the signature of MacLow::CalculateTransmissionTime and
Time CalculateTransmissionTime (MacLowTransmissionParameters
void StartTransmission (MacLowTransmissionParameters parameters,
I also looked briefly at the aggregation support and its interaction
with the rate control code but I have to confess that I am not too
familiar with the latest 802.11n spec (I did get a copy of draft 7) so,
I have a question for you too :) What is the difference between MSDU and
MPDU aggregation ? When do you use one or the other ?
thanks a lot for getting started on this project !
More information about the Ns-developers