LEFT | RIGHT |
1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ | 1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ |
2 /* | 2 /* |
3 * Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC) | 3 * Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC) |
4 * | 4 * |
5 * This program is free software; you can redistribute it and/or modify | 5 * This program is free software; you can redistribute it and/or modify |
6 * it under the terms of the GNU General Public License version 2 as | 6 * it under the terms of the GNU General Public License version 2 as |
7 * published by the Free Software Foundation; | 7 * published by the Free Software Foundation; |
8 * | 8 * |
9 * This program is distributed in the hope that it will be useful, | 9 * This program is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 1005 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1016 // SCHED SAP | 1016 // SCHED SAP |
1017 // //////////////////////////////////////////// | 1017 // //////////////////////////////////////////// |
1018 | 1018 |
1019 | 1019 |
1020 | 1020 |
1021 void | 1021 void |
1022 LteEnbMac::DoSchedDlConfigInd (FfMacSchedSapUser::SchedDlConfigIndParameters ind
) | 1022 LteEnbMac::DoSchedDlConfigInd (FfMacSchedSapUser::SchedDlConfigIndParameters ind
) |
1023 { | 1023 { |
1024 NS_LOG_FUNCTION (this); | 1024 NS_LOG_FUNCTION (this); |
1025 // Create DL PHY PDU | 1025 // Create DL PHY PDU |
1026 Ptr<PacketBurst> pb = CreateObject<PacketBurst> (); | |
1027 std::map <LteFlowId_t, LteMacSapUser* >::iterator it; | |
1028 | 1026 |
1029 for (unsigned int i = 0; i < ind.m_buildDataList.size (); i++) | 1027 for (unsigned int i = 0; i < ind.m_buildDataList.size (); i++) |
1030 { | 1028 { |
1031 for (uint16_t layer = 0; layer < ind.m_buildDataList.at (i).m_dci.m_ndi.si
ze (); layer++) | 1029 for (uint16_t layer = 0; layer < ind.m_buildDataList.at (i).m_dci.m_ndi.si
ze (); layer++) |
1032 { | 1030 { |
1033 if (ind.m_buildDataList.at (i).m_dci.m_ndi.at (layer) == 1) | 1031 if (ind.m_buildDataList.at (i).m_dci.m_ndi.at (layer) == 1) |
1034 { | 1032 { |
1035 // new data -> force emptying correspondent harq pkt buffer | 1033 // new data -> force emptying correspondent harq pkt buffer |
1036 std::map <uint16_t, DlHarqProcessesBuffer_t>::iterator it1 = m_miD
lHarqProcessesPackets.find (ind.m_buildDataList.at (i).m_rnti); | 1034 std::map <uint16_t, DlHarqProcessesBuffer_t>::iterator it = m_miDl
HarqProcessesPackets.find (ind.m_buildDataList.at (i).m_rnti); |
1037 NS_ASSERT (it1 != m_miDlHarqProcessesPackets.end ()); | 1035 NS_ASSERT (it != m_miDlHarqProcessesPackets.end ()); |
1038 for (uint16_t lcId = 0; lcId < (*it1).second.size (); lcId++) | 1036 for (uint16_t lcId = 0; lcId < (*it).second.size (); lcId++) |
1039 { | 1037 { |
1040 Ptr<PacketBurst> pb1 = CreateObject <PacketBurst> (); | 1038 Ptr<PacketBurst> pb = CreateObject <PacketBurst> (); |
1041 (*it1).second.at (lcId).at (ind.m_buildDataList.at (i).m_dci.m
_harqProcess) = pb1; | 1039 (*it).second.at (lcId).at (ind.m_buildDataList.at (i).m_dci.m_
harqProcess) = pb; |
1042 } | 1040 } |
1043 } | 1041 } |
1044 } | 1042 } |
| 1043 Ptr<PacketBurst> pb = CreateObject<PacketBurst> (); |
1045 for (unsigned int j = 0; j < ind.m_buildDataList.at (i).m_rlcPduList.size
(); j++) | 1044 for (unsigned int j = 0; j < ind.m_buildDataList.at (i).m_rlcPduList.size
(); j++) |
1046 { | 1045 { |
1047 for (uint16_t k = 0; k < ind.m_buildDataList.at (i).m_rlcPduList.at (j
).size (); k++) | 1046 for (uint8_t k = 0; k < ind.m_buildDataList.at (i).m_rlcPduList.at (j)
.size (); k++) |
1048 { | 1047 { |
1049 if (ind.m_buildDataList.at (i).m_dci.m_ndi.at (k) == 1) | 1048 if (ind.m_buildDataList.at (i).m_dci.m_ndi.at (k) == 1) |
1050 { | 1049 { |
1051 // New Data -> retrieve it from RLC | 1050 // New Data -> retrieve it from RLC |
1052 uint16_t rnti = ind.m_buildDataList.at (i).m_rnti; | 1051 uint16_t rnti = ind.m_buildDataList.at (i).m_rnti; |
1053 uint8_t lcid = ind.m_buildDataList.at (i).m_rlcPduList.at (j).
at (k).m_logicalChannelIdentity; | 1052 uint8_t lcid = ind.m_buildDataList.at (i).m_rlcPduList.at (j).
at (k).m_logicalChannelIdentity; |
1054 std::map <uint16_t, std::map<uint8_t, LteMacSapUser*> >::itera
tor rntiIt = m_rlcAttached.find (rnti); | 1053 std::map <uint16_t, std::map<uint8_t, LteMacSapUser*> >::itera
tor rntiIt = m_rlcAttached.find (rnti); |
1055 NS_ASSERT_MSG (rntiIt != m_rlcAttached.end (), "could not find
RNTI" << rnti); | 1054 NS_ASSERT_MSG (rntiIt != m_rlcAttached.end (), "could not find
RNTI" << rnti); |
1056 std::map<uint8_t, LteMacSapUser*>::iterator lcidIt = rntiIt->s
econd.find (lcid); | 1055 std::map<uint8_t, LteMacSapUser*>::iterator lcidIt = rntiIt->s
econd.find (lcid); |
1057 NS_ASSERT_MSG (lcidIt != rntiIt->second.end (), "could not fin
d LCID" << (uint32_t)lcid<<" carrier id:"<<(uint16_t)m_componentCarrierId); | 1056 NS_ASSERT_MSG (lcidIt != rntiIt->second.end (), "could not fin
d LCID" << (uint32_t)lcid<<" carrier id:"<<(uint16_t)m_componentCarrierId); |
1058 NS_LOG_DEBUG (this << " rnti= " << rnti << " lcid= " << (uint3
2_t) lcid << " layer= " << k); | 1057 NS_LOG_DEBUG (this << " rnti= " << rnti << " lcid= " << (uint3
2_t) lcid << " layer= " << k); |
1059 (*lcidIt).second->NotifyTxOpportunity (ind.m_buildDataList.at
(i).m_rlcPduList.at (j).at (k).m_size, (uint8_t)k, ind.m_buildDataList.at (i).m_
dci.m_harqProcess, m_componentCarrierId, rnti, lcid); | 1058 (*lcidIt).second->NotifyTxOpportunity (ind.m_buildDataList.at
(i).m_rlcPduList.at (j).at (k).m_size, k, ind.m_buildDataList.at (i).m_dci.m_har
qProcess, m_componentCarrierId, rnti, lcid); |
1060 } | 1059 } |
1061 else | 1060 else |
1062 { | 1061 { |
1063 if (ind.m_buildDataList.at (i).m_dci.m_tbsSize.at (k) > 0) | 1062 if (ind.m_buildDataList.at (i).m_dci.m_tbsSize.at (k) > 0) |
1064 { | 1063 { |
1065 // HARQ retransmission -> retrieve TB from HARQ buffer | 1064 // HARQ retransmission -> retrieve TB from HARQ buffer |
1066 std::map <uint16_t, DlHarqProcessesBuffer_t>::iterator it1
= m_miDlHarqProcessesPackets.find (ind.m_buildDataList.at (i).m_rnti); | 1065 std::map <uint16_t, DlHarqProcessesBuffer_t>::iterator it1
= m_miDlHarqProcessesPackets.find (ind.m_buildDataList.at (i).m_rnti); |
1067 NS_ASSERT (it1 != m_miDlHarqProcessesPackets.end ()); | 1066 NS_ASSERT (it1 != m_miDlHarqProcessesPackets.end ()); |
1068 pb = (*it1).second.at (k).at ( ind.m_buildDataList.at (i).
m_dci.m_harqProcess); | 1067 pb = (*it1).second.at (k).at ( ind.m_buildDataList.at (i).
m_dci.m_harqProcess); |
1069 for (std::list<Ptr<Packet> >::const_iterator l = pb->Begin
(); l != pb->End (); ++l) | 1068 for (std::list<Ptr<Packet> >::const_iterator l = pb->Begin
(); l != pb->End (); ++l) |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1264 else | 1263 else |
1265 { | 1264 { |
1266 NS_FATAL_ERROR (" HARQ functionality not implemented"); | 1265 NS_FATAL_ERROR (" HARQ functionality not implemented"); |
1267 } | 1266 } |
1268 } | 1267 } |
1269 m_dlInfoListReceived.push_back (params); | 1268 m_dlInfoListReceived.push_back (params); |
1270 } | 1269 } |
1271 | 1270 |
1272 | 1271 |
1273 } // namespace ns3 | 1272 } // namespace ns3 |
LEFT | RIGHT |