Fix PacketSet parameters' calculation when sending bursts so that actual transmit rate matches configured rate

Fixes issue #157
This commit is contained in:
Srivats P 2015-09-08 18:46:56 +05:30
parent 32766c6e8e
commit 449facd119

View File

@ -197,10 +197,8 @@ void AbstractPort::updatePacketListSequential()
case OstProto::StreamControl::e_su_bursts: case OstProto::StreamControl::e_su_bursts:
burstSize = streamList_[i]->burstSize(); burstSize = streamList_[i]->burstSize();
x = AbstractProtocol::lcm(frameVariableCount, burstSize); x = AbstractProtocol::lcm(frameVariableCount, burstSize);
n = ulong(burstSize * streamList_[i]->burstRate() n = ulong(burstSize * streamList_[i]->numBursts()) / x;
* streamList_[i]->numBursts()) / x; y = ulong(burstSize * streamList_[i]->numBursts()) % x;
y = ulong(burstSize * streamList_[i]->burstRate()
* streamList_[i]->numBursts()) % x;
if (streamList_[i]->burstRate() > 0) if (streamList_[i]->burstRate() > 0)
{ {
ibg = 1e9/double(streamList_[i]->burstRate()); ibg = 1e9/double(streamList_[i]->burstRate());