--- a/src/lte/model/lte-ue-mac.cc Tue Jun 26 14:07:07 2012 +0200
+++ b/src/lte/model/lte-ue-mac.cc Mon Jul 02 11:34:21 2012 +0200
@@ -292,16 +292,22 @@
MacCeListElement_s bsr;
bsr.m_rnti = m_rnti;
bsr.m_macCeType = MacCeListElement_s::BSR;
- // BSR
- std::map <uint8_t, uint64_t>::iterator it;
- NS_ASSERT_MSG (m_ulBsrReceived.size () <=4, " Too many LCs (max is 4)");
-
+
+ // BSR is reported for each LCG. As a simplification, we consider that all LCs belong to the first LCG.
+ std::map <uint8_t, uint64_t>::iterator it;
+ int queue = 0;
for (it = m_ulBsrReceived.begin (); it != m_ulBsrReceived.end (); it++)
{
- int queue = (*it).second;
- int index = BufferSizeLevelBsr::BufferSize2BsrId (queue);
- bsr.m_macCeValue.m_bufferStatus.push_back (index);
+ queue += (*it).second;
+
}
+ int index = BufferSizeLevelBsr::BufferSize2BsrId (queue);
+ bsr.m_macCeValue.m_bufferStatus.push_back (index);
+ // FF API says that all 4 LCGs are always present
+ // we do so but reporting a 0 size for all other LCGs
+ bsr.m_macCeValue.m_bufferStatus.push_back (BufferSizeLevelBsr::BufferSize2BsrId (0));
+ bsr.m_macCeValue.m_bufferStatus.push_back (BufferSizeLevelBsr::BufferSize2BsrId (0));
+ bsr.m_macCeValue.m_bufferStatus.push_back (BufferSizeLevelBsr::BufferSize2BsrId (0));
// create the feedback to eNB
Ptr<BsrIdealControlMessage> msg = Create<BsrIdealControlMessage> ();