diff -urNw -X exclude_files ns-3-dev-original/src/devices/wimax/AUTHORS ns-3-dev/src/devices/wimax/AUTHORS --- ns-3-dev-original/src/devices/wimax/AUTHORS 2010-06-04 19:29:43.106102608 -0300 +++ ns-3-dev/src/devices/wimax/AUTHORS 2010-06-04 19:29:47.594104148 -0300 @@ -22,7 +22,7 @@ TELEMATICS LAB, Politecnico di Bari G.Piro@poliba.it -Flavio Kobuta, Juliana Freitag Borin, Nelson L. S. da Fonseca +Flavio Kubota, Juliana Freitag Borin, Nelson L. S. da Fonseca ============================================================== Development and Integration of the mbqos uplink scheduler 2009 diff -urNw -X exclude_files ns-3-dev-original/src/devices/wimax/bandwidth-manager.cc ns-3-dev/src/devices/wimax/bandwidth-manager.cc --- ns-3-dev-original/src/devices/wimax/bandwidth-manager.cc 2010-06-04 19:29:43.106102608 -0300 +++ ns-3-dev/src/devices/wimax/bandwidth-manager.cc 2010-06-04 19:29:47.594104148 -0300 @@ -133,6 +133,7 @@ { // bandwidth is requested for all packets bytesToRequest = serviceFlow->GetQueue ()->GetQueueLengthWithMACOverhead (); + break; } } } diff -urNw -X exclude_files ns-3-dev-original/src/devices/wimax/bs-net-device.cc ns-3-dev/src/devices/wimax/bs-net-device.cc --- ns-3-dev-original/src/devices/wimax/bs-net-device.cc 2010-06-04 19:29:43.106102608 -0300 +++ ns-3-dev/src/devices/wimax/bs-net-device.cc 2010-06-04 19:29:47.598103208 -0300 @@ -522,6 +522,11 @@ void BaseStationNetDevice::StartFrame (void) { + //setting DL/UL subframe allocation for this frame + uint32_t symbolsPerFrame = GetPhy ()->GetSymbolsPerFrame (); + SetNrDlSymbols ((symbolsPerFrame / 2) - ceil(GetTtg()*m_psDuration.GetSeconds ()/m_symbolDuration.GetSeconds ())); + SetNrUlSymbols ((symbolsPerFrame / 2) - ceil(GetRtg()*m_psDuration.GetSeconds ()/m_symbolDuration.GetSeconds ())); + m_frameStartTime = Simulator::Now (); NS_LOG_INFO ("----------------------frame" << GetNrFrames () + 1 << "----------------------"); @@ -951,6 +956,7 @@ burst = pair.second; dlMapIe = pair.first; cid = dlMapIe->GetCid (); + uint8_t diuc = dlMapIe->GetDiuc (); if (cid != GetInitialRangingConnection ()->GetCid () && cid != GetBroadcastConnection ()->GetCid ()) { @@ -958,12 +964,12 @@ { if (m_serviceFlowManager->GetServiceFlow (cid)->GetIsMulticast () == true) { - modulationType = m_serviceFlowManager->GetServiceFlow (cid)->GetModulation (); + modulationType = GetBurstProfileManager ()->GetModulationType (diuc, WimaxNetDevice::DIRECTION_DOWNLINK); } } else { - modulationType = m_ssManager->GetSSRecord (cid)->GetModulationType (); + modulationType = GetBurstProfileManager ()->GetModulationType (diuc, WimaxNetDevice::DIRECTION_DOWNLINK); } } else diff -urNw -X exclude_files ns-3-dev-original/src/devices/wimax/bs-scheduler-simple.cc ns-3-dev/src/devices/wimax/bs-scheduler-simple.cc --- ns-3-dev-original/src/devices/wimax/bs-scheduler-simple.cc 2010-06-04 19:29:43.110103127 -0300 +++ ns-3-dev/src/devices/wimax/bs-scheduler-simple.cc 2010-06-04 19:29:47.602103090 -0300 @@ -177,11 +177,15 @@ packet = connection->Dequeue (MacHeaderType::HEADER_TYPE_GENERIC, availableByte); availableSymbols = 0; } - else + else if (availableSymbols >= nrSymbolsRequired) { packet = connection->Dequeue (); availableSymbols -= nrSymbolsRequired; } + else + { + break; + } burst->AddPacket (packet); } AddDownlinkBurst (connection, diuc, modulationType, burst); diff -urNw -X exclude_files ns-3-dev-original/src/devices/wimax/wimax-mac-queue.cc ns-3-dev/src/devices/wimax/wimax-mac-queue.cc --- ns-3-dev-original/src/devices/wimax/wimax-mac-queue.cc 2010-06-04 19:29:43.206104371 -0300 +++ ns-3-dev/src/devices/wimax/wimax-mac-queue.cc 2010-06-04 19:29:47.690102412 -0300 @@ -191,14 +191,13 @@ /*check because may be it is a bandwidth request packet (in which case a Bandwidth Request Header has already been added to the packet) in which case Generic MAC Header will not be added to it. this will only happen in the case of SS as only SS sends the bandwidth request packet. */ + m_bytes -= element.GetSize (); if (element.m_hdrType.GetType () == MacHeaderType::HEADER_TYPE_GENERIC) { packet->AddHeader (element.m_hdr); } packet->AddHeader (element.m_hdrType); - m_bytes -= element.GetSize (); - m_traceDequeue (packet); return packet; }