LEFT | RIGHT |
(no file at all) | |
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 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
239 m_srb1->m_logicalChannelConfig.prioritizedBitRateKbps = 100; | 239 m_srb1->m_logicalChannelConfig.prioritizedBitRateKbps = 100; |
240 m_srb1->m_logicalChannelConfig.bucketSizeDurationMs = 100; | 240 m_srb1->m_logicalChannelConfig.bucketSizeDurationMs = 100; |
241 m_srb1->m_logicalChannelConfig.logicalChannelGroup = 0; | 241 m_srb1->m_logicalChannelConfig.logicalChannelGroup = 0; |
242 | 242 |
243 LteEnbCmacSapProvider::LcInfo lcinfo; | 243 LteEnbCmacSapProvider::LcInfo lcinfo; |
244 lcinfo.rnti = m_rnti; | 244 lcinfo.rnti = m_rnti; |
245 lcinfo.lcId = lcid; | 245 lcinfo.lcId = lcid; |
246 lcinfo.lcGroup = 0; // all SRBs always mapped to LCG 0 | 246 lcinfo.lcGroup = 0; // all SRBs always mapped to LCG 0 |
247 lcinfo.qci = EpsBearer::GBR_CONV_VOICE; // not sure why the FF API requires
a CQI even for SRBs... | 247 lcinfo.qci = EpsBearer::GBR_CONV_VOICE; // not sure why the FF API requires
a CQI even for SRBs... |
248 lcinfo.isGbr = true; | 248 lcinfo.isGbr = true; |
249 lcinfo.mbrUl = 1e6; | 249 lcinfo.mbrUl = 1000000; |
250 lcinfo.mbrDl = 1e6; | 250 lcinfo.mbrDl = 1000000; |
251 lcinfo.gbrUl = 1e4; | 251 lcinfo.gbrUl = 10000; |
252 lcinfo.gbrDl = 1e4; | 252 lcinfo.gbrDl = 10000; |
253 // MacSapUserForRlc in the ComponentCarrierManager MacSapUser | 253 // MacSapUserForRlc in the ComponentCarrierManager MacSapUser |
254 LteMacSapUser* MacSapUserForRlc = m_rrc->m_ccmRrcSapProvider->ConfigureSigna
lBearer(lcinfo, rlc->GetLteMacSapUser ());· | 254 LteMacSapUser* MacSapUserForRlc = m_rrc->m_ccmRrcSapProvider->ConfigureSigna
lBearer(lcinfo, rlc->GetLteMacSapUser ());· |
255 // Signal Channel are only on Primary Carrier | 255 // Signal Channel are only on Primary Carrier |
256 m_rrc->m_cmacSapProvider.at (m_componentCarrierId)->AddLc (lcinfo, MacSapUse
rForRlc); | 256 m_rrc->m_cmacSapProvider.at (m_componentCarrierId)->AddLc (lcinfo, MacSapUse
rForRlc); |
257 m_rrc->m_ccmRrcSapProvider->AddLc (lcinfo, MacSapUserForRlc); | 257 m_rrc->m_ccmRrcSapProvider->AddLc (lcinfo, MacSapUserForRlc); |
258 } | 258 } |
259 | 259 |
260 LteEnbRrcSapUser::SetupUeParameters ueParams; | 260 LteEnbRrcSapUser::SetupUeParameters ueParams; |
261 ueParams.srb0SapProvider = m_srb0->m_rlc->GetLteRlcSapProvider (); | 261 ueParams.srb0SapProvider = m_srb0->m_rlc->GetLteRlcSapProvider (); |
262 ueParams.srb1SapProvider = m_srb1->m_pdcp->GetLtePdcpSapProvider (); | 262 ueParams.srb1SapProvider = m_srb1->m_pdcp->GetLtePdcpSapProvider (); |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
424 // lcinfo.mbrUl = bearer.gbrQosInfo.mbrUl; | 424 // lcinfo.mbrUl = bearer.gbrQosInfo.mbrUl; |
425 // lcinfo.mbrDl = bearer.gbrQosInfo.mbrDl; | 425 // lcinfo.mbrDl = bearer.gbrQosInfo.mbrDl; |
426 // lcinfo.gbrUl = bearer.gbrQosInfo.gbrUl; | 426 // lcinfo.gbrUl = bearer.gbrQosInfo.gbrUl; |
427 // lcinfo.gbrDl = bearer.gbrQosInfo.gbrDl; | 427 // lcinfo.gbrDl = bearer.gbrQosInfo.gbrDl; |
428 // use a for cycle to send the AddLc to the appropriate Mac Sap | 428 // use a for cycle to send the AddLc to the appropriate Mac Sap |
429 // if the sap is not initialized the appropriated method has to be called | 429 // if the sap is not initialized the appropriated method has to be called |
430 std::vector<LteCcmRrcSapProvider::LcsConfig>::iterator itLcOnCcMapping = lcOnC
cMapping.begin (); | 430 std::vector<LteCcmRrcSapProvider::LcsConfig>::iterator itLcOnCcMapping = lcOnC
cMapping.begin (); |
431 NS_ASSERT_MSG (itLcOnCcMapping != lcOnCcMapping.end (), "Problem"); | 431 NS_ASSERT_MSG (itLcOnCcMapping != lcOnCcMapping.end (), "Problem"); |
432 for (itLcOnCcMapping = lcOnCcMapping.begin (); itLcOnCcMapping != lcOnCcMappin
g.end (); ++itLcOnCcMapping) | 432 for (itLcOnCcMapping = lcOnCcMapping.begin (); itLcOnCcMapping != lcOnCcMappin
g.end (); ++itLcOnCcMapping) |
433 { | 433 { |
434 NS_LOG_DEBUG (this << " RNTI " << itLcOnCcMapping->lc.rnti << "Lcid " << (
uint16_t) itLcOnCcMapping->lc.lcId << " lcGroup " << (uint16_t) itLcOnCcMapping-
>lc.lcGroup << " ComponentCarrierId " << itLcOnCcMapping->componentCarrierId); | 434 NS_LOG_DEBUG (this << " RNTI " << itLcOnCcMapping->lc.rnti << " Lcid " <<
(uint16_t) itLcOnCcMapping->lc.lcId << " lcGroup " << (uint16_t) itLcOnCcMapping
->lc.lcGroup << " ComponentCarrierId " << itLcOnCcMapping->componentCarrierId); |
435 uint8_t index = itLcOnCcMapping->componentCarrierId; | 435 uint8_t index = static_cast<uint8_t>(itLcOnCcMapping->componentCarrierId); |
436 LteEnbCmacSapProvider::LcInfo lcinfo = itLcOnCcMapping->lc; | 436 LteEnbCmacSapProvider::LcInfo lcinfo = itLcOnCcMapping->lc; |
437 LteMacSapUser *msu = itLcOnCcMapping->msu; | 437 LteMacSapUser *msu = itLcOnCcMapping->msu; |
438 m_rrc->m_cmacSapProvider.at (index)->AddLc (lcinfo, msu); | 438 m_rrc->m_cmacSapProvider.at (index)->AddLc (lcinfo, msu); |
439 m_rrc->m_ccmRrcSapProvider->AddLc (lcinfo, msu); | 439 m_rrc->m_ccmRrcSapProvider->AddLc (lcinfo, msu); |
440 } | 440 } |
441 | 441 |
442 if (rlcTypeId == LteRlcAm::GetTypeId ()) | 442 if (rlcTypeId == LteRlcAm::GetTypeId ()) |
443 { | 443 { |
444 drbInfo->m_rlcConfig.choice = LteRrcSap::RlcConfig::AM; | 444 drbInfo->m_rlcConfig.choice = LteRrcSap::RlcConfig::AM; |
445 } | 445 } |
446 else | 446 else |
447 { | 447 { |
448 drbInfo->m_rlcConfig.choice = LteRrcSap::RlcConfig::UM_BI_DIRECTIONAL; | 448 drbInfo->m_rlcConfig.choice = LteRrcSap::RlcConfig::UM_BI_DIRECTIONAL; |
449 } | 449 } |
450 | 450 |
451 drbInfo->m_logicalChannelIdentity = lcid; | 451 drbInfo->m_logicalChannelIdentity = lcid; |
452 drbInfo->m_logicalChannelConfig.priority = m_rrc->GetLogicalChannelPriority (
bearer); | 452 drbInfo->m_logicalChannelConfig.priority = m_rrc->GetLogicalChannelPriority (
bearer); |
453 drbInfo->m_logicalChannelConfig.logicalChannelGroup = m_rrc->GetLogicalChannel
Group (bearer); | 453 drbInfo->m_logicalChannelConfig.logicalChannelGroup = m_rrc->GetLogicalChannel
Group (bearer); |
454 if (bearer.IsGbr ()) | 454 if (bearer.IsGbr ()) |
455 { | 455 { |
456 drbInfo->m_logicalChannelConfig.prioritizedBitRateKbps = bearer.gbrQosInfo
.gbrUl; | 456 drbInfo->m_logicalChannelConfig.prioritizedBitRateKbps = static_cast<uint1
6_t>(bearer.gbrQosInfo.gbrUl); |
457 } | 457 } |
458 else | 458 else |
459 { | 459 { |
460 drbInfo->m_logicalChannelConfig.prioritizedBitRateKbps = 0; | 460 drbInfo->m_logicalChannelConfig.prioritizedBitRateKbps = 0; |
461 } | 461 } |
462 drbInfo->m_logicalChannelConfig.bucketSizeDurationMs = 1000; | 462 drbInfo->m_logicalChannelConfig.bucketSizeDurationMs = 1000; |
463 | 463 |
464 ScheduleRrcConnectionReconfiguration (); | 464 ScheduleRrcConnectionReconfiguration (); |
465 } | 465 } |
466 | 466 |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
585 switch (m_state) | 585 switch (m_state) |
586 { | 586 { |
587 case CONNECTED_NORMALLY: | 587 case CONNECTED_NORMALLY: |
588 { | 588 { |
589 m_targetCellId = cellId; | 589 m_targetCellId = cellId; |
590 EpcX2SapProvider::HandoverRequestParams params; | 590 EpcX2SapProvider::HandoverRequestParams params; |
591 params.oldEnbUeX2apId = m_rnti; | 591 params.oldEnbUeX2apId = m_rnti; |
592 params.cause = EpcX2SapProvider::HandoverDesirableForRadioReaso
n; | 592 params.cause = EpcX2SapProvider::HandoverDesirableForRadioReaso
n; |
593 params.sourceCellId = m_rrc->ComponentCarrierToCellId (m_componentCarr
ierId); | 593 params.sourceCellId = m_rrc->ComponentCarrierToCellId (m_componentCarr
ierId); |
594 params.targetCellId = cellId; | 594 params.targetCellId = cellId; |
595 params.mmeUeS1apId = m_imsi; | 595 params.mmeUeS1apId = static_cast<uint32_t>(m_imsi); |
596 params.ueAggregateMaxBitRateDownlink = 200 * 1000; | 596 params.ueAggregateMaxBitRateDownlink = 200 * 1000; |
597 params.ueAggregateMaxBitRateUplink = 100 * 1000; | 597 params.ueAggregateMaxBitRateUplink = 100 * 1000; |
598 params.bearers = GetErabList (); | 598 params.bearers = GetErabList (); |
599 | 599 |
600 LteRrcSap::HandoverPreparationInfo hpi; | 600 LteRrcSap::HandoverPreparationInfo hpi; |
601 hpi.asConfig.sourceUeIdentity = m_rnti; | 601 hpi.asConfig.sourceUeIdentity = m_rnti; |
602 hpi.asConfig.sourceDlCarrierFreq = m_rrc->m_dlEarfcn; | 602 hpi.asConfig.sourceDlCarrierFreq = m_rrc->m_dlEarfcn; |
603 hpi.asConfig.sourceMeasConfig = m_rrc->m_ueMeasConfig; | 603 hpi.asConfig.sourceMeasConfig = m_rrc->m_ueMeasConfig; |
604 hpi.asConfig.sourceRadioResourceConfig = GetRadioResourceConfigForHandov
erPreparationInfo (); | 604 hpi.asConfig.sourceRadioResourceConfig = GetRadioResourceConfigForHandov
erPreparationInfo (); |
605 hpi.asConfig.sourceMasterInformationBlock.dlBandwidth = m_rrc->m_dlBandw
idth; | 605 hpi.asConfig.sourceMasterInformationBlock.dlBandwidth = static_cast<uint
8_t>(m_rrc->m_dlBandwidth); |
606 hpi.asConfig.sourceMasterInformationBlock.systemFrameNumber = 0; | 606 hpi.asConfig.sourceMasterInformationBlock.systemFrameNumber = 0; |
607 hpi.asConfig.sourceSystemInformationBlockType1.cellAccessRelatedInfo.plm
nIdentityInfo.plmnIdentity = m_rrc->m_sib1.at (m_componentCarrierId).cellAccessR
elatedInfo.plmnIdentityInfo.plmnIdentity; | 607 hpi.asConfig.sourceSystemInformationBlockType1.cellAccessRelatedInfo.plm
nIdentityInfo.plmnIdentity = m_rrc->m_sib1.at (m_componentCarrierId).cellAccessR
elatedInfo.plmnIdentityInfo.plmnIdentity; |
608 hpi.asConfig.sourceSystemInformationBlockType1.cellAccessRelatedInfo.cel
lIdentity = m_rrc->ComponentCarrierToCellId (m_componentCarrierId); | 608 hpi.asConfig.sourceSystemInformationBlockType1.cellAccessRelatedInfo.cel
lIdentity = m_rrc->ComponentCarrierToCellId (m_componentCarrierId); |
609 hpi.asConfig.sourceSystemInformationBlockType1.cellAccessRelatedInfo.csg
Indication = m_rrc->m_sib1.at (m_componentCarrierId).cellAccessRelatedInfo.csgIn
dication; | 609 hpi.asConfig.sourceSystemInformationBlockType1.cellAccessRelatedInfo.csg
Indication = m_rrc->m_sib1.at (m_componentCarrierId).cellAccessRelatedInfo.csgIn
dication; |
610 hpi.asConfig.sourceSystemInformationBlockType1.cellAccessRelatedInfo.csg
Identity = m_rrc->m_sib1.at (m_componentCarrierId).cellAccessRelatedInfo.csgIden
tity; | 610 hpi.asConfig.sourceSystemInformationBlockType1.cellAccessRelatedInfo.csg
Identity = m_rrc->m_sib1.at (m_componentCarrierId).cellAccessRelatedInfo.csgIden
tity; |
611 LteEnbCmacSapProvider::RachConfig rc = m_rrc->m_cmacSapProvider.at (m_co
mponentCarrierId)->GetRachConfig (); | 611 LteEnbCmacSapProvider::RachConfig rc = m_rrc->m_cmacSapProvider.at (m_co
mponentCarrierId)->GetRachConfig (); |
612 hpi.asConfig.sourceSystemInformationBlockType2.radioResourceConfigCommon
.rachConfigCommon.preambleInfo.numberOfRaPreambles = rc.numberOfRaPreambles; | 612 hpi.asConfig.sourceSystemInformationBlockType2.radioResourceConfigCommon
.rachConfigCommon.preambleInfo.numberOfRaPreambles = rc.numberOfRaPreambles; |
613 hpi.asConfig.sourceSystemInformationBlockType2.radioResourceConfigCommon
.rachConfigCommon.raSupervisionInfo.preambleTransMax = rc.preambleTransMax; | 613 hpi.asConfig.sourceSystemInformationBlockType2.radioResourceConfigCommon
.rachConfigCommon.raSupervisionInfo.preambleTransMax = rc.preambleTransMax; |
614 hpi.asConfig.sourceSystemInformationBlockType2.radioResourceConfigCommon
.rachConfigCommon.raSupervisionInfo.raResponseWindowSize = rc.raResponseWindowSi
ze; | 614 hpi.asConfig.sourceSystemInformationBlockType2.radioResourceConfigCommon
.rachConfigCommon.raSupervisionInfo.raResponseWindowSize = rc.raResponseWindowSi
ze; |
615 hpi.asConfig.sourceSystemInformationBlockType2.freqInfo.ulCarrierFreq =
m_rrc->m_ulEarfcn; | 615 hpi.asConfig.sourceSystemInformationBlockType2.freqInfo.ulCarrierFreq =
m_rrc->m_ulEarfcn; |
616 hpi.asConfig.sourceSystemInformationBlockType2.freqInfo.ulBandwidth = m_
rrc->m_ulBandwidth; | 616 hpi.asConfig.sourceSystemInformationBlockType2.freqInfo.ulBandwidth = st
atic_cast<uint8_t>(m_rrc->m_ulBandwidth); |
617 params.rrcContext = m_rrc->m_rrcSapUser->EncodeHandoverPreparationInform
ation (hpi); | 617 params.rrcContext = m_rrc->m_rrcSapUser->EncodeHandoverPreparationInform
ation (hpi); |
618 | 618 |
619 NS_LOG_LOGIC ("oldEnbUeX2apId = " << params.oldEnbUeX2apId); | 619 NS_LOG_LOGIC ("oldEnbUeX2apId = " << params.oldEnbUeX2apId); |
620 NS_LOG_LOGIC ("sourceCellId = " << params.sourceCellId); | 620 NS_LOG_LOGIC ("sourceCellId = " << params.sourceCellId); |
621 NS_LOG_LOGIC ("targetCellId = " << params.targetCellId); | 621 NS_LOG_LOGIC ("targetCellId = " << params.targetCellId); |
622 NS_LOG_LOGIC ("mmeUeS1apId = " << params.mmeUeS1apId); | 622 NS_LOG_LOGIC ("mmeUeS1apId = " << params.mmeUeS1apId); |
623 NS_LOG_LOGIC ("rrcContext = " << params.rrcContext); | 623 NS_LOG_LOGIC ("rrcContext = " << params.rrcContext); |
624 | 624 |
625 m_rrc->m_x2SapProvider->SendHandoverRequest (params); | 625 m_rrc->m_x2SapProvider->SendHandoverRequest (params); |
626 SwitchToState (HANDOVER_PREPARATION); | 626 SwitchToState (HANDOVER_PREPARATION); |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
830 // uint8_t drbId = Bid2Drbid (erabIt->erabId); | 830 // uint8_t drbId = Bid2Drbid (erabIt->erabId); |
831 // std::map <uint8_t, Ptr<LteDataRadioBearerInfo> >::iterator drbIt = m_dr
bMap.find (drbId); | 831 // std::map <uint8_t, Ptr<LteDataRadioBearerInfo> >::iterator drbIt = m_dr
bMap.find (drbId); |
832 // NS_ASSERT_MSG (drbIt != m_drbMap.end (), "could not find DRBID " << (ui
nt32_t) drbId); | 832 // NS_ASSERT_MSG (drbIt != m_drbMap.end (), "could not find DRBID " << (ui
nt32_t) drbId); |
833 // drbIt->second->m_pdcp->SetStatus (status); | 833 // drbIt->second->m_pdcp->SetStatus (status); |
834 } | 834 } |
835 } | 835 } |
836 | 836 |
837 void· | 837 void· |
838 UeManager::RecvUeContextRelease (EpcX2SapUser::UeContextReleaseParams params) | 838 UeManager::RecvUeContextRelease (EpcX2SapUser::UeContextReleaseParams params) |
839 { | 839 { |
| 840 NS_UNUSED(params); |
840 NS_LOG_FUNCTION (this); | 841 NS_LOG_FUNCTION (this); |
841 NS_ASSERT_MSG (m_state == HANDOVER_LEAVING, "method unexpected in state " << T
oString (m_state)); | 842 NS_ASSERT_MSG (m_state == HANDOVER_LEAVING, "method unexpected in state " << T
oString (m_state)); |
842 m_handoverLeavingTimeout.Cancel (); | 843 m_handoverLeavingTimeout.Cancel (); |
843 } | 844 } |
844 | 845 |
845 | 846 |
846 // methods forwarded from RRC SAP | 847 // methods forwarded from RRC SAP |
847 | 848 |
848 void· | 849 void· |
849 UeManager::CompleteSetupUe (LteEnbRrcSapProvider::CompleteSetupUeParameters para
ms) | 850 UeManager::CompleteSetupUe (LteEnbRrcSapProvider::CompleteSetupUeParameters para
ms) |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
902 | 903 |
903 default: | 904 default: |
904 NS_FATAL_ERROR ("method unexpected in state " << ToString (m_state)); | 905 NS_FATAL_ERROR ("method unexpected in state " << ToString (m_state)); |
905 break; | 906 break; |
906 } | 907 } |
907 } | 908 } |
908 | 909 |
909 void | 910 void |
910 UeManager::RecvRrcConnectionSetupCompleted (LteRrcSap::RrcConnectionSetupComplet
ed msg) | 911 UeManager::RecvRrcConnectionSetupCompleted (LteRrcSap::RrcConnectionSetupComplet
ed msg) |
911 { | 912 { |
| 913 NS_UNUSED(msg); |
912 NS_LOG_FUNCTION (this); | 914 NS_LOG_FUNCTION (this); |
913 switch (m_state) | 915 switch (m_state) |
914 { | 916 { |
915 case CONNECTION_SETUP: | 917 case CONNECTION_SETUP: |
916 m_connectionSetupTimeout.Cancel (); | 918 m_connectionSetupTimeout.Cancel (); |
917 if ( m_caSupportConfigured == false && m_rrc->m_numberOfComponentCarriers
> 1) | 919 if ( m_caSupportConfigured == false && m_rrc->m_numberOfComponentCarriers
> 1) |
918 { | 920 { |
919 m_pendingRrcConnectionReconfiguration = true; // Force Reconfiguration | 921 m_pendingRrcConnectionReconfiguration = true; // Force Reconfiguration |
920 m_pendingStartDataRadioBearers = true; | 922 m_pendingStartDataRadioBearers = true; |
921 } | 923 } |
922 else | 924 else |
923 { | 925 { |
924 m_pendingStartDataRadioBearers = false; | 926 m_pendingStartDataRadioBearers = false; |
925 StartDataRadioBearers (); | 927 StartDataRadioBearers (); |
926 } | 928 } |
927 SwitchToState (CONNECTED_NORMALLY); | 929 SwitchToState (CONNECTED_NORMALLY); |
928 m_rrc->m_connectionEstablishedTrace (m_imsi, m_rrc->ComponentCarrierToCell
Id (m_componentCarrierId), m_rnti); | 930 m_rrc->m_connectionEstablishedTrace (m_imsi, m_rrc->ComponentCarrierToCell
Id (m_componentCarrierId), m_rnti); |
929 break; | 931 break; |
930 | 932 |
931 default: | 933 default: |
932 NS_FATAL_ERROR ("method unexpected in state " << ToString (m_state)); | 934 NS_FATAL_ERROR ("method unexpected in state " << ToString (m_state)); |
933 break; | 935 break; |
934 } | 936 } |
935 } | 937 } |
936 | 938 |
937 void | 939 void |
938 UeManager::RecvRrcConnectionReconfigurationCompleted (LteRrcSap::RrcConnectionRe
configurationCompleted msg) | 940 UeManager::RecvRrcConnectionReconfigurationCompleted (LteRrcSap::RrcConnectionRe
configurationCompleted msg) |
939 { | 941 { |
| 942 NS_UNUSED(msg); |
940 NS_LOG_FUNCTION (this); | 943 NS_LOG_FUNCTION (this); |
941 switch (m_state) | 944 switch (m_state) |
942 { | 945 { |
943 case CONNECTION_RECONFIGURATION: | 946 case CONNECTION_RECONFIGURATION: |
944 StartDataRadioBearers (); | 947 StartDataRadioBearers (); |
945 if (m_needPhyMacConfiguration) | 948 if (m_needPhyMacConfiguration) |
946 { | 949 { |
947 // configure MAC (and scheduler) | 950 // configure MAC (and scheduler) |
948 LteEnbCmacSapProvider::UeConfig req; | 951 LteEnbCmacSapProvider::UeConfig req; |
949 req.m_rnti = m_rnti; | 952 req.m_rnti = m_rnti; |
(...skipping 23 matching lines...) Expand all Loading... |
973 NS_LOG_INFO ("ignoring RecvRrcConnectionReconfigurationCompleted in state
" << ToString (m_state)); | 976 NS_LOG_INFO ("ignoring RecvRrcConnectionReconfigurationCompleted in state
" << ToString (m_state)); |
974 break; | 977 break; |
975 | 978 |
976 case HANDOVER_JOINING: | 979 case HANDOVER_JOINING: |
977 { | 980 { |
978 m_handoverJoiningTimeout.Cancel (); | 981 m_handoverJoiningTimeout.Cancel (); |
979 NS_LOG_INFO ("Send PATH SWITCH REQUEST to the MME"); | 982 NS_LOG_INFO ("Send PATH SWITCH REQUEST to the MME"); |
980 EpcEnbS1SapProvider::PathSwitchRequestParameters params; | 983 EpcEnbS1SapProvider::PathSwitchRequestParameters params; |
981 params.rnti = m_rnti; | 984 params.rnti = m_rnti; |
982 params.cellId = m_rrc->ComponentCarrierToCellId (m_componentCarrierId); | 985 params.cellId = m_rrc->ComponentCarrierToCellId (m_componentCarrierId); |
983 params.mmeUeS1Id = m_imsi; | 986 params.mmeUeS1Id = static_cast<uint32_t>(m_imsi); |
984 SwitchToState (HANDOVER_PATH_SWITCH); | 987 SwitchToState (HANDOVER_PATH_SWITCH); |
985 for (std::map <uint8_t, Ptr<LteDataRadioBearerInfo> >::iterator it = m_
drbMap.begin (); | 988 for (std::map <uint8_t, Ptr<LteDataRadioBearerInfo> >::iterator it = m_
drbMap.begin (); |
986 it != m_drbMap.end (); | 989 it != m_drbMap.end (); |
987 ++it) | 990 ++it) |
988 { | 991 { |
989 EpcEnbS1SapProvider::BearerToBeSwitched b; | 992 EpcEnbS1SapProvider::BearerToBeSwitched b; |
990 b.epsBearerId = it->second->m_epsBearerIdentity; | 993 b.epsBearerId = it->second->m_epsBearerIdentity; |
991 b.teid = it->second->m_gtpTeid; | 994 b.teid = it->second->m_gtpTeid; |
992 params.bearersToBeSwitched.push_back (b); | 995 params.bearersToBeSwitched.push_back (b); |
993 } | 996 } |
994 m_rrc->m_s1SapProvider->PathSwitchRequest (params); | 997 m_rrc->m_s1SapProvider->PathSwitchRequest (params); |
995 } | 998 } |
996 break; | 999 break; |
997 | 1000 |
998 default: | 1001 default: |
999 NS_FATAL_ERROR ("method unexpected in state " << ToString (m_state)); | 1002 NS_FATAL_ERROR ("method unexpected in state " << ToString (m_state)); |
1000 break; | 1003 break; |
1001 } | 1004 } |
1002 } | 1005 } |
1003 | 1006 |
1004 void· | 1007 void· |
1005 UeManager::RecvRrcConnectionReestablishmentRequest (LteRrcSap::RrcConnectionRees
tablishmentRequest msg) | 1008 UeManager::RecvRrcConnectionReestablishmentRequest (LteRrcSap::RrcConnectionRees
tablishmentRequest msg) |
1006 { | 1009 { |
| 1010 NS_UNUSED(msg); |
1007 NS_LOG_FUNCTION (this); | 1011 NS_LOG_FUNCTION (this); |
1008 switch (m_state) | 1012 switch (m_state) |
1009 { | 1013 { |
1010 case CONNECTED_NORMALLY: | 1014 case CONNECTED_NORMALLY: |
1011 break; | 1015 break; |
1012 | 1016 |
1013 case HANDOVER_LEAVING: | 1017 case HANDOVER_LEAVING: |
1014 m_handoverLeavingTimeout.Cancel (); | 1018 m_handoverLeavingTimeout.Cancel (); |
1015 break; | 1019 break; |
1016 | 1020 |
1017 default: | 1021 default: |
1018 NS_FATAL_ERROR ("method unexpected in state " << ToString (m_state)); | 1022 NS_FATAL_ERROR ("method unexpected in state " << ToString (m_state)); |
1019 break; | 1023 break; |
1020 } | 1024 } |
1021 | 1025 |
1022 LteRrcSap::RrcConnectionReestablishment msg2; | 1026 LteRrcSap::RrcConnectionReestablishment msg2; |
1023 msg2.rrcTransactionIdentifier = GetNewRrcTransactionIdentifier (); | 1027 msg2.rrcTransactionIdentifier = GetNewRrcTransactionIdentifier (); |
1024 msg2.radioResourceConfigDedicated = BuildRadioResourceConfigDedicated (); | 1028 msg2.radioResourceConfigDedicated = BuildRadioResourceConfigDedicated (); |
1025 m_rrc->m_rrcSapUser->SendRrcConnectionReestablishment (m_rnti, msg2); | 1029 m_rrc->m_rrcSapUser->SendRrcConnectionReestablishment (m_rnti, msg2); |
1026 SwitchToState (CONNECTION_REESTABLISHMENT); | 1030 SwitchToState (CONNECTION_REESTABLISHMENT); |
1027 } | 1031 } |
1028 | 1032 |
1029 void· | 1033 void· |
1030 UeManager::RecvRrcConnectionReestablishmentComplete (LteRrcSap::RrcConnectionRee
stablishmentComplete msg) | 1034 UeManager::RecvRrcConnectionReestablishmentComplete (LteRrcSap::RrcConnectionRee
stablishmentComplete msg) |
1031 { | 1035 { |
| 1036 NS_UNUSED(msg); |
1032 NS_LOG_FUNCTION (this); | 1037 NS_LOG_FUNCTION (this); |
1033 SwitchToState (CONNECTED_NORMALLY); | 1038 SwitchToState (CONNECTED_NORMALLY); |
1034 } | 1039 } |
1035 | 1040 |
1036 void· | 1041 void· |
1037 UeManager::RecvMeasurementReport (LteRrcSap::MeasurementReport msg) | 1042 UeManager::RecvMeasurementReport (LteRrcSap::MeasurementReport msg) |
1038 { | 1043 { |
1039 uint8_t measId = msg.measResults.measId; | 1044 uint8_t measId = msg.measResults.measId; |
1040 NS_LOG_FUNCTION (this << (uint16_t) measId); | 1045 NS_LOG_FUNCTION (this << (uint16_t) measId); |
1041 NS_LOG_LOGIC ("measId " << (uint16_t) measId | 1046 NS_LOG_LOGIC ("measId " << (uint16_t) measId |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1202 | 1207 |
1203 // reconfigure the UE RRC | 1208 // reconfigure the UE RRC |
1204 ScheduleRrcConnectionReconfiguration (); | 1209 ScheduleRrcConnectionReconfiguration (); |
1205 } | 1210 } |
1206 | 1211 |
1207 uint8_t | 1212 uint8_t |
1208 UeManager::AddDataRadioBearerInfo (Ptr<LteDataRadioBearerInfo> drbInfo) | 1213 UeManager::AddDataRadioBearerInfo (Ptr<LteDataRadioBearerInfo> drbInfo) |
1209 { | 1214 { |
1210 NS_LOG_FUNCTION (this); | 1215 NS_LOG_FUNCTION (this); |
1211 const uint8_t MAX_DRB_ID = 32; | 1216 const uint8_t MAX_DRB_ID = 32; |
1212 for (int drbid = (m_lastAllocatedDrbid + 1) % MAX_DRB_ID;· | 1217 for (uint8_t drbid = (m_lastAllocatedDrbid + 1) % MAX_DRB_ID;· |
1213 drbid != m_lastAllocatedDrbid;· | 1218 drbid != m_lastAllocatedDrbid;· |
1214 drbid = (drbid + 1) % MAX_DRB_ID) | 1219 drbid = (drbid + 1) % MAX_DRB_ID) |
1215 { | 1220 { |
1216 if (drbid != 0) // 0 is not allowed | 1221 if (drbid != 0) // 0 is not allowed |
1217 { | 1222 { |
1218 if (m_drbMap.find (drbid) == m_drbMap.end ()) | 1223 if (m_drbMap.find (drbid) == m_drbMap.end ()) |
1219 { | 1224 { |
1220 m_drbMap.insert (std::pair<uint8_t, Ptr<LteDataRadioBearerInfo> >
(drbid, drbInfo)); | 1225 m_drbMap.insert (std::pair<uint8_t, Ptr<LteDataRadioBearerInfo> >
(drbid, drbInfo)); |
1221 drbInfo->m_drbIdentity = drbid; | 1226 drbInfo->m_drbIdentity = drbid; |
1222 m_lastAllocatedDrbid = drbid; | 1227 m_lastAllocatedDrbid = drbid; |
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1512 m_cphySapProvider.push_back (0); | 1517 m_cphySapProvider.push_back (0); |
1513 m_cmacSapProvider.push_back (0); | 1518 m_cmacSapProvider.push_back (0); |
1514 m_ffrRrcSapProvider.push_back (0); | 1519 m_ffrRrcSapProvider.push_back (0); |
1515 } | 1520 } |
1516 | 1521 |
1517 void | 1522 void |
1518 LteEnbRrc::ConfigureCarriers (std::map<uint8_t, Ptr<ComponentCarrierEnb>> ccPhyC
onf) | 1523 LteEnbRrc::ConfigureCarriers (std::map<uint8_t, Ptr<ComponentCarrierEnb>> ccPhyC
onf) |
1519 { | 1524 { |
1520 NS_ASSERT_MSG (!m_carriersConfigured, "Secondary carriers can be configured on
ly once."); | 1525 NS_ASSERT_MSG (!m_carriersConfigured, "Secondary carriers can be configured on
ly once."); |
1521 m_componentCarrierPhyConf = ccPhyConf; | 1526 m_componentCarrierPhyConf = ccPhyConf; |
1522 m_numberOfComponentCarriers = ccPhyConf.size (); | 1527 m_numberOfComponentCarriers = static_cast<uint16_t>(ccPhyConf.size ()); |
1523 | 1528 |
1524 NS_ASSERT (m_numberOfComponentCarriers >= MIN_NO_CC && m_numberOfComponentCarr
iers <= MAX_NO_CC); | 1529 NS_ASSERT (m_numberOfComponentCarriers >= MIN_NO_CC && m_numberOfComponentCarr
iers <= MAX_NO_CC); |
1525 | 1530 |
1526 for (uint8_t i = 1; i < m_numberOfComponentCarriers; i++) | 1531 for (uint8_t i = 1; i < m_numberOfComponentCarriers; i++) |
1527 { | 1532 { |
1528 m_cphySapUser.push_back (new MemberLteEnbCphySapUser<LteEnbRrc> (this)); | 1533 m_cphySapUser.push_back (new MemberLteEnbCphySapUser<LteEnbRrc> (this)); |
1529 m_cmacSapUser.push_back (new EnbRrcMemberLteEnbCmacSapUser (this, i)); | 1534 m_cmacSapUser.push_back (new EnbRrcMemberLteEnbCmacSapUser (this, i)); |
1530 m_ffrRrcSapUser.push_back (new MemberLteFfrRrcSapUser<LteEnbRrc> (this)); | 1535 m_ffrRrcSapUser.push_back (new MemberLteFfrRrcSapUser<LteEnbRrc> (this)); |
1531 m_cphySapProvider.push_back (0); | 1536 m_cphySapProvider.push_back (0); |
1532 m_cmacSapProvider.push_back (0); | 1537 m_cmacSapProvider.push_back (0); |
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1984 if (config.purpose != LteRrcSap::ReportConfigEutra::REPORT_STRONGEST_CELLS) | 1989 if (config.purpose != LteRrcSap::ReportConfigEutra::REPORT_STRONGEST_CELLS) |
1985 { | 1990 { |
1986 NS_FATAL_ERROR ("Only REPORT_STRONGEST_CELLS purpose is supported"); | 1991 NS_FATAL_ERROR ("Only REPORT_STRONGEST_CELLS purpose is supported"); |
1987 } | 1992 } |
1988 | 1993 |
1989 if (config.reportQuantity != LteRrcSap::ReportConfigEutra::BOTH) | 1994 if (config.reportQuantity != LteRrcSap::ReportConfigEutra::BOTH) |
1990 { | 1995 { |
1991 NS_LOG_WARN ("reportQuantity = BOTH will be used instead of the given repo
rtQuantity"); | 1996 NS_LOG_WARN ("reportQuantity = BOTH will be used instead of the given repo
rtQuantity"); |
1992 } | 1997 } |
1993 | 1998 |
1994 uint8_t nextId = m_ueMeasConfig.reportConfigToAddModList.size () + 1; | 1999 uint8_t nextId = static_cast<uint8_t>(m_ueMeasConfig.reportConfigToAddModList.
size () + 1); |
1995 | 2000 |
1996 // create the reporting configuration | 2001 // create the reporting configuration |
1997 LteRrcSap::ReportConfigToAddMod reportConfig; | 2002 LteRrcSap::ReportConfigToAddMod reportConfig; |
1998 reportConfig.reportConfigId = nextId; | 2003 reportConfig.reportConfigId = nextId; |
1999 reportConfig.reportConfigEutra = config; | 2004 reportConfig.reportConfigEutra = config; |
2000 | 2005 |
2001 // create the measurement identity | 2006 // create the measurement identity |
2002 LteRrcSap::MeasIdToAddMod measId; | 2007 LteRrcSap::MeasIdToAddMod measId; |
2003 measId.measId = nextId; | 2008 measId.measId = nextId; |
2004 measId.measObjectId = 1; | 2009 measId.measObjectId = 1; |
(...skipping 12 matching lines...) Expand all Loading... |
2017 auto it = ccPhyConf.begin (); | 2022 auto it = ccPhyConf.begin (); |
2018 NS_ASSERT (it != ccPhyConf.end ()); | 2023 NS_ASSERT (it != ccPhyConf.end ()); |
2019 uint8_t ulBandwidth = it->second->GetUlBandwidth (); | 2024 uint8_t ulBandwidth = it->second->GetUlBandwidth (); |
2020 uint8_t dlBandwidth = it->second->GetDlBandwidth (); | 2025 uint8_t dlBandwidth = it->second->GetDlBandwidth (); |
2021 uint32_t ulEarfcn = it->second->GetUlEarfcn (); | 2026 uint32_t ulEarfcn = it->second->GetUlEarfcn (); |
2022 uint32_t dlEarfcn = it->second->GetDlEarfcn (); | 2027 uint32_t dlEarfcn = it->second->GetDlEarfcn (); |
2023 NS_LOG_FUNCTION (this << (uint16_t) ulBandwidth << (uint16_t) dlBandwidth | 2028 NS_LOG_FUNCTION (this << (uint16_t) ulBandwidth << (uint16_t) dlBandwidth |
2024 << ulEarfcn << dlEarfcn); | 2029 << ulEarfcn << dlEarfcn); |
2025 NS_ASSERT (!m_configured); | 2030 NS_ASSERT (!m_configured); |
2026 | 2031 |
2027 for (const auto &it: ccPhyConf) | 2032 for (const auto &it2: ccPhyConf) |
2028 { | 2033 { |
2029 m_cphySapProvider.at (it.first)->SetBandwidth (it.second->GetUlBandwidth (
), it.second->GetDlBandwidth ()); | 2034 m_cphySapProvider.at (it2.first)->SetBandwidth (it2.second->GetUlBandwidth
(), it2.second->GetDlBandwidth ()); |
2030 m_cphySapProvider.at (it.first)->SetEarfcn (it.second->GetUlEarfcn (), it.
second->GetDlEarfcn ()); | 2035 m_cphySapProvider.at (it2.first)->SetEarfcn (it2.second->GetUlEarfcn (), i
t2.second->GetDlEarfcn ()); |
2031 m_cphySapProvider.at (it.first)->SetCellId (it.second->GetCellId ()); | 2036 m_cphySapProvider.at (it2.first)->SetCellId (it2.second->GetCellId ()); |
2032 m_cmacSapProvider.at (it.first)->ConfigureMac (it.second->GetUlBandwidth (
), it.second->GetDlBandwidth ()); | 2037 m_cmacSapProvider.at (it2.first)->ConfigureMac (it2.second->GetUlBandwidth
(), it2.second->GetDlBandwidth ()); |
2033 m_ffrRrcSapProvider.at (it.first)->SetCellId (it.second->GetCellId ()); | 2038 m_ffrRrcSapProvider.at (it2.first)->SetCellId (it2.second->GetCellId ()); |
2034 m_ffrRrcSapProvider.at (it.first)->SetBandwidth (it.second->GetUlBandwidth
(), it.second->GetDlBandwidth ()); | 2039 m_ffrRrcSapProvider.at (it2.first)->SetBandwidth (it2.second->GetUlBandwid
th (), it2.second->GetDlBandwidth ()); |
2035 } | 2040 } |
2036 | 2041 |
2037 m_dlEarfcn = dlEarfcn; | 2042 m_dlEarfcn = dlEarfcn; |
2038 m_ulEarfcn = ulEarfcn; | 2043 m_ulEarfcn = ulEarfcn; |
2039 m_dlBandwidth = dlBandwidth; | 2044 m_dlBandwidth = dlBandwidth; |
2040 m_ulBandwidth = ulBandwidth; | 2045 m_ulBandwidth = ulBandwidth; |
2041 | 2046 |
2042 /* | 2047 /* |
2043 * Initializing the list of UE measurement configuration (m_ueMeasConfig). | 2048 * Initializing the list of UE measurement configuration (m_ueMeasConfig). |
2044 * Only intra-frequency measurements are supported, so only one measurement | 2049 * Only intra-frequency measurements are supported, so only one measurement |
2045 * object is created. | 2050 * object is created. |
2046 */ | 2051 */ |
2047 | 2052 |
2048 LteRrcSap::MeasObjectToAddMod measObject; | 2053 LteRrcSap::MeasObjectToAddMod measObject; |
2049 measObject.measObjectId = 1; | 2054 measObject.measObjectId = 1; |
2050 measObject.measObjectEutra.carrierFreq = m_dlEarfcn; | 2055 measObject.measObjectEutra.carrierFreq = m_dlEarfcn; |
2051 measObject.measObjectEutra.allowedMeasBandwidth = m_dlBandwidth; | 2056 measObject.measObjectEutra.allowedMeasBandwidth = static_cast<uint8_t>(m_dlBan
dwidth); |
2052 measObject.measObjectEutra.presenceAntennaPort1 = false; | 2057 measObject.measObjectEutra.presenceAntennaPort1 = false; |
2053 measObject.measObjectEutra.neighCellConfig = 0; | 2058 measObject.measObjectEutra.neighCellConfig = 0; |
2054 measObject.measObjectEutra.offsetFreq = 0; | 2059 measObject.measObjectEutra.offsetFreq = 0; |
2055 measObject.measObjectEutra.haveCellForWhichToReportCGI = false; | 2060 measObject.measObjectEutra.haveCellForWhichToReportCGI = false; |
2056 | 2061 |
2057 m_ueMeasConfig.measObjectToAddModList.push_back (measObject); | 2062 m_ueMeasConfig.measObjectToAddModList.push_back (measObject); |
2058 m_ueMeasConfig.haveQuantityConfig = true; | 2063 m_ueMeasConfig.haveQuantityConfig = true; |
2059 m_ueMeasConfig.quantityConfig.filterCoefficientRSRP = m_rsrpFilterCoefficient; | 2064 m_ueMeasConfig.quantityConfig.filterCoefficientRSRP = m_rsrpFilterCoefficient; |
2060 m_ueMeasConfig.quantityConfig.filterCoefficientRSRQ = m_rsrqFilterCoefficient; | 2065 m_ueMeasConfig.quantityConfig.filterCoefficientRSRQ = m_rsrqFilterCoefficient; |
2061 m_ueMeasConfig.haveMeasGapConfig = false; | 2066 m_ueMeasConfig.haveMeasGapConfig = false; |
2062 m_ueMeasConfig.haveSmeasure = false; | 2067 m_ueMeasConfig.haveSmeasure = false; |
2063 m_ueMeasConfig.haveSpeedStatePars = false; | 2068 m_ueMeasConfig.haveSpeedStatePars = false; |
2064 | 2069 |
2065 m_sib1.clear (); | 2070 m_sib1.clear (); |
2066 m_sib1.reserve (ccPhyConf.size ()); | 2071 m_sib1.reserve (ccPhyConf.size ()); |
2067 for (const auto &it: ccPhyConf) | 2072 for (const auto &it2: ccPhyConf) |
2068 { | 2073 { |
2069 // Enabling MIB transmission | 2074 // Enabling MIB transmission |
2070 LteRrcSap::MasterInformationBlock mib; | 2075 LteRrcSap::MasterInformationBlock mib; |
2071 mib.dlBandwidth = it.second->GetDlBandwidth (); | 2076 mib.dlBandwidth = it2.second->GetDlBandwidth (); |
2072 mib.systemFrameNumber = 0; | 2077 mib.systemFrameNumber = 0; |
2073 m_cphySapProvider.at (it.first)->SetMasterInformationBlock (mib); | 2078 m_cphySapProvider.at (it2.first)->SetMasterInformationBlock (mib); |
2074 | 2079 |
2075 // Enabling SIB1 transmission with default values | 2080 // Enabling SIB1 transmission with default values |
2076 LteRrcSap::SystemInformationBlockType1 sib1; | 2081 LteRrcSap::SystemInformationBlockType1 sib1; |
2077 sib1.cellAccessRelatedInfo.cellIdentity = it.second->GetCellId (); | 2082 sib1.cellAccessRelatedInfo.cellIdentity = it2.second->GetCellId (); |
2078 sib1.cellAccessRelatedInfo.csgIndication = false; | 2083 sib1.cellAccessRelatedInfo.csgIndication = false; |
2079 sib1.cellAccessRelatedInfo.csgIdentity = 0; | 2084 sib1.cellAccessRelatedInfo.csgIdentity = 0; |
2080 sib1.cellAccessRelatedInfo.plmnIdentityInfo.plmnIdentity = 0; // not used | 2085 sib1.cellAccessRelatedInfo.plmnIdentityInfo.plmnIdentity = 0; // not used |
2081 sib1.cellSelectionInfo.qQualMin = -34; // not used, set as minimum value | 2086 sib1.cellSelectionInfo.qQualMin = -34; // not used, set as minimum value |
2082 sib1.cellSelectionInfo.qRxLevMin = m_qRxLevMin; // set as minimum value | 2087 sib1.cellSelectionInfo.qRxLevMin = m_qRxLevMin; // set as minimum value |
2083 m_sib1.push_back (sib1); | 2088 m_sib1.push_back (sib1); |
2084 m_cphySapProvider.at (it.first)->SetSystemInformationBlockType1 (sib1); | 2089 m_cphySapProvider.at (it2.first)->SetSystemInformationBlockType1 (sib1); |
2085 } | 2090 } |
2086 /* | 2091 /* |
2087 * Enabling transmission of other SIB. The first time System Information is | 2092 * Enabling transmission of other SIB. The first time System Information is |
2088 * transmitted is arbitrarily assumed to be at +0.016s, and then it will be | 2093 * transmitted is arbitrarily assumed to be at +0.016s, and then it will be |
2089 * regularly transmitted every 80 ms by default (set the | 2094 * regularly transmitted every 80 ms by default (set the |
2090 * SystemInformationPeriodicity attribute to configure this). | 2095 * SystemInformationPeriodicity attribute to configure this). |
2091 */ | 2096 */ |
2092 Simulator::Schedule (MilliSeconds (16), &LteEnbRrc::SendSystemInformation, thi
s); | 2097 Simulator::Schedule (MilliSeconds (16), &LteEnbRrc::SendSystemInformation, thi
s); |
2093 | 2098 |
2094 m_configured = true; | 2099 m_configured = true; |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2315 EpcX2SapProvider::HandoverRequestAckParams ackParams; | 2320 EpcX2SapProvider::HandoverRequestAckParams ackParams; |
2316 ackParams.oldEnbUeX2apId = req.oldEnbUeX2apId; | 2321 ackParams.oldEnbUeX2apId = req.oldEnbUeX2apId; |
2317 ackParams.newEnbUeX2apId = rnti; | 2322 ackParams.newEnbUeX2apId = rnti; |
2318 ackParams.sourceCellId = req.sourceCellId; | 2323 ackParams.sourceCellId = req.sourceCellId; |
2319 ackParams.targetCellId = req.targetCellId; | 2324 ackParams.targetCellId = req.targetCellId; |
2320 | 2325 |
2321 for (std::vector <EpcX2Sap::ErabToBeSetupItem>::iterator it = req.bearers.begi
n (); | 2326 for (std::vector <EpcX2Sap::ErabToBeSetupItem>::iterator it = req.bearers.begi
n (); |
2322 it != req.bearers.end (); | 2327 it != req.bearers.end (); |
2323 ++it) | 2328 ++it) |
2324 { | 2329 { |
2325 ueManager->SetupDataRadioBearer (it->erabLevelQosParameters, it->erabId, i
t->gtpTeid, it->transportLayerAddress); | 2330 ueManager->SetupDataRadioBearer (it->erabLevelQosParameters, static_cast<u
int8_t>(it->erabId), it->gtpTeid, it->transportLayerAddress); |
2326 EpcX2Sap::ErabAdmittedItem i; | 2331 EpcX2Sap::ErabAdmittedItem i; |
2327 i.erabId = it->erabId; | 2332 i.erabId = it->erabId; |
2328 ackParams.admittedBearers.push_back (i); | 2333 ackParams.admittedBearers.push_back (i); |
2329 } | 2334 } |
2330 | 2335 |
2331 LteRrcSap::RrcConnectionReconfiguration handoverCommand = ueManager->GetRrcCon
nectionReconfigurationForHandover (); | 2336 LteRrcSap::RrcConnectionReconfiguration handoverCommand = ueManager->GetRrcCon
nectionReconfigurationForHandover (); |
2332 handoverCommand.haveMobilityControlInfo = true; | 2337 handoverCommand.haveMobilityControlInfo = true; |
2333 handoverCommand.mobilityControlInfo.targetPhysCellId = req.targetCellId; | 2338 handoverCommand.mobilityControlInfo.targetPhysCellId = req.targetCellId; |
2334 handoverCommand.mobilityControlInfo.haveCarrierFreq = true; | 2339 handoverCommand.mobilityControlInfo.haveCarrierFreq = true; |
2335 handoverCommand.mobilityControlInfo.carrierFreq.dlCarrierFreq = m_dlEarfcn; | 2340 handoverCommand.mobilityControlInfo.carrierFreq.dlCarrierFreq = m_dlEarfcn; |
2336 handoverCommand.mobilityControlInfo.carrierFreq.ulCarrierFreq = m_ulEarfcn; | 2341 handoverCommand.mobilityControlInfo.carrierFreq.ulCarrierFreq = m_ulEarfcn; |
2337 handoverCommand.mobilityControlInfo.haveCarrierBandwidth = true; | 2342 handoverCommand.mobilityControlInfo.haveCarrierBandwidth = true; |
2338 handoverCommand.mobilityControlInfo.carrierBandwidth.dlBandwidth = m_dlBandwid
th; | 2343 handoverCommand.mobilityControlInfo.carrierBandwidth.dlBandwidth = static_cast
<uint8_t>(m_dlBandwidth); |
2339 handoverCommand.mobilityControlInfo.carrierBandwidth.ulBandwidth = m_ulBandwid
th; | 2344 handoverCommand.mobilityControlInfo.carrierBandwidth.ulBandwidth = static_cast
<uint8_t>(m_ulBandwidth); |
2340 handoverCommand.mobilityControlInfo.newUeIdentity = rnti; | 2345 handoverCommand.mobilityControlInfo.newUeIdentity = rnti; |
2341 handoverCommand.mobilityControlInfo.haveRachConfigDedicated = true; | 2346 handoverCommand.mobilityControlInfo.haveRachConfigDedicated = true; |
2342 handoverCommand.mobilityControlInfo.rachConfigDedicated.raPreambleIndex = anrc
rv.raPreambleId; | 2347 handoverCommand.mobilityControlInfo.rachConfigDedicated.raPreambleIndex = anrc
rv.raPreambleId; |
2343 handoverCommand.mobilityControlInfo.rachConfigDedicated.raPrachMaskIndex = anr
crv.raPrachMaskIndex; | 2348 handoverCommand.mobilityControlInfo.rachConfigDedicated.raPrachMaskIndex = anr
crv.raPrachMaskIndex; |
2344 | 2349 |
2345 LteEnbCmacSapProvider::RachConfig rc = m_cmacSapProvider.at (0)->GetRachConfig
(); | 2350 LteEnbCmacSapProvider::RachConfig rc = m_cmacSapProvider.at (0)->GetRachConfig
(); |
2346 handoverCommand.mobilityControlInfo.radioResourceConfigCommon.rachConfigCommon
.preambleInfo.numberOfRaPreambles = rc.numberOfRaPreambles; | 2351 handoverCommand.mobilityControlInfo.radioResourceConfigCommon.rachConfigCommon
.preambleInfo.numberOfRaPreambles = rc.numberOfRaPreambles; |
2347 handoverCommand.mobilityControlInfo.radioResourceConfigCommon.rachConfigCommon
.raSupervisionInfo.preambleTransMax = rc.preambleTransMax; | 2352 handoverCommand.mobilityControlInfo.radioResourceConfigCommon.rachConfigCommon
.raSupervisionInfo.preambleTransMax = rc.preambleTransMax; |
2348 handoverCommand.mobilityControlInfo.radioResourceConfigCommon.rachConfigCommon
.raSupervisionInfo.raResponseWindowSize = rc.raResponseWindowSize; | 2353 handoverCommand.mobilityControlInfo.radioResourceConfigCommon.rachConfigCommon
.raSupervisionInfo.raResponseWindowSize = rc.raResponseWindowSize; |
2349 handoverCommand.haveNonCriticalExtension = false; | 2354 handoverCommand.haveNonCriticalExtension = false; |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2487 void | 2492 void |
2488 LteEnbRrc::DoRrcConfigurationUpdateInd (LteEnbCmacSapUser::UeConfig cmacParams) | 2493 LteEnbRrc::DoRrcConfigurationUpdateInd (LteEnbCmacSapUser::UeConfig cmacParams) |
2489 { | 2494 { |
2490 Ptr<UeManager> ueManager = GetUeManager (cmacParams.m_rnti); | 2495 Ptr<UeManager> ueManager = GetUeManager (cmacParams.m_rnti); |
2491 ueManager->CmacUeConfigUpdateInd (cmacParams); | 2496 ueManager->CmacUeConfigUpdateInd (cmacParams); |
2492 } | 2497 } |
2493 | 2498 |
2494 void | 2499 void |
2495 LteEnbRrc::DoNotifyLcConfigResult (uint16_t rnti, uint8_t lcid, bool success) | 2500 LteEnbRrc::DoNotifyLcConfigResult (uint16_t rnti, uint8_t lcid, bool success) |
2496 { | 2501 { |
| 2502 NS_UNUSED(lcid); |
| 2503 NS_UNUSED(success); |
2497 NS_LOG_FUNCTION (this << (uint32_t) rnti); | 2504 NS_LOG_FUNCTION (this << (uint32_t) rnti); |
2498 NS_FATAL_ERROR ("not implemented"); | 2505 NS_FATAL_ERROR ("not implemented"); |
2499 } | 2506 } |
2500 | 2507 |
2501 | 2508 |
2502 uint8_t | 2509 uint8_t |
2503 LteEnbRrc::DoAddUeMeasReportConfigForHandover (LteRrcSap::ReportConfigEutra repo
rtConfig) | 2510 LteEnbRrc::DoAddUeMeasReportConfigForHandover (LteRrcSap::ReportConfigEutra repo
rtConfig) |
2504 { | 2511 { |
2505 NS_LOG_FUNCTION (this); | 2512 NS_LOG_FUNCTION (this); |
2506 uint8_t measId = AddUeMeasReportConfig (reportConfig); | 2513 uint8_t measId = AddUeMeasReportConfig (reportConfig); |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2725 * The upper bound (inclusive) of the SRS configuration indices (ISRS) which | 2732 * The upper bound (inclusive) of the SRS configuration indices (ISRS) which |
2726 * use the corresponding SRS periodicity (TSRS). Taken from 3GPP TS 36.213 | 2733 * use the corresponding SRS periodicity (TSRS). Taken from 3GPP TS 36.213 |
2727 * Table 8.2-1. Index starts from 1. | 2734 * Table 8.2-1. Index starts from 1. |
2728 */ | 2735 */ |
2729 static const uint16_t g_srsCiHigh[SRS_ENTRIES] = {0, 1, 6, 16, 36, 76, 156,
316, 636}; | 2736 static const uint16_t g_srsCiHigh[SRS_ENTRIES] = {0, 1, 6, 16, 36, 76, 156,
316, 636}; |
2730 | 2737 |
2731 void· | 2738 void· |
2732 LteEnbRrc::SetSrsPeriodicity (uint32_t p) | 2739 LteEnbRrc::SetSrsPeriodicity (uint32_t p) |
2733 { | 2740 { |
2734 NS_LOG_FUNCTION (this << p); | 2741 NS_LOG_FUNCTION (this << p); |
2735 for (uint32_t id = 1; id < SRS_ENTRIES; ++id) | 2742 for (uint16_t id = 1; id < SRS_ENTRIES; ++id) |
2736 { | 2743 { |
2737 if (g_srsPeriodicity[id] == p) | 2744 if (g_srsPeriodicity[id] == p) |
2738 { | 2745 { |
2739 m_srsCurrentPeriodicityId = id; | 2746 m_srsCurrentPeriodicityId = id; |
2740 return; | 2747 return; |
2741 } | 2748 } |
2742 } | 2749 } |
2743 // no match found | 2750 // no match found |
2744 std::ostringstream allowedValues; | 2751 std::ostringstream allowedValues; |
2745 for (uint32_t id = 1; id < SRS_ENTRIES; ++id) | 2752 for (uint32_t id = 1; id < SRS_ENTRIES; ++id) |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2831 } | 2838 } |
2832 else | 2839 else |
2833 { | 2840 { |
2834 return 2; | 2841 return 2; |
2835 } | 2842 } |
2836 } | 2843 } |
2837 | 2844 |
2838 uint8_t· | 2845 uint8_t· |
2839 LteEnbRrc::GetLogicalChannelPriority (EpsBearer bearer) | 2846 LteEnbRrc::GetLogicalChannelPriority (EpsBearer bearer) |
2840 { | 2847 { |
2841 return bearer.qci; | 2848 return static_cast<uint8_t>(bearer.qci); |
2842 } | 2849 } |
2843 | 2850 |
2844 void | 2851 void |
2845 LteEnbRrc::SendSystemInformation () | 2852 LteEnbRrc::SendSystemInformation () |
2846 { | 2853 { |
2847 // NS_LOG_FUNCTION (this); | 2854 // NS_LOG_FUNCTION (this); |
2848 | 2855 |
2849 for (auto &it: m_componentCarrierPhyConf) | 2856 for (auto &it: m_componentCarrierPhyConf) |
2850 { | 2857 { |
2851 uint8_t ccId = it.first; | 2858 uint8_t ccId = it.first; |
(...skipping 18 matching lines...) Expand all Loading... |
2870 /* | 2877 /* |
2871 * For simplicity, we use the same periodicity for all SIBs. Note that in real | 2878 * For simplicity, we use the same periodicity for all SIBs. Note that in real |
2872 * systems the periodicy of each SIBs could be different. | 2879 * systems the periodicy of each SIBs could be different. |
2873 */ | 2880 */ |
2874 Simulator::Schedule (m_systemInformationPeriodicity, &LteEnbRrc::SendSystemInf
ormation, this); | 2881 Simulator::Schedule (m_systemInformationPeriodicity, &LteEnbRrc::SendSystemInf
ormation, this); |
2875 } | 2882 } |
2876 | 2883 |
2877 | 2884 |
2878 } // namespace ns3 | 2885 } // namespace ns3 |
2879 | 2886 |
LEFT | RIGHT |