src/wifi/model/wifi-mac-queue.h
author Vedran Miletić <rivanvx@gmail.com>
Sun, 20 Oct 2013 12:46:27 +0200
changeset 10218 97da49da2d6c
parent 7385 10beb0e53130
child 10459 f2e90c12a44f
permissions -rw-r--r--
Fix compilation with Clang 3.2 and newer versions, including Apple Clang 5.0 Clang 3.2 requires all class members to be used in the code; this patch either removes class members that are not used or adds NS_UNUSED/NS_UNUSED_GLOBAL around them. Thanks to Andrey Mazo and Tommaso Pecorella for review.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
7385
10beb0e53130 standardize emacs c++ mode comments
Vedran Miletić <rivanvx@gmail.com>
parents: 7141
diff changeset
     1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
1924
0471fb5a3df8 add WifiMacQueue to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     2
/*
4402
f6243535620f new methods to look in the packet queue
Mirko Banchi <mk.banchi@gmail.com>
parents: 2524
diff changeset
     3
 * Copyright (c) 2005, 2009 INRIA
f6243535620f new methods to look in the packet queue
Mirko Banchi <mk.banchi@gmail.com>
parents: 2524
diff changeset
     4
 * Copyright (c) 2009 MIRKO BANCHI
1924
0471fb5a3df8 add WifiMacQueue to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     5
 *
0471fb5a3df8 add WifiMacQueue to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     6
 * This program is free software; you can redistribute it and/or modify
7141
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 7139
diff changeset
     7
 * it under the terms of the GNU General Public License version 2 as
1924
0471fb5a3df8 add WifiMacQueue to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     8
 * published by the Free Software Foundation;
0471fb5a3df8 add WifiMacQueue to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     9
 *
0471fb5a3df8 add WifiMacQueue to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    10
 * This program is distributed in the hope that it will be useful,
0471fb5a3df8 add WifiMacQueue to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
0471fb5a3df8 add WifiMacQueue to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0471fb5a3df8 add WifiMacQueue to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    13
 * GNU General Public License for more details.
0471fb5a3df8 add WifiMacQueue to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    14
 *
0471fb5a3df8 add WifiMacQueue to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License
0471fb5a3df8 add WifiMacQueue to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    16
 * along with this program; if not, write to the Free Software
0471fb5a3df8 add WifiMacQueue to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    17
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
0471fb5a3df8 add WifiMacQueue to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    18
 *
0471fb5a3df8 add WifiMacQueue to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    19
 * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
4402
f6243535620f new methods to look in the packet queue
Mirko Banchi <mk.banchi@gmail.com>
parents: 2524
diff changeset
    20
 * Author: Mirko Banchi <mk.banchi@gmail.com>
1924
0471fb5a3df8 add WifiMacQueue to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    21
 */
0471fb5a3df8 add WifiMacQueue to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    22
#ifndef WIFI_MAC_QUEUE_H
0471fb5a3df8 add WifiMacQueue to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    23
#define WIFI_MAC_QUEUE_H
0471fb5a3df8 add WifiMacQueue to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    24
4402
f6243535620f new methods to look in the packet queue
Mirko Banchi <mk.banchi@gmail.com>
parents: 2524
diff changeset
    25
#include <list>
1924
0471fb5a3df8 add WifiMacQueue to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    26
#include <utility>
0471fb5a3df8 add WifiMacQueue to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    27
#include "ns3/packet.h"
0471fb5a3df8 add WifiMacQueue to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    28
#include "ns3/nstime.h"
2524
db72c0e7743e port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2508
diff changeset
    29
