|
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); |
|
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 |
} |