src/devices/wifi/mac-stations.h
author Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
Thu, 18 Oct 2007 13:37:22 +0200
changeset 2003 335dc094e52a
parent 1982 bafca3fcd557
child 2268 0e57ac711220
permissions -rw-r--r--
support BRAND_NEW station in adhoc code. initialize the supported rates.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1893
d72388b06b22 add MacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     1
/* -*-  Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
d72388b06b22 add MacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     2
/*
1912
028e1945d5b2 fix copyright statement
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1911
diff changeset
     3
 * Copyright (c) 2005,2006,2007 INRIA
1893
d72388b06b22 add MacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     4
 *
d72388b06b22 add MacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     5
 * This program is free software; you can redistribute it and/or modify
d72388b06b22 add MacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     6
 * it under the terms of the GNU General Public License version 2 as 
d72388b06b22 add MacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     7
 * published by the Free Software Foundation;
d72388b06b22 add MacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     8
 *
d72388b06b22 add MacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     9
 * This program is distributed in the hope that it will be useful,
d72388b06b22 add MacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
d72388b06b22 add MacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
d72388b06b22 add MacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    12
 * GNU General Public License for more details.
d72388b06b22 add MacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    13
 *
d72388b06b22 add MacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    14
 * You should have received a copy of the GNU General Public License
d72388b06b22 add MacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    15
 * along with this program; if not, write to the Free Software
d72388b06b22 add MacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    16
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
d72388b06b22 add MacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    17
 *
d72388b06b22 add MacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    18
 * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
d72388b06b22 add MacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    19
 */
d72388b06b22 add MacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    20
#ifndef MAC_STATIONS_H
d72388b06b22 add MacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    21
#define MAC_STATIONS_H
d72388b06b22 add MacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    22
1930
ec22299cf6bb rework MacStations to handle correctly Supported vs Basic rate sets and add IdealMacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1913
diff changeset
    23
#include <vector>
1893
d72388b06b22 add MacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    24
#include <utility>
d72388b06b22 add MacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    25
#include "ns3/mac48-address.h"
1911
e24ae66c6918 use WifiMode rather than mode indexes in MacStations API.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1908
diff changeset
    26
