doxygen.
--- a/src/devices/wifi/wifi-remote-station-manager.h Tue May 27 15:01:11 2008 -0700
+++ b/src/devices/wifi/wifi-remote-station-manager.h Tue May 27 15:32:08 2008 -0700
@@ -35,12 +35,9 @@
class WifiPhy;
/**
- * \brief hold per-remote-station state.
+ * \brief hold a list of per-remote-station state.
*
- * The state in this class is used to keep track
- * of association status if we are in an infrastructure
- * network and to perform the selection of tx parameters
- * on a per-packet basis.
+ * \sa ns3::WifiRemoteStation.
*/
class WifiRemoteStationManager : public Object
{
@@ -106,6 +103,14 @@
namespace ns3 {
+/**
+ * \brief hold per-remote-station state.
+ *
+ * The state in this class is used to keep track
+ * of association status if we are in an infrastructure
+ * network and to perform the selection of tx parameters
+ * on a per-packet basis.
+ */
class WifiRemoteStation {
public:
@@ -114,14 +119,18 @@
WifiRemoteStation ();
virtual ~WifiRemoteStation ();
- // Invoked in an AP upon disassociation of a
- // specific STA.
+ /**
+ * Invoked in an AP upon disassociation of a
+ * specific STA.
+ */
void Reset (void);
- // Invoked in a STA or AP to store the set of
- // modes supported by a destination which is
- // also supported locally.
- // The set of supported modes includes
- // the BSSBasicRateSet.
+ /**
+ * Invoked in a STA or AP to store the set of
+ * modes supported by a destination which is
+ * also supported locally.
+ * The set of supported modes includes
+ * the BSSBasicRateSet.
+ */
void AddSupportedMode (WifiMode mode);
bool IsBrandNew (void) const;
@@ -132,30 +141,121 @@
void RecordGotAssocTxFailed (void);
void RecordDisassociated (void);
+ /**
+ * \param packet the packet to queue
+ * \param fullPacketSize the size of the packet after its 802.11 MAC header has been added.
+ *
+ * This method is typically invoked just before queuing a packet for transmission.
+ * It is a no-op unless the IsLowLatency attribute of the attached ns3::WifiRemoteStationManager
+ * is set to false, in which case, the tx parameters of the packet are calculated and stored in
+ * the packet as a tag. These tx parameters are later retrieved from GetDadaMode and GetRtsMode.
+ */
void PrepareForQueue (Ptr<const Packet> packet, uint32_t fullPacketSize);
+ /**
+ * \param packet the packet to send
+ * \param fullPacketSize the size of the packet after its 802.11 MAC header has been added.
+ * \returns the transmission mode to use to send this packet
+ */
WifiMode GetDataMode (Ptr<const Packet> packet, uint32_t fullPacketSize);
+ /**
+ * \param packet the packet to send
+ * \param fullPacketSize the size of the packet after its 802.11 MAC header has been added.
+ * \returns the transmission mode to use to send the RTS prior to the
+ * transmission of the data packet itself.
+ */
WifiMode GetRtsMode (Ptr<const Packet> packet);
- // transmission-related methods
+ /**
+ * Should be invoked whenever the RtsTimeout associated to a transmission
+ * attempt expires.
+ */
void ReportRtsFailed (void);
+ /**
+ * Should be invoked whenever the AckTimeout associated to a transmission
+ * attempt expires.
+ */
void ReportDataFailed (void);
+ /**
+ * Should be invoked whenever we receive the Cts associated to an RTS
+ * we just sent.
+ */
void ReportRtsOk (double ctsSnr, WifiMode ctsMode, double rtsSnr);
+ /**
+ * Should be invoked whenever we receive the Ack associated to a data packet
+ * we just sent.
+ */
void ReportDataOk (double ackSnr, WifiMode ackMode, double dataSnr);
+ /**
+ * Should be invoked after calling ReportRtsFailed if
+ * NeedRtsRetransmission returns false
+ */
void ReportFinalRtsFailed (void);
+ /**
+ * Should be invoked after calling ReportDataFailed if
+ * NeedDataRetransmission returns false
+ */
void ReportFinalDataFailed (void);
- // reception-related method
+ /**
+ * \param rxSnr the snr of the packet received
+ * \param txMode the transmission mode used for the packet received.
+ *
+ * Should be invoked whenever a packet is successfully received.
+ */
void ReportRxOk (double rxSnr, WifiMode txMode);
+ /**
+ * \param packet the packet to send
+ * \returns true if we want to use an RTS/CTS handshake for this
+ * packet before sending it, false otherwise.
+ */
virtual bool NeedRts (Ptr<const Packet> packet);
+ /**
+ * \param packet the packet to send
+ * \returns true if we want to restart a failed RTS/CTS
+ * handshake, false otherwise.
+ */
virtual bool NeedRtsRetransmission (Ptr<const Packet> packet);
+ /**
+ * \param packet the packet to send
+ * \returns true if we want to resend a packet
+ * after a failed transmission attempt, false otherwise.
+ */
virtual bool NeedDataRetransmission (Ptr<const Packet> packet);
+ /**
+ * \param the packet to send
+ * \returns true if this packet should be fragmented, false otherwise.
+ */
virtual bool NeedFragmentation (Ptr<const Packet> packet);
+ /**
+ * \param the packet to send
+ * \returns the number of fragments which should be used for this packet.
+ */
virtual uint32_t GetNFragments (Ptr<const Packet> packet);
+ /**
+ * \param the packet to send
+ * \param fragmentNumber the fragment index of the next fragment to send (starts at zero).
+ * \returns the size of the corresponding fragment.
+ */
virtual uint32_t GetFragmentSize (Ptr<const Packet> packet, uint32_t fragmentNumber);
+ /**
+ * \param the packet to send
+ * \param fragmentNumber the fragment index of the next fragment to send (starts at zero).
+ * \returns true if this is the last fragment, false otherwise.
+ */
virtual bool IsLastFragment (Ptr<const Packet> packet, uint32_t fragmentNumber);
+ /**
+ * \param rtsMode the transmission mode used to send an RTS we just received
+ * \returns the transmission mode to use for the CTS to complete the RTS/CTS
+ * handshake.
+ */
WifiMode GetCtsMode (WifiMode rtsMode);
+ /**
+ * \param ackMode the transmission mode used to send an ACK we just received
+ * \returns the transmission mode to use for the ACK to complete the data/ACK
+ * handshake.
+ */
WifiMode GetAckMode (WifiMode dataMode);
private: