4408
|
1 |
/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
|
|
2 |
/*
|
|
3 |
* Copyright (c) 2009 MIRKO BANCHI
|
|
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: Mirko Banchi <mk.banchi@gmail.com>
|
|
19 |
*/
|
|
20 |
#ifndef QOS_WIFI_MAC_HELPER_H
|
|
21 |
#define QOS_WIFI_MAC_HELPER_H
|
|
22 |
|
|
23 |
#include "wifi-helper.h"
|
|
24 |
#include "ns3/qos-utils.h"
|
|
25 |
|
|
26 |
#include <map>
|
|
27 |
|
|
28 |
namespace ns3 {
|
|
29 |
|
|
30 |
class QosWifiMacHelper : public WifiMacHelper
|
|
31 |
{
|
|
32 |
public:
|
|
33 |
QosWifiMacHelper ();
|
|
34 |
virtual ~QosWifiMacHelper ();
|
|
35 |
/**
|
|
36 |
* Create a mac helper in a default working state.
|
|
37 |
*/
|
|
38 |
static QosWifiMacHelper Default (void);
|
|
39 |
/**
|
|
40 |
* \param type the type of ns3::WifiMac to create.
|
|
41 |
* \param n0 the name of the attribute to set
|
|
42 |
* \param v0 the value of the attribute to set
|
|
43 |
* \param n1 the name of the attribute to set
|
|
44 |
* \param v1 the value of the attribute to set
|
|
45 |
* \param n2 the name of the attribute to set
|
|
46 |
* \param v2 the value of the attribute to set
|
|
47 |
* \param n3 the name of the attribute to set
|
|
48 |
* \param v3 the value of the attribute to set
|
|
49 |
* \param n4 the name of the attribute to set
|
|
50 |
* \param v4 the value of the attribute to set
|
|
51 |
* \param n5 the name of the attribute to set
|
|
52 |
* \param v5 the value of the attribute to set
|
|
53 |
* \param n6 the name of the attribute to set
|
|
54 |
* \param v6 the value of the attribute to set
|
|
55 |
* \param n7 the name of the attribute to set
|
|
56 |
* \param v7 the value of the attribute to set
|
|
57 |
*
|
|
58 |
* All the attributes specified in this method should exist
|
|
59 |
* in the requested mac.
|
|
60 |
*/
|
|
61 |
void SetType (std::string type,
|
|
62 |
std::string n0 = "", const AttributeValue &v0 = EmptyAttributeValue (),
|
|
63 |
std::string n1 = "", const AttributeValue &v1 = EmptyAttributeValue (),
|
|
64 |
std::string n2 = "", const AttributeValue &v2 = EmptyAttributeValue (),
|
|
65 |
std::string n3 = "", const AttributeValue &v3 = EmptyAttributeValue (),
|
|
66 |
std::string n4 = "", const AttributeValue &v4 = EmptyAttributeValue (),
|
|
67 |
std::string n5 = "", const AttributeValue &v5 = EmptyAttributeValue (),
|
|
68 |
std::string n6 = "", const AttributeValue &v6 = EmptyAttributeValue (),
|
|
69 |
std::string n7 = "", const AttributeValue &v7 = EmptyAttributeValue ());
|
|
70 |
/**
|
|
71 |
* \param accessClass access class for which we are setting aggregator. Possibilities
|
|
72 |
* are: AC_BK, AC_BE, AC_VI, AC_VO.
|
|
73 |
* \param aggregatorType type of aggregator.
|
|
74 |
* \param n0 the name of the attribute to set
|
|
75 |
* \param v0 the value of the attribute to set
|
|
76 |
* \param n1 the name of the attribute to set
|
|
77 |
* \param v1 the value of the attribute to set
|
|
78 |
* \param n2 the name of the attribute to set
|
|
79 |
* \param v2 the value of the attribute to set
|
|
80 |
* \param n3 the name of the attribute to set
|
|
81 |
* \param v3 the value of the attribute to set
|
|
82 |
*
|
|
83 |
* All the attributes specified in this method should exist
|
|
84 |
* in the requested aggregator.
|
|
85 |
*/
|
|
86 |
void SetMsduAggregatorForAc (AccessClass accessClass, std::string type,
|
|
87 |
std::string n0 = "", const AttributeValue &v0 = EmptyAttributeValue (),
|
|
88 |
std::string n1 = "", const AttributeValue &v1 = EmptyAttributeValue (),
|
|
89 |
std::string n2 = "", const AttributeValue &v2 = EmptyAttributeValue (),
|
|
90 |
std::string n3 = "", const AttributeValue &v3 = EmptyAttributeValue ());
|
|
91 |
/**
|
|
92 |
* \param accessClass access class for which we are setting edca params. Possibilities
|
|
93 |
* are: AC_BK, AC_BE, AC_VI, AC_VO.
|
|
94 |
* \param n0 the name of the attribute to set
|
|
95 |
* \param v0 the value of the attribute to set
|
|
96 |
* \param n1 the name of the attribute to set
|
|
97 |
* \param v1 the value of the attribute to set
|
|
98 |
* \param n2 the name of the attribute to set
|
|
99 |
* \param v2 the value of the attribute to set
|
|
100 |
* \param n3 the name of the attribute to set
|
|
101 |
* \param v3 the value of the attribute to set
|
|
102 |
*/
|
|
103 |
void SetEdcaParametersForAc (AccessClass accessClass,
|
|
104 |
std::string n0 = "", const AttributeValue &v0 = EmptyAttributeValue (),
|
|
105 |
std::string n1 = "", const AttributeValue &v1 = EmptyAttributeValue (),
|
|
106 |
std::string n2 = "", const AttributeValue &v2 = EmptyAttributeValue (),
|
|
107 |
std::string n3 = "", const AttributeValue &v3 = EmptyAttributeValue ());
|
|
108 |
private:
|
|
109 |
/**
|
|
110 |
* \returns a newly-created MAC object.
|
|
111 |
*
|
|
112 |
* This method implements the pure virtual method defined in \ref ns3::WifiMacHelper.
|
|
113 |
*/
|
|
114 |
virtual Ptr<WifiMac> Create (void) const;
|
|
115 |
|
|
116 |
ObjectFactory m_mac;
|
|
117 |
std::map<AccessClass, ObjectFactory> m_queues;
|
|
118 |
std::map<AccessClass, ObjectFactory> m_aggregators;
|
|
119 |
};
|
|
120 |
|
|
121 |
} //namespace ns3
|
|
122 |
|
|
123 |
#endif /* QOS_WIFI_MAC_HELPER_H */
|