lte: (fixes #2523) Scheduler to generate properly the RLC PDU (fix by Marco Miozzo and Zoraze Ali)
Extend all schedulers to generate properly the RLC PDU structure when there is no retransmission on the layer.
--- a/src/lte/model/cqa-ff-mac-scheduler.cc Thu Nov 03 18:31:23 2016 +0100
+++ b/src/lte/model/cqa-ff-mac-scheduler.cc Mon Nov 07 12:13:34 2016 +0100
@@ -1165,9 +1165,18 @@
{
if (j < dci.m_ndi.size ())
{
+ NS_LOG_INFO (" layer " << (uint16_t)j << " tb size " << dci.m_tbsSize.at (j));
rlcPduListPerLc.push_back ((*itRlcPdu).second.at (j).at (dci.m_harqProcess).at (k));
}
}
+ else
+ { // if no retx needed on layer j, push an RlcPduListElement_s object with m_size=0 to keep the size of rlcPduListPerLc vector = 2 in case of MIMO
+ NS_LOG_INFO (" layer " << (uint16_t)j << " tb size "<<dci.m_tbsSize.at (j));
+ RlcPduListElement_s emptyElement;
+ emptyElement.m_logicalChannelIdentity = (*itRlcPdu).second.at (j).at (dci.m_harqProcess).at (k).m_logicalChannelIdentity;
+ emptyElement.m_size = 0;
+ rlcPduListPerLc.push_back (emptyElement);
+ }
}
if (rlcPduListPerLc.size () > 0)
--- a/src/lte/model/fdbet-ff-mac-scheduler.cc Thu Nov 03 18:31:23 2016 +0100
+++ b/src/lte/model/fdbet-ff-mac-scheduler.cc Mon Nov 07 12:13:34 2016 +0100
@@ -977,9 +977,18 @@
{
if (j < dci.m_ndi.size ())
{
+ NS_LOG_INFO (" layer " << (uint16_t)j << " tb size " << dci.m_tbsSize.at (j));
rlcPduListPerLc.push_back ((*itRlcPdu).second.at (j).at (dci.m_harqProcess).at (k));
}
}
+ else
+ { // if no retx needed on layer j, push an RlcPduListElement_s object with m_size=0 to keep the size of rlcPduListPerLc vector = 2 in case of MIMO
+ NS_LOG_INFO (" layer " << (uint16_t)j << " tb size "<<dci.m_tbsSize.at (j));
+ RlcPduListElement_s emptyElement;
+ emptyElement.m_logicalChannelIdentity = (*itRlcPdu).second.at (j).at (dci.m_harqProcess).at (k).m_logicalChannelIdentity;
+ emptyElement.m_size = 0;
+ rlcPduListPerLc.push_back (emptyElement);
+ }
}
if (rlcPduListPerLc.size () > 0)
--- a/src/lte/model/fdmt-ff-mac-scheduler.cc Thu Nov 03 18:31:23 2016 +0100
+++ b/src/lte/model/fdmt-ff-mac-scheduler.cc Mon Nov 07 12:13:34 2016 +0100
@@ -964,9 +964,18 @@
{
if (j < dci.m_ndi.size ())
{
+ NS_LOG_INFO (" layer " << (uint16_t)j << " tb size " << dci.m_tbsSize.at (j));
rlcPduListPerLc.push_back ((*itRlcPdu).second.at (j).at (dci.m_harqProcess).at (k));
}
}
+ else
+ { // if no retx needed on layer j, push an RlcPduListElement_s object with m_size=0 to keep the size of rlcPduListPerLc vector = 2 in case of MIMO
+ NS_LOG_INFO (" layer " << (uint16_t)j << " tb size "<<dci.m_tbsSize.at (j));
+ RlcPduListElement_s emptyElement;
+ emptyElement.m_logicalChannelIdentity = (*itRlcPdu).second.at (j).at (dci.m_harqProcess).at (k).m_logicalChannelIdentity;
+ emptyElement.m_size = 0;
+ rlcPduListPerLc.push_back (emptyElement);
+ }
}
if (rlcPduListPerLc.size () > 0)
--- a/src/lte/model/fdtbfq-ff-mac-scheduler.cc Thu Nov 03 18:31:23 2016 +0100
+++ b/src/lte/model/fdtbfq-ff-mac-scheduler.cc Mon Nov 07 12:13:34 2016 +0100
@@ -1071,9 +1071,18 @@
{
if (j < dci.m_ndi.size ())
{
+ NS_LOG_INFO (" layer " << (uint16_t)j << " tb size " << dci.m_tbsSize.at (j));
rlcPduListPerLc.push_back ((*itRlcPdu).second.at (j).at (dci.m_harqProcess).at (k));
}
}
+ else
+ { // if no retx needed on layer j, push an RlcPduListElement_s object with m_size=0 to keep the size of rlcPduListPerLc vector = 2 in case of MIMO
+ NS_LOG_INFO (" layer " << (uint16_t)j << " tb size "<<dci.m_tbsSize.at (j));
+ RlcPduListElement_s emptyElement;
+ emptyElement.m_logicalChannelIdentity = (*itRlcPdu).second.at (j).at (dci.m_harqProcess).at (k).m_logicalChannelIdentity;
+ emptyElement.m_size = 0;
+ rlcPduListPerLc.push_back (emptyElement);
+ }
}
if (rlcPduListPerLc.size () > 0)
--- a/src/lte/model/pf-ff-mac-scheduler.cc Thu Nov 03 18:31:23 2016 +0100
+++ b/src/lte/model/pf-ff-mac-scheduler.cc Mon Nov 07 12:13:34 2016 +0100
@@ -1059,9 +1059,18 @@
{
if (j < dci.m_ndi.size ())
{
+ NS_LOG_INFO (" layer " << (uint16_t)j << " tb size " << dci.m_tbsSize.at (j));
rlcPduListPerLc.push_back ((*itRlcPdu).second.at (j).at (dci.m_harqProcess).at (k));
}
}
+ else
+ { // if no retx needed on layer j, push an RlcPduListElement_s object with m_size=0 to keep the size of rlcPduListPerLc vector = 2 in case of MIMO
+ NS_LOG_INFO (" layer " << (uint16_t)j << " tb size "<<dci.m_tbsSize.at (j));
+ RlcPduListElement_s emptyElement;
+ emptyElement.m_logicalChannelIdentity = (*itRlcPdu).second.at (j).at (dci.m_harqProcess).at (k).m_logicalChannelIdentity;
+ emptyElement.m_size = 0;
+ rlcPduListPerLc.push_back (emptyElement);
+ }
}
if (rlcPduListPerLc.size () > 0)
--- a/src/lte/model/pss-ff-mac-scheduler.cc Thu Nov 03 18:31:23 2016 +0100
+++ b/src/lte/model/pss-ff-mac-scheduler.cc Mon Nov 07 12:13:34 2016 +0100
@@ -1056,9 +1056,18 @@
{
if (j < dci.m_ndi.size ())
{
+ NS_LOG_INFO (" layer " << (uint16_t)j << " tb size " << dci.m_tbsSize.at (j));
rlcPduListPerLc.push_back ((*itRlcPdu).second.at (j).at (dci.m_harqProcess).at (k));
}
}
+ else
+ { // if no retx needed on layer j, push an RlcPduListElement_s object with m_size=0 to keep the size of rlcPduListPerLc vector = 2 in case of MIMO
+ NS_LOG_INFO (" layer " << (uint16_t)j << " tb size "<<dci.m_tbsSize.at (j));
+ RlcPduListElement_s emptyElement;
+ emptyElement.m_logicalChannelIdentity = (*itRlcPdu).second.at (j).at (dci.m_harqProcess).at (k).m_logicalChannelIdentity;
+ emptyElement.m_size = 0;
+ rlcPduListPerLc.push_back (emptyElement);
+ }
}
if (rlcPduListPerLc.size () > 0)
--- a/src/lte/model/rr-ff-mac-scheduler.cc Thu Nov 03 18:31:23 2016 +0100
+++ b/src/lte/model/rr-ff-mac-scheduler.cc Mon Nov 07 12:13:34 2016 +0100
@@ -940,9 +940,18 @@
{
if (j < dci.m_ndi.size ())
{
+ NS_LOG_INFO (" layer " << (uint16_t)j << " tb size " << dci.m_tbsSize.at (j));
rlcPduListPerLc.push_back ((*itRlcPdu).second.at (j).at (dci.m_harqProcess).at (k));
}
}
+ else
+ { // if no retx needed on layer j, push an RlcPduListElement_s object with m_size=0 to keep the size of rlcPduListPerLc vector = 2 in case of MIMO
+ NS_LOG_INFO (" layer " << (uint16_t)j << " tb size "<<dci.m_tbsSize.at (j));
+ RlcPduListElement_s emptyElement;
+ emptyElement.m_logicalChannelIdentity = (*itRlcPdu).second.at (j).at (dci.m_harqProcess).at (k).m_logicalChannelIdentity;
+ emptyElement.m_size = 0;
+ rlcPduListPerLc.push_back (emptyElement);
+ }
}
if (rlcPduListPerLc.size () > 0)
--- a/src/lte/model/tdbet-ff-mac-scheduler.cc Thu Nov 03 18:31:23 2016 +0100
+++ b/src/lte/model/tdbet-ff-mac-scheduler.cc Mon Nov 07 12:13:34 2016 +0100
@@ -973,9 +973,18 @@
{
if (j < dci.m_ndi.size ())
{
+ NS_LOG_INFO (" layer " << (uint16_t)j << " tb size " << dci.m_tbsSize.at (j));
rlcPduListPerLc.push_back ((*itRlcPdu).second.at (j).at (dci.m_harqProcess).at (k));
}
}
+ else
+ { // if no retx needed on layer j, push an RlcPduListElement_s object with m_size=0 to keep the size of rlcPduListPerLc vector = 2 in case of MIMO
+ NS_LOG_INFO (" layer " << (uint16_t)j << " tb size "<<dci.m_tbsSize.at (j));
+ RlcPduListElement_s emptyElement;
+ emptyElement.m_logicalChannelIdentity = (*itRlcPdu).second.at (j).at (dci.m_harqProcess).at (k).m_logicalChannelIdentity;
+ emptyElement.m_size = 0;
+ rlcPduListPerLc.push_back (emptyElement);
+ }
}
if (rlcPduListPerLc.size () > 0)
--- a/src/lte/model/tdmt-ff-mac-scheduler.cc Thu Nov 03 18:31:23 2016 +0100
+++ b/src/lte/model/tdmt-ff-mac-scheduler.cc Mon Nov 07 12:13:34 2016 +0100
@@ -961,9 +961,18 @@
{
if (j < dci.m_ndi.size ())
{
+ NS_LOG_INFO (" layer " << (uint16_t)j << " tb size " << dci.m_tbsSize.at (j));
rlcPduListPerLc.push_back ((*itRlcPdu).second.at (j).at (dci.m_harqProcess).at (k));
}
}
+ else
+ { // if no retx needed on layer j, push an RlcPduListElement_s object with m_size=0 to keep the size of rlcPduListPerLc vector = 2 in case of MIMO
+ NS_LOG_INFO (" layer " << (uint16_t)j << " tb size "<<dci.m_tbsSize.at (j));
+ RlcPduListElement_s emptyElement;
+ emptyElement.m_logicalChannelIdentity = (*itRlcPdu).second.at (j).at (dci.m_harqProcess).at (k).m_logicalChannelIdentity;
+ emptyElement.m_size = 0;
+ rlcPduListPerLc.push_back (emptyElement);
+ }
}
if (rlcPduListPerLc.size () > 0)
--- a/src/lte/model/tdtbfq-ff-mac-scheduler.cc Thu Nov 03 18:31:23 2016 +0100
+++ b/src/lte/model/tdtbfq-ff-mac-scheduler.cc Mon Nov 07 12:13:34 2016 +0100
@@ -1070,9 +1070,18 @@
{
if (j < dci.m_ndi.size ())
{
+ NS_LOG_INFO (" layer " << (uint16_t)j << " tb size " << dci.m_tbsSize.at (j));
rlcPduListPerLc.push_back ((*itRlcPdu).second.at (j).at (dci.m_harqProcess).at (k));
}
}
+ else
+ { // if no retx needed on layer j, push an RlcPduListElement_s object with m_size=0 to keep the size of rlcPduListPerLc vector = 2 in case of MIMO
+ NS_LOG_INFO (" layer " << (uint16_t)j << " tb size "<<dci.m_tbsSize.at (j));
+ RlcPduListElement_s emptyElement;
+ emptyElement.m_logicalChannelIdentity = (*itRlcPdu).second.at (j).at (dci.m_harqProcess).at (k).m_logicalChannelIdentity;
+ emptyElement.m_size = 0;
+ rlcPduListPerLc.push_back (emptyElement);
+ }
}
if (rlcPduListPerLc.size () > 0)
--- a/src/lte/model/tta-ff-mac-scheduler.cc Thu Nov 03 18:31:23 2016 +0100
+++ b/src/lte/model/tta-ff-mac-scheduler.cc Mon Nov 07 12:13:34 2016 +0100
@@ -962,9 +962,18 @@
{
if (j < dci.m_ndi.size ())
{
+ NS_LOG_INFO (" layer " << (uint16_t)j << " tb size " << dci.m_tbsSize.at (j));
rlcPduListPerLc.push_back ((*itRlcPdu).second.at (j).at (dci.m_harqProcess).at (k));
}
}
+ else
+ { // if no retx needed on layer j, push an RlcPduListElement_s object with m_size=0 to keep the size of rlcPduListPerLc vector = 2 in case of MIMO
+ NS_LOG_INFO (" layer " << (uint16_t)j << " tb size "<<dci.m_tbsSize.at (j));
+ RlcPduListElement_s emptyElement;
+ emptyElement.m_logicalChannelIdentity = (*itRlcPdu).second.at (j).at (dci.m_harqProcess).at (k).m_logicalChannelIdentity;
+ emptyElement.m_size = 0;
+ rlcPduListPerLc.push_back (emptyElement);
+ }
}
if (rlcPduListPerLc.size () > 0)