Doxy doc for Wifi channel switching
authorRamon Bauza
Tue, 15 Sep 2009 14:33:04 +0200
changeset 5192 fb3d57fd97e4
parent 5191 ca171cb4ea82
child 5193 cd2005af03ea
Doxy doc for Wifi channel switching
src/devices/wifi/dca-txop.h
src/devices/wifi/dcf-manager.h
src/devices/wifi/edca-txop-n.h
src/devices/wifi/mac-low.h
src/devices/wifi/yans-wifi-channel.h
src/devices/wifi/yans-wifi-phy.h
--- a/src/devices/wifi/dca-txop.h	Tue Sep 15 13:14:37 2009 +0200
+++ b/src/devices/wifi/dca-txop.h	Tue Sep 15 14:33:04 2009 +0200
@@ -127,6 +127,9 @@
   void NotifyAccessGranted (void);
   void NotifyInternalCollision (void);
   void NotifyCollision (void);
+  /**
+  * When a channel switching occurs, enqueued packets are removed.
+  */
   void NotifyChannelSwitching (void); 
   /* event handlers */
   void GotCts (double snr, WifiMode txMode);
--- a/src/devices/wifi/dcf-manager.h	Tue Sep 15 13:14:37 2009 +0200
+++ b/src/devices/wifi/dcf-manager.h	Tue Sep 15 14:33:04 2009 +0200
@@ -260,6 +260,8 @@
    * \param duration expected duration of channel switching period
    *
    * Notify the DCF that a channel switching period has just started.
+   * During swtiching state, new packets can be enqueued in DcaTxop/EdcaTxop
+   * but they won't access to the medium until the end of the channel switching.
    */
   void NotifySwitchingStartNow (Time duration); 
   /**
--- a/src/devices/wifi/edca-txop-n.h	Tue Sep 15 13:14:37 2009 +0200
+++ b/src/devices/wifi/edca-txop-n.h	Tue Sep 15 14:33:04 2009 +0200
@@ -101,6 +101,9 @@
   void NotifyAccessGranted (void);
   void NotifyInternalCollision (void);
   void NotifyCollision (void);
+  /**
+  * When a channel switching occurs, enqueued packets are removed.
+  */
   void NotifyChannelSwitching (void);
 
   /*event handlers*/
--- a/src/devices/wifi/mac-low.h	Tue Sep 15 13:14:37 2009 +0200
+++ b/src/devices/wifi/mac-low.h	Tue Sep 15 14:33:04 2009 +0200
@@ -360,7 +360,8 @@
    * \param duration switching delay duration.
    *
    * This method is typically invoked by the PhyMacLowListener to notify
-   * the MAC layer that a channel switching occured.
+   * the MAC layer that a channel switching occured. When a channel switching
+   * occurs, pending MAC transmissions (RTS, CTS, DATA and ACK) are cancelled.
    */
   void NotifySwitchingStartNow (Time duration); 
 private:
--- a/src/devices/wifi/yans-wifi-channel.h	Tue Sep 15 13:14:37 2009 +0200
+++ b/src/devices/wifi/yans-wifi-channel.h	Tue Sep 15 14:33:04 2009 +0200
@@ -76,7 +76,9 @@
    * \param preamble the preamble associated to the packet
    *
    * This method should not be invoked by normal users. It is 
-   * currently invoked only from WifiPhy::Send.
+   * currently invoked only from WifiPhy::Send. YansWifiChannel 
+   * delivers packets only between PHYs with the same m_channelNumber,
+   * e.g. PHYs that are operating on the same channel.
    */
   void Send (Ptr<YansWifiPhy> sender, Ptr<const Packet> packet, double txPowerDbm,
              WifiMode wifiMode, WifiPreamble preamble) const;
--- a/src/devices/wifi/yans-wifi-phy.h	Tue Sep 15 13:14:37 2009 +0200
+++ b/src/devices/wifi/yans-wifi-phy.h	Tue Sep 15 14:33:04 2009 +0200
@@ -77,6 +77,13 @@
    *
    * where Starting channel frequency is standard-dependent, see SetStandard()
    * as defined in IEEE 802.11-2007 17.3.8.3.2.
+   *
+   * YansWifiPhy can switch among different channels. Basically, YansWifiPhy 
+   * has a private attribute m_channelNumber that identifies the channel the 
+   * PHY operates on. Channel switching cannot interrupt an ongoing transmission.
+   * When PHY is in TX state, the channel switching is postponed until the end
+   * of the current transmission. When the PHY is in SYNC state, the channel 
+   * switching causes the drop of the sync packet. 
    */ 
   void SetChannelNumber (uint16_t id);
   /// Return current channel number, see SetChannelNumber()