rename 'index' variable to 'type'
authorMathieu Lacage <mathieu.lacage@sophia.inria.fr>
Fri, 24 Apr 2009 09:11:48 +0200
changeset 4403 54141b0e8f9f
parent 4402 f6243535620f
child 4404 e10005ac0701
rename 'index' variable to 'type'
src/devices/wifi/wifi-mac-queue.cc
src/devices/wifi/wifi-mac-queue.h
--- a/src/devices/wifi/wifi-mac-queue.cc	Fri Apr 24 09:10:14 2009 +0200
+++ b/src/devices/wifi/wifi-mac-queue.cc	Fri Apr 24 09:11:48 2009 +0200
@@ -155,19 +155,19 @@
 
 Ptr<const Packet>
 WifiMacQueue::DequeueByTidAndAddress (WifiMacHeader *hdr, uint8_t tid, 
-                                      WifiMacHeader::AddressType index, Mac48Address dest)
+                                      WifiMacHeader::AddressType type, Mac48Address dest)
 {
   Cleanup ();
   Ptr<const Packet> packet = 0;
   if (!m_queue.empty ())
     {
       PacketQueueI it;
-      NS_ASSERT (index <= 4);
+      NS_ASSERT (type <= 4);
       for (it = m_queue.begin (); it != m_queue.end (); ++it)
         {
           if (it->hdr.IsQosData ())
             {
-              if (GetAddressForPacket (index, it) == dest &&
+              if (GetAddressForPacket (type, it) == dest &&
                   it->hdr.GetQosTid () == tid)
                 {
                   packet = it->packet;
@@ -184,18 +184,18 @@
 
 Ptr<const Packet>
 WifiMacQueue::PeekByTidAndAddress (WifiMacHeader *hdr, uint8_t tid, 
-                                   WifiMacHeader::AddressType index, Mac48Address dest)
+                                   WifiMacHeader::AddressType type, Mac48Address dest)
 {
   Cleanup ();
   if (!m_queue.empty ())
     {
       PacketQueueI it;
-      NS_ASSERT (index <= 4);
+      NS_ASSERT (type <= 4);
       for (it = m_queue.begin (); it != m_queue.end (); ++it)
         {
           if (it->hdr.IsQosData ())
             {
-              if (GetAddressForPacket (index, it) == dest &&
+              if (GetAddressForPacket (type, it) == dest &&
                   it->hdr.GetQosTid () == tid)
                 {
                   *hdr = it->hdr;
@@ -228,17 +228,17 @@
 }
 
 Mac48Address
-WifiMacQueue::GetAddressForPacket (uint8_t index, PacketQueueI it)
+WifiMacQueue::GetAddressForPacket (uint8_t type, PacketQueueI it)
 {
-  if (index == WifiMacHeader::ADDR1)
+  if (type == WifiMacHeader::ADDR1)
     {
       return it->hdr.GetAddr1 ();
     }
-  if (index == WifiMacHeader::ADDR2)
+  if (type == WifiMacHeader::ADDR2)
     {
       return it->hdr.GetAddr2 ();
     }
-  if (index == WifiMacHeader::ADDR3)
+  if (type == WifiMacHeader::ADDR3)
     {
       return it->hdr.GetAddr3 ();
     }
--- a/src/devices/wifi/wifi-mac-queue.h	Fri Apr 24 09:10:14 2009 +0200
+++ b/src/devices/wifi/wifi-mac-queue.h	Fri Apr 24 09:11:48 2009 +0200
@@ -65,25 +65,25 @@
   Ptr<const Packet> Peek (WifiMacHeader *hdr);
   /**
    * Searchs and returns, if is present in this queue, first packet having 
-   * address indicated by <i>index</i> equals to <i>addr</i>, and tid 
+   * address indicated by <i>type</i> equals to <i>addr</i>, and tid 
    * equals to <i>tid</i>. This method removes the packet from this queue. 
    * Is typically used by ns3::EdcaTxopN in order to perform correct MSDU 
    * aggregation (A-MSDU).
    */
   Ptr<const Packet> DequeueByTidAndAddress (WifiMacHeader *hdr,
                                             uint8_t tid, 
-                                            WifiMacHeader::AddressType index,
+                                            WifiMacHeader::AddressType type,
                                             Mac48Address addr);
   /**
    * Searchs and returns, if is present in this queue, first packet having
-   * address indicated by <i>index</i> equals to <i>addr</i>, and tid 
+   * address indicated by <i>type</i> equals to <i>addr</i>, and tid 
    * equals to <i>tid</i>. This method doesn't remove the packet from this queue.
    * Is typically used by ns3::EdcaTxopN in order to perform correct MSDU
    * aggregation (A-MSDU).
    */
   Ptr<const Packet> PeekByTidAndAddress (WifiMacHeader *hdr,
                                          uint8_t tid,
-                                         WifiMacHeader::AddressType index,
+                                         WifiMacHeader::AddressType type,
                                          Mac48Address addr);
   /**
    * If exists, removes <i>packet</i> from queue and returns true. Otherwise it
@@ -105,7 +105,7 @@
   typedef std::list<struct Item>::iterator PacketQueueI;
   
   void Cleanup (void);
-  Mac48Address GetAddressForPacket (uint8_t index, PacketQueueI);
+  Mac48Address GetAddressForPacket (uint8_t type, PacketQueueI);
   
   struct Item {
     Item (Ptr<const Packet> packet,