20 #include "ns3/assert.h"
33 .AddConstructor<ChannelManager> ()
53 std::map<uint32_t, WaveChannel *> ::iterator i;
72 std::vector<uint32_t> schs;
73 schs.push_back (
SCH1);
74 schs.push_back (
SCH2);
75 schs.push_back (
SCH3);
76 schs.push_back (
SCH4);
77 schs.push_back (
SCH5);
78 schs.push_back (
SCH6);
86 std::vector<uint32_t> channels;
87 channels.push_back (
CCH);
88 channels.push_back (
SCH1);
89 channels.push_back (
SCH2);
90 channels.push_back (
SCH3);
91 channels.push_back (
SCH4);
92 channels.push_back (
SCH5);
93 channels.push_back (
SCH6);
102 return NumberOfWaveChannels;
109 return channelNumber ==
CCH;
116 if (channelNumber < SCH1 || channelNumber >
SCH6)
120 if (channelNumber % 2 == 1)
124 return (channelNumber !=
CCH);
131 if (channelNumber < SCH1 || channelNumber >
SCH6)
135 if (channelNumber % 2 == 1)
146 return m_channels[channelNumber]->operatingClass;
167 return m_channels[channelNumber]->txPowerLevel;
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
static std::vector< uint32_t > GetWaveChannels(void)
static std::vector< uint32_t > GetSchs(void)
bool GetManagementAdaptable(uint32_t channelNumber)
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
static bool IsWaveChannel(uint32_t channelNumber)
#define NS_LOG_FUNCTION_NOARGS()
Output the name of the function.
represent a single transmission modeA WifiMode is implemented by a single integer which is used to lo...
static uint32_t GetNumberOfWaveChannels(void)
static uint32_t GetCch(void)
static bool IsCch(uint32_t channelNumber)
Every class exported by the ns3 library is enclosed in the ns3 namespace.
uint32_t GetOperatingClass(uint32_t channelNumber)
static bool IsSch(uint32_t channelNumber)
uint32_t GetManagementPowerLevel(uint32_t channelNumber)
WifiMode GetManagementDataRate(uint32_t channelNumber)
A base class which provides memory management and object aggregation.
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
static TypeId GetTypeId(void)
virtual ~ChannelManager()
std::map< uint32_t, WaveChannel * > m_channels