Bug 953 - WiMAX channel scanning overflow

This commit is contained in:
Flavio Kubota
2010-08-07 21:15:14 -03:00
parent f83a82bc7a
commit e3f7114daf
7 changed files with 32 additions and 17 deletions

View File

@@ -67,7 +67,7 @@ using namespace ns3;
int main (int argc, char *argv[])
{
// default values
int nbSS = 4, duration = 2, schedType = 0;
int nbSS = 4, duration = 7, schedType = 0;
bool verbose = false;
WimaxHelper::SchedulerType scheduler = WimaxHelper::SCHED_TYPE_SIMPLE;
LogComponentEnable ("UdpClient", LOG_LEVEL_INFO);
@@ -151,7 +151,7 @@ int main (int argc, char *argv[])
// set server port to 100+(i*10)
udpServer[i] = UdpServerHelper (100 + (i * 10));
serverApps[i] = udpServer[i].Install (ssNodes.Get (i));
serverApps[i].Start (Seconds (1));
serverApps[i].Start (Seconds (6));
serverApps[i].Stop (Seconds (duration));
udpClient[i] = UdpClientHelper (SSinterfaces.GetAddress (i), 100 + (i * 10));
@@ -160,7 +160,7 @@ int main (int argc, char *argv[])
udpClient[i].SetAttribute ("PacketSize", UintegerValue (800));
clientApps[i] = udpClient[i].Install (ssNodes.Get (i + (nbSS / 2)));
clientApps[i].Start (Seconds (1));
clientApps[i].Start (Seconds (6));
clientApps[i].Stop (Seconds (duration));
}

View File

@@ -98,7 +98,7 @@ int main (int argc, char *argv[])
Ptr<RandomRectanglePositionAllocator> SSPosAllocator[MAXSS];
// default values
int nbSS = 10, duration = 2, schedType = 0;
int nbSS = 10, duration = 7, schedType = 0;
WimaxHelper::SchedulerType scheduler = WimaxHelper::SCHED_TYPE_SIMPLE;
CommandLine cmd;
@@ -266,14 +266,14 @@ int main (int argc, char *argv[])
{
udpServer[i] = UdpServerHelper (multicast_port);
serverApps[i] = udpServer[i].Install (ssNodes.Get (i));
serverApps[i].Start (Seconds (1));
serverApps[i].Start (Seconds (6));
serverApps[i].Stop (Seconds (duration));
}
udpClient = UdpTraceClientHelper (multicastGroup, multicast_port, "");
clientApps = udpClient.Install (Streamer_Node.Get (0));
clientApps.Start (Seconds (1));
clientApps.Start (Seconds (6));
clientApps.Stop (Seconds (duration));
IpcsClassifierRecord MulticastClassifier (Ipv4Address ("0.0.0.0"),

View File

@@ -61,7 +61,7 @@ int main (int argc, char *argv[])
{
bool verbose = false;
int duration = 2, schedType = 0;
int duration = 7, schedType = 0;
WimaxHelper::SchedulerType scheduler = WimaxHelper::SCHED_TYPE_SIMPLE;
CommandLine cmd;
@@ -140,7 +140,7 @@ int main (int argc, char *argv[])
udpServer = UdpServerHelper (100);
serverApps = udpServer.Install (ssNodes.Get (0));
serverApps.Start (Seconds (1));
serverApps.Start (Seconds (6));
serverApps.Stop (Seconds (duration));
udpClient = UdpClientHelper (SSinterfaces.GetAddress (0), 100);
@@ -149,7 +149,7 @@ int main (int argc, char *argv[])
udpClient.SetAttribute ("PacketSize", UintegerValue (1024));
clientApps = udpClient.Install (ssNodes.Get (1));
clientApps.Start (Seconds (1));
clientApps.Start (Seconds (6));
clientApps.Stop (Seconds (duration));
Simulator::Stop (Seconds (duration + 0.1));

View File

@@ -321,8 +321,11 @@ BSLinkManager::DeallocateCids (Cid cid)
uint64_t
BSLinkManager::SelectDlChannel (void)
{
// temporarily set to 1 for quick scanning
return m_bs->GetChannel (1);
// Values according to WirelessMAN-OFDM RF profile for 10 MHz channelization
// Section 12.3.3.1 from IEEE 802.16-2004 standard
// profR10_3 :
// channels: 5000 + n ⋅ 5 MHz, ∀n ∈ { 147, 149, 151, 153, 155, 157, 159, 161, 163, 165, 167 }
return m_bs->GetChannel (147);
}
bool

View File

@@ -138,6 +138,12 @@ SSLinkManager::StartScanning (
m_dlChnlNr++;
}
// using max number of channel according to according to Section 8.5.1 of IEEE 802.16-2004 standard.
if (m_dlChnlNr >= 200)
{
m_dlChnlNr = 0;
}
uint64_t dlChannel = m_ss->GetChannel (m_dlChnlNr);
m_ss->SetState (SubscriberStationNetDevice::SS_STATE_SCANNING);

View File

@@ -581,13 +581,19 @@ WimaxNetDevice::ForwardDown (Ptr<PacketBurst> burst, WimaxPhy::ModulationType mo
void
WimaxNetDevice::InitializeChannels (void)
{
// initializing arbitrary vector of channels (or frequencies)
uint64_t frequency = 2000;
for (uint8_t i = 0; i < 20; i++)
// initializing vector of channels (or frequencies)
// Values according to WirelessMAN-OFDM RF profile for 10 MHz channelization
// Section 12.3.3.1 from IEEE 802.16-2004 standard
// profR10_3 :
// channels: 5000 + n ⋅ 5 MHz, ∀n ∈ { 147, 149, 151, 153, 155, 157, 159, 161, 163, 165, 167 }
// from a range 5GHz to 6GHz, according to Section 8.5.1.
uint64_t frequency = 5000;
for (uint8_t i = 0; i < 200; i++)
{
m_dlChannels.push_back (frequency);
frequency += 40;
frequency += 5;
}
}

View File

@@ -60,7 +60,7 @@ TypeId WimaxPhy::GetTypeId (void)
.AddAttribute ("Bandwidth",
"The channel bandwidth in Hz.",
UintegerValue (20000000),
UintegerValue (10000000),
MakeUintegerAccessor (&WimaxPhy::SetChannelBandwidth, &WimaxPhy::GetChannelBandwidth),
MakeUintegerChecker<uint32_t> (5000000, 30000000))
@@ -73,7 +73,7 @@ WimaxPhy::WimaxPhy (void)
m_nrCarriers (0),
m_frameDuration (Seconds (0.01)),
m_frequency (5000000),
m_channelBandwidth (20000000),
m_channelBandwidth (10000000),
m_psDuration (Seconds (0)),
m_symbolDuration (Seconds (0)),
m_psPerSymbol (0),