merge
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
#include <list>
|
||||
|
||||
#include <ns3/ptr.h>
|
||||
#include <ns3/simulator.h>
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
@@ -594,63 +595,63 @@ template <class C>
|
||||
void
|
||||
MemberLteUeRrcSapProvider<C>::RecvMasterInformationBlock (MasterInformationBlock msg)
|
||||
{
|
||||
m_owner->DoRecvMasterInformationBlock (msg);
|
||||
Simulator::ScheduleNow (&C::DoRecvMasterInformationBlock, m_owner, msg);
|
||||
}
|
||||
|
||||
template <class C>
|
||||
void
|
||||
MemberLteUeRrcSapProvider<C>::RecvSystemInformationBlockType1 (SystemInformationBlockType1 msg)
|
||||
{
|
||||
m_owner->DoRecvSystemInformationBlockType1 (msg);
|
||||
Simulator::ScheduleNow (&C::DoRecvSystemInformationBlockType1, m_owner, msg);
|
||||
}
|
||||
|
||||
template <class C>
|
||||
void
|
||||
MemberLteUeRrcSapProvider<C>::RecvSystemInformation (SystemInformation msg)
|
||||
{
|
||||
m_owner->DoRecvSystemInformation (msg);
|
||||
Simulator::ScheduleNow (&C::DoRecvSystemInformation, m_owner, msg);
|
||||
}
|
||||
|
||||
template <class C>
|
||||
void
|
||||
MemberLteUeRrcSapProvider<C>::RecvRrcConnectionSetup (RrcConnectionSetup msg)
|
||||
{
|
||||
m_owner->DoRecvRrcConnectionSetup (msg);
|
||||
Simulator::ScheduleNow (&C::DoRecvRrcConnectionSetup, m_owner, msg);
|
||||
}
|
||||
|
||||
template <class C>
|
||||
void
|
||||
MemberLteUeRrcSapProvider<C>::RecvRrcConnectionReconfiguration (RrcConnectionReconfiguration msg)
|
||||
{
|
||||
m_owner->DoRecvRrcConnectionReconfiguration (msg);
|
||||
Simulator::ScheduleNow (&C::DoRecvRrcConnectionReconfiguration, m_owner, msg);
|
||||
}
|
||||
|
||||
template <class C>
|
||||
void
|
||||
MemberLteUeRrcSapProvider<C>::RecvRrcConnectionReestablishment (RrcConnectionReestablishment msg)
|
||||
{
|
||||
m_owner->DoRecvRrcConnectionReestablishment (msg);
|
||||
Simulator::ScheduleNow (&C::DoRecvRrcConnectionReestablishment, m_owner, msg);
|
||||
}
|
||||
|
||||
template <class C>
|
||||
void
|
||||
MemberLteUeRrcSapProvider<C>::RecvRrcConnectionReestablishmentReject (RrcConnectionReestablishmentReject msg)
|
||||
{
|
||||
m_owner->DoRecvRrcConnectionReestablishmentReject (msg);
|
||||
Simulator::ScheduleNow (&C::DoRecvRrcConnectionReestablishmentReject, m_owner, msg);
|
||||
}
|
||||
|
||||
template <class C>
|
||||
void
|
||||
MemberLteUeRrcSapProvider<C>::RecvRrcConnectionRelease (RrcConnectionRelease msg)
|
||||
{
|
||||
m_owner->DoRecvRrcConnectionRelease (msg);
|
||||
Simulator::ScheduleNow (&C::DoRecvRrcConnectionRelease, m_owner, msg);
|
||||
}
|
||||
|
||||
template <class C>
|
||||
void
|
||||
MemberLteUeRrcSapProvider<C>::RecvRrcConnectionReject (RrcConnectionReject msg)
|
||||
{
|
||||
m_owner->DoRecvRrcConnectionReject (msg);
|
||||
Simulator::ScheduleNow (&C::DoRecvRrcConnectionReject, m_owner, msg);
|
||||
}
|
||||
|
||||
|
||||
@@ -852,35 +853,35 @@ template <class C>
|
||||
void
|
||||
MemberLteEnbRrcSapProvider<C>::RecvRrcConnectionRequest (uint16_t rnti, RrcConnectionRequest msg)
|
||||
{
|
||||
m_owner->DoRecvRrcConnectionRequest (rnti, msg);
|
||||
Simulator::ScheduleNow (&C::DoRecvRrcConnectionRequest, m_owner, rnti, msg);
|
||||
}
|
||||
|
||||
template <class C>
|
||||
void
|
||||
MemberLteEnbRrcSapProvider<C>::RecvRrcConnectionSetupCompleted (uint16_t rnti, RrcConnectionSetupCompleted msg)
|
||||
{
|
||||
m_owner->DoRecvRrcConnectionSetupCompleted (rnti, msg);
|
||||
Simulator::ScheduleNow (&C::DoRecvRrcConnectionSetupCompleted, m_owner, rnti, msg);
|
||||
}
|
||||
|
||||
template <class C>
|
||||
void
|
||||
MemberLteEnbRrcSapProvider<C>::RecvRrcConnectionReconfigurationCompleted (uint16_t rnti, RrcConnectionReconfigurationCompleted msg)
|
||||
{
|
||||
m_owner->DoRecvRrcConnectionReconfigurationCompleted (rnti, msg);
|
||||
Simulator::ScheduleNow (&C::DoRecvRrcConnectionReconfigurationCompleted, m_owner, rnti, msg);
|
||||
}
|
||||
|
||||
template <class C>
|
||||
void
|
||||
MemberLteEnbRrcSapProvider<C>::RecvRrcConnectionReestablishmentRequest (uint16_t rnti, RrcConnectionReestablishmentRequest msg)
|
||||
{
|
||||
m_owner->DoRecvRrcConnectionReestablishmentRequest (rnti, msg);
|
||||
Simulator::ScheduleNow (&C::DoRecvRrcConnectionReestablishmentRequest, m_owner, rnti, msg);
|
||||
}
|
||||
|
||||
template <class C>
|
||||
void
|
||||
MemberLteEnbRrcSapProvider<C>::RecvRrcConnectionReestablishmentComplete (uint16_t rnti, RrcConnectionReestablishmentComplete msg)
|
||||
{
|
||||
m_owner->DoRecvRrcConnectionReestablishmentComplete (rnti, msg);
|
||||
Simulator::ScheduleNow (&C::DoRecvRrcConnectionReestablishmentComplete, m_owner, rnti, msg);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -294,6 +294,27 @@ LteSpectrumPhy::SetNoisePowerSpectralDensity (Ptr<const SpectrumValue> noisePsd)
|
||||
m_interferenceCtrl->SetNoisePowerSpectralDensity (noisePsd);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
LteSpectrumPhy::Reset ()
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
m_cellId = 0;
|
||||
m_state = IDLE;
|
||||
m_transmissionMode = 0;
|
||||
m_layersNum = 1;
|
||||
m_endTxEvent.Cancel ();
|
||||
m_endRxDataEvent.Cancel ();
|
||||
m_endRxDlCtrlEvent.Cancel ();
|
||||
m_endRxUlSrsEvent.Cancel ();
|
||||
m_rxControlMessageList.clear ();
|
||||
m_expectedTbs.clear ();
|
||||
m_txControlMessageList.clear ();
|
||||
m_rxPacketBurstList.clear ();
|
||||
m_txPacketBurst = 0;
|
||||
m_rxSpectrumModel = 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void
|
||||
@@ -429,7 +450,7 @@ LteSpectrumPhy::StartTxDataFrame (Ptr<PacketBurst> pb, std::list<Ptr<LteControlM
|
||||
txParams->ctrlMsgList = ctrlMsgList;
|
||||
txParams->cellId = m_cellId;
|
||||
m_channel->StartTx (txParams);
|
||||
Simulator::Schedule (duration, &LteSpectrumPhy::EndTx, this);
|
||||
m_endTxEvent = Simulator::Schedule (duration, &LteSpectrumPhy::EndTx, this);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
@@ -484,7 +505,7 @@ LteSpectrumPhy::StartTxDlCtrlFrame (std::list<Ptr<LteControlMessage> > ctrlMsgLi
|
||||
txParams->cellId = m_cellId;
|
||||
txParams->ctrlMsgList = ctrlMsgList;
|
||||
m_channel->StartTx (txParams);
|
||||
Simulator::Schedule (DL_CTRL_DURATION, &LteSpectrumPhy::EndTx, this);
|
||||
m_endTxEvent = Simulator::Schedule (DL_CTRL_DURATION, &LteSpectrumPhy::EndTx, this);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
@@ -539,7 +560,7 @@ LteSpectrumPhy::StartTxUlSrsFrame ()
|
||||
txParams->psd = m_txPsd;
|
||||
txParams->cellId = m_cellId;
|
||||
m_channel->StartTx (txParams);
|
||||
Simulator::Schedule (UL_SRS_DURATION, &LteSpectrumPhy::EndTx, this);
|
||||
m_endTxEvent = Simulator::Schedule (UL_SRS_DURATION, &LteSpectrumPhy::EndTx, this);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
@@ -646,7 +667,7 @@ LteSpectrumPhy::StartRxData (Ptr<LteSpectrumSignalParametersDataFrame> params)
|
||||
m_firstRxStart = Simulator::Now ();
|
||||
m_firstRxDuration = params->duration;
|
||||
NS_LOG_LOGIC (this << " scheduling EndRx with delay " << params->duration.GetSeconds () << "s");
|
||||
Simulator::Schedule (params->duration, &LteSpectrumPhy::EndRxData, this);
|
||||
m_endRxDataEvent = Simulator::Schedule (params->duration, &LteSpectrumPhy::EndRxData, this);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -740,11 +761,11 @@ LteSpectrumPhy::StartRxCtrl (Ptr<SpectrumSignalParameters> params)
|
||||
{
|
||||
// store the DCIs
|
||||
m_rxControlMessageList = lteDlCtrlRxParams->ctrlMsgList;
|
||||
Simulator::Schedule (params->duration, &LteSpectrumPhy::EndRxDlCtrl, this);
|
||||
m_endRxDlCtrlEvent = Simulator::Schedule (params->duration, &LteSpectrumPhy::EndRxDlCtrl, this);
|
||||
}
|
||||
else
|
||||
{
|
||||
Simulator::Schedule (params->duration, &LteSpectrumPhy::EndRxUlSrs, this);
|
||||
m_endRxUlSrsEvent = Simulator::Schedule (params->duration, &LteSpectrumPhy::EndRxUlSrs, this);
|
||||
}
|
||||
}
|
||||
else if (m_state == RX_CTRL)
|
||||
|
||||
@@ -189,6 +189,12 @@ public:
|
||||
* (Watt, Pascal...) per Hz.
|
||||
*/
|
||||
void SetNoisePowerSpectralDensity (Ptr<const SpectrumValue> noisePsd);
|
||||
|
||||
/**
|
||||
* reset the internal state
|
||||
*
|
||||
*/
|
||||
void Reset ();
|
||||
|
||||
/**
|
||||
* set the AntennaModel to be used
|
||||
@@ -461,6 +467,12 @@ private:
|
||||
*/
|
||||
TracedCallback<PhyReceptionStatParameters> m_ulPhyReception;
|
||||
|
||||
EventId m_endTxEvent;
|
||||
EventId m_endRxDataEvent;
|
||||
EventId m_endRxDlCtrlEvent;
|
||||
EventId m_endRxUlSrsEvent;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -755,7 +755,7 @@ LteUePhy::SubframeIndication (uint32_t frameNo, uint32_t subframeNo)
|
||||
|
||||
std::list<Ptr<LteControlMessage> > ctrlMsg = GetControlMessages ();
|
||||
// send packets in queue
|
||||
NS_LOG_LOGIC (this << " UE - start slot for PUSCH + PUCCH - RNTI " << m_rnti);
|
||||
NS_LOG_LOGIC (this << " UE - start slot for PUSCH + PUCCH - RNTI " << m_rnti << " CELLID " << m_cellId);
|
||||
// send the current burts of packets
|
||||
Ptr<PacketBurst> pb = GetPacketBurst ();
|
||||
if (pb)
|
||||
@@ -841,6 +841,8 @@ LteUePhy::DoReset ()
|
||||
m_subChannelsForTransmissionQueue.resize (m_macChTtiDelay, ulRb);
|
||||
|
||||
m_sendSrsEvent.Cancel ();
|
||||
m_downlinkSpectrumPhy->Reset ();
|
||||
m_uplinkSpectrumPhy->Reset ();
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -155,9 +155,11 @@ LteLinkAdaptationTestCase::~LteLinkAdaptationTestCase ()
|
||||
void
|
||||
LteLinkAdaptationTestCase::DoRun (void)
|
||||
{
|
||||
|
||||
Config::Reset ();
|
||||
Config::SetDefault ("ns3::LteAmc::AmcModel", EnumValue (LteAmc::PiroEW2010));
|
||||
Config::SetDefault ("ns3::LteAmc::Ber", DoubleValue (0.00005));
|
||||
Config::SetDefault ("ns3::LteEnbRrc::SrsPeriodicity", UintegerValue (2));
|
||||
|
||||
/**
|
||||
* Simulation Topology
|
||||
*/
|
||||
@@ -206,7 +208,7 @@ LteLinkAdaptationTestCase::DoRun (void)
|
||||
Config::Connect ("/NodeList/0/DeviceList/0/LteEnbMac/DlScheduling",
|
||||
MakeBoundCallback (&LteTestDlSchedulingCallback, this));
|
||||
|
||||
Simulator::Stop (Seconds (0.026));
|
||||
Simulator::Stop (Seconds (0.040));
|
||||
Simulator::Run ();
|
||||
|
||||
double calculatedSinrDb = 10.0 * log10 (testSinr->GetSinr ()->operator[] (0));
|
||||
@@ -233,7 +235,7 @@ LteLinkAdaptationTestCase::DlScheduling (uint32_t frameNo, uint32_t subframeNo,
|
||||
* RRC connection has been completed and
|
||||
* CQI feedback is available at the eNB.
|
||||
*/
|
||||
if (Simulator::Now ().GetSeconds () > 0.024)
|
||||
if (Simulator::Now ().GetSeconds () > 0.030)
|
||||
{
|
||||
NS_LOG_INFO (m_snrDb << "\t" << m_mcsIndex << "\t" << (uint16_t)mcsTb1);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user