src/wifi/model/yans-wifi-phy.h
author Sébastien Deronne <sebastien.deronne@gmail.com>
Sun, 21 Jun 2015 00:23:45 +0200
changeset 11450 9f4ae69f12b7
parent 11444 bdd8ef382d1e
child 11451 36f951da53ac
permissions -rw-r--r--
cleanup wifi module
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
7385
10beb0e53130 standardize emacs c++ mode comments
Vedran Miletić <rivanvx@gmail.com>
parents: 7143
diff changeset
     1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
1889
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     2
/*
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     3
 * Copyright (c) 2005,2006 INRIA
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     4
 *
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     5
 * 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
     6
 * it under the terms of the GNU General Public License version 2 as
1889
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     7
 * published by the Free Software Foundation;
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     8
 *
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     9
 * This program is distributed in the hope that it will be useful,
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    12
 * GNU General Public License for more details.
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    13
 *
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    14
 * You should have received a copy of the GNU General Public License
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    15
 * along with this program; if not, write to the Free Software
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    16
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    17
 *
11444
bdd8ef382d1e cleanup yans-wifi-phy
Sébastien Deronne <sebastien.deronne@gmail.com>
parents: 11348
diff changeset
    18
 * Authors: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
bdd8ef382d1e cleanup yans-wifi-phy
Sébastien Deronne <sebastien.deronne@gmail.com>
parents: 11348
diff changeset
    19
 *          Ghada Badawy <gbadawy@gmail.com>
1889
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    20
 */
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    21
3888
a15618dcd0eb rename WifiPhy to YansWifiPhy and add WifiPhy abstract base class.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3887
diff changeset
    22
#ifndef YANS_WIFI_PHY_H
a15618dcd0eb rename WifiPhy to YansWifiPhy and add WifiPhy abstract base class.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3887
diff changeset
    23
#define YANS_WIFI_PHY_H
1889
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    24
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    25
#include <stdint.h>
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    26
#include "ns3/callback.h"
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    27
#include "ns3/event-id.h"
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    28
#include "ns3/packet.h"
2054
ba8e810bae4c derive WifiPhy from Object and manage it with a Ptr<>
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1988
diff changeset
    29
#include "ns3/object.h"
2524
db72c0e7743e port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2166
diff changeset
    30
#include "ns3/traced-callback.h"
1889
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    31
#include "ns3/nstime.h"
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    32
#include "ns3/ptr.h"
8981
7e1c95c4d1a7 Replace src/wifi usage of RandomVariable with RandomVariableStream
Mitch Watrous
parents: 7385
diff changeset
    33
#include "ns3/random-variable-stream.h"
3888
a15618dcd0eb rename WifiPhy to YansWifiPhy and add WifiPhy abstract base class.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3887
diff changeset
    34
#include "wifi-phy.h"
1902
26a57487bb49 no need for ns3 prefix
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1892
diff changeset
    35
#include "wifi-mode.h"
1920
1d4864775cf8 replace header mode with preamble mode
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1919
diff changeset
    36
#include "wifi-preamble.h"
2166
00b5eb43dba2 Improve the accuracy of 802.11a tx duration calculations.
Federico Maguolo <federico.maguolo@dei.unipd.it>
parents: 2159
diff changeset
    37
#include "wifi-phy-standard.h"
3905
99c9346b5d71 split interference calculation from YansWifiPhy. Move them to InterferenceHelper
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3904
diff changeset
    38
