author | Pavel Boyko <boyko@iitp.ru> |
Mon, 15 Jun 2009 13:10:56 +0400 | |
changeset 5063 | 97b947e83640 |
parent 5056 | ded692c12540 |
child 5081 | 869b81c5e774 |
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/nstime.h" |
5055
903fb7d81b97
Restructured mesh - helper
Kirill Andreev <andreev@iitp.ru>
parents:
5054
diff
changeset
|
28 |
#include "ns3/mesh-interface-helper.h" |
4793 | 29 |
|
4812
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4811
diff
changeset
|
30 |
namespace ns3 { |
4855
0b5980b04249
Restructured helper: switch to new mac, now only beacon functionality works
Kirill Andreev <andreev@iitp.ru>
parents:
4852
diff
changeset
|
31 |
|
4812
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4811
diff
changeset
|
32 |
class WifiChannel; |
4793 | 33 |
|
4815 | 34 |
/** |
4860
bb5194d57734
New peer management protocol moved to 802.11s/
Pavel Boyko <boyko@iitp.ru>
parents:
4858
diff
changeset
|
35 |
* \ingroup dot11s |
4815 | 36 |
* |
4929
1689c94d7442
802.11s helper (ns3::dot11s::MeshWifiHelper) refactored
Pavel Boyko <boyko@iitp.ru>
parents:
4887
diff
changeset
|
37 |
* \brief Helper to create IEEE 802.11s mesh networks |
4815 | 38 |
*/ |
4812
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4811
diff
changeset
|
39 |
class MeshWifiHelper |
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4811
diff
changeset
|
40 |
{ |
4929
1689c94d7442
802.11s helper (ns3::dot11s::MeshWifiHelper) refactored
Pavel Boyko <boyko@iitp.ru>
parents:
4887
diff
changeset
|
41 |
public: |
1689c94d7442
802.11s helper (ns3::dot11s::MeshWifiHelper) refactored
Pavel Boyko <boyko@iitp.ru>
parents:
4887
diff
changeset
|
42 |
MeshWifiHelper (); |
1689c94d7442
802.11s helper (ns3::dot11s::MeshWifiHelper) refactored
Pavel Boyko <boyko@iitp.ru>
parents:
4887
diff
changeset
|
43 |
/** |
4937
7211ebc93e69
Add spread interfaces frequency channels option
Pavel Boyko <boyko@iitp.ru>
parents:
4930
diff
changeset
|
44 |
* \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
|
45 |
* |
7211ebc93e69
Add spread interfaces frequency channels option
Pavel Boyko <boyko@iitp.ru>
parents:
4930
diff
changeset
|
46 |
* 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
|
47 |
* 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
|
48 |
*/ |
7211ebc93e69
Add spread interfaces frequency channels option
Pavel Boyko <boyko@iitp.ru>
parents:
4930
diff
changeset
|
49 |
void SetSpreadInterfaceChannels (bool); |
7211ebc93e69
Add spread interfaces frequency channels option
Pavel Boyko <boyko@iitp.ru>
parents:
4930
diff
changeset
|
50 |
|
7211ebc93e69
Add spread interfaces frequency channels option
Pavel Boyko <boyko@iitp.ru>
parents:
4930
diff
changeset
|
51 |
/** |
5063 | 52 |
* \brief Install 802.11s mesh device & protocols on given node list |
4929
1689c94d7442
802.11s helper (ns3::dot11s::MeshWifiHelper) refactored
Pavel Boyko <boyko@iitp.ru>
parents:
4887
diff
changeset
|
53 |
* |
1689c94d7442
802.11s helper (ns3::dot11s::MeshWifiHelper) refactored
Pavel Boyko <boyko@iitp.ru>
parents:
4887
diff
changeset
|
54 |
* \param phy Wifi PHY helper |
1689c94d7442
802.11s helper (ns3::dot11s::MeshWifiHelper) refactored
Pavel Boyko <boyko@iitp.ru>
parents:
4887
diff
changeset
|
55 |
* \param nodes List of nodes to install |
4963
869399fad0b6
Fixed proactive mode. 1 root works
Kirill Andreev <andreev@iitp.ru>
parents:
4937
diff
changeset
|
56 |
* \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
|
57 |
* \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
|
58 |
* |
1689c94d7442
802.11s helper (ns3::dot11s::MeshWifiHelper) refactored
Pavel Boyko <boyko@iitp.ru>
parents:
4887
diff
changeset
|
59 |
* \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
|
60 |
*/ |
5054 | 61 |
NetDeviceContainer Install (const WifiPhyHelper &phyHelper, const MeshInterfaceHelper &interfaceHelper, 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
|
62 |
/** |
1689c94d7442
802.11s helper (ns3::dot11s::MeshWifiHelper) refactored
Pavel Boyko <boyko@iitp.ru>
parents:
4887
diff
changeset
|
63 |
* \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
|
64 |
* |
1689c94d7442
802.11s helper (ns3::dot11s::MeshWifiHelper) refactored
Pavel Boyko <boyko@iitp.ru>
parents:
4887
diff
changeset
|
65 |
* \param phy Wifi PHY helper |
1689c94d7442
802.11s helper (ns3::dot11s::MeshWifiHelper) refactored
Pavel Boyko <boyko@iitp.ru>
parents:
4887
diff
changeset
|
66 |
* \param node Node to install |
4963
869399fad0b6
Fixed proactive mode. 1 root works
Kirill Andreev <andreev@iitp.ru>
parents:
4937
diff
changeset
|
67 |
* \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
|
68 |
* \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
|
69 |
* |
1689c94d7442
802.11s helper (ns3::dot11s::MeshWifiHelper) refactored
Pavel Boyko <boyko@iitp.ru>
parents:
4887
diff
changeset
|
70 |
* \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
|
71 |
*/ |
5054 | 72 |
NetDeviceContainer Install (const WifiPhyHelper &phy, const MeshInterfaceHelper &interfaceHelper, Ptr<Node> node, std::vector<uint32_t> roots = std::vector<uint32_t> (), uint32_t nInterfaces = 1) const; |
5012 | 73 |
static void Report (const ns3::Ptr<ns3::NetDevice>&, std::ostream&); |
5015 | 74 |
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
|
75 |
private: |
4937
7211ebc93e69
Add spread interfaces frequency channels option
Pavel Boyko <boyko@iitp.ru>
parents:
4930
diff
changeset
|
76 |
bool m_spreadInterfaceChannels; |
4812
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4811
diff
changeset
|
77 |
}; |
4872 | 78 |
} //namespace ns3 |
79 |
||
4812
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4811
diff
changeset
|
80 |
#endif /* _MESHWIFIHELPER_H */ |
4793 | 81 |