author | Kirill Andreev <andreev@iitp.ru> |
Thu, 21 May 2009 16:35:55 +0400 | |
changeset 5015 | e460e29f9f78 |
parent 5012 | c81291702113 |
child 5020 | 79e8178d69eb |
permissions | -rw-r--r-- |
4793 | 1 |
/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ |
2 |
/* |
|
3 |
* Copyright (c) 2008,2009 IITP RAS |
|
4 |
* |
|
5 |
* This program is free software; you can redistribute it and/or modify |
|
4812
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4811
diff
changeset
|
6 |
* it under the terms of the GNU General Public License version 2 as |
4793 | 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 |
* |
|
4811
080b8f23fa4a
Added license information to some files.
Andrey Mazo <mazo@iitp.ru>
parents:
4793
diff
changeset
|
18 |
* Author: Kirill Andreev <andreev@iitp.ru> |
4929
1689c94d7442
802.11s helper (ns3::dot11s::MeshWifiHelper) refactored
Pavel Boyko <boyko@iitp.ru>
parents:
4887
diff
changeset
|
19 |
* Pavel Boyko <boyko@iitp.ru> |
4793 | 20 |
*/ |
21 |
||
22 |
||
23 |
#ifndef _MESHWIFIHELPER_H |
|
4812
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4811
diff
changeset
|
24 |
#define _MESHWIFIHELPER_H |
4929
1689c94d7442
802.11s helper (ns3::dot11s::MeshWifiHelper) refactored
Pavel Boyko <boyko@iitp.ru>
parents:
4887
diff
changeset
|
25 |
|
4860
bb5194d57734
New peer management protocol moved to 802.11s/
Pavel Boyko <boyko@iitp.ru>
parents:
4858
diff
changeset
|
26 |
#include "ns3/wifi-helper.h" |
4929
1689c94d7442
802.11s helper (ns3::dot11s::MeshWifiHelper) refactored
Pavel Boyko <boyko@iitp.ru>
parents:
4887
diff
changeset
|
27 |
#include "ns3/ssid.h" |
1689c94d7442
802.11s helper (ns3::dot11s::MeshWifiHelper) refactored
Pavel Boyko <boyko@iitp.ru>
parents:
4887
diff
changeset
|
28 |
#include "ns3/nstime.h" |
4882
3eab2f6b1adc
Moved hwmp to dot11s, removed unneded files, removed unneded headers from
Kirill Andreev <andreev@iitp.ru>
parents:
4872
diff
changeset
|
29 |
#include "ns3/peer-management-protocol.h" |
4887
cbf02c77d5c1
HWMP is attached to mesh point device and MAC layer with zero functionality
Kirill Andreev <andreev@iitp.ru>
parents:
4882
diff
changeset
|
30 |
#include "ns3/hwmp-protocol.h" |
4793 | 31 |
|
4812
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4811
diff
changeset
|
32 |
namespace ns3 { |
4872 | 33 |
namespace dot11s { |
4855
0b5980b04249
Restructured helper: switch to new mac, now only beacon functionality works
Kirill Andreev <andreev@iitp.ru>
parents:
4852
diff
changeset
|
34 |
|
4812
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4811
diff
changeset
|
35 |
class WifiChannel; |
4793 | 36 |
|
4815 | 37 |
/** |
4860
bb5194d57734
New peer management protocol moved to 802.11s/
Pavel Boyko <boyko@iitp.ru>
parents:
4858
diff
changeset
|
38 |
* \ingroup dot11s |
4815 | 39 |
* |
4929
1689c94d7442
802.11s helper (ns3::dot11s::MeshWifiHelper) refactored
Pavel Boyko <boyko@iitp.ru>
parents:
4887
diff
changeset
|
40 |
* \brief Helper to create IEEE 802.11s mesh networks |
4815 | 41 |
*/ |
4812
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4811
diff
changeset
|
42 |
class MeshWifiHelper |
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4811
diff
changeset
|
43 |
{ |
4929
1689c94d7442
802.11s helper (ns3::dot11s::MeshWifiHelper) refactored
Pavel Boyko <boyko@iitp.ru>
parents:
4887
diff
changeset
|
44 |
public: |
1689c94d7442
802.11s helper (ns3::dot11s::MeshWifiHelper) refactored
Pavel Boyko <boyko@iitp.ru>
parents:
4887
diff
changeset
|
45 |
MeshWifiHelper (); |
1689c94d7442
802.11s helper (ns3::dot11s::MeshWifiHelper) refactored
Pavel Boyko <boyko@iitp.ru>
parents:
4887
diff
changeset
|
46 |
/// Set mesh SSID |
1689c94d7442
802.11s helper (ns3::dot11s::MeshWifiHelper) refactored
Pavel Boyko <boyko@iitp.ru>
parents:
4887
diff
changeset
|
47 |
void SetSsid (const Ssid &); |
4930
fa5e570d56fa
Mesh test refactored, see --pcap and --interfaces command line arguments
Pavel Boyko <boyko@iitp.ru>
parents:
4929
diff
changeset
|
48 |
/// Get mesh SSID |
fa5e570d56fa
Mesh test refactored, see --pcap and --interfaces command line arguments
Pavel Boyko <boyko@iitp.ru>
parents:
4929
diff
changeset
|
49 |
Ssid GetSsid () const; |
4929
1689c94d7442
802.11s helper (ns3::dot11s::MeshWifiHelper) refactored
Pavel Boyko <boyko@iitp.ru>
parents:
4887
diff
changeset
|
50 |
/// Set maximum random start delay |
1689c94d7442
802.11s helper (ns3::dot11s::MeshWifiHelper) refactored
Pavel Boyko <boyko@iitp.ru>
parents:
4887
diff
changeset
|
51 |
void SetRandomStartDelay (Time delay); |
1689c94d7442
802.11s helper (ns3::dot11s::MeshWifiHelper) refactored
Pavel Boyko <boyko@iitp.ru>
parents:
4887
diff
changeset
|
52 |
/** |
4937
7211ebc93e69
Add spread interfaces frequency channels option
Pavel Boyko <boyko@iitp.ru>
parents:
4930
diff
changeset
|
53 |
* \brief Spread/not spread frequency channels of MP interfaces. |
7211ebc93e69
Add spread interfaces frequency channels option
Pavel Boyko <boyko@iitp.ru>
parents:
4930
diff
changeset
|
54 |
* |
7211ebc93e69
Add spread interfaces frequency channels option
Pavel Boyko <boyko@iitp.ru>
parents:
4930
diff
changeset
|
55 |
* If set to true different non-overlaping 20MHz frequency |
7211ebc93e69
Add spread interfaces frequency channels option
Pavel Boyko <boyko@iitp.ru>
parents:
4930
diff
changeset
|
56 |
* channels will be assigned to different mesh point interfaces. |
7211ebc93e69
Add spread interfaces frequency channels option
Pavel Boyko <boyko@iitp.ru>
parents:
4930
diff
changeset
|
57 |
*/ |
7211ebc93e69
Add spread interfaces frequency channels option
Pavel Boyko <boyko@iitp.ru>
parents:
4930
diff
changeset
|
58 |
void SetSpreadInterfaceChannels (bool); |
7211ebc93e69
Add spread interfaces frequency channels option
Pavel Boyko <boyko@iitp.ru>
parents:
4930
diff
changeset
|
59 |
|
7211ebc93e69
Add spread interfaces frequency channels option
Pavel Boyko <boyko@iitp.ru>
parents:
4930
diff
changeset
|
60 |
/** |
4929
1689c94d7442
802.11s helper (ns3::dot11s::MeshWifiHelper) refactored
Pavel Boyko <boyko@iitp.ru>
parents:
4887
diff
changeset
|
61 |
* \brief Install 802.11s mesh device & protocols on given node |
1689c94d7442
802.11s helper (ns3::dot11s::MeshWifiHelper) refactored
Pavel Boyko <boyko@iitp.ru>
parents:
4887
diff
changeset
|
62 |
* |
1689c94d7442
802.11s helper (ns3::dot11s::MeshWifiHelper) refactored
Pavel Boyko <boyko@iitp.ru>
parents:
4887
diff
changeset
|
63 |
* \param phy Wifi PHY helper |
1689c94d7442
802.11s helper (ns3::dot11s::MeshWifiHelper) refactored
Pavel Boyko <boyko@iitp.ru>
parents:
4887
diff
changeset
|
64 |
* \param nodes List of nodes to install |
4963
869399fad0b6
Fixed proactive mode. 1 root works
Kirill Andreev <andreev@iitp.ru>
parents:
4937
diff
changeset
|
65 |
* \param roots List of root mesh points |
4929
1689c94d7442
802.11s helper (ns3::dot11s::MeshWifiHelper) refactored
Pavel Boyko <boyko@iitp.ru>
parents:
4887
diff
changeset
|
66 |
* \param nInterfaces Number of mesh point radio interfaces (= WiFi NICs) |
1689c94d7442
802.11s helper (ns3::dot11s::MeshWifiHelper) refactored
Pavel Boyko <boyko@iitp.ru>
parents:
4887
diff
changeset
|
67 |
* |
1689c94d7442
802.11s helper (ns3::dot11s::MeshWifiHelper) refactored
Pavel Boyko <boyko@iitp.ru>
parents:
4887
diff
changeset
|
68 |
* \return list of created mesh point devices, see MeshPointDevice |
1689c94d7442
802.11s helper (ns3::dot11s::MeshWifiHelper) refactored
Pavel Boyko <boyko@iitp.ru>
parents:
4887
diff
changeset
|
69 |
*/ |
4963
869399fad0b6
Fixed proactive mode. 1 root works
Kirill Andreev <andreev@iitp.ru>
parents:
4937
diff
changeset
|
70 |
NetDeviceContainer Install (const WifiPhyHelper &phyHelper, NodeContainer c, std::vector<uint32_t> roots = std::vector<uint32_t> (), uint32_t nInterfaces = 1) const; |
4929
1689c94d7442
802.11s helper (ns3::dot11s::MeshWifiHelper) refactored
Pavel Boyko <boyko@iitp.ru>
parents:
4887
diff
changeset
|
71 |
/** |
1689c94d7442
802.11s helper (ns3::dot11s::MeshWifiHelper) refactored
Pavel Boyko <boyko@iitp.ru>
parents:
4887
diff
changeset
|
72 |
* \brief Install 802.11s mesh device & protocols on given node |
1689c94d7442
802.11s helper (ns3::dot11s::MeshWifiHelper) refactored
Pavel Boyko <boyko@iitp.ru>
parents:
4887
diff
changeset
|
73 |
* |
1689c94d7442
802.11s helper (ns3::dot11s::MeshWifiHelper) refactored
Pavel Boyko <boyko@iitp.ru>
parents:
4887
diff
changeset
|
74 |
* \param phy Wifi PHY helper |
1689c94d7442
802.11s helper (ns3::dot11s::MeshWifiHelper) refactored
Pavel Boyko <boyko@iitp.ru>
parents:
4887
diff
changeset
|
75 |
* \param node Node to install |
4963
869399fad0b6
Fixed proactive mode. 1 root works
Kirill Andreev <andreev@iitp.ru>
parents:
4937
diff
changeset
|
76 |
* \param roots List of root mesh points |
4929
1689c94d7442
802.11s helper (ns3::dot11s::MeshWifiHelper) refactored
Pavel Boyko <boyko@iitp.ru>
parents:
4887
diff
changeset
|
77 |
* \param nInterfaces Number of mesh point radio interfaces (= WiFi NICs) |
1689c94d7442
802.11s helper (ns3::dot11s::MeshWifiHelper) refactored
Pavel Boyko <boyko@iitp.ru>
parents:
4887
diff
changeset
|
78 |
* |
1689c94d7442
802.11s helper (ns3::dot11s::MeshWifiHelper) refactored
Pavel Boyko <boyko@iitp.ru>
parents:
4887
diff
changeset
|
79 |
* \return list of created mesh point devices, see MeshPointDevice |
1689c94d7442
802.11s helper (ns3::dot11s::MeshWifiHelper) refactored
Pavel Boyko <boyko@iitp.ru>
parents:
4887
diff
changeset
|
80 |
*/ |
4963
869399fad0b6
Fixed proactive mode. 1 root works
Kirill Andreev <andreev@iitp.ru>
parents:
4937
diff
changeset
|
81 |
NetDeviceContainer Install (const WifiPhyHelper &phy, Ptr<Node> node, std::vector<uint32_t> roots = std::vector<uint32_t> (), uint32_t nInterfaces = 1) const; |
5012 | 82 |
static void Report (const ns3::Ptr<ns3::NetDevice>&, std::ostream&); |
5015 | 83 |
static void ResetStats (const ns3::Ptr<ns3::NetDevice>&); |
4929
1689c94d7442
802.11s helper (ns3::dot11s::MeshWifiHelper) refactored
Pavel Boyko <boyko@iitp.ru>
parents:
4887
diff
changeset
|
84 |
private: |
1689c94d7442
802.11s helper (ns3::dot11s::MeshWifiHelper) refactored
Pavel Boyko <boyko@iitp.ru>
parents:
4887
diff
changeset
|
85 |
Ssid m_ssid; |
1689c94d7442
802.11s helper (ns3::dot11s::MeshWifiHelper) refactored
Pavel Boyko <boyko@iitp.ru>
parents:
4887
diff
changeset
|
86 |
Time m_randomStartDelay; |
4937
7211ebc93e69
Add spread interfaces frequency channels option
Pavel Boyko <boyko@iitp.ru>
parents:
4930
diff
changeset
|
87 |
bool m_spreadInterfaceChannels; |
4929
1689c94d7442
802.11s helper (ns3::dot11s::MeshWifiHelper) refactored
Pavel Boyko <boyko@iitp.ru>
parents:
4887
diff
changeset
|
88 |
|
1689c94d7442
802.11s helper (ns3::dot11s::MeshWifiHelper) refactored
Pavel Boyko <boyko@iitp.ru>
parents:
4887
diff
changeset
|
89 |
/// Create single mesh interface NIC |
1689c94d7442
802.11s helper (ns3::dot11s::MeshWifiHelper) refactored
Pavel Boyko <boyko@iitp.ru>
parents:
4887
diff
changeset
|
90 |
Ptr<WifiNetDevice> CreateInterface (const WifiPhyHelper &phyHelper, Ptr<Node> node) const; |
1689c94d7442
802.11s helper (ns3::dot11s::MeshWifiHelper) refactored
Pavel Boyko <boyko@iitp.ru>
parents:
4887
diff
changeset
|
91 |
|
4812
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4811
diff
changeset
|
92 |
}; |
4872 | 93 |
} // namespace dot11s |
94 |
} //namespace ns3 |
|
95 |
||
4812
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4811
diff
changeset
|
96 |
#endif /* _MESHWIFIHELPER_H */ |
4793 | 97 |