This documentation is not the
Latest Release
.
A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Portuguese
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
channel-manager.h
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* This program is free software; you can redistribute it and/or modify
4
* it under the terms of the GNU General Public License version 2 as
5
* published by the Free Software Foundation;
6
*
7
* This program is distributed in the hope that it will be useful,
8
* but WITHOUT ANY WARRANTY; without even the implied warranty of
9
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
* GNU General Public License for more details.
11
*
12
* You should have received a copy of the GNU General Public License
13
* along with this program; if not, write to the Free Software
14
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
15
*
16
* Author: Junling Bu <linlinjavaer@gmail.com>
17
*/
18
#ifndef CHANNEL_MANAGER_H
19
#define CHANNEL_MANAGER_H
20
#include <map>
21
#include <vector>
22
#include "ns3/object.h"
23
#include "ns3/wifi-mode.h"
24
25
namespace
ns3
{
26
38
#define CH172 172
39
#define CH174 174
40
#define CH176 176
41
#define CH178 178
42
#define CH180 180
43
#define CH182 182
44
#define CH184 184
45
46
#define SCH1 172
47
#define SCH2 174
48
#define SCH3 176
49
#define CCH 178
50
#define SCH4 180
51
#define SCH5 182
52
#define SCH6 184
53
59
class
ChannelManager
:
public
Object
60
{
61
public
:
62
static
TypeId
GetTypeId
(
void
);
63
ChannelManager
();
64
virtual
~ChannelManager
();
65
69
static
uint32_t
GetCch
(
void
);
73
static
std::vector<uint32_t>
GetSchs
(
void
);
79
static
std::vector<uint32_t>
GetWaveChannels
(
void
);
83
static
uint32_t
GetNumberOfWaveChannels
(
void
);
88
static
bool
IsCch
(uint32_t channelNumber);
93
static
bool
IsSch
(uint32_t channelNumber);
98
static
bool
IsWaveChannel
(uint32_t channelNumber);
99
106
uint32_t
GetOperatingClass
(uint32_t channelNumber);
111
bool
GetManagementAdaptable
(uint32_t channelNumber);
116
WifiMode
GetManagementDataRate
(uint32_t channelNumber);
121
uint32_t
GetManagementPowerLevel
(uint32_t channelNumber);
122
123
private
:
124
// 1609.4-2010 Annex H
125
static
const
uint32_t
DEFAULT_OPERATING_CLASS
= 17;
126
127
struct
WaveChannel
128
{
129
uint32_t
channelNumber
;
130
uint32_t
operatingClass
;
131
bool
adaptable
;
132
WifiMode
dataRate
;
133
uint32_t
txPowerLevel
;
134
135
WaveChannel
(uint32_t
channel
)
136
: channelNumber (channel),
137
operatingClass (DEFAULT_OPERATING_CLASS),
138
adaptable (true),
139
dataRate (
WifiMode
(
"OfdmRate6MbpsBW10MHz"
)),
140
txPowerLevel (4)
141
{
142
}
143
};
144
std::map<uint32_t, WaveChannel *>
m_channels
;
145
};
146
147
}
148
#endif
/* CHANNEL_MANAGER_H */
third.channel
tuple channel
Definition:
third.py:85
ns3::ChannelManager::GetWaveChannels
static std::vector< uint32_t > GetWaveChannels(void)
Definition:
channel-manager.cc:84
ns3::ChannelManager::GetSchs
static std::vector< uint32_t > GetSchs(void)
Definition:
channel-manager.cc:70
ns3::ChannelManager::GetManagementAdaptable
bool GetManagementAdaptable(uint32_t channelNumber)
Definition:
channel-manager.cc:151
ns3::ChannelManager::IsWaveChannel
static bool IsWaveChannel(uint32_t channelNumber)
Definition:
channel-manager.cc:129
ns3::WifiMode
represent a single transmission modeA WifiMode is implemented by a single integer which is used to lo...
Definition:
wifi-mode.h:97
ns3::ChannelManager::WaveChannel::WaveChannel
WaveChannel(uint32_t channel)
Definition:
channel-manager.h:135
ns3::ChannelManager::WaveChannel::adaptable
bool adaptable
Definition:
channel-manager.h:131
ns3::ChannelManager::WaveChannel::dataRate
WifiMode dataRate
Definition:
channel-manager.h:132
ns3::ChannelManager::GetNumberOfWaveChannels
static uint32_t GetNumberOfWaveChannels(void)
Definition:
channel-manager.cc:99
ns3::ChannelManager::WaveChannel
Definition:
channel-manager.h:127
ns3::ChannelManager::WaveChannel::txPowerLevel
uint32_t txPowerLevel
Definition:
channel-manager.h:133
ns3::ChannelManager::GetCch
static uint32_t GetCch(void)
Definition:
channel-manager.cc:63
ns3::ChannelManager::IsCch
static bool IsCch(uint32_t channelNumber)
Definition:
channel-manager.cc:107
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::ChannelManager::WaveChannel::operatingClass
uint32_t operatingClass
Definition:
channel-manager.h:130
ns3::ChannelManager::GetOperatingClass
uint32_t GetOperatingClass(uint32_t channelNumber)
Definition:
channel-manager.cc:144
ns3::ChannelManager::IsSch
static bool IsSch(uint32_t channelNumber)
Definition:
channel-manager.cc:114
ns3::ChannelManager::WaveChannel::channelNumber
uint32_t channelNumber
Definition:
channel-manager.h:129
ns3::ChannelManager::GetManagementPowerLevel
uint32_t GetManagementPowerLevel(uint32_t channelNumber)
Definition:
channel-manager.cc:165
ns3::ChannelManager::GetManagementDataRate
WifiMode GetManagementDataRate(uint32_t channelNumber)
Definition:
channel-manager.cc:158
ns3::Object
A base class which provides memory management and object aggregation.
Definition:
object.h:87
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:58
ns3::ChannelManager::DEFAULT_OPERATING_CLASS
static const uint32_t DEFAULT_OPERATING_CLASS
Definition:
channel-manager.h:125
ns3::ChannelManager::GetTypeId
static TypeId GetTypeId(void)
Definition:
channel-manager.cc:29
ns3::ChannelManager::~ChannelManager
virtual ~ChannelManager()
Definition:
channel-manager.cc:51
ns3::ChannelManager::m_channels
std::map< uint32_t, WaveChannel * > m_channels
Definition:
channel-manager.h:144
ns3::ChannelManager
manage 7 WaveChannels and the tx information such as data rate and txPowerLevel.
Definition:
channel-manager.h:59
ns3::ChannelManager::ChannelManager
ChannelManager()
Definition:
channel-manager.cc:39
src
wave
model
channel-manager.h
Generated on Wed Nov 11 2015 20:00:50 for ns-3 by
1.8.9.1