OLD | NEW |
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 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 return m_cschedSapProvider; | 289 return m_cschedSapProvider; |
290 } | 290 } |
291 | 291 |
292 FfMacSchedSapProvider* | 292 FfMacSchedSapProvider* |
293 TdBetFfMacScheduler::GetFfMacSchedSapProvider () | 293 TdBetFfMacScheduler::GetFfMacSchedSapProvider () |
294 { | 294 { |
295 return m_schedSapProvider; | 295 return m_schedSapProvider; |
296 } | 296 } |
297 | 297 |
298 void | 298 void |
| 299 TdBetFfMacScheduler::SetLteFfrSapProvider (LteFfrSapProvider* s) |
| 300 { |
| 301 m_ffrSapProvider = s; |
| 302 } |
| 303 |
| 304 LteFfrSapUser* |
| 305 TdBetFfMacScheduler::GetLteFfrSapUser () |
| 306 { |
| 307 return m_ffrSapUser; |
| 308 } |
| 309 |
| 310 void |
299 TdBetFfMacScheduler::DoCschedCellConfigReq (const struct FfMacCschedSapProvider:
:CschedCellConfigReqParameters& params) | 311 TdBetFfMacScheduler::DoCschedCellConfigReq (const struct FfMacCschedSapProvider:
:CschedCellConfigReqParameters& params) |
300 { | 312 { |
301 NS_LOG_FUNCTION (this); | 313 NS_LOG_FUNCTION (this); |
302 // Read the subset of parameters used | 314 // Read the subset of parameters used |
303 m_cschedCellConfig = params; | 315 m_cschedCellConfig = params; |
304 m_rachAllocationMap.resize (m_cschedCellConfig.m_ulBandwidth, 0); | 316 m_rachAllocationMap.resize (m_cschedCellConfig.m_ulBandwidth, 0); |
305 FfMacCschedSapUser::CschedUeConfigCnfParameters cnf; | 317 FfMacCschedSapUser::CschedUeConfigCnfParameters cnf; |
306 cnf.m_result = SUCCESS; | 318 cnf.m_result = SUCCESS; |
307 m_cschedSapUser->CschedUeConfigCnf (cnf); | 319 m_cschedSapUser->CschedUeConfigCnf (cnf); |
308 return; | 320 return; |
(...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
874 uint8_t startRbg = dciRbg.at (dciRbg.size () - 1); | 886 uint8_t startRbg = dciRbg.at (dciRbg.size () - 1); |
875 std::vector <bool> rbgMapCopy = rbgMap; | 887 std::vector <bool> rbgMapCopy = rbgMap; |
876 while ((j < dciRbg.size ())&&(startRbg != rbgId)) | 888 while ((j < dciRbg.size ())&&(startRbg != rbgId)) |
877 { | 889 { |
878 if (rbgMapCopy.at (rbgId) == false) | 890 if (rbgMapCopy.at (rbgId) == false) |
879 { | 891 { |
880 rbgMapCopy.at (rbgId) = true; | 892 rbgMapCopy.at (rbgId) = true; |
881 dciRbg.at (j) = rbgId; | 893 dciRbg.at (j) = rbgId; |
882 j++; | 894 j++; |
883 } | 895 } |
884 rbgId++; | 896 rbgId = (rbgId + 1) % rbgNum; |
885 } | 897 } |
886 if (j == dciRbg.size ()) | 898 if (j == dciRbg.size ()) |
887 { | 899 { |
888 // find new RBGs -> update DCI map | 900 // find new RBGs -> update DCI map |
889 uint32_t rbgMask = 0; | 901 uint32_t rbgMask = 0; |
890 for (uint16_t k = 0; k < dciRbg.size (); k++) | 902 for (uint16_t k = 0; k < dciRbg.size (); k++) |
891 { | 903 { |
892 rbgMask = rbgMask + (0x1 << dciRbg.at (k)); | 904 rbgMask = rbgMask + (0x1 << dciRbg.at (k)); |
893 rbgAllocatedNum++; | 905 rbgAllocatedNum++; |
894 } | 906 } |
895 dci.m_rbBitmap = rbgMask; | 907 dci.m_rbBitmap = rbgMask; |
896 rbgMap = rbgMapCopy; | 908 rbgMap = rbgMapCopy; |
897 NS_LOG_INFO (this << " Move retx in RBGs " << dciRbg.size ()); | 909 NS_LOG_INFO (this << " Move retx in RBGs " << dciRbg.size ()); |
898 } | 910 } |
899 else | 911 else |
900 { | 912 { |
901 // HARQ retx cannot be performed on this TTI -> store it | 913 // HARQ retx cannot be performed on this TTI -> store it |
902 dlInfoListUntxed.push_back (params.m_dlInfoList.at (i)); | 914 dlInfoListUntxed.push_back (m_dlInfoListBuffered.at (i)); |
903 NS_LOG_INFO (this << " No resource for this retx -> buffer it"
); | 915 NS_LOG_INFO (this << " No resource for this retx -> buffer it"
); |
904 } | 916 } |
905 } | 917 } |
906 // retrieve RLC PDU list for retx TBsize and update DCI | 918 // retrieve RLC PDU list for retx TBsize and update DCI |
907 BuildDataListElement_s newEl; | 919 BuildDataListElement_s newEl; |
908 std::map <uint16_t, DlHarqRlcPduListBuffer_t>::iterator itRlcPdu = m_
dlHarqProcessesRlcPduListBuffer.find (rnti); | 920 std::map <uint16_t, DlHarqRlcPduListBuffer_t>::iterator itRlcPdu = m_
dlHarqProcessesRlcPduListBuffer.find (rnti); |
909 if (itRlcPdu == m_dlHarqProcessesRlcPduListBuffer.end ()) | 921 if (itRlcPdu == m_dlHarqProcessesRlcPduListBuffer.end ()) |
910 { | 922 { |
911 NS_FATAL_ERROR ("Unable to find RlcPdcList in HARQ buffer for RNTI
" << rnti); | 923 NS_FATAL_ERROR ("Unable to find RlcPdcList in HARQ buffer for RNTI
" << rnti); |
912 } | 924 } |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1155 { | 1167 { |
1156 break; | 1168 break; |
1157 } | 1169 } |
1158 } | 1170 } |
1159 for (uint8_t j = 0; j < nLayer; j++) | 1171 for (uint8_t j = 0; j < nLayer; j++) |
1160 { | 1172 { |
1161 newDci.m_ndi.push_back (1); | 1173 newDci.m_ndi.push_back (1); |
1162 newDci.m_rv.push_back (0); | 1174 newDci.m_rv.push_back (0); |
1163 } | 1175 } |
1164 | 1176 |
| 1177 newDci.m_tpc = 1; //1 is mapped to 0 in Accumulated Mode and to -1 in Abso
lute Mode |
| 1178 |
1165 newEl.m_dci = newDci; | 1179 newEl.m_dci = newDci; |
1166 | 1180 |
1167 if (m_harqOn == true) | 1181 if (m_harqOn == true) |
1168 { | 1182 { |
1169 // store DCI for HARQ | 1183 // store DCI for HARQ |
1170 std::map <uint16_t, DlHarqProcessesDciBuffer_t>::iterator itDci = m_dl
HarqProcessesDciBuffer.find (newEl.m_rnti); | 1184 std::map <uint16_t, DlHarqProcessesDciBuffer_t>::iterator itDci = m_dl
HarqProcessesDciBuffer.find (newEl.m_rnti); |
1171 if (itDci == m_dlHarqProcessesDciBuffer.end ()) | 1185 if (itDci == m_dlHarqProcessesDciBuffer.end ()) |
1172 { | 1186 { |
1173 NS_FATAL_ERROR ("Unable to find RNTI entry in DCI HARQ buffer for
RNTI " << newEl.m_rnti); | 1187 NS_FATAL_ERROR ("Unable to find RNTI entry in DCI HARQ buffer for
RNTI " << newEl.m_rnti); |
1174 } | 1188 } |
(...skipping 904 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2079 { | 2093 { |
2080 NS_LOG_FUNCTION (this << " RNTI " << rnti << " txMode " << (uint16_t)txMode); | 2094 NS_LOG_FUNCTION (this << " RNTI " << rnti << " txMode " << (uint16_t)txMode); |
2081 FfMacCschedSapUser::CschedUeConfigUpdateIndParameters params; | 2095 FfMacCschedSapUser::CschedUeConfigUpdateIndParameters params; |
2082 params.m_rnti = rnti; | 2096 params.m_rnti = rnti; |
2083 params.m_transmissionMode = txMode; | 2097 params.m_transmissionMode = txMode; |
2084 m_cschedSapUser->CschedUeConfigUpdateInd (params); | 2098 m_cschedSapUser->CschedUeConfigUpdateInd (params); |
2085 } | 2099 } |
2086 | 2100 |
2087 | 2101 |
2088 } | 2102 } |
OLD | NEW |