src/wifi/model/wifi-phy.h
author Ashwin Narayan
Sat, 16 Jul 2011 08:54:00 -0400
changeset 7328 141f8d6ccb03
parent 7310 74528919caaf
permissions -rw-r--r--
Cleaning up code for review
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1889
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     1
/* -*-  Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
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
 *
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    18
 * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    19
 */
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    20
1890
a2b30c6456c9 Phy80211 -> WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1889
diff changeset
    21
#ifndef WIFI_PHY_H
a2b30c6456c9 Phy80211 -> WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1889
diff changeset
    22
#define WIFI_PHY_H
1889
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    23
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    24
#include <stdint.h>
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    25
#include "ns3/callback.h"
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    26
#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
    27
#include "ns3/object.h"
1889
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    28
#include "ns3/nstime.h"
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    29
#include "ns3/ptr.h"
7309
ce2189c04630 Sending RadiotapHeader up the stack from YansWifiPhy::EndReceive()
Ashwin Narayan
parents: 7143
diff changeset
    30
#include "ns3/radiotap-header.h"
1902
26a57487bb49 no need for ns3 prefix
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1892
diff changeset
    31
#include "wifi-mode.h"
1920
1d4864775cf8 replace header mode with preamble mode
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1919
diff changeset
    32
#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
    33
#include "wifi-phy-standard.h"
4263
fec2f830d015 trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents: 4039
diff changeset
    34