#include "interference-helper.h"
1889
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    39
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    40
namespace ns3 {
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    41
10139
17a71cd49da3 partial 802.11n support
Ghada Badawy <gbadawy@gmail.com>
parents: 9818
diff changeset
    42
#define HT_PHY 127
17a71cd49da3 partial 802.11n support
Ghada Badawy <gbadawy@gmail.com>
parents: 9818
diff changeset
    43
3893
94f771c1373a split WifiChannel in WifiChannel + YansWifiChannel
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3888
diff changeset
    44
class YansWifiChannel;
3900
1687492ff059 re-enable tracing of wifi phy state.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3897
diff changeset
    45
class WifiPhyStateHelper;
1889
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    46
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    47
2057
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
    48
/**
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
    49
 * \brief 802.11 PHY layer model
7139
79dd02ed46ec doxygen wifi module grouping all wifi classes
Nicola Baldo <nbaldo@cttc.es>
parents: 6852
diff changeset
    50
 * \ingroup wifi
2057
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
    51
 *
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
    52
 * This PHY implements a model of 802.11a. The model
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
    53
 * implemented here is based on the model described
7141
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 7139
diff changeset
    54
 * in "Yet Another Network Simulator",
2057
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
    55
 * (http://cutebugs.net/files/wns2-yans.pdf).
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
    56
 *
2684
68c643329c2b improve doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2659
diff changeset
    57
 *
2057
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
    58
 * This PHY model depends on a channel loss and delay
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
    59
 * model as provided by the ns3::PropagationLossModel
2684
68c643329c2b improve doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2659
diff changeset
    60
 * and ns3::PropagationDelayModel classes, both of which are
3893
94f771c1373a split WifiChannel in WifiChannel + YansWifiChannel
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3888
diff changeset
    61
 * members of the ns3::YansWifiChannel class.
2057
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
    62
 */
3888
a15618dcd0eb rename WifiPhy to YansWifiPhy and add WifiPhy abstract base class.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3887
diff changeset
    63
class YansWifiPhy : public WifiPhy
1889
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    64
{
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    65
public:
2524
db72c0e7743e port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2166
diff changeset
    66
  static TypeId GetTypeId (void);
db72c0e7743e port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2166
diff changeset
    67
3888
a15618dcd0eb rename WifiPhy to YansWifiPhy and add WifiPhy abstract base class.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3887
diff changeset
    68
  YansWifiPhy ();
a15618dcd0eb rename WifiPhy to YansWifiPhy and add WifiPhy abstract base class.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3887
diff changeset
    69
  virtual ~YansWifiPhy ();
2524
db72c0e7743e port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2166
diff changeset
    70
10483
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
    71
  /**
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
    72
   * Set the YansWifiChannel this YansWifiPhy is to be connected to.
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
    73
   *
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
    74
   * \param channel the YansWifiChannel this YansWifiPhy is to be connected to
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
    75
   */
3893
94f771c1373a split WifiChannel in WifiChannel + YansWifiChannel
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3888
diff changeset
    76
  void SetChannel (Ptr<YansWifiChannel> channel);
10483
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
    77
  /**
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
    78
   * Set the current channel number.
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
    79
   *
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
    80
   * \param id the channel number
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
    81
   */
10424
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
    82
  void SetChannelNumber (uint16_t id);
10483
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
    83
  /**
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
    84
   * Return the current channel number.
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
    85
   *
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
    86
   * \return the current channel number
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
    87
   */
11159
b744c32b69bc patch to support IEEE 1609.4 MAC extension in wave module
Junling Bu <linlinjavaer@gmail.com>
parents: 11065
diff changeset
    88
  uint16_t GetChannelNumber (void) const;
b744c32b69bc patch to support IEEE 1609.4 MAC extension in wave module
Junling Bu <linlinjavaer@gmail.com>
parents: 11065
diff changeset
    89
  /**
b744c32b69bc patch to support IEEE 1609.4 MAC extension in wave module
Junling Bu <linlinjavaer@gmail.com>
parents: 11065
diff changeset
    90
   * \return the required time for channel switch operation of this WifiPhy
b744c32b69bc patch to support IEEE 1609.4 MAC extension in wave module
Junling Bu <linlinjavaer@gmail.com>
parents: 11065
diff changeset
    91
   */
b744c32b69bc patch to support IEEE 1609.4 MAC extension in wave module
Junling Bu <linlinjavaer@gmail.com>
parents: 11065
diff changeset
    92
  Time GetChannelSwitchDelay (void) const;
7141
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 7139
diff changeset
    93
  /**
10424
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
    94
   * Return current center channel frequency in MHz.
5192
fb3d57fd97e4 Doxy doc for Wifi channel switching
Ramon Bauza
parents: 5189
diff changeset
    95
   *
10424
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
    96
   * \return the current center channel frequency in MHz
11450
9f4ae69f12b7 cleanup wifi module
Sébastien Deronne <sebastien.deronne@gmail.com>
parents: 11444
diff changeset
    97
   */
7141
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 7139
diff changeset
    98
  double GetChannelFrequencyMhz () const;
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 7139
diff changeset
    99
10483
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
   100
  /**
11348
ded786322135 Bug 2066 [wifi] - A-MPDU reception should check for successful preamble
Sébastien Deronne <sebastien.deronne@gmail.com>
parents: 11174
diff changeset
   101
   * Starting receiving the plcp of a packet (i.e. the first bit of the preamble has arrived).
10483
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
   102
   *
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
   103
   * \param packet the arriving packet
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
   104
   * \param rxPowerDbm the receive power in dBm
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
   105
   * \param txVector the TXVECTOR of the arriving packet
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
   106
   * \param preamble the preamble of the arriving packet
11450
9f4ae69f12b7 cleanup wifi module
Sébastien Deronne <sebastien.deronne@gmail.com>
parents: 11444
diff changeset
   107
   * \param packetType The type of the received packet (values: 0 not an A-MPDU, 1 corresponds to any packets in an A-MPDU except the last one, 2 is the last packet in an A-MPDU)
11348
ded786322135 Bug 2066 [wifi] - A-MPDU reception should check for successful preamble
Sébastien Deronne <sebastien.deronne@gmail.com>
parents: 11174
diff changeset
   108
   * \param rxDuration the duration needed for the reception of the packet
ded786322135 Bug 2066 [wifi] - A-MPDU reception should check for successful preamble
Sébastien Deronne <sebastien.deronne@gmail.com>
parents: 11174
diff changeset
   109
   */
11444
bdd8ef382d1e cleanup yans-wifi-phy
Sébastien Deronne <sebastien.deronne@gmail.com>
parents: 11348
diff changeset
   110
  void StartReceivePreambleAndHeader (Ptr<Packet> packet,
bdd8ef382d1e cleanup yans-wifi-phy
Sébastien Deronne <sebastien.deronne@gmail.com>
parents: 11348
diff changeset
   111
                                      double rxPowerDbm,
bdd8ef382d1e cleanup yans-wifi-phy
Sébastien Deronne <sebastien.deronne@gmail.com>
parents: 11348
diff changeset
   112
                                      WifiTxVector txVector,
bdd8ef382d1e cleanup yans-wifi-phy
Sébastien Deronne <sebastien.deronne@gmail.com>
parents: 11348
diff changeset
   113
                                      WifiPreamble preamble,
bdd8ef382d1e cleanup yans-wifi-phy
Sébastien Deronne <sebastien.deronne@gmail.com>
parents: 11348
diff changeset
   114
                                      uint8_t packetType,
bdd8ef382d1e cleanup yans-wifi-phy
Sébastien Deronne <sebastien.deronne@gmail.com>
parents: 11348
diff changeset
   115
                                      Time rxDuration);
11348
ded786322135 Bug 2066 [wifi] - A-MPDU reception should check for successful preamble
Sébastien Deronne <sebastien.deronne@gmail.com>
parents: 11174
diff changeset
   116
  /**
ded786322135 Bug 2066 [wifi] - A-MPDU reception should check for successful preamble
Sébastien Deronne <sebastien.deronne@gmail.com>
parents: 11174
diff changeset
   117
   * Starting receiving the payload of a packet (i.e. the first bit of the packet has arrived).
ded786322135 Bug 2066 [wifi] - A-MPDU reception should check for successful preamble
Sébastien Deronne <sebastien.deronne@gmail.com>
parents: 11174
diff changeset
   118
   *
ded786322135 Bug 2066 [wifi] - A-MPDU reception should check for successful preamble
Sébastien Deronne <sebastien.deronne@gmail.com>
parents: 11174
diff changeset
   119
   * \param packet the arriving packet
ded786322135 Bug 2066 [wifi] - A-MPDU reception should check for successful preamble
Sébastien Deronne <sebastien.deronne@gmail.com>
parents: 11174
diff changeset
   120
   * \param txVector the TXVECTOR of the arriving packet
ded786322135 Bug 2066 [wifi] - A-MPDU reception should check for successful preamble
Sébastien Deronne <sebastien.deronne@gmail.com>
parents: 11174
diff changeset
   121
   * \param preamble the preamble of the arriving packet
11450
9f4ae69f12b7 cleanup wifi module
Sébastien Deronne <sebastien.deronne@gmail.com>
parents: 11444
diff changeset
   122
   * \param packetType The type of the received packet (values: 0 not an A-MPDU, 1 corresponds to any packets in an A-MPDU except the last one, 2 is the last packet in an A-MPDU)
11348
ded786322135 Bug 2066 [wifi] - A-MPDU reception should check for successful preamble
Sébastien Deronne <sebastien.deronne@gmail.com>
parents: 11174
diff changeset
   123
   * \param event the corresponding event of the first time the packet arrives
10483
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
   124
   */
3893
94f771c1373a split WifiChannel in WifiChannel + YansWifiChannel
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3888
diff changeset
   125
  void StartReceivePacket (Ptr<Packet> packet,
10139
17a71cd49da3 partial 802.11n support
Ghada Badawy <gbadawy@gmail.com>
parents: 9818
diff changeset
   126
                           WifiTxVector txVector,
11174
780a43e4980c add MPDU aggregation (with contributions from Sebastien Deronne and Ioannis Selinis)
Ghada Badawy <gbadawy@gmail.com>
parents: 11159
diff changeset
   127
                           WifiPreamble preamble,
780a43e4980c add MPDU aggregation (with contributions from Sebastien Deronne and Ioannis Selinis)
Ghada Badawy <gbadawy@gmail.com>
parents: 11159
diff changeset
   128
                           uint8_t packetType,
11348
ded786322135 Bug 2066 [wifi] - A-MPDU reception should check for successful preamble
Sébastien Deronne <sebastien.deronne@gmail.com>
parents: 11174
diff changeset
   129
                           Ptr<InterferenceHelper::Event> event);
3893
94f771c1373a split WifiChannel in WifiChannel + YansWifiChannel
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3888
diff changeset
   130
10424
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   131
  /**
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   132
   * Sets the RX loss (dB) in the Signal-to-Noise-Ratio due to non-idealities in the receiver.
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   133
   *
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   134
   * \param noiseFigureDb noise figure in dB
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   135
   */
4315
56a5bf298339 noiseFloor -> noiseFigure (bug 543)
Nicola Baldo <nbaldo@cttc.es>
parents: 4264
diff changeset
   136
  void SetRxNoiseFigure (double noiseFigureDb);
10424
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   137
  /**
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   138
   * Sets the minimum available transmission power level (dBm).
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   139
   *
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   140
   * \param start the minimum transmission power level (dBm)
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   141
   */
2524
db72c0e7743e port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2166
diff changeset
   142
  void SetTxPowerStart (double start);
10424
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   143
  /**
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   144
   * Sets the maximum available transmission power level (dBm).
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   145
   *
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   146
   * \param end the maximum transmission power level (dBm)
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   147
   */
2524
db72c0e7743e port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2166
diff changeset
   148
  void SetTxPowerEnd (double end);
10424
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   149
  /**
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   150
   * Sets the number of transmission power levels available between the
11444
bdd8ef382d1e cleanup yans-wifi-phy
Sébastien Deronne <sebastien.deronne@gmail.com>
parents: 11348
diff changeset
   151
   * minimum level and the maximum level. Transmission power levels are
10424
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   152
   * equally separated (in dBm) with the minimum and the maximum included.
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   153
   *
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   154
   * \param n the number of available levels
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   155
   */
2524
db72c0e7743e port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2166
diff changeset
   156
  void SetNTxPower (uint32_t n);
10424
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   157
  /**
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   158
   * Sets the transmission gain (dB).
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   159
   *
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   160
   * \param gain the transmission gain in dB
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   161
   */
2524
db72c0e7743e port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2166
diff changeset
   162
  void SetTxGain (double gain);
10424
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   163
  /**
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   164
   * Sets the reception gain (dB).
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   165
   *
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   166
   * \param gain the reception gain in dB
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   167
   */
2524
db72c0e7743e port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2166
diff changeset
   168
  void SetRxGain (double gain);
10424
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   169
  /**
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   170
   * Sets the energy detection threshold (dBm).
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   171
   * The energy of a received signal should be higher than
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   172
   * this threshold (dbm) to allow the PHY layer to detect the signal.
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   173
   *
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   174
   * \param threshold the energy detction threshold in dBm
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   175
   */
2524
db72c0e7743e port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2166
diff changeset
   176
  void SetEdThreshold (double threshold);
10424
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   177
  /**
11444
bdd8ef382d1e cleanup yans-wifi-phy
Sébastien Deronne <sebastien.deronne@gmail.com>
parents: 11348
diff changeset
   178
   * Sets the CCA threshold (dBm). The energy of a received signal
10424
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   179
   * should be higher than this threshold to allow the PHY
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   180
   * layer to declare CCA BUSY state.
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   181
   *
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   182
   * \param threshold the CCA threshold in dBm
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   183
   */
3905
99c9346b5d71 split interference calculation from YansWifiPhy. Move them to InterferenceHelper
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3904
diff changeset
   184
  void SetCcaMode1Threshold (double threshold);
10424
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   185
  /**
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   186
   * Sets the error rate model.
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   187
   *
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   188
   * \param rate the error rate model
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   189
   */
3905
99c9346b5d71 split interference calculation from YansWifiPhy. Move them to InterferenceHelper
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3904
diff changeset
   190
  void SetErrorRateModel (Ptr<ErrorRateModel> rate);
10424
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   191
  /**
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   192
   * Sets the device this PHY is associated with.
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   193
   *
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   194
   * \param device the device this PHY is associated with
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   195
   */
3912
4d1a61f80745 new wifi API
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3906
diff changeset
   196
  void SetDevice (Ptr<Object> device);
10424
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   197
  /**
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   198
   * Sets the mobility model.
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   199
   *
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   200
   * \param mobility the mobility model this PHY is associated with
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   201
   */
3912
4d1a61f80745 new wifi API
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3906
diff changeset
   202
  void SetMobility (Ptr<Object> mobility);
10424
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   203
  /**
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   204
   * Return the RX noise figure (dBm).
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   205
   *
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   206
   * \return the RX noise figure in dBm
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   207
   */
4315
56a5bf298339 noiseFloor -> noiseFigure (bug 543)
Nicola Baldo <nbaldo@cttc.es>
parents: 4264
diff changeset
   208
  double GetRxNoiseFigure (void) const;
10424
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   209
  /**
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   210
   * Return the transmission gain (dB).
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   211
   *
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   212
   * \return the transmission gain in dB
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   213
   */
2524
db72c0e7743e port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2166
diff changeset
   214
  double GetTxGain (void) const;
10424
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   215
  /**
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   216
   * Return the reception gain (dB).
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   217
   *
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   218
   * \return the reception gain in dB
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   219
   */
2524
db72c0e7743e port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2166
diff changeset
   220
  double GetRxGain (void) const;
10424
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   221
  /**
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   222
   * Return the energy detection threshold (dBm).
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   223
   *
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   224
   * \return the energy detection threshold in dBm
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   225
   */
2524
db72c0e7743e port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2166
diff changeset
   226
  double GetEdThreshold (void) const;
10424
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   227
  /**
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   228
   * Return the CCA threshold (dBm).
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   229
   *
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   230
   * \return the CCA threshold in dBm
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   231
   */
3905
99c9346b5d71 split interference calculation from YansWifiPhy. Move them to InterferenceHelper
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3904
diff changeset
   232
  double GetCcaMode1Threshold (void) const;
10424
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   233
  /**
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   234
   * Return the error rate model this PHY is using.
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   235
   *
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   236
   * \return the error rate model this PHY is using
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   237
   */
3905
99c9346b5d71 split interference calculation from YansWifiPhy. Move them to InterferenceHelper
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3904
diff changeset
   238
  Ptr<ErrorRateModel> GetErrorRateModel (void) const;
10424
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   239
  /**
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   240
   * Return the device this PHY is associated with
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   241
   *
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   242
   * \return the device this PHY is associated with
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   243
   */
3912
4d1a61f80745 new wifi API
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3906
diff changeset
   244
  Ptr<Object> GetDevice (void) const;
10424
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   245
  /**
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   246
   * Return the mobility model this PHY is associated with.
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   247
   *
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   248
   * \return the mobility model this PHY is associated with
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   249
   */
3912
4d1a61f80745 new wifi API
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3906
diff changeset
   250
  Ptr<Object> GetMobility (void);
10483
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
   251
  /**
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
   252
   * Return the minimum available transmission power level (dBm).
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
   253
   * \return the minimum available transmission power level (dBm)
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
   254
   */
3888
a15618dcd0eb rename WifiPhy to YansWifiPhy and add WifiPhy abstract base class.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3887
diff changeset
   255
  virtual double GetTxPowerStart (void) const;
10483
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
   256
  /**
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
   257
   * Return the maximum available transmission power level (dBm).
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
   258
   * \return the maximum available transmission power level (dBm)
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
   259
   */
3888
a15618dcd0eb rename WifiPhy to YansWifiPhy and add WifiPhy abstract base class.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3887
diff changeset
   260
  virtual double GetTxPowerEnd (void) const;
10424
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   261
  /**
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   262
   * Return the number of available transmission power levels.
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   263
   *
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   264
   * \return the number of available transmission power levels
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   265
   */
3888
a15618dcd0eb rename WifiPhy to YansWifiPhy and add WifiPhy abstract base class.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3887
diff changeset
   266
  virtual uint32_t GetNTxPower (void) const;
11450
9f4ae69f12b7 cleanup wifi module
Sébastien Deronne <sebastien.deronne@gmail.com>
parents: 11444
diff changeset
   267
5820
1c02054740eb Renaming WifiPhy state SYNC to RX to avoid confusion with "synchronizing".
Timo Bingmann <tbns@idlebox.net>
parents: 5747
diff changeset
   268
  virtual void SetReceiveOkCallback (WifiPhy::RxOkCallback callback);
1c02054740eb Renaming WifiPhy state SYNC to RX to avoid confusion with "synchronizing".
Timo Bingmann <tbns@idlebox.net>
parents: 5747
diff changeset
   269
  virtual void SetReceiveErrorCallback (WifiPhy::RxErrorCallback callback);
11174
780a43e4980c add MPDU aggregation (with contributions from Sebastien Deronne and Ioannis Selinis)
Ghada Badawy <gbadawy@gmail.com>
parents: 11159
diff changeset
   270
  virtual void SendPacket (Ptr<const Packet> packet, WifiTxVector txvector, enum WifiPreamble preamble, uint8_t packetType);
3888
a15618dcd0eb rename WifiPhy to YansWifiPhy and add WifiPhy abstract base class.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3887
diff changeset
   271
  virtual void RegisterListener (WifiPhyListener *listener);
11159
b744c32b69bc patch to support IEEE 1609.4 MAC extension in wave module
Junling Bu <linlinjavaer@gmail.com>
parents: 11065
diff changeset
   272
  virtual void UnregisterListener (WifiPhyListener *listener);
10883
d919e7194e23 add support for a Wifi sleep mode
Stefano Avallone <stefano.avallone@unina.it>
parents: 10801
diff changeset
   273
  virtual void SetSleepMode (void);
d919e7194e23 add support for a Wifi sleep mode
Stefano Avallone <stefano.avallone@unina.it>
parents: 10801
diff changeset
   274
  virtual void ResumeFromSleep (void);
3888
a15618dcd0eb rename WifiPhy to YansWifiPhy and add WifiPhy abstract base class.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3887
diff changeset
   275
  virtual bool IsStateCcaBusy (void);
a15618dcd0eb rename WifiPhy to YansWifiPhy and add WifiPhy abstract base class.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3887
diff changeset
   276
  virtual bool IsStateIdle (void);
a15618dcd0eb rename WifiPhy to YansWifiPhy and add WifiPhy abstract base class.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3887
diff changeset
   277
  virtual bool IsStateBusy (void);
5820
1c02054740eb Renaming WifiPhy state SYNC to RX to avoid confusion with "synchronizing".
Timo Bingmann <tbns@idlebox.net>
parents: 5747
diff changeset
   278
  virtual bool IsStateRx (void);
3888
a15618dcd0eb rename WifiPhy to YansWifiPhy and add WifiPhy abstract base class.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3887
diff changeset
   279
  virtual bool IsStateTx (void);
7141
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 7139
diff changeset
   280
  virtual bool IsStateSwitching (void);
10883
d919e7194e23 add support for a Wifi sleep mode
Stefano Avallone <stefano.avallone@unina.it>
parents: 10801
diff changeset
   281
  virtual bool IsStateSleep (void);
3888
a15618dcd0eb rename WifiPhy to YansWifiPhy and add WifiPhy abstract base class.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3887
diff changeset
   282
  virtual Time GetStateDuration (void);
a15618dcd0eb rename WifiPhy to YansWifiPhy and add WifiPhy abstract base class.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3887
diff changeset
   283
  virtual Time GetDelayUntilIdle (void);
a15618dcd0eb rename WifiPhy to YansWifiPhy and add WifiPhy abstract base class.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3887
diff changeset
   284
  virtual Time GetLastRxStartTime (void) const;
a15618dcd0eb rename WifiPhy to YansWifiPhy and add WifiPhy abstract base class.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3887
diff changeset
   285
  virtual uint32_t GetNModes (void) const;
a15618dcd0eb rename WifiPhy to YansWifiPhy and add WifiPhy abstract base class.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3887
diff changeset
   286
  virtual WifiMode GetMode (uint32_t mode) const;
10600
48c3c6b355a1 Bug 1848 - yans-wifi-phy can receive frames sent using unsupported mode
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10507
diff changeset
   287
  virtual bool IsModeSupported (WifiMode mode) const;
10801
02d564a4c823 Bug 1907- Add IsMcsSupported()
Sébastien Deronne <sebastien.deronne@gmail.com>
parents: 10600
diff changeset
   288
  virtual bool IsMcsSupported (WifiMode mode);
3888
a15618dcd0eb rename WifiPhy to YansWifiPhy and add WifiPhy abstract base class.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3887
diff changeset
   289
  virtual double CalculateSnr (WifiMode txMode, double ber) const;
a15618dcd0eb rename WifiPhy to YansWifiPhy and add WifiPhy abstract base class.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3887
diff changeset
   290
  virtual Ptr<WifiChannel> GetChannel (void) const;
11450
9f4ae69f12b7 cleanup wifi module
Sébastien Deronne <sebastien.deronne@gmail.com>
parents: 11444
diff changeset
   291
4720
15221757964f bug 641: CwMin setting for 802.11b
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 4690
diff changeset
   292
  virtual void ConfigureStandard (enum WifiPhyStandard standard);
2524
db72c0e7743e port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2166
diff changeset
   293
11450
9f4ae69f12b7 cleanup wifi module
Sébastien Deronne <sebastien.deronne@gmail.com>
parents: 11444
diff changeset
   294
  /**
9f4ae69f12b7 cleanup wifi module
Sébastien Deronne <sebastien.deronne@gmail.com>
parents: 11444
diff changeset
   295
   * Assign a fixed random variable stream number to the random variables
9f4ae69f12b7 cleanup wifi module
Sébastien Deronne <sebastien.deronne@gmail.com>
parents: 11444
diff changeset
   296
   * used by this model.  Return the number of streams (possibly zero) that
9f4ae69f12b7 cleanup wifi module
Sébastien Deronne <sebastien.deronne@gmail.com>
parents: 11444
diff changeset
   297
   * have been assigned.
9f4ae69f12b7 cleanup wifi module
Sébastien Deronne <sebastien.deronne@gmail.com>
parents: 11444
diff changeset
   298
   *
9f4ae69f12b7 cleanup wifi module
Sébastien Deronne <sebastien.deronne@gmail.com>
parents: 11444
diff changeset
   299
   * \param stream first stream index to use
9f4ae69f12b7 cleanup wifi module
Sébastien Deronne <sebastien.deronne@gmail.com>
parents: 11444
diff changeset
   300
   * \return the number of stream indices assigned by this model
9f4ae69f12b7 cleanup wifi module
Sébastien Deronne <sebastien.deronne@gmail.com>
parents: 11444
diff changeset
   301
   */
8981
7e1c95c4d1a7 Replace src/wifi usage of RandomVariable with RandomVariableStream
Mitch Watrous
parents: 7385
diff changeset
   302
  int64_t AssignStreams (int64_t stream);
7e1c95c4d1a7 Replace src/wifi usage of RandomVariable with RandomVariableStream
Mitch Watrous
parents: 7385
diff changeset
   303
10139
17a71cd49da3 partial 802.11n support
Ghada Badawy <gbadawy@gmail.com>
parents: 9818
diff changeset
   304
  /**
10424
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   305
   * \param freq the operating frequency on this node (2.4 GHz or 5GHz).
10139
17a71cd49da3 partial 802.11n support
Ghada Badawy <gbadawy@gmail.com>
parents: 9818
diff changeset
   306
   */
17a71cd49da3 partial 802.11n support
Ghada Badawy <gbadawy@gmail.com>
parents: 9818
diff changeset
   307
  virtual void SetFrequency (uint32_t freq);
17a71cd49da3 partial 802.11n support
Ghada Badawy <gbadawy@gmail.com>
parents: 9818
diff changeset
   308
  /**
10424
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   309
   * \return the operating frequency on this node
10139
17a71cd49da3 partial 802.11n support
Ghada Badawy <gbadawy@gmail.com>
parents: 9818
diff changeset
   310
   */
17a71cd49da3 partial 802.11n support
Ghada Badawy <gbadawy@gmail.com>
parents: 9818
diff changeset
   311
  virtual uint32_t GetFrequency (void) const;
17a71cd49da3 partial 802.11n support
Ghada Badawy <gbadawy@gmail.com>
parents: 9818
diff changeset
   312
  /**
10424
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   313
   * \param tx the number of transmitters on this node.
10139
17a71cd49da3 partial 802.11n support
Ghada Badawy <gbadawy@gmail.com>
parents: 9818
diff changeset
   314
   */
17a71cd49da3 partial 802.11n support
Ghada Badawy <gbadawy@gmail.com>
parents: 9818
diff changeset
   315
  virtual void SetNumberOfTransmitAntennas (uint32_t tx);
11444
bdd8ef382d1e cleanup yans-wifi-phy
Sébastien Deronne <sebastien.deronne@gmail.com>
parents: 11348
diff changeset
   316
  /**
bdd8ef382d1e cleanup yans-wifi-phy
Sébastien Deronne <sebastien.deronne@gmail.com>
parents: 11348
diff changeset
   317
   * \return the number of transmitters on this node.
bdd8ef382d1e cleanup yans-wifi-phy
Sébastien Deronne <sebastien.deronne@gmail.com>
parents: 11348
diff changeset
   318
   */
10139
17a71cd49da3 partial 802.11n support
Ghada Badawy <gbadawy@gmail.com>
parents: 9818
diff changeset
   319
  virtual uint32_t GetNumberOfTransmitAntennas (void) const;
17a71cd49da3 partial 802.11n support
Ghada Badawy <gbadawy@gmail.com>
parents: 9818
diff changeset
   320
  /**
10424
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   321
   * \param rx the number of receivers on this node.
10139
17a71cd49da3 partial 802.11n support
Ghada Badawy <gbadawy@gmail.com>
parents: 9818
diff changeset
   322
   */
11450
9f4ae69f12b7 cleanup wifi module
Sébastien Deronne <sebastien.deronne@gmail.com>
parents: 11444
diff changeset
   323
  virtual void SetNumberOfReceiveAntennas (uint32_t rx);
10139
17a71cd49da3 partial 802.11n support
Ghada Badawy <gbadawy@gmail.com>
parents: 9818
diff changeset
   324
  /**
10424
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   325
   * \return the number of receivers on this node.
10139
17a71cd49da3 partial 802.11n support
Ghada Badawy <gbadawy@gmail.com>
parents: 9818
diff changeset
   326
   */
17a71cd49da3 partial 802.11n support
Ghada Badawy <gbadawy@gmail.com>
parents: 9818
diff changeset
   327
  virtual uint32_t GetNumberOfReceiveAntennas (void) const;
17a71cd49da3 partial 802.11n support
Ghada Badawy <gbadawy@gmail.com>
parents: 9818
diff changeset
   328
  /**
10424
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   329
   * Enable or disable short/long guard interval.
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   330
   *
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   331
   * \param guardInterval Enable or disable guard interval
10139
17a71cd49da3 partial 802.11n support
Ghada Badawy <gbadawy@gmail.com>
parents: 9818
diff changeset
   332
   */
10424
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   333
  virtual void SetGuardInterval (bool guardInterval);
10139
17a71cd49da3 partial 802.11n support
Ghada Badawy <gbadawy@gmail.com>
parents: 9818
diff changeset
   334
  /**
10424
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   335
   * Return whether guard interval is being used.
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   336
   *
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   337
   * \return true if guard interval is being used, false otherwise
10139
17a71cd49da3 partial 802.11n support
Ghada Badawy <gbadawy@gmail.com>
parents: 9818
diff changeset
   338
   */
10424
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   339
  virtual bool GetGuardInterval (void) const;
10139
17a71cd49da3 partial 802.11n support
Ghada Badawy <gbadawy@gmail.com>
parents: 9818
diff changeset
   340
  /**
10424
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   341
   * Enable or disable LDPC.
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   342
   * \param ldpc Enable or disable LDPC
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   343
   */
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   344
  virtual void SetLdpc (bool ldpc);
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   345
  /**
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   346
   * Return if LDPC is supported.
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   347
   *
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   348
   * \return true if LDPC is supported, false otherwise
10139
17a71cd49da3 partial 802.11n support
Ghada Badawy <gbadawy@gmail.com>
parents: 9818
diff changeset
   349
   */
17a71cd49da3 partial 802.11n support
Ghada Badawy <gbadawy@gmail.com>
parents: 9818
diff changeset
   350
  virtual bool GetLdpc (void) const;
17a71cd49da3 partial 802.11n support
Ghada Badawy <gbadawy@gmail.com>
parents: 9818
diff changeset
   351
  /**
10424
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   352
   * Enable or disable STBC.
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   353
   *
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   354
   * \param stbc Enable or disable STBC
10139
17a71cd49da3 partial 802.11n support
Ghada Badawy <gbadawy@gmail.com>
parents: 9818
diff changeset
   355
   */
17a71cd49da3 partial 802.11n support
Ghada Badawy <gbadawy@gmail.com>
parents: 9818
diff changeset
   356
  virtual void SetStbc (bool stbc);
10424
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   357
  /**
11450
9f4ae69f12b7 cleanup wifi module
Sébastien Deronne <sebastien.deronne@gmail.com>
parents: 11444
diff changeset
   358
   * Return whether STBC is supported.
10424
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   359
   *
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   360
   * \return true if STBC is supported, false otherwise
10139
17a71cd49da3 partial 802.11n support
Ghada Badawy <gbadawy@gmail.com>
parents: 9818
diff changeset
   361
   */
17a71cd49da3 partial 802.11n support
Ghada Badawy <gbadawy@gmail.com>
parents: 9818
diff changeset
   362
  virtual bool GetStbc (void) const;
17a71cd49da3 partial 802.11n support
Ghada Badawy <gbadawy@gmail.com>
parents: 9818
diff changeset
   363
  /**
10424
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   364
   * Enable or disable Greenfield support.
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   365
   *
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   366
   * \param greenfield Enable or disable Greenfield
10139
17a71cd49da3 partial 802.11n support
Ghada Badawy <gbadawy@gmail.com>
parents: 9818
diff changeset
   367
   */
17a71cd49da3 partial 802.11n support
Ghada Badawy <gbadawy@gmail.com>
parents: 9818
diff changeset
   368
  virtual void SetGreenfield (bool greenfield);
17a71cd49da3 partial 802.11n support
Ghada Badawy <gbadawy@gmail.com>
parents: 9818
diff changeset
   369
  /**
10424
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   370
   * Return whether Greenfield is supported.
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   371
   *
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   372
   * \return true if Greenfield is supported, false otherwise
10139
17a71cd49da3 partial 802.11n support
Ghada Badawy <gbadawy@gmail.com>
parents: 9818
diff changeset
   373
   */
17a71cd49da3 partial 802.11n support
Ghada Badawy <gbadawy@gmail.com>
parents: 9818
diff changeset
   374
  virtual bool GetGreenfield (void) const;
17a71cd49da3 partial 802.11n support
Ghada Badawy <gbadawy@gmail.com>
parents: 9818
diff changeset
   375
  /**
10424
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   376
   * Return whether channel bonding is supported.
11450
9f4ae69f12b7 cleanup wifi module
Sébastien Deronne <sebastien.deronne@gmail.com>
parents: 11444
diff changeset
   377
   *
10424
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   378
   * \return true if channel bonding is supported, false otherwise
10139
17a71cd49da3 partial 802.11n support
Ghada Badawy <gbadawy@gmail.com>
parents: 9818
diff changeset
   379
   */
11450
9f4ae69f12b7 cleanup wifi module
Sébastien Deronne <sebastien.deronne@gmail.com>
parents: 11444
diff changeset
   380
  virtual bool GetChannelBonding (void) const;
10139
17a71cd49da3 partial 802.11n support
Ghada Badawy <gbadawy@gmail.com>
parents: 9818
diff changeset
   381
  /**
10424
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   382
   * Enable or disable channel bonding support.
11450
9f4ae69f12b7 cleanup wifi module
Sébastien Deronne <sebastien.deronne@gmail.com>
parents: 11444
diff changeset
   383
   *
10483
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
   384
   * \param channelbonding Enable or disable channel bonding
10139
17a71cd49da3 partial 802.11n support
Ghada Badawy <gbadawy@gmail.com>
parents: 9818
diff changeset
   385
   */
11450
9f4ae69f12b7 cleanup wifi module
Sébastien Deronne <sebastien.deronne@gmail.com>
parents: 11444
diff changeset
   386
  virtual void SetChannelBonding (bool channelbonding);
10139
17a71cd49da3 partial 802.11n support
Ghada Badawy <gbadawy@gmail.com>
parents: 9818
diff changeset
   387
17a71cd49da3 partial 802.11n support
Ghada Badawy <gbadawy@gmail.com>
parents: 9818
diff changeset
   388
  virtual uint32_t GetNBssMembershipSelectors (void) const;
17a71cd49da3 partial 802.11n support
Ghada Badawy <gbadawy@gmail.com>
parents: 9818
diff changeset
   389
  virtual uint32_t GetBssMembershipSelector (uint32_t selector) const;
11450
9f4ae69f12b7 cleanup wifi module
Sébastien Deronne <sebastien.deronne@gmail.com>
parents: 11444
diff changeset
   390
  virtual WifiModeList GetMembershipSelectorModes (uint32_t selector);
9f4ae69f12b7 cleanup wifi module
Sébastien Deronne <sebastien.deronne@gmail.com>
parents: 11444
diff changeset
   391
10139
17a71cd49da3 partial 802.11n support
Ghada Badawy <gbadawy@gmail.com>
parents: 9818
diff changeset
   392
  /**
10424
9d29c9a5ddcb doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10204
diff changeset
   393
   * \return the number of MCS supported by this phy
10139
17a71cd49da3 partial 802.11n support
Ghada Badawy <gbadawy@gmail.com>
parents: 9818
diff changeset
   394
   */
17a71cd49da3 partial 802.11n support
Ghada Badawy <gbadawy@gmail.com>
parents: 9818
diff changeset
   395
  virtual uint8_t GetNMcs (void) const;
17a71cd49da3 partial 802.11n support
Ghada Badawy <gbadawy@gmail.com>
parents: 9818
diff changeset
   396
  virtual uint8_t GetMcs (uint8_t mcs) const;
10483
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
   397
10139
17a71cd49da3 partial 802.11n support
Ghada Badawy <gbadawy@gmail.com>
parents: 9818
diff changeset
   398
  virtual uint32_t WifiModeToMcs (WifiMode mode);
17a71cd49da3 partial 802.11n support
Ghada Badawy <gbadawy@gmail.com>
parents: 9818
diff changeset
   399
  virtual WifiMode McsToWifiMode (uint8_t mcs);
17a71cd49da3 partial 802.11n support
Ghada Badawy <gbadawy@gmail.com>
parents: 9818
diff changeset
   400
11444
bdd8ef382d1e cleanup yans-wifi-phy
Sébastien Deronne <sebastien.deronne@gmail.com>
parents: 11348
diff changeset
   401
1889
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   402
private:
11444
bdd8ef382d1e cleanup yans-wifi-phy
Sébastien Deronne <sebastien.deronne@gmail.com>
parents: 11348
diff changeset
   403
  virtual void DoInitialize (void);
2530
05f9cec44621 avoid memory leaks
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2524
diff changeset
   404
  virtual void DoDispose (void);
11450
9f4ae69f12b7 cleanup wifi module
Sébastien Deronne <sebastien.deronne@gmail.com>
parents: 11444
diff changeset
   405
10483
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
   406
  /**
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
   407
   * Configure YansWifiPhy with appropriate channel frequency and
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
   408
   * supported rates for 802.11a standard.
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
   409
   */
1964
041240a915f8 build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1920
diff changeset
   410
  void Configure80211a (void);
10483
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
   411
  /**
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
   412
   * Configure YansWifiPhy with appropriate channel frequency and
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
   413
   * supported rates for 802.11b standard.
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
   414
   */
4470
51b5c1a272d3 802.11b PHY support
Gary Pei <guangyu.pei@boeing.com>
parents: 4315
diff changeset
   415
  void Configure80211b (void);
10483
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
   416
  /**
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
   417
   * Configure YansWifiPhy with appropriate channel frequency and
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
   418
   * supported rates for 802.11g standard.
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
   419
   */
6597
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6372
diff changeset
   420
  void Configure80211g (void);
10483
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
   421
  /**
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
   422
   * Configure YansWifiPhy with appropriate channel frequency and
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
   423
   * supported rates for 802.11a standard with 10MHz channel spacing.
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
   424
   */
4680
a52c39181dd4 Support for 5 and 10Mhz wifi channels
Ramon Bauza <monbauza@gmail.com>
parents: 4492
diff changeset
   425
  void Configure80211_10Mhz (void);
10483
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
   426
  /**
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
   427
   * Configure YansWifiPhy with appropriate channel frequency and
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
   428
   * supported rates for 802.11a standard with 5MHz channel spacing.
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
   429
   */
4680
a52c39181dd4 Support for 5 and 10Mhz wifi channels
Ramon Bauza <monbauza@gmail.com>
parents: 4492
diff changeset
   430
  void Configure80211_5Mhz ();
2083
c7541b84285e add the holland 802.11a set of modes.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2071
diff changeset
   431
  void ConfigureHolland (void);
10483
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
   432
  /**
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
   433
   * Configure YansWifiPhy with appropriate channel frequency and
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
   434
   * supported rates for 802.11n standard.
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
   435
   */
10139
17a71cd49da3 partial 802.11n support
Ghada Badawy <gbadawy@gmail.com>
parents: 9818
diff changeset
   436
  void Configure80211n (void);
10483
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
   437
  /**
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
   438
   * Return the energy detection threshold.
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
   439
   *
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
   440
   * \return the energy detection threshold.
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
   441
   */
1889
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   442
  double GetEdThresholdW (void) const;
10483
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
   443
  /**
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
   444
   * Convert from dBm to Watts.
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
   445
   *
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
   446
   * \param dbm the power in dBm
11444
bdd8ef382d1e cleanup yans-wifi-phy
Sébastien Deronne <sebastien.deronne@gmail.com>
parents: 11348
diff changeset
   447
   *
10483
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
   448
   * \return the equivalent Watts for the given dBm
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
   449
   */
1889
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   450
  double DbmToW (double dbm) const;
10483
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
   451
  /**
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
   452
   * Convert from dB to ratio.
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
   453
   *
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
   454
   * \param db
11444
bdd8ef382d1e cleanup yans-wifi-phy
Sébastien Deronne <sebastien.deronne@gmail.com>
parents: 11348
diff changeset
   455
   *
10483
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
   456
   * \return ratio
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
   457
   */
1889
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   458
  double DbToRatio (double db) const;
10483
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
   459
  /**
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
   460
   * Convert from Watts to dBm.
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
   461
   *
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
   462
   * \param w the power in Watts
11444
bdd8ef382d1e cleanup yans-wifi-phy
Sébastien Deronne <sebastien.deronne@gmail.com>
parents: 11348
diff changeset
   463
   *
10483
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
   464
   * \return the equivalent dBm for the given Watts
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
   465
   */
2524
db72c0e7743e port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2166
diff changeset
   466
  double WToDbm (double w) const;
10483
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
   467
  /**
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
   468
   * Convert from ratio to dB.
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
   469
   *
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
   470
   * \param ratio
11444
bdd8ef382d1e cleanup yans-wifi-phy
Sébastien Deronne <sebastien.deronne@gmail.com>
parents: 11348
diff changeset
   471
   *
10483
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
   472
   * \return dB
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
   473
   */
2524
db72c0e7743e port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2166
diff changeset
   474
  double RatioToDb (double ratio) const;
10483
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
   475
  /**
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
   476
   * Get the power of the given power level in dBm.
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
   477
   * In YansWifiPhy implementation, the power levels are equally spaced (in dBm).
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
   478
   *
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
   479
   * \param power the power level
11444
bdd8ef382d1e cleanup yans-wifi-phy
Sébastien Deronne <sebastien.deronne@gmail.com>
parents: 11348
diff changeset
   480
   *
10483
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
   481
   * \return the transmission power in dBm at the given power level
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
   482
   */
1889
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   483
  double GetPowerDbm (uint8_t power) const;
10483
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
   484
  /**
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
   485
   * The last bit of the packet has arrived.
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
   486
   *
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
   487
   * \param packet the packet that the last bit has arrived
11348
ded786322135 Bug 2066 [wifi] - A-MPDU reception should check for successful preamble
Sébastien Deronne <sebastien.deronne@gmail.com>
parents: 11174
diff changeset
   488
   * \param preamble the preamble of the arriving packet
ded786322135 Bug 2066 [wifi] - A-MPDU reception should check for successful preamble
Sébastien Deronne <sebastien.deronne@gmail.com>
parents: 11174
diff changeset
   489
   * \param packetType The type of the received packet (values: 0 not an A-MPDU, 1 corresponds to any packets in an A-MPDU except the last one, 2 is the last packet in an A-MPDU)
10483
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
   490
   * \param event the corresponding event of the first time the packet arrives
e3a02ed14587 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10424
diff changeset
   491
   */
11348
ded786322135 Bug 2066 [wifi] - A-MPDU reception should check for successful preamble
Sébastien Deronne <sebastien.deronne@gmail.com>
parents: 11174
diff changeset
   492
  void EndReceive (Ptr<Packet> packet, enum WifiPreamble preamble, uint8_t packetType, Ptr<InterferenceHelper::Event> event);
11450
9f4ae69f12b7 cleanup wifi module
Sébastien Deronne <sebastien.deronne@gmail.com>
parents: 11444
diff changeset
   493
11174
780a43e4980c add MPDU aggregation (with contributions from Sebastien Deronne and Ioannis Selinis)
Ghada Badawy <gbadawy@gmail.com>
parents: 11159
diff changeset
   494
  bool     m_initialized;         //!< Flag for runtime initialization
10507
2081aa152526 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10483
diff changeset
   495
  double   m_edThresholdW;        //!< Energy detection threshold in watts
2081aa152526 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10483
diff changeset
   496
  double   m_ccaMode1ThresholdW;  //!< Clear channel assessment (CCA) threshold in watts
2081aa152526 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10483
diff changeset
   497
  double   m_txGainDb;            //!< Transmission gain (dB)
2081aa152526 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10483
diff changeset
   498
  double   m_rxGainDb;            //!< Reception gain (dB)
2081aa152526 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10483
diff changeset
   499
  double   m_txPowerBaseDbm;      //!< Minimum transmission power (dBm)
2081aa152526 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10483
diff changeset
   500
  double   m_txPowerEndDbm;       //!< Maximum transmission power (dBm)
2081aa152526 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10483
diff changeset
   501
  uint32_t m_nTxPower;            //!< Number of available transmission power levels
10139
17a71cd49da3 partial 802.11n support
Ghada Badawy <gbadawy@gmail.com>
parents: 9818
diff changeset
   502
10507
2081aa152526 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10483
diff changeset
   503
  Ptr<YansWifiChannel> m_channel;        //!< YansWifiChannel that this YansWifiPhy is connected to
2081aa152526 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10483
diff changeset
   504
  uint16_t             m_channelNumber;  //!< Operating channel number
2081aa152526 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10483
diff changeset
   505
  Ptr<Object>          m_device;         //!< Pointer to the device
2081aa152526 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10483
diff changeset
   506
  Ptr<Object>          m_mobility;       //!< Pointer to the mobility model
2081aa152526 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10483
diff changeset
   507
2081aa152526 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10483
diff changeset
   508
  uint32_t m_numberOfTransmitters;  //!< Number of transmitters
2081aa152526 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10483
diff changeset
   509
  uint32_t m_numberOfReceivers;     //!< Number of receivers
2081aa152526 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10483
diff changeset
   510
  bool     m_ldpc;                  //!< Flag if LDPC is used
11450
9f4ae69f12b7 cleanup wifi module
Sébastien Deronne <sebastien.deronne@gmail.com>
parents: 11444
diff changeset
   511
  bool     m_stbc;                  //!< Flag if STBC is used
10507
2081aa152526 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10483
diff changeset
   512
  bool     m_greenfield;            //!< Flag if GreenField format is supported
2081aa152526 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10483
diff changeset
   513
  bool     m_guardInterval;         //!< Flag if short guard interval is used
11065
2e6f9e4be3a3 fix misspelled attribute and doxygen in YansWifiPhy
Sébastien Deronne <sebastien.deronne@gmail.com>
parents: 10883
diff changeset
   514
  bool     m_channelBonding;        //!< Flag if channel bonding is used
10139
17a71cd49da3 partial 802.11n support
Ghada Badawy <gbadawy@gmail.com>
parents: 9818
diff changeset
   515
6372
0fafd9716f44 Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents: 6273
diff changeset
   516
0fafd9716f44 Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents: 6273
diff changeset
   517
  /**
0fafd9716f44 Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents: 6273
diff changeset
   518
   * This vector holds the set of transmission modes that this
0fafd9716f44 Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents: 6273
diff changeset
   519
   * WifiPhy(-derived class) can support. In conversation we call this
0fafd9716f44 Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents: 6273
diff changeset
   520
   * the DeviceRateSet (not a term you'll find in the standard), and
0fafd9716f44 Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents: 6273
diff changeset
   521
   * it is a superset of standard-defined parameters such as the
0fafd9716f44 Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents: 6273
diff changeset
   522
   * OperationalRateSet, and the BSSBasicRateSet (which, themselves,
0fafd9716f44 Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents: 6273
diff changeset
   523
   * have a superset/subset relationship).
0fafd9716f44 Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents: 6273
diff changeset
   524
   *
0fafd9716f44 Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents: 6273
diff changeset
   525
   * Mandatory rates relevant to this WifiPhy can be found by
0fafd9716f44 Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents: 6273
diff changeset
   526
   * iterating over this vector looking for WifiMode objects for which
0fafd9716f44 Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents: 6273
diff changeset
   527
   * WifiMode::IsMandatory() is true.
0fafd9716f44 Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents: 6273
diff changeset
   528
   *
0fafd9716f44 Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents: 6273
diff changeset
   529
   * A quick note is appropriate here (well, here is as good a place
0fafd9716f44 Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents: 6273
diff changeset
   530
   * as any I can find)...
0fafd9716f44 Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents: 6273
diff changeset
   531
   *
0fafd9716f44 Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents: 6273
diff changeset
   532
   * In the standard there is no text that explicitly precludes
0fafd9716f44 Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents: 6273
diff changeset
   533
   * production of a device that does not support some rates that are
0fafd9716f44 Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents: 6273
diff changeset
   534
   * mandatory (according to the standard) for PHYs that the device
0fafd9716f44 Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents: 6273
diff changeset
   535
   * happens to fully or partially support.
0fafd9716f44 Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents: 6273
diff changeset
   536
   *
0fafd9716f44 Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents: 6273
diff changeset
   537
   * This approach is taken by some devices which choose to only support,
0fafd9716f44 Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents: 6273
diff changeset
   538
   * for example, 6 and 9 Mbps ERP-OFDM rates for cost and power
0fafd9716f44 Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents: 6273
diff changeset
   539
   * consumption reasons (i.e., these devices don't need to be designed
0fafd9716f44 Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents: 6273
diff changeset
   540
   * for and waste current on the increased linearity requirement of
0fafd9716f44 Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents: 6273
diff changeset
   541
   * higher-order constellations when 6 and 9 Mbps more than meet their
0fafd9716f44 Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents: 6273
diff changeset
   542
   * data requirements). The wording of the standard allows such devices
0fafd9716f44 Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents: 6273
diff changeset
   543
   * to have an OperationalRateSet which includes 6 and 9 Mbps ERP-OFDM
0fafd9716f44 Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents: 6273
diff changeset
   544
   * rates, despite 12 and 24 Mbps being "mandatory" rates for the
0fafd9716f44 Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents: 6273
diff changeset
   545
   * ERP-OFDM PHY.
0fafd9716f44 Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents: 6273
diff changeset
   546
   *
0fafd9716f44 Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents: 6273
diff changeset
   547
   * Now this doesn't actually have any impact on code, yet. It is,
0fafd9716f44 Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents: 6273
diff changeset
   548
   * however, something that we need to keep in mind for the
0fafd9716f44 Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents: 6273
diff changeset
   549
   * future. Basically, the key point is that we can't be making
0fafd9716f44 Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents: 6273
diff changeset
   550
   * assumptions like "the Operational Rate Set will contain all the
0fafd9716f44 Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents: 6273
diff changeset
   551
   * mandatory rates".
0fafd9716f44 Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents: 6273
diff changeset
   552
   */
0fafd9716f44 Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents: 6273
diff changeset
   553
  WifiModeList m_deviceRateSet;
11450
9f4ae69f12b7 cleanup wifi module
Sébastien Deronne <sebastien.deronne@gmail.com>
parents: 11444
diff changeset
   554
10139
17a71cd49da3 partial 802.11n support
Ghada Badawy <gbadawy@gmail.com>
parents: 9818
diff changeset
   555
  std::vector<uint32_t> m_bssMembershipSelectorSet;
17a71cd49da3 partial 802.11n support
Ghada Badawy <gbadawy@gmail.com>
parents: 9818
diff changeset
   556
  std::vector<uint8_t> m_deviceMcsSet;
5820
1c02054740eb Renaming WifiPhy state SYNC to RX to avoid confusion with "synchronizing".
Timo Bingmann <tbns@idlebox.net>
parents: 5747
diff changeset
   557
  EventId m_endRxEvent;
11348
ded786322135 Bug 2066 [wifi] - A-MPDU reception should check for successful preamble
Sébastien Deronne <sebastien.deronne@gmail.com>
parents: 11174
diff changeset
   558
  EventId m_endPlcpRxEvent;
10507
2081aa152526 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10483
diff changeset
   559
2081aa152526 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10483
diff changeset
   560
  Ptr<UniformRandomVariable> m_random;  //!< Provides uniform random variables.
2081aa152526 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10483
diff changeset
   561
  double m_channelStartingFrequency;    //!< Standard-dependent center frequency of 0-th channel in MHz
2081aa152526 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10483
diff changeset
   562
  Ptr<WifiPhyStateHelper> m_state;      //!< Pointer to WifiPhyStateHelper
2081aa152526 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10483
diff changeset
   563
  InterferenceHelper m_interference;    //!< Pointer to InterferenceHelper
2081aa152526 [doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 10483
diff changeset
   564
  Time m_channelSwitchDelay;            //!< Time required to switch between channel
11174
780a43e4980c add MPDU aggregation (with contributions from Sebastien Deronne and Ioannis Selinis)
Ghada Badawy <gbadawy@gmail.com>
parents: 11159
diff changeset
   565
  uint16_t m_mpdusNum;                  //!< carries the number of expected mpdus that are part of an A-MPDU
11348
ded786322135 Bug 2066 [wifi] - A-MPDU reception should check for successful preamble
Sébastien Deronne <sebastien.deronne@gmail.com>
parents: 11174
diff changeset
   566
  bool m_plcpSuccess;                   //!< Flag if the PLCP of the packet or the first MPDU in an A-MPDU has been received
1889
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   567
};
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   568
11450
9f4ae69f12b7 cleanup wifi module
Sébastien Deronne <sebastien.deronne@gmail.com>
parents: 11444
diff changeset
   569
} //namespace ns3
1889
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   570
3888
a15618dcd0eb rename WifiPhy to YansWifiPhy and add WifiPhy abstract base class.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3887
diff changeset
   571
#endif /* YANS_WIFI_PHY_H */