merge
This commit is contained in:
@@ -81,7 +81,7 @@ int main (int argc, char *argv[])
|
||||
EpsBearer bearer (q);
|
||||
lteHelper->ActivateDataRadioBearer (ueDevs, bearer);
|
||||
|
||||
Simulator::Stop (Seconds (0.010));
|
||||
Simulator::Stop (Seconds (0.100));
|
||||
|
||||
Simulator::Run ();
|
||||
|
||||
|
||||
@@ -704,7 +704,7 @@ LteHelper::ActivateDataRadioBearer (Ptr<NetDevice> ueDevice, EpsBearer bearer)
|
||||
NS_ASSERT_MSG (m_epcHelper == 0, "this method must not be used when EPC is being used");
|
||||
|
||||
// Normally it is the EPC that takes care of activating DRBs
|
||||
// after the UE gets connected. When the EPC is not used, we achieve
|
||||
// when the UE gets connected. When the EPC is not used, we achieve
|
||||
// the same behavior by hooking a dedicated DRB activation function
|
||||
// to the Enb RRC Connection Established trace source
|
||||
|
||||
|
||||
@@ -277,8 +277,8 @@ UeManager::SetImsi (uint64_t imsi)
|
||||
m_imsi = imsi;
|
||||
}
|
||||
|
||||
uint8_t
|
||||
UeManager::SetupDataRadioBearer (EpsBearer bearer, uint32_t gtpTeid, Ipv4Address transportLayerAddress)
|
||||
void
|
||||
UeManager::SetupDataRadioBearer (EpsBearer bearer, uint8_t bearerId, uint32_t gtpTeid, Ipv4Address transportLayerAddress)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << (uint32_t) m_rnti);
|
||||
|
||||
@@ -286,6 +286,7 @@ UeManager::SetupDataRadioBearer (EpsBearer bearer, uint32_t gtpTeid, Ipv4Address
|
||||
uint8_t drbid = AddDataRadioBearerInfo (drbInfo);
|
||||
uint8_t lcid = Drbid2Lcid (drbid);
|
||||
uint8_t bid = Drbid2Bid (drbid);
|
||||
NS_ASSERT_MSG ( bearerId == 0 || bid == bearerId, "bearer ID mismatch (" << (uint32_t) bid << " != " << (uint32_t) bearerId << ", the assumption that ID are allocated in the same way by MME and RRC is not valid any more");
|
||||
drbInfo->m_epsBearerIdentity = bid;
|
||||
drbInfo->m_drbIdentity = drbid;
|
||||
drbInfo->m_logicalChannelIdentity = lcid;
|
||||
@@ -351,7 +352,23 @@ UeManager::SetupDataRadioBearer (EpsBearer bearer, uint32_t gtpTeid, Ipv4Address
|
||||
}
|
||||
drbInfo->m_logicalChannelConfig.bucketSizeDurationMs = 1000;
|
||||
|
||||
return drbid;
|
||||
ScheduleRrcConnectionReconfiguration ();
|
||||
}
|
||||
|
||||
void
|
||||
UeManager::StartDataRadioBearers ()
|
||||
{
|
||||
NS_LOG_FUNCTION (this << (uint32_t) m_rnti);
|
||||
for (std::map <uint8_t, Ptr<LteDataRadioBearerInfo> >::iterator it = m_drbMap.begin ();
|
||||
it != m_drbMap.end ();
|
||||
++it)
|
||||
{
|
||||
it->second->m_rlc->Start ();
|
||||
if (it->second->m_pdcp)
|
||||
{
|
||||
it->second->m_pdcp->Start ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -594,7 +611,8 @@ UeManager::RecvRrcConnectionSetupCompleted (LteRrcSap::RrcConnectionSetupComplet
|
||||
NS_LOG_FUNCTION (this);
|
||||
switch (m_state)
|
||||
{
|
||||
case CONNECTION_SETUP:
|
||||
case CONNECTION_SETUP:
|
||||
StartDataRadioBearers ();
|
||||
SwitchToState (CONNECTED_NORMALLY);
|
||||
m_rrc->m_connectionEstablishedTrace (m_imsi, m_rrc->m_cellId, m_rnti);
|
||||
break;
|
||||
@@ -611,7 +629,8 @@ UeManager::RecvRrcConnectionReconfigurationCompleted (LteRrcSap::RrcConnectionRe
|
||||
NS_LOG_FUNCTION (this);
|
||||
switch (m_state)
|
||||
{
|
||||
case CONNECTION_RECONFIGURATION:
|
||||
case CONNECTION_RECONFIGURATION:
|
||||
StartDataRadioBearers ();
|
||||
SwitchToState (CONNECTED_NORMALLY);
|
||||
m_rrc->m_connectionReconfigurationTrace (m_imsi, m_rrc->m_cellId, m_rnti);
|
||||
break;
|
||||
@@ -1219,11 +1238,8 @@ LteEnbRrc::DoRecvRrcConnectionReestablishmentComplete (uint16_t rnti, LteRrcSap:
|
||||
void
|
||||
LteEnbRrc::DoDataRadioBearerSetupRequest (EpcEnbS1SapUser::DataRadioBearerSetupRequestParameters request)
|
||||
{
|
||||
|
||||
Ptr<UeManager> ueManager = GetUeManager (request.rnti);
|
||||
uint8_t bid = ueManager->SetupDataRadioBearer (request.bearer, request.gtpTeid, request.transportLayerAddress);
|
||||
NS_ASSERT_MSG ( request.bearerId == 0 || bid == request.bearerId, "bearer ID mismatch (" << (uint32_t) bid << " != " << (uint32_t) request.bearerId << ", the assumption that ID are allocated in the same way by MME and RRC is not valid any more");
|
||||
ueManager->ScheduleRrcConnectionReconfiguration ();
|
||||
ueManager->SetupDataRadioBearer (request.bearer, request.bearerId, request.gtpTeid, request.transportLayerAddress);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -1278,7 +1294,7 @@ LteEnbRrc::DoRecvHandoverRequest (EpcX2SapUser::HandoverRequestParams req)
|
||||
it != req.bearers.end ();
|
||||
++it)
|
||||
{
|
||||
ueManager->SetupDataRadioBearer (it->erabLevelQosParameters, it->gtpTeid, it->transportLayerAddress);
|
||||
ueManager->SetupDataRadioBearer (it->erabLevelQosParameters, it->erabId, it->gtpTeid, it->transportLayerAddress);
|
||||
}
|
||||
|
||||
LteRrcSap::RrcConnectionReconfiguration handoverCommand = ueManager->GetRrcConnectionReconfigurationForHandover ();
|
||||
|
||||
@@ -120,14 +120,21 @@ public:
|
||||
* Setup a new data radio bearer, including both the configuration
|
||||
* within the eNB and the necessary RRC signaling with the UE
|
||||
*
|
||||
* \param bearer
|
||||
* \param bearer the QoS characteristics of the bearer
|
||||
* \param bearerId the EPS bearer identifier
|
||||
* \param gtpTeid S1-bearer GTP tunnel endpoint identifier, see 36.423 9.2.1
|
||||
* \param transportLayerAddress IP Address of the SGW, see 36.423 9.2.1
|
||||
*
|
||||
* \return the EPS Bearer Id
|
||||
*/
|
||||
uint8_t SetupDataRadioBearer (EpsBearer bearer, uint32_t gtpTeid, Ipv4Address transportLayerAddress);
|
||||
void SetupDataRadioBearer (EpsBearer bearer, uint8_t bearerId, uint32_t gtpTeid, Ipv4Address transportLayerAddress);
|
||||
|
||||
/**
|
||||
* Start all configured data radio bearers. It is safe to call this
|
||||
* method if any bearer had been already started previously.
|
||||
*
|
||||
*/
|
||||
void StartDataRadioBearers ();
|
||||
|
||||
/**
|
||||
*
|
||||
* Release a given radio bearer
|
||||
|
||||
@@ -108,12 +108,6 @@ TypeId LteRlc::GetTypeId (void)
|
||||
return tid;
|
||||
}
|
||||
|
||||
void
|
||||
LteRlcSm::DoDispose ()
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
}
|
||||
|
||||
void
|
||||
LteRlc::SetRnti (uint16_t rnti)
|
||||
{
|
||||
@@ -171,9 +165,7 @@ NS_OBJECT_ENSURE_REGISTERED (LteRlcSm);
|
||||
|
||||
LteRlcSm::LteRlcSm ()
|
||||
{
|
||||
|
||||
NS_LOG_FUNCTION (this);
|
||||
Simulator::ScheduleNow (&LteRlcSm::Start, this);
|
||||
}
|
||||
|
||||
LteRlcSm::~LteRlcSm ()
|
||||
@@ -191,6 +183,19 @@ LteRlcSm::GetTypeId (void)
|
||||
return tid;
|
||||
}
|
||||
|
||||
void
|
||||
LteRlcSm::DoStart ()
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
ReportBufferStatus ();
|
||||
}
|
||||
|
||||
void
|
||||
LteRlcSm::DoDispose ()
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
}
|
||||
|
||||
void
|
||||
LteRlcSm::DoTransmitPdcpPdu (Ptr<Packet> p)
|
||||
{
|
||||
@@ -244,13 +249,6 @@ LteRlcSm::DoNotifyHarqDeliveryFailure ()
|
||||
NS_LOG_FUNCTION (this);
|
||||
}
|
||||
|
||||
void
|
||||
LteRlcSm::Start ()
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
ReportBufferStatus ();
|
||||
}
|
||||
|
||||
void
|
||||
LteRlcSm::ReportBufferStatus ()
|
||||
{
|
||||
|
||||
@@ -148,6 +148,7 @@ public:
|
||||
LteRlcSm ();
|
||||
virtual ~LteRlcSm ();
|
||||
static TypeId GetTypeId (void);
|
||||
virtual void DoStart ();
|
||||
virtual void DoDispose ();
|
||||
|
||||
virtual void DoTransmitPdcpPdu (Ptr<Packet> p);
|
||||
@@ -155,7 +156,7 @@ public:
|
||||
virtual void DoNotifyHarqDeliveryFailure ();
|
||||
virtual void DoReceivePdu (Ptr<Packet> p);
|
||||
|
||||
void Start ();
|
||||
|
||||
|
||||
private:
|
||||
void ReportBufferStatus ();
|
||||
|
||||
@@ -841,6 +841,7 @@ LteUeRrc::ApplyRadioResourceConfigDedicated (LteRrcSap::RadioResourceConfigDedic
|
||||
m_cmacSapProvider->AddLc (dtamIt->logicalChannelIdentity,
|
||||
lcConfig,
|
||||
rlc->GetLteMacSapUser ());
|
||||
rlc->Start ();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user