|
60 |
delete [] m_receiveBitMap; |
60 |
delete [] m_receiveBitMap; |
61 |
} |
61 |
} |
62 |
m_receiveBitMap = new uint8_t [m_bitMapSize] (); |
62 |
m_receiveBitMap = new uint8_t [m_bitMapSize] (); |
63 |
memset (m_receiveBitMap,1,m_bitMapSize); |
63 |
memset (m_receiveBitMap,0xFF,m_bitMapSize); |
64 |
} |
64 |
} |
65 |
|
65 |
|
66 |
uint32_t |
66 |
uint32_t |
|
103 |
void |
103 |
void |
104 |
PacketLossCounter::NotifyReceived (uint32_t seqNum) |
104 |
PacketLossCounter::NotifyReceived (uint32_t seqNum) |
105 |
{ |
105 |
{ |
106 |
if (seqNum>(uint32_t)(m_bitMapSize*8)-1) |
106 |
for (uint32_t i=m_lastMaxSeqNum+1; i<=seqNum;i++) |
107 |
{ |
107 |
{ |
108 |
for (uint32_t i=m_lastMaxSeqNum+1; i<=seqNum;i++) |
108 |
if (GetBit(i)!=1) |
109 |
{ |
109 |
{ |
110 |
if (GetBit(i)!=1) |
110 |
NS_LOG_INFO ("Packet lost: " << i-(m_bitMapSize*8)); |
111 |
{ |
111 |
m_lost++; |
112 |
NS_LOG_INFO ("Packet lost: " << i-(m_bitMapSize*8)); |
|
|
113 |
m_lost++; |
114 |
} |
115 |
SetBit(i, 0); |
116 |
} |
112 |
} |
|
|
113 |
SetBit(i, 0); |
117 |
} |
114 |
} |
118 |
SetBit(seqNum, 1); |
115 |
SetBit(seqNum, 1); |
119 |
if (seqNum>m_lastMaxSeqNum) |
116 |
if (seqNum>m_lastMaxSeqNum) |