View | Details | Raw Unified | Return to bug 995
Collapse All | Expand All

(-)a/src/devices/wimax/bs-scheduler-rtps.cc (-1 / +1 lines)
 Lines 494-500    Link Here 
494
  ServiceFlowRecord *serviceFlowRecord;
494
  ServiceFlowRecord *serviceFlowRecord;
495
  std::vector<ServiceFlow*> serviceFlows;
495
  std::vector<ServiceFlow*> serviceFlows;
496
496
497
  std::deque<WimaxMacQueue::QueueElement>::const_iterator iter3;
497
///  std::deque<WimaxMacQueue::QueueElement>::const_iterator iter3;
498
  uint32_t symbolsRequired[100];
498
  uint32_t symbolsRequired[100];
499
  WimaxPhy::ModulationType modulationType_[100];
499
  WimaxPhy::ModulationType modulationType_[100];
500
  uint8_t diuc_[100];
500
  uint8_t diuc_[100];
(-)a/src/devices/wimax/bs-scheduler-simple.cc (-3 / +8 lines)
 Lines 159-171    Link Here 
159
            {
159
            {
160
              uint32_t BurstSizeSymbols =  GetBs ()->GetPhy ()->GetNrSymbols (burst->GetSize (), modulationType);
160
              uint32_t BurstSizeSymbols =  GetBs ()->GetPhy ()->GetNrSymbols (burst->GetSize (), modulationType);
161
              AddDownlinkBurst (connection, diuc, modulationType, burst);
161
              AddDownlinkBurst (connection, diuc, modulationType, burst);
162
              availableSymbols -= BurstSizeSymbols;
162
163
              if (availableSymbols <= BurstSizeSymbols)
164
                {
165
                  availableSymbols -= BurstSizeSymbols; // XXX: Overflows but don't know how to fix
166
                  break;
167
                }
163
            }
168
            }
164
        }
169
        }
165
      else
170
      else
166
        {
171
        {
167
          burst = Create<PacketBurst> ();
172
          burst = Create<PacketBurst> ();
168
          while (availableSymbols >= 0 && connection->HasPackets () == true)
173
          while (connection->HasPackets () == true)
169
            {
174
            {
170
              uint32_t FirstPacketSize = connection->GetQueue ()->GetFirstPacketRequiredByte (MacHeaderType::HEADER_TYPE_GENERIC);
175
              uint32_t FirstPacketSize = connection->GetQueue ()->GetFirstPacketRequiredByte (MacHeaderType::HEADER_TYPE_GENERIC);
171
              nrSymbolsRequired = GetBs ()->GetPhy ()->GetNrSymbols (FirstPacketSize, modulationType);
176
              nrSymbolsRequired = GetBs ()->GetPhy ()->GetNrSymbols (FirstPacketSize, modulationType);
 Lines 190-196    Link Here 
190
            }
195
            }
191
          AddDownlinkBurst (connection, diuc, modulationType, burst);
196
          AddDownlinkBurst (connection, diuc, modulationType, burst);
192
        }
197
        }
193
      if (availableSymbols <= 0)
198
      if (availableSymbols == 0)
194
        {
199
        {
195
          break;
200
          break;
196
        }
201
        }
(-)a/src/devices/wimax/simple-ofdm-wimax-phy.cc (-1 / +1 lines)
 Lines 797-803    Link Here 
797
  m_nrBlocks = GetNrBlocks (burstSize, modulationType);
797
  m_nrBlocks = GetNrBlocks (burstSize, modulationType);
798
  m_paddingBits = (m_nrBlocks * m_blockSize) - (burstSize * 8);
798
  m_paddingBits = (m_nrBlocks * m_blockSize) - (burstSize * 8);
799
  m_nrRemainingBlocksToSend = m_nrBlocks;
799
  m_nrRemainingBlocksToSend = m_nrBlocks;
800
  NS_ASSERT_MSG (m_paddingBits >= 0, "Size of padding bytes < 0");
800
  NS_ASSERT_MSG ((m_nrBlocks * m_blockSize) >= (burstSize * 8), "Size of padding bytes < 0");
801
}
801
}
802
802
803
uint16_t
803
uint16_t
(-)a/src/devices/wimax/wimax-mac-queue.cc (-4 / +4 lines)
 Lines 171-186    Link Here 
171
      if (element.m_hdrType.GetType () == MacHeaderType::HEADER_TYPE_GENERIC)
171
      if (element.m_hdrType.GetType () == MacHeaderType::HEADER_TYPE_GENERIC)
172
        {
172
        {
173
          NS_LOG_INFO ("Enqueued Packet IS A data packet");
173
          NS_LOG_INFO ("Enqueued Packet IS A data packet");
174
          NS_ASSERT_MSG (m_nrDataPackets >= 1,
175
                         "Can not enqueue more packets: no space left in the queue");
174
          m_nrDataPackets--;
176
          m_nrDataPackets--;
175
          NS_ASSERT_MSG (m_nrDataPackets >= 0,
176
                         "Can not enqueue more packets: no space left in the queue");
177
        }
177
        }
178
      else
178
      else
179
        {
179
        {
180
          NS_LOG_INFO ("Enqueued Packet IS A Request BW packet");
180
          NS_LOG_INFO ("Enqueued Packet IS A Request BW packet");
181
          NS_ASSERT_MSG (m_nrRequestPackets >= 1,
182
                         "Can not enqueue more packets: no space left in the queue");
181
          m_nrRequestPackets--;
183
          m_nrRequestPackets--;
182
          NS_ASSERT_MSG (m_nrRequestPackets >= 0,
183
                         "Can not enqueue more packets: no space left in the queue");
184
        }
184
        }
185
185
186
      Ptr<Packet> packet = element.m_packet;
186
      Ptr<Packet> packet = element.m_packet;

Return to bug 995