#include "ns3/object.h"
1924
0471fb5a3df8 add WifiMacQueue to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    30
#include "wifi-mac-header.h"
0471fb5a3df8 add WifiMacQueue to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    31
0471fb5a3df8 add WifiMacQueue to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    32
namespace ns3 {
0471fb5a3df8 add WifiMacQueue to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    33
2508
18b690d1e74b MacParameters -> WifiMacParameters
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2159
diff changeset
    34
class WifiMacParameters;
5962
65fbfd43d8e7 add support for blocking of qos packets in WifiMacQueue
Mirko Banchi <mk.banchi@gmail.com>
parents: 5959
diff changeset
    35
class QosBlockedDestinations;
1924
0471fb5a3df8 add WifiMacQueue to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    36
2059
d8b7b2de044e doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1924
diff changeset
    37
/**
7139
79dd02ed46ec doxygen wifi module grouping all wifi classes
Nicola Baldo <nbaldo@cttc.es>
parents: 6852
diff changeset
    38
 * \ingroup wifi
2059
d8b7b2de044e doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1924
diff changeset
    39
 *
6656
a8038fd4949b documentation: WifiMacQueue not 802.11e-specific
Nicola Baldo <nbaldo@cttc.es>
parents: 5962
diff changeset
    40
 * This queue implements the timeout procedure described in IEEE
a8038fd4949b documentation: WifiMacQueue not 802.11e-specific
Nicola Baldo <nbaldo@cttc.es>
parents: 5962
diff changeset
    41
 * Std. 802.11-2007, section 9.9.1.6, paragraph 6.
2059
d8b7b2de044e doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1924
diff changeset
    42
 *
7141
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 7139
diff changeset
    43
 * When a packet is received by the MAC, to be sent to the PHY,
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 7139
diff changeset
    44
 * it is queued in the internal queue after being tagged by the
2059
d8b7b2de044e doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1924
diff changeset
    45
 * current time.
d8b7b2de044e doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1924
diff changeset
    46
 *
7141
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 7139
diff changeset
    47
 * When a packet is dequeued, the queue checks its timestamp
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 7139
diff changeset
    48
 * to verify whether or not it should be dropped. If
2059
d8b7b2de044e doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1924
diff changeset
    49
 * dot11EDCATableMSDULifetime has elapsed, it is dropped.
d8b7b2de044e doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1924
diff changeset
    50
 * Otherwise, it is returned to the caller.
d8b7b2de044e doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1924
diff changeset
    51
 */
2524
db72c0e7743e port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2508
diff changeset
    52
class WifiMacQueue : public Object
db72c0e7743e port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2508
diff changeset
    53
{
1924
0471fb5a3df8 add WifiMacQueue to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    54
public:
2524
db72c0e7743e port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2508
diff changeset
    55
  static TypeId GetTypeId (void);
1924
0471fb5a3df8 add WifiMacQueue to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    56
  WifiMacQueue ();
0471fb5a3df8 add WifiMacQueue to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    57
  ~WifiMacQueue ();
0471fb5a3df8 add WifiMacQueue to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    58
0471fb5a3df8 add WifiMacQueue to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    59
  void SetMaxSize (uint32_t maxSize);
0471fb5a3df8 add WifiMacQueue to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    60
  void SetMaxDelay (Time delay);
2524
db72c0e7743e port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2508
diff changeset
    61
  uint32_t GetMaxSize (void) const;
db72c0e7743e port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2508
diff changeset
    62
  Time GetMaxDelay (void) const;
1924
0471fb5a3df8 add WifiMacQueue to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    63
4466
8edb50eea6cb const cleanup
Timo Bingmann <timo.bingmann@student.kit.edu>
parents: 4443
diff changeset
    64
  void Enqueue (Ptr<const Packet> packet, const WifiMacHeader &hdr);
5952
0588b01cd77e WifiMacQueue now supports head pushing
Mirko Banchi <mk.banchi@gmail.com>
parents: 4466
diff changeset
    65
  void PushFront (Ptr<const Packet> packet, const WifiMacHeader &hdr);
2159
20f882e85b4a port to Ptr<Packet> branch
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2059
diff changeset
    66
  Ptr<const Packet> Dequeue (WifiMacHeader *hdr);
4402
f6243535620f new methods to look in the packet queue
Mirko Banchi <mk.banchi@gmail.com>
parents: 2524
diff changeset
    67
  Ptr<const Packet> Peek (WifiMacHeader *hdr);
f6243535620f new methods to look in the packet queue
Mirko Banchi <mk.banchi@gmail.com>
parents: 2524
diff changeset
    68
  /**
7141
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 7139
diff changeset
    69
   * Searchs and returns, if is present in this queue, first packet having
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 7139
diff changeset
    70
   * address indicated by <i>type</i> equals to <i>addr</i>, and tid
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 7139
diff changeset
    71
   * equals to <i>tid</i>. This method removes the packet from this queue.
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 7139
diff changeset
    72
   * Is typically used by ns3::EdcaTxopN in order to perform correct MSDU
4402
f6243535620f new methods to look in the packet queue
Mirko Banchi <mk.banchi@gmail.com>
parents: 2524
diff changeset
    73
   * aggregation (A-MSDU).
f6243535620f new methods to look in the packet queue
Mirko Banchi <mk.banchi@gmail.com>
parents: 2524
diff changeset
    74
   */
f6243535620f new methods to look in the packet queue
Mirko Banchi <mk.banchi@gmail.com>
parents: 2524
diff changeset
    75
  Ptr<const Packet> DequeueByTidAndAddress (WifiMacHeader *hdr,
7141
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 7139
diff changeset
    76
                                            uint8_t tid,
4403
54141b0e8f9f rename 'index' variable to 'type'
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 4402
diff changeset
    77
                                            WifiMacHeader::AddressType type,
4402
f6243535620f new methods to look in the packet queue
Mirko Banchi <mk.banchi@gmail.com>
parents: 2524
diff changeset
    78
                                            Mac48Address addr);
f6243535620f new methods to look in the packet queue
Mirko Banchi <mk.banchi@gmail.com>
parents: 2524
diff changeset
    79
  /**
f6243535620f new methods to look in the packet queue
Mirko Banchi <mk.banchi@gmail.com>
parents: 2524
diff changeset
    80
   * Searchs and returns, if is present in this queue, first packet having
7141
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 7139
diff changeset
    81
   * address indicated by <i>type</i> equals to <i>addr</i>, and tid
4402
f6243535620f new methods to look in the packet queue
Mirko Banchi <mk.banchi@gmail.com>
parents: 2524
diff changeset
    82
   * equals to <i>tid</i>. This method doesn't remove the packet from this queue.
f6243535620f new methods to look in the packet queue
Mirko Banchi <mk.banchi@gmail.com>
parents: 2524
diff changeset
    83
   * Is typically used by ns3::EdcaTxopN in order to perform correct MSDU
f6243535620f new methods to look in the packet queue
Mirko Banchi <mk.banchi@gmail.com>
parents: 2524
diff changeset
    84
   * aggregation (A-MSDU).
f6243535620f new methods to look in the packet queue
Mirko Banchi <mk.banchi@gmail.com>
parents: 2524
diff changeset
    85
   */
f6243535620f new methods to look in the packet queue
Mirko Banchi <mk.banchi@gmail.com>
parents: 2524
diff changeset
    86
  Ptr<const Packet> PeekByTidAndAddress (WifiMacHeader *hdr,
f6243535620f new methods to look in the packet queue
Mirko Banchi <mk.banchi@gmail.com>
parents: 2524
diff changeset
    87
                                         uint8_t tid,
4403
54141b0e8f9f rename 'index' variable to 'type'
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 4402
diff changeset
    88
                                         WifiMacHeader::AddressType type,
4402
f6243535620f new methods to look in the packet queue
Mirko Banchi <mk.banchi@gmail.com>
parents: 2524
diff changeset
    89
                                         Mac48Address addr);
f6243535620f new methods to look in the packet queue
Mirko Banchi <mk.banchi@gmail.com>
parents: 2524
diff changeset
    90
  /**
f6243535620f new methods to look in the packet queue
Mirko Banchi <mk.banchi@gmail.com>
parents: 2524
diff changeset
    91
   * If exists, removes <i>packet</i> from queue and returns true. Otherwise it
f6243535620f new methods to look in the packet queue
Mirko Banchi <mk.banchi@gmail.com>
parents: 2524
diff changeset
    92
   * takes no effects and return false. Deletion of the packet is
7141
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 7139
diff changeset
    93
   * performed in linear time (O(n)).
4402
f6243535620f new methods to look in the packet queue
Mirko Banchi <mk.banchi@gmail.com>
parents: 2524
diff changeset
    94
   */
f6243535620f new methods to look in the packet queue
Mirko Banchi <mk.banchi@gmail.com>
parents: 2524
diff changeset
    95
  bool Remove (Ptr<const Packet> packet);
5959
66bc2d3da45f add WifiMacQueue::GetNPacketsByTidAndAddress method
Mirko Banchi <mk.banchi@gmail.com>
parents: 5952
diff changeset
    96
  /**
66bc2d3da45f add WifiMacQueue::GetNPacketsByTidAndAddress method
Mirko Banchi <mk.banchi@gmail.com>
parents: 5952
diff changeset
    97
   * Returns number of QoS packets having tid equals to <i>tid</i> and address
66bc2d3da45f add WifiMacQueue::GetNPacketsByTidAndAddress method
Mirko Banchi <mk.banchi@gmail.com>
parents: 5952
diff changeset
    98
   * specified by <i>type</i> equals to <i>addr</i>.
66bc2d3da45f add WifiMacQueue::GetNPacketsByTidAndAddress method
Mirko Banchi <mk.banchi@gmail.com>
parents: 5952
diff changeset
    99
   */
66bc2d3da45f add WifiMacQueue::GetNPacketsByTidAndAddress method
Mirko Banchi <mk.banchi@gmail.com>
parents: 5952
diff changeset
   100
  uint32_t GetNPacketsByTidAndAddress (uint8_t tid,
66bc2d3da45f add WifiMacQueue::GetNPacketsByTidAndAddress method
Mirko Banchi <mk.banchi@gmail.com>
parents: 5952
diff changeset
   101
                                       WifiMacHeader::AddressType type,
66bc2d3da45f add WifiMacQueue::GetNPacketsByTidAndAddress method
Mirko Banchi <mk.banchi@gmail.com>
parents: 5952
diff changeset
   102
                                       Mac48Address addr);
5962
65fbfd43d8e7 add support for blocking of qos packets in WifiMacQueue
Mirko Banchi <mk.banchi@gmail.com>
parents: 5959
diff changeset
   103
  /**
65fbfd43d8e7 add support for blocking of qos packets in WifiMacQueue
Mirko Banchi <mk.banchi@gmail.com>
parents: 5959
diff changeset
   104
   * Returns first available packet for transmission. A packet could be no available
65fbfd43d8e7 add support for blocking of qos packets in WifiMacQueue
Mirko Banchi <mk.banchi@gmail.com>
parents: 5959
diff changeset
   105
   * if it's a QoS packet with a tid and an address1 fields equal to <i>tid</i> and <i>addr</i>
65fbfd43d8e7 add support for blocking of qos packets in WifiMacQueue
Mirko Banchi <mk.banchi@gmail.com>
parents: 5959
diff changeset
   106
   * respectively that index a pending agreement in the BlockAckManager object.
65fbfd43d8e7 add support for blocking of qos packets in WifiMacQueue
Mirko Banchi <mk.banchi@gmail.com>
parents: 5959
diff changeset
   107
   * So that packet must not be transmitted until reception of an ADDBA response frame from station
7141
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 7139
diff changeset
   108
   * addressed by <i>addr</i>. This method removes the packet from queue.
5962
65fbfd43d8e7 add support for blocking of qos packets in WifiMacQueue
Mirko Banchi <mk.banchi@gmail.com>
parents: 5959
diff changeset
   109
   */
65fbfd43d8e7 add support for blocking of qos packets in WifiMacQueue
Mirko Banchi <mk.banchi@gmail.com>
parents: 5959
diff changeset
   110
  Ptr<const Packet> DequeueFirstAvailable (WifiMacHeader *hdr,
65fbfd43d8e7 add support for blocking of qos packets in WifiMacQueue
Mirko Banchi <mk.banchi@gmail.com>
parents: 5959
diff changeset
   111
                                           Time &tStamp,
65fbfd43d8e7 add support for blocking of qos packets in WifiMacQueue
Mirko Banchi <mk.banchi@gmail.com>
parents: 5959
diff changeset
   112
                                           const QosBlockedDestinations *blockedPackets);
65fbfd43d8e7 add support for blocking of qos packets in WifiMacQueue
Mirko Banchi <mk.banchi@gmail.com>
parents: 5959
diff changeset
   113
  /**
65fbfd43d8e7 add support for blocking of qos packets in WifiMacQueue
Mirko Banchi <mk.banchi@gmail.com>
parents: 5959
diff changeset
   114
   * Returns first available packet for transmission. The packet isn't removed from queue.
65fbfd43d8e7 add support for blocking of qos packets in WifiMacQueue
Mirko Banchi <mk.banchi@gmail.com>
parents: 5959
diff changeset
   115
   */
65fbfd43d8e7 add support for blocking of qos packets in WifiMacQueue
Mirko Banchi <mk.banchi@gmail.com>
parents: 5959
diff changeset
   116
  Ptr<const Packet> PeekFirstAvailable (WifiMacHeader *hdr,
65fbfd43d8e7 add support for blocking of qos packets in WifiMacQueue
Mirko Banchi <mk.banchi@gmail.com>
parents: 5959
diff changeset
   117
                                        Time &tStamp,
65fbfd43d8e7 add support for blocking of qos packets in WifiMacQueue
Mirko Banchi <mk.banchi@gmail.com>
parents: 5959
diff changeset
   118
                                        const QosBlockedDestinations *blockedPackets);
1924
0471fb5a3df8 add WifiMacQueue to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   119
  void Flush (void);
0471fb5a3df8 add WifiMacQueue to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   120
0471fb5a3df8 add WifiMacQueue to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   121
  bool IsEmpty (void);
0471fb5a3df8 add WifiMacQueue to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   122
  uint32_t GetSize (void);
0471fb5a3df8 add WifiMacQueue to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   123
private:
4402
f6243535620f new methods to look in the packet queue
Mirko Banchi <mk.banchi@gmail.com>
parents: 2524
diff changeset
   124
  struct Item;
7141
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 7139
diff changeset
   125
4402
f6243535620f new methods to look in the packet queue
Mirko Banchi <mk.banchi@gmail.com>
parents: 2524
diff changeset
   126
  typedef std::list<struct Item> PacketQueue;
f6243535620f new methods to look in the packet queue
Mirko Banchi <mk.banchi@gmail.com>
parents: 2524
diff changeset
   127
  typedef std::list<struct Item>::reverse_iterator PacketQueueRI;
f6243535620f new methods to look in the packet queue
Mirko Banchi <mk.banchi@gmail.com>
parents: 2524
diff changeset
   128
  typedef std::list<struct Item>::iterator PacketQueueI;
7141
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 7139
diff changeset
   129
1924
0471fb5a3df8 add WifiMacQueue to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   130
  void Cleanup (void);
4443
b6f14f95c8af mismatching type
Mirko Banchi <mk.banchi@gmail.com>
parents: 4403
diff changeset
   131
  Mac48Address GetAddressForPacket (enum WifiMacHeader::AddressType type, PacketQueueI);
7141
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 7139
diff changeset
   132
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 7139
diff changeset
   133
  struct Item
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 7139
diff changeset
   134
  {
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 7139
diff changeset
   135
    Item (Ptr<const Packet> packet,
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 7139
diff changeset
   136
          const WifiMacHeader &hdr,
1924
0471fb5a3df8 add WifiMacQueue to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   137
          Time tstamp);
2159
20f882e85b4a port to Ptr<Packet> branch
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2059
diff changeset
   138
    Ptr<const Packet> packet;
1924
0471fb5a3df8 add WifiMacQueue to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   139
    WifiMacHeader hdr;
0471fb5a3df8 add WifiMacQueue to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   140
    Time tstamp;
0471fb5a3df8 add WifiMacQueue to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   141
  };
4402
f6243535620f new methods to look in the packet queue
Mirko Banchi <mk.banchi@gmail.com>
parents: 2524
diff changeset
   142
1924
0471fb5a3df8 add WifiMacQueue to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   143
  PacketQueue m_queue;
0471fb5a3df8 add WifiMacQueue to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   144
  uint32_t m_size;
0471fb5a3df8 add WifiMacQueue to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   145
  uint32_t m_maxSize;
0471fb5a3df8 add WifiMacQueue to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   146
  Time m_maxDelay;
0471fb5a3df8 add WifiMacQueue to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   147
};
0471fb5a3df8 add WifiMacQueue to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   148
0471fb5a3df8 add WifiMacQueue to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   149
} // namespace ns3
0471fb5a3df8 add WifiMacQueue to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   150
0471fb5a3df8 add WifiMacQueue to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   151
#endif /* WIFI_MAC_QUEUE_H */