#include "ns3/traced-callback.h"
1889
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    35
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    36
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    37
namespace ns3 {
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    38
1891
add6fb8761f3 use WifiMode rather than TransmissionMode
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1890
diff changeset
    39
class WifiChannel;
3912
4d1a61f80745 new wifi API
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3906
diff changeset
    40
class NetDevice;
1889
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    41
2684
68c643329c2b improve doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2659
diff changeset
    42
/**
68c643329c2b improve doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2659
diff changeset
    43
 * \brief receive notifications about phy events.
68c643329c2b improve doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2659
diff changeset
    44
 */
7141
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 7139
diff changeset
    45
class WifiPhyListener
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 7139
diff changeset
    46
{
1889
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    47
public:
1890
a2b30c6456c9 Phy80211 -> WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1889
diff changeset
    48
  virtual ~WifiPhyListener ();
1889
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    49
2684
68c643329c2b improve doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2659
diff changeset
    50
  /**
68c643329c2b improve doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2659
diff changeset
    51
   * \param duration the expected duration of the packet reception.
68c643329c2b improve doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2659
diff changeset
    52
   *
3905
99c9346b5d71 split interference calculation from YansWifiPhy. Move them to InterferenceHelper
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3899
diff changeset
    53
   * We have received the first bit of a packet. We decided
1889
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    54
   * that we could synchronize on this packet. It does not mean
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    55
   * we will be able to successfully receive completely the
3905
99c9346b5d71 split interference calculation from YansWifiPhy. Move them to InterferenceHelper
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3899
diff changeset
    56
   * whole packet. It means that we will report a BUSY status until
99c9346b5d71 split interference calculation from YansWifiPhy. Move them to InterferenceHelper
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3899
diff changeset
    57
   * one of the following happens:
99c9346b5d71 split interference calculation from YansWifiPhy. Move them to InterferenceHelper
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3899
diff changeset
    58
   *   - NotifyRxEndOk
99c9346b5d71 split interference calculation from YansWifiPhy. Move them to InterferenceHelper
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3899
diff changeset
    59
   *   - NotifyExEndError
99c9346b5d71 split interference calculation from YansWifiPhy. Move them to InterferenceHelper
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3899
diff changeset
    60
   *   - NotifyTxStart
1889
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    61
   */
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    62
  virtual void NotifyRxStart (Time duration) = 0;
2684
68c643329c2b improve doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2659
diff changeset
    63
  /**
3905
99c9346b5d71 split interference calculation from YansWifiPhy. Move them to InterferenceHelper
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3899
diff changeset
    64
   * We have received the last bit of a packet for which
2684
68c643329c2b improve doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2659
diff changeset
    65
   * NotifyRxStart was invoked first and, the packet has
68c643329c2b improve doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2659
diff changeset
    66
   * been successfully received.
1889
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    67
   */
7141
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 7139
diff changeset
    68
  virtual void NotifyRxEndOk (void) = 0;
2684
68c643329c2b improve doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2659
diff changeset
    69
  /**
3905
99c9346b5d71 split interference calculation from YansWifiPhy. Move them to InterferenceHelper
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3899
diff changeset
    70
   * We have received the last bit of a packet for which
2684
68c643329c2b improve doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2659
diff changeset
    71
   * NotifyRxStart was invoked first and, the packet has
68c643329c2b improve doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2659
diff changeset
    72
   * _not_ been successfully received.
68c643329c2b improve doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2659
diff changeset
    73
   */
1889
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    74
  virtual void NotifyRxEndError (void) = 0;
2684
68c643329c2b improve doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2659
diff changeset
    75
  /**
68c643329c2b improve doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2659
diff changeset
    76
   * \param duration the expected transmission duration.
68c643329c2b improve doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2659
diff changeset
    77
   *
68c643329c2b improve doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2659
diff changeset
    78
   * We are about to send the first bit of the packet.
7141
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 7139
diff changeset
    79
   * We do not send any event to notify the end of
3905
99c9346b5d71 split interference calculation from YansWifiPhy. Move them to InterferenceHelper
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3899
diff changeset
    80
   * transmission. Listeners should assume that the
99c9346b5d71 split interference calculation from YansWifiPhy. Move them to InterferenceHelper
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3899
diff changeset
    81
   * channel implicitely reverts to the idle state
99c9346b5d71 split interference calculation from YansWifiPhy. Move them to InterferenceHelper
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3899
diff changeset
    82
   * unless they have received a cca busy report.
1889
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    83
   */
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    84
  virtual void NotifyTxStart (Time duration) = 0;
4263
fec2f830d015 trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents: 4039
diff changeset
    85
2684
68c643329c2b improve doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2659
diff changeset
    86
  /**
68c643329c2b improve doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2659
diff changeset
    87
   * \param duration the expected busy duration.
68c643329c2b improve doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2659
diff changeset
    88
   *
3905
99c9346b5d71 split interference calculation from YansWifiPhy. Move them to InterferenceHelper
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3899
diff changeset
    89
   * This method does not really report a real state
99c9346b5d71 split interference calculation from YansWifiPhy. Move them to InterferenceHelper
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3899
diff changeset
    90
   * change as opposed to the other methods in this class.
99c9346b5d71 split interference calculation from YansWifiPhy. Move them to InterferenceHelper
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3899
diff changeset
    91
   * It merely reports that, unless the medium is reported
7141
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 7139
diff changeset
    92
   * busy through NotifyTxStart or NotifyRxStart/End,
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 7139
diff changeset
    93
   * it will be busy as defined by the currently selected
3905
99c9346b5d71 split interference calculation from YansWifiPhy. Move them to InterferenceHelper
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3899
diff changeset
    94
   * CCA mode.
99c9346b5d71 split interference calculation from YansWifiPhy. Move them to InterferenceHelper
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3899
diff changeset
    95
   *
99c9346b5d71 split interference calculation from YansWifiPhy. Move them to InterferenceHelper
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3899
diff changeset
    96
   * Typical client code which wants to have a clear picture
99c9346b5d71 split interference calculation from YansWifiPhy. Move them to InterferenceHelper
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3899
diff changeset
    97
   * of the CCA state will need to keep track of the time at
99c9346b5d71 split interference calculation from YansWifiPhy. Move them to InterferenceHelper
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3899
diff changeset
    98
   * which the last NotifyCcaBusyStart method is called and
99c9346b5d71 split interference calculation from YansWifiPhy. Move them to InterferenceHelper
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3899
diff changeset
    99
   * what duration it reported.
2684
68c643329c2b improve doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2659
diff changeset
   100
   */
3905
99c9346b5d71 split interference calculation from YansWifiPhy. Move them to InterferenceHelper
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3899
diff changeset
   101
  virtual void NotifyMaybeCcaBusyStart (Time duration) = 0;
5189
8fcdf87a790a Channel switching support for Wifi
Ramon Bauza
parents: 5179
diff changeset
   102
  /**
8fcdf87a790a Channel switching support for Wifi
Ramon Bauza
parents: 5179
diff changeset
   103
   * \param duration the expected channel switching duration.
8fcdf87a790a Channel switching support for Wifi
Ramon Bauza
parents: 5179
diff changeset
   104
   *
7141
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 7139
diff changeset
   105
   * We do not send any event to notify the end of
5189
8fcdf87a790a Channel switching support for Wifi
Ramon Bauza
parents: 5179
diff changeset
   106
   * channel switching. Listeners should assume that the
8fcdf87a790a Channel switching support for Wifi
Ramon Bauza
parents: 5179
diff changeset
   107
   * channel implicitely reverts to the idle or busy states.
8fcdf87a790a Channel switching support for Wifi
Ramon Bauza
parents: 5179
diff changeset
   108
   */
7141
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 7139
diff changeset
   109
  virtual void NotifySwitchingStart (Time duration) = 0;
1889
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   110
};
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   111
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   112
2057
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
   113
/**
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
   114
 * \brief 802.11 PHY layer model
7139
79dd02ed46ec doxygen wifi module grouping all wifi classes
Nicola Baldo <nbaldo@cttc.es>
parents: 6852
diff changeset
   115
 * \ingroup wifi
2057
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
   116
 *
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
   117
 */
2054
ba8e810bae4c derive WifiPhy from Object and manage it with a Ptr<>
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1988
diff changeset
   118
class WifiPhy : public Object
1889
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   119
{
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   120
public:
2057
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
   121
  /**
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
   122
   * The state of the PHY layer.
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
   123
   */
7141
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 7139
diff changeset
   124
  enum State
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 7139
diff changeset
   125
  {
2057
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
   126
    /**
5820
1c02054740eb Renaming WifiPhy state SYNC to RX to avoid confusion with "synchronizing".
Timo Bingmann <tbns@idlebox.net>
parents: 5189
diff changeset
   127
     * The PHY layer is IDLE.
2057
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
   128
     */
5820
1c02054740eb Renaming WifiPhy state SYNC to RX to avoid confusion with "synchronizing".
Timo Bingmann <tbns@idlebox.net>
parents: 5189
diff changeset
   129
    IDLE,
1c02054740eb Renaming WifiPhy state SYNC to RX to avoid confusion with "synchronizing".
Timo Bingmann <tbns@idlebox.net>
parents: 5189
diff changeset
   130
    /**
1c02054740eb Renaming WifiPhy state SYNC to RX to avoid confusion with "synchronizing".
Timo Bingmann <tbns@idlebox.net>
parents: 5189
diff changeset
   131
     * The PHY layer has sense the medium busy through the CCA mechanism
1c02054740eb Renaming WifiPhy state SYNC to RX to avoid confusion with "synchronizing".
Timo Bingmann <tbns@idlebox.net>
parents: 5189
diff changeset
   132
     */
1c02054740eb Renaming WifiPhy state SYNC to RX to avoid confusion with "synchronizing".
Timo Bingmann <tbns@idlebox.net>
parents: 5189
diff changeset
   133
    CCA_BUSY,
2057
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
   134
    /**
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
   135
     * The PHY layer is sending a packet.
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
   136
     */
2055
8899d6ef5d52 phy state logger
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2054
diff changeset
   137
    TX,
2057
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
   138
    /**
5820
1c02054740eb Renaming WifiPhy state SYNC to RX to avoid confusion with "synchronizing".
Timo Bingmann <tbns@idlebox.net>
parents: 5189
diff changeset
   139
     * The PHY layer is receiving a packet.
2057
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
   140
     */
5820
1c02054740eb Renaming WifiPhy state SYNC to RX to avoid confusion with "synchronizing".
Timo Bingmann <tbns@idlebox.net>
parents: 5189
diff changeset
   141
    RX,
5189
8fcdf87a790a Channel switching support for Wifi
Ramon Bauza
parents: 5179
diff changeset
   142
    /**
8fcdf87a790a Channel switching support for Wifi
Ramon Bauza
parents: 5179
diff changeset
   143
     * The PHY layer is switching to other channel.
8fcdf87a790a Channel switching support for Wifi
Ramon Bauza
parents: 5179
diff changeset
   144
     */
8fcdf87a790a Channel switching support for Wifi
Ramon Bauza
parents: 5179
diff changeset
   145
    SWITCHING
2055
8899d6ef5d52 phy state logger
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2054
diff changeset
   146
  };
5820
1c02054740eb Renaming WifiPhy state SYNC to RX to avoid confusion with "synchronizing".
Timo Bingmann <tbns@idlebox.net>
parents: 5189
diff changeset
   147
2057
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
   148
  /**
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
   149
   * arg1: packet received successfully
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
   150
   * arg2: snr of packet
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
   151
   * arg3: mode of packet
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
   152
   * arg4: type of preamble used for packet.
7328
141f8d6ccb03 Cleaning up code for review
Ashwin Narayan
parents: 7310
diff changeset
   153
   * arg5: RadiotapHeader of packet
2057
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
   154
   */
7309
ce2189c04630 Sending RadiotapHeader up the stack from YansWifiPhy::EndReceive()
Ashwin Narayan
parents: 7143
diff changeset
   155
  typedef Callback<void,Ptr<Packet>, double, WifiMode, enum WifiPreamble, RadiotapHeader> RxOkCallback;
2057
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
   156
  /**
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
   157
   * arg1: packet received unsuccessfully
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
   158
   * arg2: snr of packet
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
   159
   */
5820
1c02054740eb Renaming WifiPhy state SYNC to RX to avoid confusion with "synchronizing".
Timo Bingmann <tbns@idlebox.net>
parents: 5189
diff changeset
   160
  typedef Callback<void,Ptr<const Packet>, double> RxErrorCallback;
1889
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   161
2524
db72c0e7743e port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2166
diff changeset
   162
  static TypeId GetTypeId (void);
db72c0e7743e port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2166
diff changeset
   163
db72c0e7743e port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2166
diff changeset
   164
  WifiPhy ();
db72c0e7743e port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2166
diff changeset
   165
  virtual ~WifiPhy ();
db72c0e7743e port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2166
diff changeset
   166
3888
a15618dcd0eb rename WifiPhy to YansWifiPhy and add WifiPhy abstract base class.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3887
diff changeset
   167
  virtual double GetTxPowerStart (void) const = 0;
a15618dcd0eb rename WifiPhy to YansWifiPhy and add WifiPhy abstract base class.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3887
diff changeset
   168
  virtual double GetTxPowerEnd (void) const = 0;
2057
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
   169
  /**
2524
db72c0e7743e port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2166
diff changeset
   170
   * \returns the number of tx power levels available for this PHY.
2057
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
   171
   */
3888
a15618dcd0eb rename WifiPhy to YansWifiPhy and add WifiPhy abstract base class.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3887
diff changeset
   172
  virtual uint32_t GetNTxPower (void) const = 0;
1891
add6fb8761f3 use WifiMode rather than TransmissionMode
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1890
diff changeset
   173
2057
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
   174
  /**
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
   175
   * \param callback the callback to invoke
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
   176
   *        upon successful packet reception.
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
   177
   */
5820
1c02054740eb Renaming WifiPhy state SYNC to RX to avoid confusion with "synchronizing".
Timo Bingmann <tbns@idlebox.net>
parents: 5189
diff changeset
   178
  virtual void SetReceiveOkCallback (RxOkCallback callback) = 0;
2057
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
   179
  /**
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
   180
   * \param callback the callback to invoke
6273
8d70de29d514 spell check, mostly in comments.
Andrey Mazo <mazo@iitp.ru>
parents: 5820
diff changeset
   181
   *        upon erroneous packet reception.
2057
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
   182
   */
5820
1c02054740eb Renaming WifiPhy state SYNC to RX to avoid confusion with "synchronizing".
Timo Bingmann <tbns@idlebox.net>
parents: 5189
diff changeset
   183
  virtual void SetReceiveErrorCallback (RxErrorCallback callback) = 0;
1889
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   184
2057
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
   185
  /**
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
   186
   * \param packet the packet to send
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
   187
   * \param mode the transmission mode to use to send this packet
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
   188
   * \param preamble the type of preamble to use to send this packet.
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
   189
   * \param txPowerLevel a power level to use to send this packet. The real
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
   190
   *        transmission power is calculated as txPowerMin + txPowerLevel * (txPowerMax - txPowerMin) / nTxLevels
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
   191
   */
3888
a15618dcd0eb rename WifiPhy to YansWifiPhy and add WifiPhy abstract base class.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3887
diff changeset
   192
  virtual void SendPacket (Ptr<const Packet> packet, WifiMode mode, enum WifiPreamble preamble, uint8_t txPowerLevel) = 0;
1889
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   193
2057
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
   194
  /**
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
   195
   * \param listener the new listener
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
   196
   *
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
   197
   * Add the input listener to the list of objects to be notified of
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
   198
   * PHY-level events.
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
   199
   */
3888
a15618dcd0eb rename WifiPhy to YansWifiPhy and add WifiPhy abstract base class.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3887
diff changeset
   200
  virtual void RegisterListener (WifiPhyListener *listener) = 0;
1889
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   201
2057
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
   202
  /**
5820
1c02054740eb Renaming WifiPhy state SYNC to RX to avoid confusion with "synchronizing".
Timo Bingmann <tbns@idlebox.net>
parents: 5189
diff changeset
   203
   * \returns true of the current state of the PHY layer is WifiPhy::IDLE, false otherwise.
1c02054740eb Renaming WifiPhy state SYNC to RX to avoid confusion with "synchronizing".
Timo Bingmann <tbns@idlebox.net>
parents: 5189
diff changeset
   204
   */
1c02054740eb Renaming WifiPhy state SYNC to RX to avoid confusion with "synchronizing".
Timo Bingmann <tbns@idlebox.net>
parents: 5189
diff changeset
   205
  virtual bool IsStateIdle (void) = 0;
1c02054740eb Renaming WifiPhy state SYNC to RX to avoid confusion with "synchronizing".
Timo Bingmann <tbns@idlebox.net>
parents: 5189
diff changeset
   206
  /**
3890
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3888
diff changeset
   207
   * \returns true of the current state of the PHY layer is WifiPhy::CCA_BUSY, false otherwise.
2057
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
   208
   */
3888
a15618dcd0eb rename WifiPhy to YansWifiPhy and add WifiPhy abstract base class.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3887
diff changeset
   209
  virtual bool IsStateCcaBusy (void) = 0;
2057
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
   210
  /**
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
   211
   * \returns true of the current state of the PHY layer is not WifiPhy::IDLE, false otherwise.
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
   212
   */
3888
a15618dcd0eb rename WifiPhy to YansWifiPhy and add WifiPhy abstract base class.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3887
diff changeset
   213
  virtual bool IsStateBusy (void) = 0;
2057
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
   214
  /**
5820
1c02054740eb Renaming WifiPhy state SYNC to RX to avoid confusion with "synchronizing".
Timo Bingmann <tbns@idlebox.net>
parents: 5189
diff changeset
   215
   * \returns true of the current state of the PHY layer is WifiPhy::RX, false otherwise.
2057
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
   216
   */
5820
1c02054740eb Renaming WifiPhy state SYNC to RX to avoid confusion with "synchronizing".
Timo Bingmann <tbns@idlebox.net>
parents: 5189
diff changeset
   217
  virtual bool IsStateRx (void) = 0;
2057
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
   218
  /**
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
   219
   * \returns true of the current state of the PHY layer is WifiPhy::TX, false otherwise.
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
   220
   */
3888
a15618dcd0eb rename WifiPhy to YansWifiPhy and add WifiPhy abstract base class.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3887
diff changeset
   221
  virtual bool IsStateTx (void) = 0;
2057
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
   222
  /**
5820
1c02054740eb Renaming WifiPhy state SYNC to RX to avoid confusion with "synchronizing".
Timo Bingmann <tbns@idlebox.net>
parents: 5189
diff changeset
   223
   * \returns true of the current state of the PHY layer is WifiPhy::SWITCHING, false otherwise.
1c02054740eb Renaming WifiPhy state SYNC to RX to avoid confusion with "synchronizing".
Timo Bingmann <tbns@idlebox.net>
parents: 5189
diff changeset
   224
   */
1c02054740eb Renaming WifiPhy state SYNC to RX to avoid confusion with "synchronizing".
Timo Bingmann <tbns@idlebox.net>
parents: 5189
diff changeset
   225
  virtual bool IsStateSwitching (void) = 0;
1c02054740eb Renaming WifiPhy state SYNC to RX to avoid confusion with "synchronizing".
Timo Bingmann <tbns@idlebox.net>
parents: 5189
diff changeset
   226
  /**
2057
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
   227
   * \returns the amount of time since the current state has started.
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
   228
   */
3888
a15618dcd0eb rename WifiPhy to YansWifiPhy and add WifiPhy abstract base class.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3887
diff changeset
   229
  virtual Time GetStateDuration (void) = 0;
2057
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
   230
  /**
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
   231
   * \returns the predicted delay until this PHY can become WifiPhy::IDLE.
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
   232
   *
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
   233
   * The PHY will never become WifiPhy::IDLE _before_ the delay returned by
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
   234
   * this method but it could become really idle later.
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
   235
   */
3888
a15618dcd0eb rename WifiPhy to YansWifiPhy and add WifiPhy abstract base class.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3887
diff changeset
   236
  virtual Time GetDelayUntilIdle (void) = 0;
1889
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   237
3888
a15618dcd0eb rename WifiPhy to YansWifiPhy and add WifiPhy abstract base class.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3887
diff changeset
   238
  virtual Time GetLastRxStartTime (void) const = 0;
2139
a2cf93c741c3 add WifiPhy::GetLastRxStart
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2083
diff changeset
   239
2057
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
   240
  /**
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
   241
   * \param size the number of bytes in the packet to send
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
   242
   * \param payloadMode the transmission mode to use for this packet
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
   243
   * \param preamble the type of preamble to use for this packet.
7143
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   244
   * \return the total amount of time this PHY will stay busy for
2057
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
   245
   *          the transmission of these bytes.
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
   246
   */
7143
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   247
  static Time CalculateTxDuration (uint32_t size, WifiMode payloadMode, enum WifiPreamble preamble);
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   248
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   249
  /** 
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   250
   * \param payloadMode the WifiMode use for the transmission of the payload
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   251
   * \param preamble the type of preamble
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   252
   * 
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   253
   * \return the WifiMode used for the transmission of the PLCP header 
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   254
   */
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   255
  static WifiMode GetPlcpHeaderMode (WifiMode payloadMode, WifiPreamble preamble);
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   256
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   257
  /** 
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   258
   * 
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   259
   * 
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   260
   * \param payloadMode the WifiMode use for the transmission of the payload
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   261
   * \param preamble the type of preamble 
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   262
   * 
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   263
   * \return the duration of the PLCP header in microseconds
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   264
   */
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   265
  static uint32_t GetPlcpHeaderDurationMicroSeconds (WifiMode payloadMode, WifiPreamble preamble);
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   266
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   267
  /** 
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   268
   * \param payloadMode the WifiMode use for the transmission of the payload
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   269
   * \param preamble the type of preamble 
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   270
   * 
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   271
   * \return the duration of the PLCP preamble in microseconds
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   272
   */
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   273
  static uint32_t GetPlcpPreambleDurationMicroSeconds (WifiMode payloadMode, WifiPreamble preamble);
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   274
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   275
  /** 
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   276
   * \param payloadMode the WifiMode use for the transmission of the payload
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   277
   * \param preamble the type of preamble 
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   278
   * 
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   279
   * \return the duration of the payload in microseconds
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   280
   */
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   281
  static uint32_t GetPayloadDurationMicroSeconds (uint32_t size, WifiMode payloadMode);
6372
0fafd9716f44 Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   282
2057
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
   283
  /**
6372
0fafd9716f44 Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   284
   * The WifiPhy::GetNModes() and WifiPhy::GetMode() methods are used
0fafd9716f44 Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   285
   * (e.g., by a WifiRemoteStationManager) to determine the set of
0fafd9716f44 Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   286
   * transmission/reception modes that this WifiPhy(-derived class)
0fafd9716f44 Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   287
   * can support - a set of WifiMode objects which we call the
0fafd9716f44 Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   288
   * DeviceRateSet, and which is stored as WifiPhy::m_deviceRateSet.
0fafd9716f44 Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   289
   *
0fafd9716f44 Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   290
   * It is important to note that the DeviceRateSet is a superset (not
0fafd9716f44 Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   291
   * necessarily proper) of the OperationalRateSet (which is
0fafd9716f44 Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   292
   * logically, if not actually, a property of the associated
0fafd9716f44 Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   293
   * WifiRemoteStationManager), which itself is a superset (again, not
0fafd9716f44 Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   294
   * necessarily proper) of the BSSBasicRateSet.
0fafd9716f44 Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   295
   *
2057
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
   296
   * \returns the number of transmission modes supported by this PHY.
6372
0fafd9716f44 Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   297
   *
0fafd9716f44 Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   298
   * \sa WifiPhy::GetMode()
2057
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
   299
   */
3888
a15618dcd0eb rename WifiPhy to YansWifiPhy and add WifiPhy abstract base class.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3887
diff changeset
   300
  virtual uint32_t GetNModes (void) const = 0;
2057
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
   301
  /**
6372
0fafd9716f44 Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   302
   * The WifiPhy::GetNModes() and WifiPhy::GetMode() methods are used
0fafd9716f44 Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   303
   * (e.g., by a WifiRemoteStationManager) to determine the set of
0fafd9716f44 Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   304
   * transmission/reception modes that this WifiPhy(-derived class)
0fafd9716f44 Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   305
   * can support - a set of WifiMode objects which we call the
0fafd9716f44 Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   306
   * DeviceRateSet, and which is stored as WifiPhy::m_deviceRateSet.
0fafd9716f44 Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   307
   *
0fafd9716f44 Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   308
   * It is important to note that the DeviceRateSet is a superset (not
0fafd9716f44 Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   309
   * necessarily proper) of the OperationalRateSet (which is
0fafd9716f44 Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   310
   * logically, if not actually, a property of the associated
0fafd9716f44 Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   311
   * WifiRemoteStationManager), which itself is a superset (again, not
0fafd9716f44 Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   312
   * necessarily proper) of the BSSBasicRateSet.
0fafd9716f44 Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   313
   *
2057
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
   314
   * \param mode index in array of supported modes
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
   315
   * \returns the mode whose index is specified.
6372
0fafd9716f44 Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   316
   *
0fafd9716f44 Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   317
   * \sa WifiPhy::GetNModes()
2057
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
   318
   */
3888
a15618dcd0eb rename WifiPhy to YansWifiPhy and add WifiPhy abstract base class.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3887
diff changeset
   319
  virtual WifiMode GetMode (uint32_t mode) const = 0;
2057
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
   320
  /**
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
   321
   * \param txMode the transmission mode
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
   322
   * \param ber the probability of bit error rate
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
   323
   * \returns the minimum snr which is required to achieve
3912
4d1a61f80745 new wifi API
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3906
diff changeset
   324
   *          the requested ber for the specified transmission mode. (W/W)
2057
73723aad7527 dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2056
diff changeset
   325
   */
3888
a15618dcd0eb rename WifiPhy to YansWifiPhy and add WifiPhy abstract base class.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3887
diff changeset
   326
  virtual double CalculateSnr (WifiMode txMode, double ber) const = 0;
5820
1c02054740eb Renaming WifiPhy state SYNC to RX to avoid confusion with "synchronizing".
Timo Bingmann <tbns@idlebox.net>
parents: 5189
diff changeset
   327
7141
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 7139
diff changeset
   328
  /**
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 7139
diff changeset
   329
   * \brief Set channel number.
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 7139
diff changeset
   330
   *
4690
86343f7d6bfd Initial multichannel support in Yans Wifi PHY.
Pavel Boyko <boyko@iitp.ru>
parents: 4680
diff changeset
   331
   * Channel center frequency = Channel starting frequency + 5 MHz * (nch - 1)
86343f7d6bfd Initial multichannel support in Yans Wifi PHY.
Pavel Boyko <boyko@iitp.ru>
parents: 4680
diff changeset
   332
   *
86343f7d6bfd Initial multichannel support in Yans Wifi PHY.
Pavel Boyko <boyko@iitp.ru>
parents: 4680
diff changeset
   333
   * where Starting channel frequency is standard-dependent, see SetStandard()
86343f7d6bfd Initial multichannel support in Yans Wifi PHY.
Pavel Boyko <boyko@iitp.ru>
parents: 4680
diff changeset
   334
   * as defined in IEEE 802.11-2007 17.3.8.3.2.
7141
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 7139
diff changeset
   335
   */
4690
86343f7d6bfd Initial multichannel support in Yans Wifi PHY.
Pavel Boyko <boyko@iitp.ru>
parents: 4680
diff changeset
   336
  virtual void SetChannelNumber (uint16_t id) = 0;
86343f7d6bfd Initial multichannel support in Yans Wifi PHY.
Pavel Boyko <boyko@iitp.ru>
parents: 4680
diff changeset
   337
  /// Return current channel number, see SetChannelNumber()
86343f7d6bfd Initial multichannel support in Yans Wifi PHY.
Pavel Boyko <boyko@iitp.ru>
parents: 4680
diff changeset
   338
  virtual uint16_t GetChannelNumber () const = 0;
4720
15221757964f bug 641: CwMin setting for 802.11b
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 4715
diff changeset
   339
15221757964f bug 641: CwMin setting for 802.11b
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 4715
diff changeset
   340
  virtual void ConfigureStandard (enum WifiPhyStandard standard) = 0;
7141
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 7139
diff changeset
   341
3888
a15618dcd0eb rename WifiPhy to YansWifiPhy and add WifiPhy abstract base class.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3887
diff changeset
   342
  virtual Ptr<WifiChannel> GetChannel (void) const = 0;
1889
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   343
6360
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6273
diff changeset
   344
  static WifiMode GetDsssRate1Mbps ();
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6273
diff changeset
   345
  static WifiMode GetDsssRate2Mbps ();
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6273
diff changeset
   346
  static WifiMode GetDsssRate5_5Mbps ();
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6273
diff changeset
   347
  static WifiMode GetDsssRate11Mbps ();
6597
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6372
diff changeset
   348
  static WifiMode GetErpOfdmRate6Mbps ();
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6372
diff changeset
   349
  static WifiMode GetErpOfdmRate9Mbps ();
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6372
diff changeset
   350
  static WifiMode GetErpOfdmRate12Mbps ();
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6372
diff changeset
   351
  static WifiMode GetErpOfdmRate18Mbps ();
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6372
diff changeset
   352
  static WifiMode GetErpOfdmRate24Mbps ();
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6372
diff changeset
   353
  static WifiMode GetErpOfdmRate36Mbps ();
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6372
diff changeset
   354
  static WifiMode GetErpOfdmRate48Mbps ();
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6372
diff changeset
   355
  static WifiMode GetErpOfdmRate54Mbps ();
6360
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6273
diff changeset
   356
  static WifiMode GetOfdmRate6Mbps ();
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6273
diff changeset
   357
  static WifiMode GetOfdmRate9Mbps ();
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6273
diff changeset
   358
  static WifiMode GetOfdmRate12Mbps ();
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6273
diff changeset
   359
  static WifiMode GetOfdmRate18Mbps ();
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6273
diff changeset
   360
  static WifiMode GetOfdmRate24Mbps ();
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6273
diff changeset
   361
  static WifiMode GetOfdmRate36Mbps ();
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6273
diff changeset
   362
  static WifiMode GetOfdmRate48Mbps ();
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6273
diff changeset
   363
  static WifiMode GetOfdmRate54Mbps ();
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6273
diff changeset
   364
  static WifiMode GetOfdmRate3MbpsBW10MHz ();
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6273
diff changeset
   365
  static WifiMode GetOfdmRate4_5MbpsBW10MHz ();
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6273
diff changeset
   366
  static WifiMode GetOfdmRate6MbpsBW10MHz ();
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6273
diff changeset
   367
  static WifiMode GetOfdmRate9MbpsBW10MHz ();
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6273
diff changeset
   368
  static WifiMode GetOfdmRate12MbpsBW10MHz ();
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6273
diff changeset
   369
  static WifiMode GetOfdmRate18MbpsBW10MHz ();
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6273
diff changeset
   370
  static WifiMode GetOfdmRate24MbpsBW10MHz ();
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6273
diff changeset
   371
  static WifiMode GetOfdmRate27MbpsBW10MHz ();
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6273
diff changeset
   372
  static WifiMode GetOfdmRate1_5MbpsBW5MHz ();
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6273
diff changeset
   373
  static WifiMode GetOfdmRate2_25MbpsBW5MHz ();
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6273
diff changeset
   374
  static WifiMode GetOfdmRate3MbpsBW5MHz ();
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6273
diff changeset
   375
  static WifiMode GetOfdmRate4_5MbpsBW5MHz ();
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6273
diff changeset
   376
  static WifiMode GetOfdmRate6MbpsBW5MHz ();
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6273
diff changeset
   377
  static WifiMode GetOfdmRate9MbpsBW5MHz ();
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6273
diff changeset
   378
  static WifiMode GetOfdmRate12MbpsBW5MHz ();
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6273
diff changeset
   379
  static WifiMode GetOfdmRate13_5MbpsBW5MHz ();
4470
51b5c1a272d3 802.11b PHY support
Gary Pei <guangyu.pei@boeing.com>
parents: 4264
diff changeset
   380
4263
fec2f830d015 trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents: 4039
diff changeset
   381
4264
9d2e96c4e6e4 Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents: 4263
diff changeset
   382
  /**
7141
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 7139
diff changeset
   383
   * Public method used to fire a PhyTxBegin trace.  Implemented for encapsulation
4264
9d2e96c4e6e4 Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents: 4263
diff changeset
   384
   * purposes.
9d2e96c4e6e4 Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents: 4263
diff changeset
   385
   */
9d2e96c4e6e4 Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents: 4263
diff changeset
   386
  void NotifyTxBegin (Ptr<const Packet> packet);
9d2e96c4e6e4 Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents: 4263
diff changeset
   387
9d2e96c4e6e4 Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents: 4263
diff changeset
   388
  /**
7141
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 7139
diff changeset
   389
   * Public method used to fire a PhyTxEnd trace.  Implemented for encapsulation
4264
9d2e96c4e6e4 Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents: 4263
diff changeset
   390
   * purposes.
9d2e96c4e6e4 Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents: 4263
diff changeset
   391
   */
9d2e96c4e6e4 Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents: 4263
diff changeset
   392
  void NotifyTxEnd (Ptr<const Packet> packet);
9d2e96c4e6e4 Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents: 4263
diff changeset
   393
9d2e96c4e6e4 Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents: 4263
diff changeset
   394
  /**
7141
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 7139
diff changeset
   395
   * Public method used to fire a PhyTxDrop trace.  Implemented for encapsulation
4264
9d2e96c4e6e4 Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents: 4263
diff changeset
   396
   * purposes.
9d2e96c4e6e4 Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents: 4263
diff changeset
   397
   */
9d2e96c4e6e4 Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents: 4263
diff changeset
   398
  void NotifyTxDrop (Ptr<const Packet> packet);
9d2e96c4e6e4 Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents: 4263
diff changeset
   399
4263
fec2f830d015 trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents: 4039
diff changeset
   400
  /**
7141
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 7139
diff changeset
   401
   * Public method used to fire a PhyRxBegin trace.  Implemented for encapsulation
4264
9d2e96c4e6e4 Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents: 4263
diff changeset
   402
   * purposes.
9d2e96c4e6e4 Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents: 4263
diff changeset
   403
   */
9d2e96c4e6e4 Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents: 4263
diff changeset
   404
  void NotifyRxBegin (Ptr<const Packet> packet);
9d2e96c4e6e4 Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents: 4263
diff changeset
   405
9d2e96c4e6e4 Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents: 4263
diff changeset
   406
  /**
7141
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 7139
diff changeset
   407
   * Public method used to fire a PhyRxEnd trace.  Implemented for encapsulation
4264
9d2e96c4e6e4 Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents: 4263
diff changeset
   408
   * purposes.
9d2e96c4e6e4 Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents: 4263
diff changeset
   409
   */
9d2e96c4e6e4 Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents: 4263
diff changeset
   410
  void NotifyRxEnd (Ptr<const Packet> packet);
9d2e96c4e6e4 Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents: 4263
diff changeset
   411
9d2e96c4e6e4 Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents: 4263
diff changeset
   412
  /**
7141
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 7139
diff changeset
   413
   * Public method used to fire a PhyRxDrop trace.  Implemented for encapsulation
4264
9d2e96c4e6e4 Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents: 4263
diff changeset
   414
   * purposes.
9d2e96c4e6e4 Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents: 4263
diff changeset
   415
   */
9d2e96c4e6e4 Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents: 4263
diff changeset
   416
  void NotifyRxDrop (Ptr<const Packet> packet);
9d2e96c4e6e4 Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents: 4263
diff changeset
   417
7141
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 7139
diff changeset
   418
  /**
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 7139
diff changeset
   419
   *
7310
74528919caaf MonitorMacHigh changes and testing reception of RT header at Ipv4L3ClickProtocol::Receive()
Ashwin Narayan
parents: 7309
diff changeset
   420
   * Public method used to fire a MonitorSniffer trace for a wifi packet being received.  Implemented for encapsulation
4264
9d2e96c4e6e4 Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents: 4263
diff changeset
   421
   * purposes.
7141
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 7139
diff changeset
   422
   *
4492
3ebeb7bf3c15 added support for radiotap and prism headers
Nicola Baldo <nbaldo@cttc.es>
parents: 4470
diff changeset
   423
   * @param packet the packet being received
3ebeb7bf3c15 added support for radiotap and prism headers
Nicola Baldo <nbaldo@cttc.es>
parents: 4470
diff changeset
   424
   * @param channelFreqMhz the frequency in MHz at which the packet is
3ebeb7bf3c15 added support for radiotap and prism headers
Nicola Baldo <nbaldo@cttc.es>
parents: 4470
diff changeset
   425
   * received. Note that in real devices this is normally the
3ebeb7bf3c15 added support for radiotap and prism headers
Nicola Baldo <nbaldo@cttc.es>
parents: 4470
diff changeset
   426
   * frequency to which  the receiver is tuned, and this can be
3ebeb7bf3c15 added support for radiotap and prism headers
Nicola Baldo <nbaldo@cttc.es>
parents: 4470
diff changeset
   427
   * different than the frequency at which the packet was originally
3ebeb7bf3c15 added support for radiotap and prism headers
Nicola Baldo <nbaldo@cttc.es>
parents: 4470
diff changeset
   428
   * transmitted. This is because it is possible to have the receiver
3ebeb7bf3c15 added support for radiotap and prism headers
Nicola Baldo <nbaldo@cttc.es>
parents: 4470
diff changeset
   429
   * tuned on a given channel and still to be able to receive packets
3ebeb7bf3c15 added support for radiotap and prism headers
Nicola Baldo <nbaldo@cttc.es>
parents: 4470
diff changeset
   430
   * on a nearby channel.
4757
1b7c28a1c131 Fix doxygen errors
Tom Henderson <tomh@tomh.org>
parents: 4720
diff changeset
   431
   * @param channelNumber the channel on which the packet is received
4492
3ebeb7bf3c15 added support for radiotap and prism headers
Nicola Baldo <nbaldo@cttc.es>
parents: 4470
diff changeset
   432
   * @param rate the PHY data rate in units of 500kbps (i.e., the same
7141
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 7139
diff changeset
   433
   * units used both for the radiotap and for the prism header)
4645
d53223aae797 get rid of some doxygen warnings
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 4497
diff changeset
   434
   * @param isShortPreamble true if short preamble is used, false otherwise
4492
3ebeb7bf3c15 added support for radiotap and prism headers
Nicola Baldo <nbaldo@cttc.es>
parents: 4470
diff changeset
   435
   * @param signalDbm signal power in dBm
3ebeb7bf3c15 added support for radiotap and prism headers
Nicola Baldo <nbaldo@cttc.es>
parents: 4470
diff changeset
   436
   * @param noiseDbm  noise power in dBm
4264
9d2e96c4e6e4 Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents: 4263
diff changeset
   437
   */
7310
74528919caaf MonitorMacHigh changes and testing reception of RT header at Ipv4L3ClickProtocol::Receive()
Ashwin Narayan
parents: 7309
diff changeset
   438
  void NotifyMonitorSniffRx (Ptr<const Packet> packet, uint16_t channelFreqMhz, uint16_t channelNumber, uint32_t rate, bool isShortPreamble,
4497
43c7dfd72eb1 make it fit on my monitor
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 4492
diff changeset
   439
                             double signalDbm, double noiseDbm);
4492
3ebeb7bf3c15 added support for radiotap and prism headers
Nicola Baldo <nbaldo@cttc.es>
parents: 4470
diff changeset
   440
7141
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 7139
diff changeset
   441
  /**
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 7139
diff changeset
   442
   *
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 7139
diff changeset
   443
   * Public method used to fire a PromiscSniffer trace for a wifi packet being transmitted.  Implemented for encapsulation
4492
3ebeb7bf3c15 added support for radiotap and prism headers
Nicola Baldo <nbaldo@cttc.es>
parents: 4470
diff changeset
   444
   * purposes.
7141
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 7139
diff changeset
   445
   *
4757
1b7c28a1c131 Fix doxygen errors
Tom Henderson <tomh@tomh.org>
parents: 4720
diff changeset
   446
   * @param packet the packet being transmitted
4492
3ebeb7bf3c15 added support for radiotap and prism headers
Nicola Baldo <nbaldo@cttc.es>
parents: 4470
diff changeset
   447
   * @param channelFreqMhz the frequency in MHz at which the packet is
7141
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 7139
diff changeset
   448
   * transmitted.
4757
1b7c28a1c131 Fix doxygen errors
Tom Henderson <tomh@tomh.org>
parents: 4720
diff changeset
   449
   * @param channelNumber the channel on which the packet is transmitted
4492
3ebeb7bf3c15 added support for radiotap and prism headers
Nicola Baldo <nbaldo@cttc.es>
parents: 4470
diff changeset
   450
   * @param rate the PHY data rate in units of 500kbps (i.e., the same
7141
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 7139
diff changeset
   451
   * units used both for the radiotap and for the prism header)
4645
d53223aae797 get rid of some doxygen warnings
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 4497
diff changeset
   452
   * @param isShortPreamble true if short preamble is used, false otherwise
4492
3ebeb7bf3c15 added support for radiotap and prism headers
Nicola Baldo <nbaldo@cttc.es>
parents: 4470
diff changeset
   453
   */
7310
74528919caaf MonitorMacHigh changes and testing reception of RT header at Ipv4L3ClickProtocol::Receive()
Ashwin Narayan
parents: 7309
diff changeset
   454
  void NotifyMonitorSniffTx (Ptr<const Packet> packet, uint16_t channelFreqMhz, uint16_t channelNumber, uint32_t rate, bool isShortPreamble);
7141
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 7139
diff changeset
   455
4264
9d2e96c4e6e4 Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents: 4263
diff changeset
   456
9d2e96c4e6e4 Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents: 4263
diff changeset
   457
private:
9d2e96c4e6e4 Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents: 4263
diff changeset
   458
  /**
9d2e96c4e6e4 Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents: 4263
diff changeset
   459
   * The trace source fired when a packet begins the transmission process on
4263
fec2f830d015 trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents: 4039
diff changeset
   460
   * the medium.
fec2f830d015 trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents: 4039
diff changeset
   461
   *
fec2f830d015 trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents: 4039
diff changeset
   462
   * \see class CallBackTraceSource
fec2f830d015 trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents: 4039
diff changeset
   463
   */
4264
9d2e96c4e6e4 Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents: 4263
diff changeset
   464
  TracedCallback<Ptr<const Packet> > m_phyTxBeginTrace;
4263
fec2f830d015 trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents: 4039
diff changeset
   465
fec2f830d015 trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents: 4039
diff changeset
   466
  /**
fec2f830d015 trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents: 4039
diff changeset
   467
   * The trace source fired when a packet ends the transmission process on
fec2f830d015 trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents: 4039
diff changeset
   468
   * the medium.
fec2f830d015 trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents: 4039
diff changeset
   469
   *
fec2f830d015 trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents: 4039
diff changeset
   470
   * \see class CallBackTraceSource
fec2f830d015 trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents: 4039
diff changeset
   471
   */
4264
9d2e96c4e6e4 Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents: 4263
diff changeset
   472
  TracedCallback<Ptr<const Packet> > m_phyTxEndTrace;
4263
fec2f830d015 trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents: 4039
diff changeset
   473
fec2f830d015 trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents: 4039
diff changeset
   474
  /**
fec2f830d015 trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents: 4039
diff changeset
   475
   * The trace source fired when the phy layer drops a packet as it tries
fec2f830d015 trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents: 4039
diff changeset
   476
   * to transmit it.
fec2f830d015 trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents: 4039
diff changeset
   477
   *
fec2f830d015 trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents: 4039
diff changeset
   478
   * \see class CallBackTraceSource
fec2f830d015 trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents: 4039
diff changeset
   479
   */
fec2f830d015 trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents: 4039
diff changeset
   480
  TracedCallback<Ptr<const Packet> > m_phyTxDropTrace;
fec2f830d015 trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents: 4039
diff changeset
   481
fec2f830d015 trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents: 4039
diff changeset
   482
  /**
4264
9d2e96c4e6e4 Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents: 4263
diff changeset
   483
   * The trace source fired when a packet begins the reception process from
4263
fec2f830d015 trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents: 4039
diff changeset
   484
   * the medium.
fec2f830d015 trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents: 4039
diff changeset
   485
   *
fec2f830d015 trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents: 4039
diff changeset
   486
   * \see class CallBackTraceSource
fec2f830d015 trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents: 4039
diff changeset
   487
   */
4264
9d2e96c4e6e4 Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents: 4263
diff changeset
   488
  TracedCallback<Ptr<const Packet> > m_phyRxBeginTrace;
4263
fec2f830d015 trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents: 4039
diff changeset
   489
fec2f830d015 trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents: 4039
diff changeset
   490
  /**
fec2f830d015 trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents: 4039
diff changeset
   491
   * The trace source fired when a packet ends the reception process from
fec2f830d015 trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents: 4039
diff changeset
   492
   * the medium.
fec2f830d015 trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents: 4039
diff changeset
   493
   *
fec2f830d015 trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents: 4039
diff changeset
   494
   * \see class CallBackTraceSource
fec2f830d015 trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents: 4039
diff changeset
   495
   */
4264
9d2e96c4e6e4 Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents: 4263
diff changeset
   496
  TracedCallback<Ptr<const Packet> > m_phyRxEndTrace;
4263
fec2f830d015 trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents: 4039
diff changeset
   497
fec2f830d015 trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents: 4039
diff changeset
   498
  /**
fec2f830d015 trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents: 4039
diff changeset
   499
   * The trace source fired when the phy layer drops a packet it has received.
fec2f830d015 trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents: 4039
diff changeset
   500
   *
fec2f830d015 trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents: 4039
diff changeset
   501
   * \see class CallBackTraceSource
fec2f830d015 trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents: 4039
diff changeset
   502
   */
fec2f830d015 trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents: 4039
diff changeset
   503
  TracedCallback<Ptr<const Packet> > m_phyRxDropTrace;
fec2f830d015 trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents: 4039
diff changeset
   504
fec2f830d015 trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents: 4039
diff changeset
   505
  /**
4492
3ebeb7bf3c15 added support for radiotap and prism headers
Nicola Baldo <nbaldo@cttc.es>
parents: 4470
diff changeset
   506
   * A trace source that emulates a wifi device in monitor mode
7141
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 7139
diff changeset
   507
   * sniffing a packet being received.
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 7139
diff changeset
   508
   *
4492
3ebeb7bf3c15 added support for radiotap and prism headers
Nicola Baldo <nbaldo@cttc.es>
parents: 4470
diff changeset
   509
   * As a reference with the real world, firing this trace
3ebeb7bf3c15 added support for radiotap and prism headers
Nicola Baldo <nbaldo@cttc.es>
parents: 4470
diff changeset
   510
   * corresponds in the madwifi driver to calling the function
3ebeb7bf3c15 added support for radiotap and prism headers
Nicola Baldo <nbaldo@cttc.es>
parents: 4470
diff changeset
   511
   * ieee80211_input_monitor()
4263
fec2f830d015 trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents: 4039
diff changeset
   512
   *
fec2f830d015 trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents: 4039
diff changeset
   513
   * \see class CallBackTraceSource
fec2f830d015 trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents: 4039
diff changeset
   514
   */
7310
74528919caaf MonitorMacHigh changes and testing reception of RT header at Ipv4L3ClickProtocol::Receive()
Ashwin Narayan
parents: 7309
diff changeset
   515
  TracedCallback<Ptr<const Packet>, uint16_t, uint16_t, uint32_t, bool, double, double> m_phyMonitorSniffRxTrace;
4492
3ebeb7bf3c15 added support for radiotap and prism headers
Nicola Baldo <nbaldo@cttc.es>
parents: 4470
diff changeset
   516
3ebeb7bf3c15 added support for radiotap and prism headers
Nicola Baldo <nbaldo@cttc.es>
parents: 4470
diff changeset
   517
  /**
3ebeb7bf3c15 added support for radiotap and prism headers
Nicola Baldo <nbaldo@cttc.es>
parents: 4470
diff changeset
   518
   * A trace source that emulates a wifi device in monitor mode
7141
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 7139
diff changeset
   519
   * sniffing a packet being transmitted.
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 7139
diff changeset
   520
   *
4492
3ebeb7bf3c15 added support for radiotap and prism headers
Nicola Baldo <nbaldo@cttc.es>
parents: 4470
diff changeset
   521
   * As a reference with the real world, firing this trace
3ebeb7bf3c15 added support for radiotap and prism headers
Nicola Baldo <nbaldo@cttc.es>
parents: 4470
diff changeset
   522
   * corresponds in the madwifi driver to calling the function
3ebeb7bf3c15 added support for radiotap and prism headers
Nicola Baldo <nbaldo@cttc.es>
parents: 4470
diff changeset
   523
   * ieee80211_input_monitor()
3ebeb7bf3c15 added support for radiotap and prism headers
Nicola Baldo <nbaldo@cttc.es>
parents: 4470
diff changeset
   524
   *
3ebeb7bf3c15 added support for radiotap and prism headers
Nicola Baldo <nbaldo@cttc.es>
parents: 4470
diff changeset
   525
   * \see class CallBackTraceSource
3ebeb7bf3c15 added support for radiotap and prism headers
Nicola Baldo <nbaldo@cttc.es>
parents: 4470
diff changeset
   526
   */
7310
74528919caaf MonitorMacHigh changes and testing reception of RT header at Ipv4L3ClickProtocol::Receive()
Ashwin Narayan
parents: 7309
diff changeset
   527
  TracedCallback<Ptr<const Packet>, uint16_t, uint16_t, uint32_t, bool> m_phyMonitorSniffTxTrace;
4492
3ebeb7bf3c15 added support for radiotap and prism headers
Nicola Baldo <nbaldo@cttc.es>
parents: 4470
diff changeset
   528
1889
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   529
};
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   530
5820
1c02054740eb Renaming WifiPhy state SYNC to RX to avoid confusion with "synchronizing".
Timo Bingmann <tbns@idlebox.net>
parents: 5189
diff changeset
   531
/**
1c02054740eb Renaming WifiPhy state SYNC to RX to avoid confusion with "synchronizing".
Timo Bingmann <tbns@idlebox.net>
parents: 5189
diff changeset
   532
 * \param os          output stream
1c02054740eb Renaming WifiPhy state SYNC to RX to avoid confusion with "synchronizing".
Timo Bingmann <tbns@idlebox.net>
parents: 5189
diff changeset
   533
 * \param state       wifi state to stringify
1c02054740eb Renaming WifiPhy state SYNC to RX to avoid confusion with "synchronizing".
Timo Bingmann <tbns@idlebox.net>
parents: 5189
diff changeset
   534
 */
1c02054740eb Renaming WifiPhy state SYNC to RX to avoid confusion with "synchronizing".
Timo Bingmann <tbns@idlebox.net>
parents: 5189
diff changeset
   535
std::ostream& operator<< (std::ostream& os, enum WifiPhy::State state);
1c02054740eb Renaming WifiPhy state SYNC to RX to avoid confusion with "synchronizing".
Timo Bingmann <tbns@idlebox.net>
parents: 5189
diff changeset
   536
1977
4303409f3d8e remove uneeded trailing ';'
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1964
diff changeset
   537
} // namespace ns3
1889
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   538
1890
a2b30c6456c9 Phy80211 -> WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1889
diff changeset
   539
#endif /* WIFI_PHY_H */