src/devices/wifi/rraa-wifi-manager.cc
author Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
Fri, 17 Apr 2009 13:45:25 +0200
changeset 4350 04bbe6fbdf3a
parent 4210 da9be6abb1b2
permissions -rw-r--r--
register a correct TypeId
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2351
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
     1
/* -*-  Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
     2
/*
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
     3
 * Copyright (c) 2004,2005,2006 INRIA
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
     4
 *
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
     5
 * This program is free software; you can redistribute it and/or modify
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
     6
 * it under the terms of the GNU General Public License version 2 as 
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
     7
 * published by the Free Software Foundation;
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
     8
 *
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
     9
 * This program is distributed in the hope that it will be useful,
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
    10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
    11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
    12
 * GNU General Public License for more details.
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
    13
 *
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
    14
 * You should have received a copy of the GNU General Public License
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
    15
 * along with this program; if not, write to the Free Software
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
    16
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
    17
 *
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
    18
 * Author: Federico Maguolo <maguolof@dei.unipd.it>
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
    19
 */
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
    20
2544
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
    21
#include "rraa-wifi-manager.h"
2351
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
    22
#include "ns3/assert.h"
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
    23
#include "ns3/log.h"
2544
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
    24
#include "ns3/boolean.h"
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
    25
#include "ns3/double.h"
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
    26
#include "ns3/uinteger.h"
2351
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
    27
#include "ns3/simulator.h"
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
    28
2544
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
    29
NS_LOG_COMPONENT_DEFINE ("RraaWifiManager");
2351
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
    30
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
    31
