/* code */
void
LteUeRrc::DoRecvRrcConnectionReestablishment (LteRrcSap::RrcConnectionReestablishment msg)
{
NS_LOG_FUNCTION (this << " RNTI " << m_rnti);
switch (m_state)
{
case CONNECTED_REESTABLISHING:
{
/**
* \todo After receiving RRC Connection Re-establishment, stop timer
* T301, fire a new trace source, reply with RRC Connection
* Re-establishment Complete, and finally switch to
* CONNECTED_NORMALLY state. See Section 5.3.7.5 of 3GPP TS
* 36.331.
*/
LeaveConnectedMode (); // will switch to IDLE_CAMPED_NORMALLY.
}
break;
default:
NS_FATAL_ERROR ("method unexpected in state " << ToString (m_state));
break;
}
}
void
LteUeRrc::DoRecvRrcConnectionReestablishmentReject (LteRrcSap::RrcConnectionReestablishmentReject msg)
{
NS_LOG_FUNCTION (this << " RNTI " << m_rnti);
switch (m_state)
{
case CONNECTED_REESTABLISHING:
{
/**
* \todo After receiving RRC Connection Re-establishment Reject, stop
* timer T301. See Section 5.3.7.8 of 3GPP TS 36.331.
*/
LeaveConnectedMode ();
}
break;
default:
NS_FATAL_ERROR ("method unexpected in state " << ToString (m_state));
break;
}
}
void
LteUeRrc::DoRecvRrcConnectionRelease (LteRrcSap::RrcConnectionRelease msg)
{
NS_LOG_FUNCTION (this << " RNTI " << m_rnti);
/// \todo Currently not implemented, see Section 5.3.8 of 3GPP TS 36.331.
NS_LOG_FUNCTION (this << m_imsi);
m_asSapUser->NotifyConnectionReleased ();
m_cmacSapProvider->RemoveLc (1);
std::map<uint8_t, Ptr<LteDataRadioBearerInfo> >::iterator it;
for (it = m_drbMap.begin (); it != m_drbMap.end (); ++it)
{
m_cmacSapProvider->RemoveLc (it->second->m_logicalChannelIdentity);
}
m_drbMap.clear ();
m_bid2DrbidMap.clear ();
m_srb1 = 0;
SwitchToState (IDLE_CELL_SEARCH);
}
void
LteUeRrc::LeaveConnectedMode ()
{
NS_LOG_FUNCTION (this << m_imsi);
m_asSapUser->NotifyConnectionReleased ();
m_cmacSapProvider->RemoveLc (1);
std::map<uint8_t, Ptr<LteDataRadioBearerInfo> >::iterator it;
for (it = m_drbMap.begin (); it != m_drbMap.end (); ++it)
{
m_cmacSapProvider->RemoveLc (it->second->m_logicalChannelIdentity);
}
m_drbMap.clear ();
m_bid2DrbidMap.clear ();
m_srb1 = 0;
SwitchToState (IDLE_CAMPED_NORMALLY);
}