src/devices/wifi/wifi-mac-parameters.h
changeset 2508 18b690d1e74b
parent 1978 cc905522d049
child 2509 a72ee2fc1f30
equal deleted inserted replaced
2505:984b364e3111 2508:18b690d1e74b
       
     1 /* -*-  Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
       
     2 /*
       
     3  * Copyright (c) 2005 INRIA
       
     4  *
       
     5  * This program is free software; you can redistribute it and/or modify
       
     6  * it under the terms of the GNU General Public License version 2 as 
       
     7  * published by the Free Software Foundation;
       
     8  *
       
     9  * This program is distributed in the hope that it will be useful,
       
    10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
       
    11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
       
    12  * GNU General Public License for more details.
       
    13  *
       
    14  * You should have received a copy of the GNU General Public License
       
    15  * along with this program; if not, write to the Free Software
       
    16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
       
    17  *
       
    18  * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
       
    19  */
       
    20 #ifndef MAC_PARAMETERS_H
       
    21 #define MAC_PARAMETERS_H
       
    22 
       
    23 #include <stdint.h>
       
    24 #include "ns3/nstime.h"
       
    25 
       
    26 namespace ns3 {
       
    27 
       
    28 class WifiMacParameters 
       
    29 {
       
    30 public:
       
    31   WifiMacParameters ();
       
    32 
       
    33   void Initialize (Time ctsDelay, Time ackDelay);
       
    34   void SetSlotTime (Time slotTime);
       
    35 
       
    36   // XXX AP-specific
       
    37   Time GetBeaconInterval (void) const;
       
    38 
       
    39   Time GetPifs (void) const;
       
    40   Time GetSifs (void) const;
       
    41   Time GetSlotTime (void) const;
       
    42 
       
    43   uint32_t GetMaxSsrc (void) const;
       
    44   uint32_t GetMaxSlrc (void) const;
       
    45   uint32_t GetRtsCtsThreshold (void) const;
       
    46   uint32_t GetFragmentationThreshold (void) const;
       
    47   Time GetCtsTimeout (void) const;
       
    48   Time GetAckTimeout (void) const;
       
    49   Time GetMsduLifetime (void) const;
       
    50   Time GetMaxPropagationDelay (void) const;
       
    51 
       
    52   uint32_t GetMaxMsduSize (void) const;
       
    53   double GetCapLimit (void) const;
       
    54   double GetMinEdcaTrafficProportion (void) const;
       
    55 private:
       
    56   void Initialize80211a (void);
       
    57   Time m_ctsTimeout;
       
    58   Time m_ackTimeout;
       
    59   Time m_sifs;
       
    60   Time m_pifs;
       
    61   Time m_slot;
       
    62   uint32_t m_maxSsrc;
       
    63   uint32_t m_maxSlrc;
       
    64   uint32_t m_rtsCtsThreshold;
       
    65   uint32_t m_fragmentationThreshold;
       
    66   Time m_maxPropagationDelay;
       
    67   static const double SPEED_OF_LIGHT; // m/s
       
    68 };
       
    69 
       
    70 } // namespace ns3
       
    71 
       
    72 #endif /* MAC_PARAMETERS_H */