#include "wifi-mode.h"
1893
d72388b06b22 add MacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    27
d72388b06b22 add MacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    28
namespace ns3 {
d72388b06b22 add MacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    29
d72388b06b22 add MacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    30
class MacStation;
1982
bafca3fcd557 specify real type
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1935
diff changeset
    31
class NonUnicastMacStation;
1893
d72388b06b22 add MacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    32
1930
ec22299cf6bb rework MacStations to handle correctly Supported vs Basic rate sets and add IdealMacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1913
diff changeset
    33
class MacStations 
ec22299cf6bb rework MacStations to handle correctly Supported vs Basic rate sets and add IdealMacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1913
diff changeset
    34
{
ec22299cf6bb rework MacStations to handle correctly Supported vs Basic rate sets and add IdealMacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1913
diff changeset
    35
private:
ec22299cf6bb rework MacStations to handle correctly Supported vs Basic rate sets and add IdealMacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1913
diff changeset
    36
  typedef std::vector<WifiMode> BasicModes;
1893
d72388b06b22 add MacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    37
public:
1930
ec22299cf6bb rework MacStations to handle correctly Supported vs Basic rate sets and add IdealMacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1913
diff changeset
    38
  typedef BasicModes::const_iterator BasicModesIterator;
ec22299cf6bb rework MacStations to handle correctly Supported vs Basic rate sets and add IdealMacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1913
diff changeset
    39
1911
e24ae66c6918 use WifiMode rather than mode indexes in MacStations API.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1908
diff changeset
    40
  MacStations (WifiMode defaultTxMode);
1893
d72388b06b22 add MacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    41
  virtual ~MacStations ();
d72388b06b22 add MacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    42
  
1930
ec22299cf6bb rework MacStations to handle correctly Supported vs Basic rate sets and add IdealMacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1913
diff changeset
    43
  // Invoked in a STA upon dis-association
ec22299cf6bb rework MacStations to handle correctly Supported vs Basic rate sets and add IdealMacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1913
diff changeset
    44
  // or in an AP upon reboot
ec22299cf6bb rework MacStations to handle correctly Supported vs Basic rate sets and add IdealMacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1913
diff changeset
    45
  void Reset (void);
ec22299cf6bb rework MacStations to handle correctly Supported vs Basic rate sets and add IdealMacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1913
diff changeset
    46
  // Invoked in a STA upon association to store
ec22299cf6bb rework MacStations to handle correctly Supported vs Basic rate sets and add IdealMacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1913
diff changeset
    47
  // the set of rates which belong to the 
ec22299cf6bb rework MacStations to handle correctly Supported vs Basic rate sets and add IdealMacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1913
diff changeset
    48
  // BSSBasicRateSet of the associated AP
ec22299cf6bb rework MacStations to handle correctly Supported vs Basic rate sets and add IdealMacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1913
diff changeset
    49
  // and which are supported locally.
ec22299cf6bb rework MacStations to handle correctly Supported vs Basic rate sets and add IdealMacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1913
diff changeset
    50
  // Invoked in an AP to configure the BSSBasicRateSet
ec22299cf6bb rework MacStations to handle correctly Supported vs Basic rate sets and add IdealMacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1913
diff changeset
    51
  void AddBasicMode (WifiMode mode);
ec22299cf6bb rework MacStations to handle correctly Supported vs Basic rate sets and add IdealMacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1913
diff changeset
    52
ec22299cf6bb rework MacStations to handle correctly Supported vs Basic rate sets and add IdealMacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1913
diff changeset
    53
  WifiMode GetDefaultMode (void) const;
ec22299cf6bb rework MacStations to handle correctly Supported vs Basic rate sets and add IdealMacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1913
diff changeset
    54
  uint32_t GetNBasicModes (void) const;
ec22299cf6bb rework MacStations to handle correctly Supported vs Basic rate sets and add IdealMacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1913
diff changeset
    55
  WifiMode GetBasicMode (uint32_t i) const;
ec22299cf6bb rework MacStations to handle correctly Supported vs Basic rate sets and add IdealMacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1913
diff changeset
    56
  BasicModesIterator BeginBasicModes (void) const;
ec22299cf6bb rework MacStations to handle correctly Supported vs Basic rate sets and add IdealMacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1913
diff changeset
    57
  BasicModesIterator EndBasicModes (void) const;
ec22299cf6bb rework MacStations to handle correctly Supported vs Basic rate sets and add IdealMacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1913
diff changeset
    58
1893
d72388b06b22 add MacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    59
  MacStation *Lookup (Mac48Address address);
1908
af48a02fe9a2 add MacStations::LookupNonUnicast
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1906
diff changeset
    60
  MacStation *LookupNonUnicast (void);
1893
d72388b06b22 add MacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    61
private:
1930
ec22299cf6bb rework MacStations to handle correctly Supported vs Basic rate sets and add IdealMacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1913
diff changeset
    62
  typedef std::vector <std::pair<Mac48Address, MacStation *> > Stations;
ec22299cf6bb rework MacStations to handle correctly Supported vs Basic rate sets and add IdealMacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1913
diff changeset
    63
  virtual class MacStation *CreateStation (void) = 0;
1893
d72388b06b22 add MacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    64
  Stations m_stations;
1930
ec22299cf6bb rework MacStations to handle correctly Supported vs Basic rate sets and add IdealMacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1913
diff changeset
    65
  WifiMode m_defaultTxMode;
1982
bafca3fcd557 specify real type
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1935
diff changeset
    66
  NonUnicastMacStation *m_nonUnicast;
1930
ec22299cf6bb rework MacStations to handle correctly Supported vs Basic rate sets and add IdealMacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1913
diff changeset
    67
  BasicModes m_basicModes;
1893
d72388b06b22 add MacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    68
};
d72388b06b22 add MacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    69
1906
c0901f40bd7e move mac-station code in mac-stations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1893
diff changeset
    70
} // namespace ns3
c0901f40bd7e move mac-station code in mac-stations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1893
diff changeset
    71
