lte: Fix tests after config update

see merge request !270
This commit is contained in:
ZorazeAli
2020-05-04 22:32:20 +02:00
parent 5b95df87d6
commit 59276b0d96
11 changed files with 45 additions and 27 deletions

View File

@@ -189,10 +189,10 @@ RadioBearerStatsConnector::NotifyRandomAccessSuccessfulUe (RadioBearerStatsConne
}
void
RadioBearerStatsConnector::CreatedDrbEnb (RadioBearerStatsConnector* c, std::string context, uint64_t imsi, uint16_t cellId, uint16_t rnti, uint8_t lcid)
RadioBearerStatsConnector::CreatedDrbEnb (RadioBearerStatsConnector* c, std::string context, uint64_t imsi, uint16_t cellId, uint16_t rnti, uint8_t lcid, std::string rlcType)
{
NS_LOG_FUNCTION (c << context << imsi << cellId << rnti << (uint16_t)lcid);
c->ConnectTracesDrbEnb (context, imsi, cellId, rnti, lcid);
NS_LOG_FUNCTION (c << context << imsi << cellId << rnti << (uint16_t)lcid << rlcType);
c->ConnectTracesDrbEnb (context, imsi, cellId, rnti, lcid, rlcType);
}
void
@@ -203,10 +203,10 @@ RadioBearerStatsConnector::CreatedSrb1Ue (RadioBearerStatsConnector* c, std::str
}
void
RadioBearerStatsConnector::CreatedDrbUe (RadioBearerStatsConnector* c, std::string context, uint64_t imsi, uint16_t cellId, uint16_t rnti, uint8_t lcid)
RadioBearerStatsConnector::CreatedDrbUe (RadioBearerStatsConnector* c, std::string context, uint64_t imsi, uint16_t cellId, uint16_t rnti, uint8_t lcid, std::string rlcType)
{
NS_LOG_FUNCTION (c << context << imsi << cellId << rnti << (uint16_t)lcid);
c->ConnectTracesDrbUe (context, imsi, cellId, rnti, lcid);
NS_LOG_FUNCTION (c << context << imsi << cellId << rnti << (uint16_t)lcid << rlcType);
c->ConnectTracesDrbUe (context, imsi, cellId, rnti, lcid, rlcType);
}
void
@@ -285,7 +285,7 @@ RadioBearerStatsConnector::ConnectTracesSrb1 (std::string context, uint64_t imsi
}
void
RadioBearerStatsConnector::ConnectTracesDrbEnb (std::string context, uint64_t imsi, uint16_t cellId, uint16_t rnti, uint8_t lcid)
RadioBearerStatsConnector::ConnectTracesDrbEnb (std::string context, uint64_t imsi, uint16_t cellId, uint16_t rnti, uint8_t lcid, std::string rlcType)
{
NS_LOG_FUNCTION (this << context << imsi << cellId << rnti << (uint16_t)lcid);
NS_LOG_LOGIC ("expected context should match /NodeList/*/DeviceList/*/LteEnbRrc/");
@@ -303,7 +303,7 @@ RadioBearerStatsConnector::ConnectTracesDrbEnb (std::string context, uint64_t im
Config::Connect (basePath + "/LteRlc/RxPDU",
MakeBoundCallback (&UlRxPduCallback, arg));
}
if (m_pdcpStats)
if (m_pdcpStats && rlcType != "ns3::LteRlcSm")
{
Ptr<BoundCallbackArgument> arg = Create<BoundCallbackArgument> ();
arg->imsi = imsi;
@@ -317,7 +317,7 @@ RadioBearerStatsConnector::ConnectTracesDrbEnb (std::string context, uint64_t im
}
void
RadioBearerStatsConnector::ConnectTracesDrbUe (std::string context, uint64_t imsi, uint16_t cellId, uint16_t rnti, uint8_t lcid)
RadioBearerStatsConnector::ConnectTracesDrbUe (std::string context, uint64_t imsi, uint16_t cellId, uint16_t rnti, uint8_t lcid, std::string rlcType)
{
NS_LOG_FUNCTION (this << context << imsi << cellId << rnti << (uint16_t)lcid);
NS_LOG_LOGIC ("expected context should match /NodeList/*/DeviceList/*/LteUeRrc/");
@@ -335,7 +335,7 @@ RadioBearerStatsConnector::ConnectTracesDrbUe (std::string context, uint64_t ims
Config::Connect (basePath + "/LteRlc/RxPDU",
MakeBoundCallback (&DlRxPduCallback, arg));
}
if (m_pdcpStats)
if (m_pdcpStats && rlcType != "ns3::LteRlcSm")
{
Ptr<BoundCallbackArgument> arg = Create<BoundCallbackArgument> ();
arg->imsi = imsi;

View File

@@ -117,8 +117,9 @@ public:
* \param cellid
* \param rnti
* \param lcid
* \param rlcType
*/
static void CreatedDrbEnb (RadioBearerStatsConnector* c, std::string context, uint64_t imsi, uint16_t cellid, uint16_t rnti, uint8_t lcid);
static void CreatedDrbEnb (RadioBearerStatsConnector* c, std::string context, uint64_t imsi, uint16_t cellid, uint16_t rnti, uint8_t lcid, std::string rlcType);
/**
* Function hooked to DrbCreated trace source at UE RRC,
@@ -130,8 +131,9 @@ public:
* \param cellid
* \param rnti
* \param lcid
* \param rlcType
*/
static void CreatedDrbUe (RadioBearerStatsConnector* c, std::string context, uint64_t imsi, uint16_t cellid, uint16_t rnti, uint8_t lcid);
static void CreatedDrbUe (RadioBearerStatsConnector* c, std::string context, uint64_t imsi, uint16_t cellid, uint16_t rnti, uint8_t lcid, std::string rlcType);
/**
* Disconnects all trace sources at eNB to RLC and PDCP calculators.
@@ -188,8 +190,9 @@ private:
* \param cellId
* \param rnti
* \param lcid
* \param rlcType
*/
void ConnectTracesDrbEnb (std::string context, uint64_t imsi, uint16_t cellId, uint16_t rnti, uint8_t lcid);
void ConnectTracesDrbEnb (std::string context, uint64_t imsi, uint16_t cellId, uint16_t rnti, uint8_t lcid, std::string rlcType);
/**
* Connects DRB trace sources at UE to RLC and PDCP calculators
@@ -198,8 +201,9 @@ private:
* \param cellId
* \param rnti
* \param lcid
* \param rlcType
*/
void ConnectTracesDrbUe (std::string context, uint64_t imsi, uint16_t cellId, uint16_t rnti, uint8_t lcid);
void ConnectTracesDrbUe (std::string context, uint64_t imsi, uint16_t cellId, uint16_t rnti, uint8_t lcid, std::string rlcType);
Ptr<RadioBearerStatsCalculator> m_rlcStats; //!< Calculator for RLC Statistics
Ptr<RadioBearerStatsCalculator> m_pdcpStats; //!< Calculator for PDCP Statistics

View File

@@ -444,7 +444,7 @@ UeManager::SetupDataRadioBearer (EpsBearer bearer, uint8_t bearerId, uint32_t gt
drbInfo->m_pdcp = pdcp;
}
m_drbCreatedTrace (m_imsi, m_rrc->ComponentCarrierToCellId (m_componentCarrierId), m_rnti, lcid);
m_drbCreatedTrace (m_imsi, m_rrc->ComponentCarrierToCellId (m_componentCarrierId), m_rnti, lcid, rlcTypeId.GetName ());
std::vector<LteCcmRrcSapProvider::LcsConfig> lcOnCcMapping = m_rrc->m_ccmRrcSapProvider->SetupDataRadioBearer (bearer, bearerId, m_rnti, lcid, m_rrc->GetLogicalChannelGroup (bearer), rlc->GetLteMacSapUser ());
// LteEnbCmacSapProvider::LcInfo lcinfo;

View File

@@ -559,9 +559,10 @@ private:
/**
* The `DrbCreated` trace source. Fired when DRB is created, i.e.
* the RLC and PDCP entities are created for one logical channel.
* Exporting IMSI, cell ID, RNTI, and LCID
* Exporting IMSI, cell ID, RNTI, LCID, and the TypeId of the RLC
* entity.
*/
TracedCallback<uint64_t, uint16_t, uint16_t, uint8_t> m_drbCreatedTrace;
TracedCallback<uint64_t, uint16_t, uint16_t, uint8_t, std::string> m_drbCreatedTrace;
uint16_t m_sourceX2apId; ///< source X2 ap ID
uint16_t m_targetX2apId; ///< target X2 ap ID

View File

@@ -1526,7 +1526,7 @@ LteUeRrc::ApplyRadioResourceConfigDedicated (LteRrcSap::RadioResourceConfigDedic
m_drbMap.insert (std::pair<uint8_t, Ptr<LteDataRadioBearerInfo> > (dtamIt->drbIdentity, drbInfo));
m_drbCreatedTrace (m_imsi, m_cellId, m_rnti, dtamIt->drbIdentity);
m_drbCreatedTrace (m_imsi, m_cellId, m_rnti, dtamIt->drbIdentity, rlcTypeId.GetName ());
struct LteUeCmacSapProvider::LogicalChannelConfig lcConfig;

View File

@@ -917,9 +917,10 @@ private:
/**
* The `DrbCreated` trace source. Fired when DRB is created, i.e.
* the RLC and PDCP entities are created for one logical channel.
* Exporting IMSI, cell ID, RNTI, and LCID
* Exporting IMSI, cell ID, RNTI, LCID, and the TypeId of the RLC
* entity.
*/
TracedCallback<uint64_t, uint16_t, uint16_t, uint8_t> m_drbCreatedTrace;
TracedCallback<uint64_t, uint16_t, uint16_t, uint8_t, std::string> m_drbCreatedTrace;
/**
* The 'PhySyncDetection' trace source. Fired when UE RRC
* receives in-sync or out-of-sync indications from UE PHY

View File

@@ -170,8 +170,6 @@ LteLinkAdaptationTestCase::DoRun (void)
Ptr<LteHelper> lteHelper = CreateObject<LteHelper> ();
// lteHelper->EnableLogComponents ();
lteHelper->EnableMacTraces ();
lteHelper->EnableRlcTraces ();
lteHelper->SetAttribute ("PathlossModel", StringValue ("ns3::ConstantSpectrumPropagationLossModel"));
NS_LOG_INFO ("SNR = " << m_snrDb << " LOSS = " << m_loss);
lteHelper->SetPathlossModelAttribute ("Loss", DoubleValue (m_loss));
@@ -214,6 +212,9 @@ LteLinkAdaptationTestCase::DoRun (void)
Config::Connect ("/NodeList/0/DeviceList/0/ComponentCarrierMap/*/LteEnbMac/DlScheduling",
MakeBoundCallback (&LteTestDlSchedulingCallback, this));
lteHelper->EnableMacTraces ();
lteHelper->EnableRlcTraces ();
Simulator::Stop (Seconds (0.040));
Simulator::Run ();

View File

@@ -201,8 +201,6 @@ LtePathlossModelSystemTestCase::DoRun (void)
Ptr<LteHelper> lteHelper = CreateObject<LteHelper> ();
// lteHelper->EnableLogComponents ();
lteHelper->EnableMacTraces ();
lteHelper->EnableRlcTraces ();
lteHelper->SetAttribute ("PathlossModel", StringValue ("ns3::HybridBuildingsPropagationLossModel"));
// set frequency. This is important because it changes the behavior of the path loss model
@@ -270,6 +268,9 @@ LtePathlossModelSystemTestCase::DoRun (void)
// Config::Connect ("/NodeList/0/DeviceList/0/LteEnbMac/DlScheduling",
// MakeBoundCallback (&LteTestPathlossDlSchedCallback, this));
lteHelper->EnableMacTraces ();
lteHelper->EnableRlcTraces ();
Simulator::Stop (Seconds (0.035));
Simulator::Run ();

View File

@@ -32,6 +32,12 @@
using namespace ns3;
/**
* \ingroup lte
*
* <b>This test is currently excluded from test.py (see LTE module wscript).
* It depends on the code, which is not yet merged fully.</b>
* \sa https://www.nsnam.org/wiki/GSOC2017Lte#Project_summary
*
* \brief Test suite for executing the secondary cell selection test cases.
*
* \sa ns3::LteSecondaryCellSelectionTestCase
@@ -48,6 +54,10 @@ public:
/**
* \ingroup lte
*
* <b>This test is currently excluded from test.py (see LTE module wscript).
* It depends on the code, which is not yet merged fully.</b>
* \sa https://www.nsnam.org/wiki/GSOC2017Lte#Project_summary
*
* \brief Testing the initial cell selection procedure by UE at IDLE state in
* the beginning of simulation with multiple component carriers.
*/

View File

@@ -198,12 +198,12 @@ LteUeMeasurementsTestCase::DoRun (void)
lteHelper->ActivateDataRadioBearer (ueDevs2, bearer);
Config::Connect ("/NodeList/2/DeviceList/0/LteUePhy/ReportUeMeasurements",
Config::Connect ("/NodeList/2/DeviceList/0/ComponentCarrierMapUe/0/LteUePhy/ReportUeMeasurements",
MakeBoundCallback (&ReportUeMeasurementsCallback, this));
Config::Connect ("/NodeList/0/DeviceList/0/LteEnbRrc/RecvMeasurementReport",
MakeBoundCallback (&RecvMeasurementReportCallback, this));
Config::Connect ("/NodeList/3/DeviceList/0/LteUePhy/ReportUeMeasurements",
Config::Connect ("/NodeList/3/DeviceList/0/ComponentCarrierMapUe/0/LteUePhy/ReportUeMeasurements",
MakeBoundCallback (&ReportUeMeasurementsCallback, this));
Config::Connect ("/NodeList/1/DeviceList/0/LteEnbRrc/RecvMeasurementReport",
MakeBoundCallback (&RecvMeasurementReportCallback, this));

View File

@@ -180,7 +180,7 @@ def build(bld):
'test/test-asn1-encoding.cc',
'test/lte-test-ue-measurements.cc',
'test/lte-test-cell-selection.cc',
'test/lte-test-secondary-cell-selection.cc',
#'test/lte-test-secondary-cell-selection.cc',
'test/test-lte-handover-delay.cc',
'test/test-lte-handover-target.cc',
'test/lte-test-deactivate-bearer.cc',