A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
mesh-helper.h
Go to the documentation of this file.
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
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: Kirill Andreev <andreev@iitp.ru>
19  * Pavel Boyko <boyko@iitp.ru>
20  */
21 
22 
23 #ifndef MESH_HELPER_H
24 #define MESH_HELPER_H
25 
26 #include "ns3/wifi-helper.h"
27 #include "ns3/mesh-stack-installer.h"
28 
29 namespace ns3 {
30 
31 class WifiChannel;
32 
39 {
40 public:
44  MeshHelper ();
45 
49  ~MeshHelper ();
50 
55  static MeshHelper Default ();
56 
78  void SetMacType (std::string n0 = "", const AttributeValue &v0 = EmptyAttributeValue (),
79  std::string n1 = "", const AttributeValue &v1 = EmptyAttributeValue (),
80  std::string n2 = "", const AttributeValue &v2 = EmptyAttributeValue (),
81  std::string n3 = "", const AttributeValue &v3 = EmptyAttributeValue (),
82  std::string n4 = "", const AttributeValue &v4 = EmptyAttributeValue (),
83  std::string n5 = "", const AttributeValue &v5 = EmptyAttributeValue (),
84  std::string n6 = "", const AttributeValue &v6 = EmptyAttributeValue (),
85  std::string n7 = "", const AttributeValue &v7 = EmptyAttributeValue ());
108  void
109  SetRemoteStationManager (std::string type,
110  std::string n0 = "", const AttributeValue &v0 = EmptyAttributeValue (),
111  std::string n1 = "", const AttributeValue &v1 = EmptyAttributeValue (),
112  std::string n2 = "", const AttributeValue &v2 = EmptyAttributeValue (),
113  std::string n3 = "", const AttributeValue &v3 = EmptyAttributeValue (),
114  std::string n4 = "", const AttributeValue &v4 = EmptyAttributeValue (),
115  std::string n5 = "", const AttributeValue &v5 = EmptyAttributeValue (),
116  std::string n6 = "", const AttributeValue &v6 = EmptyAttributeValue (),
117  std::string n7 = "", const AttributeValue &v7 = EmptyAttributeValue ());
121  void SetStandard (enum WifiPhyStandard standard);
123  //void SetMeshId (std::string s);
131  {
134  };
135 
144  void SetNumberOfInterfaces (uint32_t nInterfaces);
145 
155  Install (const WifiPhyHelper &phyHelper, NodeContainer c) const;
175  void SetStackInstaller (std::string type,
176  std::string n0 = "", const AttributeValue &v0 = EmptyAttributeValue (),
177  std::string n1 = "", const AttributeValue &v1 = EmptyAttributeValue (),
178  std::string n2 = "", const AttributeValue &v2 = EmptyAttributeValue (),
179  std::string n3 = "", const AttributeValue &v3 = EmptyAttributeValue (),
180  std::string n4 = "", const AttributeValue &v4 = EmptyAttributeValue (),
181  std::string n5 = "", const AttributeValue &v5 = EmptyAttributeValue (),
182  std::string n6 = "", const AttributeValue &v6 = EmptyAttributeValue (),
183  std::string n7 = "", const AttributeValue &v7 = EmptyAttributeValue ());
184 
188  void Report (const ns3::Ptr<ns3::NetDevice>&, std::ostream&);
189 
193  void ResetStats (const ns3::Ptr<ns3::NetDevice>&);
205  int64_t AssignStreams (NetDeviceContainer c, int64_t stream);
206 
207 private:
212  Ptr<WifiNetDevice> CreateInterface (const WifiPhyHelper &phyHelper, Ptr<Node> node, uint16_t channelId) const;
213  uint32_t m_nInterfaces;
223 };
224 } // namespace ns3
225 
226 #endif /* MESH_HELPER_H */
227