namespace ns3 {
4350
04bbe6fbdf3a register a correct TypeId
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 4210
diff changeset
    32
04bbe6fbdf3a register a correct TypeId
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 4210
diff changeset
    33
NS_OBJECT_ENSURE_REGISTERED(RraaWifiManager);
2351
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
    34
  
2544
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
    35
RraaWifiRemoteStation::RraaWifiRemoteStation (Ptr<RraaWifiManager> stations)
2351
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
    36
  : m_stations (stations)
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
    37
{
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
    38
  m_initialized = false;
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
    39
  m_rtsWnd = 0;
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
    40
  m_rtsCounter = 0;
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
    41
  m_rtsOn = false;
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
    42
  m_lastFrameFail = false;
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
    43
}
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
    44
2544
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
    45
RraaWifiRemoteStation::~RraaWifiRemoteStation ()
2351
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
    46
{}
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
    47
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
    48
void
2544
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
    49
RraaWifiRemoteStation::ResetCountersBasic (void)
2351
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
    50
{
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
    51
  if (!m_initialized) {
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
    52
    m_rate = GetMaxRate ();
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
    53
    m_initialized = true;
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
    54
  }
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
    55
  m_failed = 0;
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
    56
  m_counter = GetThresholds (m_rate).ewnd;
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
    57
  m_lastReset = Simulator::Now ();
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
    58
}
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
    59
2544
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
    60
Ptr<WifiRemoteStationManager>
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
    61
RraaWifiRemoteStation::GetManager (void) const
2351
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
    62
{
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
    63
  return m_stations;
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
    64
}
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
    65
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
    66
uint32_t
2544
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
    67
RraaWifiRemoteStation::GetMaxRate (void)
2351
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
    68
{
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
    69
  return GetNSupportedModes () - 1;
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
    70
}
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
    71
uint32_t
2544
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
    72
RraaWifiRemoteStation::GetMinRate (void)
2351
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
    73
{
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
    74
  return 0;
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
    75
}
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
    76
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
    77
ThresholdsItem
2544
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
    78
RraaWifiRemoteStation::GetThresholds (uint32_t rate) 
2351
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
    79
{
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
    80
  WifiMode mode = GetSupportedMode (rate);
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
    81
  return m_stations->GetThresholds (mode);
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
    82
}
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
    83
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
    84
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
    85
void 
2784
49006cbbfac7 GetMaxSsrc -> NeedRtsTransmission and GetMaxSlrc -> NeedDataRetransmission
Federico Maguolo <maguolof@dei.unipd.it>
parents: 2544
diff changeset
    86
RraaWifiRemoteStation::DoReportRtsFailed (void)
2351
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
    87
{}
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
    88
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
    89
void 
2784
49006cbbfac7 GetMaxSsrc -> NeedRtsTransmission and GetMaxSlrc -> NeedDataRetransmission
Federico Maguolo <maguolof@dei.unipd.it>
parents: 2544
diff changeset
    90
RraaWifiRemoteStation::DoReportDataFailed (void)
2351
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
    91
{
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
    92
  m_lastFrameFail = true;
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
    93
  CheckTimeout ();
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
    94
  m_counter--;
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
    95
  m_failed++;
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
    96
  RunBasicAlgorithm ();
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
    97
}
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
    98
void 
2784
49006cbbfac7 GetMaxSsrc -> NeedRtsTransmission and GetMaxSlrc -> NeedDataRetransmission
Federico Maguolo <maguolof@dei.unipd.it>
parents: 2544
diff changeset
    99
RraaWifiRemoteStation::DoReportRxOk (double rxSnr, WifiMode txMode)
2351
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   100
{}
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   101
void 
2784
49006cbbfac7 GetMaxSsrc -> NeedRtsTransmission and GetMaxSlrc -> NeedDataRetransmission
Federico Maguolo <maguolof@dei.unipd.it>
parents: 2544
diff changeset
   102
RraaWifiRemoteStation::DoReportRtsOk (double ctsSnr, WifiMode ctsMode, double rtsSnr)
2351
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   103
{
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   104
  NS_LOG_DEBUG ("self="<<this<<" rts ok");
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   105
}
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   106
void 
2784
49006cbbfac7 GetMaxSsrc -> NeedRtsTransmission and GetMaxSlrc -> NeedDataRetransmission
Federico Maguolo <maguolof@dei.unipd.it>
parents: 2544
diff changeset
   107
RraaWifiRemoteStation::DoReportDataOk (double ackSnr, WifiMode ackMode, double dataSnr)
2351
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   108
{
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   109
  m_lastFrameFail = false;
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   110
  CheckTimeout ();
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   111
  m_counter--;
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   112
  RunBasicAlgorithm ();
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   113
}
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   114
void 
2784
49006cbbfac7 GetMaxSsrc -> NeedRtsTransmission and GetMaxSlrc -> NeedDataRetransmission
Federico Maguolo <maguolof@dei.unipd.it>
parents: 2544
diff changeset
   115
RraaWifiRemoteStation::DoReportFinalRtsFailed (void)
2351
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   116
{}
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   117
void 
2784
49006cbbfac7 GetMaxSsrc -> NeedRtsTransmission and GetMaxSlrc -> NeedDataRetransmission
Federico Maguolo <maguolof@dei.unipd.it>
parents: 2544
diff changeset
   118
RraaWifiRemoteStation::DoReportFinalDataFailed (void)
2351
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   119
{}
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   120
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   121
WifiMode
2544
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   122
RraaWifiRemoteStation::DoGetDataMode (uint32_t size)
2351
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   123
{
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   124
  if (!m_initialized)
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   125
    ResetCountersBasic ();
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   126
  return GetSupportedMode (m_rate);
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   127
}
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   128
WifiMode
2544
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   129
RraaWifiRemoteStation::DoGetRtsMode (void)
2351
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   130
{
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   131
  return GetSupportedMode (0);
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   132
}
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   133
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   134
bool
2544
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   135
RraaWifiRemoteStation::NeedRts (Ptr<const Packet> packet)
2351
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   136
{
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   137
  if (m_stations->OnlyBasic ())
2544
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   138
    return WifiRemoteStation::NeedRts (packet);
2351
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   139
  ARts ();
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   140
  return m_rtsOn;
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   141
}
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   142
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   143
void
2544
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   144
RraaWifiRemoteStation::CheckTimeout (void)
2351
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   145
{
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   146
  Time d = Simulator::Now () - m_lastReset;
2544
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   147
  if (m_counter == 0 || d > m_stations->GetTimeout ()) {
2351
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   148
    ResetCountersBasic ();
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   149
  }
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   150
}
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   151
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   152
void
2544
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   153
RraaWifiRemoteStation::RunBasicAlgorithm (void)
2351
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   154
{
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   155
  ThresholdsItem thresholds = GetThresholds (m_rate);
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   156
  double ploss = (double) m_failed / (double) thresholds.ewnd;
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   157
  if (m_counter == 0 || ploss > thresholds.pmtl) {
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   158
    if (m_rate > GetMinRate () && ploss > thresholds.pmtl) {
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   159
      m_rate--;
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   160
    }
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   161
    else if (m_rate < GetMaxRate () && ploss < thresholds.pori) {
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   162
      m_rate++;
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   163
    }
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   164
    ResetCountersBasic ();
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   165
  }
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   166
}
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   167
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   168
void
2544
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   169
RraaWifiRemoteStation::ARts (void)
2351
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   170
{
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   171
  if (!m_rtsOn && m_lastFrameFail) {
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   172
    m_rtsWnd++;
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   173
    m_rtsCounter = m_rtsWnd;
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   174
  }
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   175
  else if ((m_rtsOn && m_lastFrameFail) || 
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   176
           (!m_rtsOn && !m_lastFrameFail)) {
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   177
    m_rtsWnd = m_rtsWnd / 2;
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   178
    m_rtsCounter = m_rtsWnd;
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   179
  }
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   180
  if (m_rtsCounter > 0) {
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   181
    m_rtsOn = true;
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   182
    m_rtsCounter--;
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   183
  }
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   184
  else {
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   185
    m_rtsOn = false;
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   186
  }
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   187
}
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   188
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   189
2544
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   190
TypeId 
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   191
RraaWifiManager::GetTypeId (void)
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   192
{
4350
04bbe6fbdf3a register a correct TypeId
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 4210
diff changeset
   193
  static TypeId tid = TypeId ("ns3::RraaWifiManager")
2544
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   194
    .SetParent<WifiRemoteStationManager> ()
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   195
    .AddConstructor<RraaWifiManager> ()
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   196
    .AddAttribute ("Basic",
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   197
                   "If true the RRAA-BASIC algorithm will be used, otherwise the RRAA wil be used",
2965
4b28e9740e3b get rid of Attribute class. Use AttributeValue subclasses directly.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2784
diff changeset
   198
                   BooleanValue (false),
2544
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   199
                   MakeBooleanAccessor (&RraaWifiManager::m_basic),
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   200
                   MakeBooleanChecker ())
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   201
    .AddAttribute ("Timeout",
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   202
                   "Timeout for the RRAA BASIC loss estimaton block (s)",
2965
4b28e9740e3b get rid of Attribute class. Use AttributeValue subclasses directly.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2784
diff changeset
   203
                   TimeValue (Seconds (0.05)),
2544
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   204
                   MakeTimeAccessor (&RraaWifiManager::m_timeout),
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   205
                   MakeTimeChecker ())
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   206
    .AddAttribute ("ewndFor54mbps",
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   207
                   "ewnd parameter for 54 Mbs data mode",
2965
4b28e9740e3b get rid of Attribute class. Use AttributeValue subclasses directly.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2784
diff changeset
   208
                   UintegerValue (40),
2544
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   209
                   MakeUintegerAccessor (&RraaWifiManager::m_ewndfor54),
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   210
                   MakeUintegerChecker<uint32_t> ())
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   211
    .AddAttribute ("ewndFor48mbps",
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   212
                   "ewnd parameter for 48 Mbs data mode",
2965
4b28e9740e3b get rid of Attribute class. Use AttributeValue subclasses directly.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2784
diff changeset
   213
                   UintegerValue (40),
2544
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   214
                   MakeUintegerAccessor (&RraaWifiManager::m_ewndfor48),
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   215
                   MakeUintegerChecker<uint32_t> ())
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   216
    .AddAttribute ("ewndFor36mbps",
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   217
                   "ewnd parameter for 36 Mbs data mode",
2965
4b28e9740e3b get rid of Attribute class. Use AttributeValue subclasses directly.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2784
diff changeset
   218
                   UintegerValue (40),
2544
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   219
                   MakeUintegerAccessor (&RraaWifiManager::m_ewndfor36),
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   220
                   MakeUintegerChecker<uint32_t> ())
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   221
    .AddAttribute ("ewndFor24mbps",
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   222
                   "ewnd parameter for 24 Mbs data mode",
2965
4b28e9740e3b get rid of Attribute class. Use AttributeValue subclasses directly.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2784
diff changeset
   223
                   UintegerValue (40),
2544
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   224
                   MakeUintegerAccessor (&RraaWifiManager::m_ewndfor24),
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   225
                   MakeUintegerChecker<uint32_t> ())
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   226
    .AddAttribute ("ewndFor18mbps",
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   227
                   "ewnd parameter for 18 Mbs data mode",
2965
4b28e9740e3b get rid of Attribute class. Use AttributeValue subclasses directly.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2784
diff changeset
   228
                   UintegerValue (20),
2544
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   229
                   MakeUintegerAccessor (&RraaWifiManager::m_ewndfor18),
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   230
                   MakeUintegerChecker<uint32_t> ())
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   231
    .AddAttribute ("ewndFor12mbps",
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   232
                   "ewnd parameter for 12 Mbs data mode",
2965
4b28e9740e3b get rid of Attribute class. Use AttributeValue subclasses directly.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2784
diff changeset
   233
                   UintegerValue (20),
2544
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   234
                   MakeUintegerAccessor (&RraaWifiManager::m_ewndfor12),
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   235
                   MakeUintegerChecker<uint32_t> ())
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   236
    .AddAttribute ("ewndFor9mbps",
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   237
                   "ewnd parameter for 9 Mbs data mode",
2965
4b28e9740e3b get rid of Attribute class. Use AttributeValue subclasses directly.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2784
diff changeset
   238
                   UintegerValue (10),
2544
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   239
                   MakeUintegerAccessor (&RraaWifiManager::m_ewndfor9),
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   240
                   MakeUintegerChecker<uint32_t> ())
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   241
    .AddAttribute ("ewndFor6mbps",
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   242
                   "ewnd parameter for 6 Mbs data mode",
2965
4b28e9740e3b get rid of Attribute class. Use AttributeValue subclasses directly.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2784
diff changeset
   243
                   UintegerValue (6),
2544
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   244
                   MakeUintegerAccessor (&RraaWifiManager::m_ewndfor6),
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   245
                   MakeUintegerChecker<uint32_t> ())
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   246
    .AddAttribute ("poriFor48mbps",
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   247
                   "Pori parameter for 48 Mbs data mode",
2965
4b28e9740e3b get rid of Attribute class. Use AttributeValue subclasses directly.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2784
diff changeset
   248
                   DoubleValue (0.047),
2544
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   249
                   MakeDoubleAccessor (&RraaWifiManager::m_porifor48),
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   250
                   MakeDoubleChecker<double> ())
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   251
    .AddAttribute ("poriFor36mbps",
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   252
                   "Pori parameter for 36 Mbs data mode",
2965
4b28e9740e3b get rid of Attribute class. Use AttributeValue subclasses directly.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2784
diff changeset
   253
                   DoubleValue (0.115),
2544
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   254
                   MakeDoubleAccessor (&RraaWifiManager::m_porifor36),
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   255
                   MakeDoubleChecker<double> ())
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   256
    .AddAttribute ("poriFor24mbps",
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   257
                   "Pori parameter for 24 Mbs data mode",
2965
4b28e9740e3b get rid of Attribute class. Use AttributeValue subclasses directly.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2784
diff changeset
   258
                   DoubleValue (0.1681),
2544
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   259
                   MakeDoubleAccessor (&RraaWifiManager::m_porifor24),
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   260
                   MakeDoubleChecker<double> ())
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   261
    .AddAttribute ("poriFor18mbps",
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   262
                   "Pori parameter for 18 Mbs data mode",
2965
4b28e9740e3b get rid of Attribute class. Use AttributeValue subclasses directly.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2784
diff changeset
   263
                   DoubleValue (0.1325),
2544
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   264
                   MakeDoubleAccessor (&RraaWifiManager::m_porifor18),
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   265
                   MakeDoubleChecker<double> ())
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   266
    .AddAttribute ("poriFor12mbps",
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   267
                   "Pori parameter for 12 Mbs data mode",
2965
4b28e9740e3b get rid of Attribute class. Use AttributeValue subclasses directly.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2784
diff changeset
   268
                   DoubleValue (0.1861),
2544
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   269
                   MakeDoubleAccessor (&RraaWifiManager::m_porifor12),
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   270
                   MakeDoubleChecker<double> ())
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   271
    .AddAttribute ("poriFor9mbps",
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   272
                   "Pori parameter for 9 Mbs data mode",
2965
4b28e9740e3b get rid of Attribute class. Use AttributeValue subclasses directly.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2784
diff changeset
   273
                   DoubleValue (0.1434),
2544
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   274
                   MakeDoubleAccessor (&RraaWifiManager::m_porifor9),
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   275
                   MakeDoubleChecker<double> ())
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   276
    .AddAttribute ("poriFor6mbps",
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   277
                   "Pori parameter for 6 Mbs data mode",
2965
4b28e9740e3b get rid of Attribute class. Use AttributeValue subclasses directly.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2784
diff changeset
   278
                   DoubleValue (0.5),
2544
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   279
                   MakeDoubleAccessor (&RraaWifiManager::m_porifor6),
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   280
                   MakeDoubleChecker<double> ())
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   281
    .AddAttribute ("pmtlFor54mbps",
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   282
                   "Pmtl parameter for 54 Mbs data mode",
2965
4b28e9740e3b get rid of Attribute class. Use AttributeValue subclasses directly.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2784
diff changeset
   283
                   DoubleValue (0.094),
2544
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   284
                   MakeDoubleAccessor (&RraaWifiManager::m_pmtlfor54),
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   285
                   MakeDoubleChecker<double> ())
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   286
    .AddAttribute ("pmtlFor48mbps",
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   287
                   "Pmtl parameter for 48 Mbs data mode",
2965
4b28e9740e3b get rid of Attribute class. Use AttributeValue subclasses directly.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2784
diff changeset
   288
                   DoubleValue (0.23),
2544
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   289
                   MakeDoubleAccessor (&RraaWifiManager::m_pmtlfor48),
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   290
                   MakeDoubleChecker<double> ())
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   291
    .AddAttribute ("pmtlFor36mbps",
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   292
                   "Pmtl parameter for 36 Mbs data mode",
2965
4b28e9740e3b get rid of Attribute class. Use AttributeValue subclasses directly.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2784
diff changeset
   293
                   DoubleValue (0.3363),
2544
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   294
                   MakeDoubleAccessor (&RraaWifiManager::m_pmtlfor36),
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   295
                   MakeDoubleChecker<double> ())
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   296
    .AddAttribute ("pmtlFor24mbps",
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   297
                   "Pmtl parameter for 24 Mbs data mode",
2965
4b28e9740e3b get rid of Attribute class. Use AttributeValue subclasses directly.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2784
diff changeset
   298
                   DoubleValue (0.265),
2544
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   299
                   MakeDoubleAccessor (&RraaWifiManager::m_pmtlfor24),
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   300
                   MakeDoubleChecker<double> ())
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   301
    .AddAttribute ("pmtlFor18mbps",
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   302
                   "Pmtl parameter for 18 Mbs data mode",
2965
4b28e9740e3b get rid of Attribute class. Use AttributeValue subclasses directly.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2784
diff changeset
   303
                   DoubleValue (0.3722),
2544
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   304
                   MakeDoubleAccessor (&RraaWifiManager::m_pmtlfor18),
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   305
                   MakeDoubleChecker<double> ())
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   306
    .AddAttribute ("pmtlFor12mbps",
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   307
                   "Pmtl parameter for 12 Mbs data mode",
2965
4b28e9740e3b get rid of Attribute class. Use AttributeValue subclasses directly.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2784
diff changeset
   308
                   DoubleValue (0.2868),
2544
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   309
                   MakeDoubleAccessor (&RraaWifiManager::m_pmtlfor12),
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   310
                   MakeDoubleChecker<double> ())
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   311
    .AddAttribute ("pmtlFor9mbps",
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   312
                   "Pmtl parameter for 9 Mbs data mode",
2965
4b28e9740e3b get rid of Attribute class. Use AttributeValue subclasses directly.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2784
diff changeset
   313
                   DoubleValue (0.3932),
2544
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   314
                   MakeDoubleAccessor (&RraaWifiManager::m_pmtlfor9),
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   315
                   MakeDoubleChecker<double> ())
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   316
    ;
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   317
  return tid;
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   318
}
2351
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   319
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   320
2544
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   321
RraaWifiManager::RraaWifiManager ()
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   322
{}
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   323
RraaWifiManager::~RraaWifiManager ()
2351
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   324
{}
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   325
2544
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   326
WifiRemoteStation *
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   327
RraaWifiManager::CreateStation (void)
2351
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   328
{
2544
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   329
  return new RraaWifiRemoteStation (this);
2351
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   330
}
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   331
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   332
bool
2544
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   333
RraaWifiManager::OnlyBasic (void)
2351
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   334
{
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   335
  return m_basic;
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   336
}
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   337
2544
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   338
Time
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   339
RraaWifiManager::GetTimeout (void) const
2351
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   340
{
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   341
  return m_timeout;
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   342
}
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   343
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   344
ThresholdsItem
2544
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   345
RraaWifiManager::GetThresholds (WifiMode mode) const
2351
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   346
{
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   347
  switch (mode.GetDataRate () / 1000000) {
2544
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   348
  case 54: {
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   349
    ThresholdsItem mode54 = {54000000, 
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   350
                             0.0, 
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   351
                             m_pmtlfor54, 
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   352
                             m_ewndfor54};
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   353
    return mode54;
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   354
  } break;
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   355
  case 48: {
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   356
    ThresholdsItem mode48 = {48000000, 
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   357
                             m_porifor48, 
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   358
                             m_pmtlfor48, 
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   359
                             m_ewndfor48};
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   360
    return mode48;
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   361
  } break;
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   362
  case 36: {
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   363
    ThresholdsItem mode36 = {36000000, 
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   364
                             m_porifor36, 
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   365
                             m_pmtlfor36, 
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   366
                             m_ewndfor36};
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   367
    return mode36;
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   368
  } break;
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   369
  case 24: {
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   370
    ThresholdsItem mode24 = {24000000, 
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   371
                             m_porifor24, 
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   372
                             m_pmtlfor24, 
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   373
                             m_ewndfor24};
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   374
    return mode24;
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   375
  } break;
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   376
  case 18: {
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   377
    ThresholdsItem mode18 = {18000000, 
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   378
                             m_porifor18, 
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   379
                             m_pmtlfor18, 
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   380
                             m_ewndfor18};
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   381
    return mode18;
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   382
  } break;
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   383
  case 12: {
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   384
    ThresholdsItem mode12 = {12000000, 
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   385
                             m_porifor12, 
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   386
                             m_pmtlfor12, 
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   387
                             m_ewndfor12};
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   388
    return mode12;
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   389
  } break;
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   390
  case 9: {
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   391
    ThresholdsItem mode9 =  {9000000, 
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   392
                             m_porifor9, 
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   393
                             m_pmtlfor9, 
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   394
                             m_ewndfor9};
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   395
    return mode9;
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   396
  } break;
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   397
  case 6: {
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   398
    ThresholdsItem mode6 =  {6000000, 
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   399
                             m_porifor6, 
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   400
                             1.0, 
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   401
                             m_ewndfor6};
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   402
    return mode6;
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   403
  } break;
2351
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   404
  }
4210
da9be6abb1b2 bug 486: patches for icc compilation.
Timo Bingmann <timo.bingmann@student.kit.edu>
parents: 2965
diff changeset
   405
  NS_ASSERT_MSG(false, "Thresholds for an unknown mode are asked");
2544
2e6e1a6e0d94 port last rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2351
diff changeset
   406
  return ThresholdsItem ();
2351
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   407
}
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   408
84e79f06621c RRAA implementation.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
diff changeset
   409
} // namespace ns3