c0901f40bd7e move mac-station code in mac-stations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1893
diff changeset
    72
namespace ns3 {
c0901f40bd7e move mac-station code in mac-stations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1893
diff changeset
    73
c0901f40bd7e move mac-station code in mac-stations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1893
diff changeset
    74
class MacStation {
c0901f40bd7e move mac-station code in mac-stations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1893
diff changeset
    75
public:
1930
ec22299cf6bb rework MacStations to handle correctly Supported vs Basic rate sets and add IdealMacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1913
diff changeset
    76
  MacStation ();
1911
e24ae66c6918 use WifiMode rather than mode indexes in MacStations API.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1908
diff changeset
    77
  virtual ~MacStation ();
1906
c0901f40bd7e move mac-station code in mac-stations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1893
diff changeset
    78
1930
ec22299cf6bb rework MacStations to handle correctly Supported vs Basic rate sets and add IdealMacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1913
diff changeset
    79
  // Invoked in an AP upon disassociation of a
ec22299cf6bb rework MacStations to handle correctly Supported vs Basic rate sets and add IdealMacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1913
diff changeset
    80
  // specific STA.
ec22299cf6bb rework MacStations to handle correctly Supported vs Basic rate sets and add IdealMacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1913
diff changeset
    81
  void Reset (void);
ec22299cf6bb rework MacStations to handle correctly Supported vs Basic rate sets and add IdealMacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1913
diff changeset
    82
  // Invoked in a STA or AP to store the set of 
ec22299cf6bb rework MacStations to handle correctly Supported vs Basic rate sets and add IdealMacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1913
diff changeset
    83
  // modes supported by a destination which is
ec22299cf6bb rework MacStations to handle correctly Supported vs Basic rate sets and add IdealMacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1913
diff changeset
    84
  // also supported locally.
ec22299cf6bb rework MacStations to handle correctly Supported vs Basic rate sets and add IdealMacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1913
diff changeset
    85
  // The set of supported modes includes
ec22299cf6bb rework MacStations to handle correctly Supported vs Basic rate sets and add IdealMacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1913
diff changeset
    86
  // the BSSBasicRateSet.
ec22299cf6bb rework MacStations to handle correctly Supported vs Basic rate sets and add IdealMacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1913
diff changeset
    87
  void AddSupportedMode (WifiMode mode);
1906
c0901f40bd7e move mac-station code in mac-stations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1893
diff changeset
    88
2003
335dc094e52a support BRAND_NEW station in adhoc code. initialize the supported rates.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1982
diff changeset
    89
  bool IsBrandNew (void) const;
1906
c0901f40bd7e move mac-station code in mac-stations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1893
diff changeset
    90
  bool IsAssociated (void) const;
c0901f40bd7e move mac-station code in mac-stations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1893
diff changeset
    91
  bool IsWaitAssocTxOk (void) const;
c0901f40bd7e move mac-station code in mac-stations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1893
diff changeset
    92
  void RecordWaitAssocTxOk (void);
c0901f40bd7e move mac-station code in mac-stations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1893
diff changeset
    93
  void RecordGotAssocTxOk (void);
c0901f40bd7e move mac-station code in mac-stations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1893
diff changeset
    94
  void RecordGotAssocTxFailed (void);
c0901f40bd7e move mac-station code in mac-stations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1893
diff changeset
    95
  void RecordDisassociated (void);
1893
d72388b06b22 add MacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    96
1906
c0901f40bd7e move mac-station code in mac-stations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1893
diff changeset
    97
  // reception-related method
1911
e24ae66c6918 use WifiMode rather than mode indexes in MacStations API.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1908
diff changeset
    98
  virtual void ReportRxOk (double rxSnr, WifiMode txMode) = 0;
1906
c0901f40bd7e move mac-station code in mac-stations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1893
diff changeset
    99
c0901f40bd7e move mac-station code in mac-stations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1893
diff changeset
   100
  // transmission-related methods
c0901f40bd7e move mac-station code in mac-stations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1893
diff changeset
   101
  virtual void ReportRtsFailed (void) = 0;
c0901f40bd7e move mac-station code in mac-stations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1893
diff changeset
   102
  virtual void ReportDataFailed (void) = 0;
1911
e24ae66c6918 use WifiMode rather than mode indexes in MacStations API.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1908
diff changeset
   103
  virtual void ReportRtsOk (double ctsSnr, WifiMode ctsMode, double rtsSnr) = 0;
e24ae66c6918 use WifiMode rather than mode indexes in MacStations API.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1908
diff changeset
   104
  virtual void ReportDataOk (double ackSnr, WifiMode ackMode, double dataSnr) = 0;
e24ae66c6918 use WifiMode rather than mode indexes in MacStations API.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1908
diff changeset
   105
  virtual WifiMode GetDataMode (uint32_t size) = 0;
e24ae66c6918 use WifiMode rather than mode indexes in MacStations API.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1908
diff changeset
   106
  virtual WifiMode GetRtsMode (void) = 0;
e24ae66c6918 use WifiMode rather than mode indexes in MacStations API.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1908
diff changeset
   107
e24ae66c6918 use WifiMode rather than mode indexes in MacStations API.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1908
diff changeset
   108
  WifiMode GetCtsMode (WifiMode rtsMode);
e24ae66c6918 use WifiMode rather than mode indexes in MacStations API.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1908
diff changeset
   109
  WifiMode GetAckMode (WifiMode dataMode);
1906
c0901f40bd7e move mac-station code in mac-stations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1893
diff changeset
   110
c0901f40bd7e move mac-station code in mac-stations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1893
diff changeset
   111
private:
1930
ec22299cf6bb rework MacStations to handle correctly Supported vs Basic rate sets and add IdealMacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1913
diff changeset
   112
  typedef std::vector<WifiMode> SupportedModes;
ec22299cf6bb rework MacStations to handle correctly Supported vs Basic rate sets and add IdealMacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1913
diff changeset
   113
  virtual MacStations *GetStations (void) const = 0;
1911
e24ae66c6918 use WifiMode rather than mode indexes in MacStations API.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1908
diff changeset
   114
protected:
1930
ec22299cf6bb rework MacStations to handle correctly Supported vs Basic rate sets and add IdealMacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1913
diff changeset
   115
  uint32_t GetNSupportedModes (void) const;
ec22299cf6bb rework MacStations to handle correctly Supported vs Basic rate sets and add IdealMacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1913
diff changeset
   116
  WifiMode GetSupportedMode (uint32_t i) const;
1911
e24ae66c6918 use WifiMode rather than mode indexes in MacStations API.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1908
diff changeset
   117
private:
e24ae66c6918 use WifiMode rather than mode indexes in MacStations API.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1908
diff changeset
   118
  bool IsIn (WifiMode mode) const;
e24ae66c6918 use WifiMode rather than mode indexes in MacStations API.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1908
diff changeset
   119
  WifiMode GetControlAnswerMode (WifiMode reqMode);
1906
c0901f40bd7e move mac-station code in mac-stations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1893
diff changeset
   120
  enum {
2003
335dc094e52a support BRAND_NEW station in adhoc code. initialize the supported rates.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1982
diff changeset
   121
    BRAND_NEW,
1906
c0901f40bd7e move mac-station code in mac-stations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1893
diff changeset
   122
    DISASSOC,
c0901f40bd7e move mac-station code in mac-stations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1893
diff changeset
   123
    WAIT_ASSOC_TX_OK,
c0901f40bd7e move mac-station code in mac-stations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1893
diff changeset
   124
    GOT_ASSOC_TX_OK
c0901f40bd7e move mac-station code in mac-stations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1893
diff changeset
   125
  } m_state;
1930
ec22299cf6bb rework MacStations to handle correctly Supported vs Basic rate sets and add IdealMacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1913
diff changeset
   126
  SupportedModes m_modes;
1906
c0901f40bd7e move mac-station code in mac-stations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1893
diff changeset
   127
};
c0901f40bd7e move mac-station code in mac-stations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1893
diff changeset
   128
c0901f40bd7e move mac-station code in mac-stations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1893
diff changeset
   129
} // namespace ns3 
1893
d72388b06b22 add MacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   130
d72388b06b22 add MacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   131
#endif /* MAC_STATIONS_H */