lte: extend LTE model to include a Component Carrier Id where necessary

This commit is contained in:
Danilo Abrignani
2017-01-17 20:24:57 +01:00
parent 7a77ec9865
commit 6d92f75610
12 changed files with 63 additions and 2 deletions

View File

@@ -127,6 +127,7 @@ struct PhyTransmissionStatParameters
uint16_t m_size; ///< Size of transport block
uint8_t m_rv; ///< the redundancy version (HARQ)
uint8_t m_ndi; ///< new data indicator flag
uint8_t m_ccId; ///< component carrier id
/**
* TracedCallback signature.
@@ -152,6 +153,7 @@ struct PhyReceptionStatParameters
uint8_t m_rv; ///< the redundancy version (HARQ)
uint8_t m_ndi; ///< new data indicator flag
uint8_t m_correctness; ///< correctness of the TB received
uint8_t m_ccId; ///< component carrier id
/**
* TracedCallback signature.

View File

@@ -339,6 +339,11 @@ LteEnbMac::GetTypeId (void)
"Information regarding UL scheduling.",
MakeTraceSourceAccessor (&LteEnbMac::m_ulScheduling),
"ns3::LteEnbMac::UlSchedulingTracedCallback")
.AddAttribute ("ComponentCarrierId",
"ComponentCarrier Id, needed to reply on the appropriate sap.",
UintegerValue (0),
MakeUintegerAccessor (&LteEnbMac::m_componentCarrierId),
MakeUintegerChecker<uint8_t> (0,4))
;
return tid;
@@ -378,6 +383,11 @@ LteEnbMac::DoDispose ()
delete m_enbPhySapUser;
}
void
LteEnbMac::SetComponentCarrierId (uint16_t index)
{
m_componentCarrierId = index;
}
void
LteEnbMac::SetFfMacSchedSapProvider (FfMacSchedSapProvider* s)

View File

@@ -62,7 +62,7 @@ public:
virtual ~LteEnbMac (void);
virtual void DoDispose (void);
void SetComponentCarrierId (uint16_t index);
/**
* \brief Set the scheduler SAP provider
* \param s a pointer SAP provider of the FF packet scheduler
@@ -290,6 +290,10 @@ private:
std::map<uint8_t, uint32_t> m_receivedRachPreambleCount;
std::map<uint8_t, uint32_t> m_rapIdRntiMap;
// component carrier Id used to address sap
uint8_t m_componentCarrierId;
};
} // end namespace ns3

View File

@@ -704,6 +704,7 @@ LteEnbPhy::StartSubFrame (void)
params.m_size = dci->GetDci ().m_tbsSize.at (i);
params.m_rv = dci->GetDci ().m_rv.at (i);
params.m_ndi = dci->GetDci ().m_ndi.at (i);
params.m_ccId = m_componentCarrierId;
m_dlPhyTransmission (params);
}

View File

@@ -49,6 +49,7 @@ public:
uint8_t lcid; /**< the logical channel id corresponding to the sending RLC instance */
uint8_t layer; /**< the layer value that was passed by the MAC in the call to NotifyTxOpportunity that generated this PDU */
uint8_t harqProcessId; /**< the HARQ process id that was passed by the MAC in the call to NotifyTxOpportunity that generated this PDU */
uint8_t componentCarrierId; /**< the component carrier id corresponding to the sending Mac istance */
};
/**

View File

@@ -49,7 +49,8 @@ LtePhy::LtePhy (Ptr<LteSpectrumPhy> dlPhy, Ptr<LteSpectrumPhy> ulPhy)
m_dlBandwidth (0),
m_rbgSize (0),
m_macChTtiDelay (0),
m_cellId (0)
m_cellId (0),
m_componentCarrierId(0)
{
NS_LOG_FUNCTION (this);
}
@@ -249,5 +250,18 @@ LtePhy::DoSetCellId (uint16_t cellId)
m_uplinkSpectrumPhy->SetCellId (cellId);
}
void
LtePhy::SetComponentCarrierId (uint16_t index)
{
m_componentCarrierId = index;
m_downlinkSpectrumPhy->SetComponentCarrierId (index);
m_uplinkSpectrumPhy->SetComponentCarrierId (index);
}
uint8_t
LtePhy::GetComponentCarrierId ()
{
return m_componentCarrierId;
}
} // namespace ns3

View File

@@ -209,7 +209,9 @@ public:
*/
virtual void ReportRsReceivedPower (const SpectrumValue& power) = 0;
void SetComponentCarrierId (uint16_t index);
uint8_t GetComponentCarrierId ();
protected:
/// Pointer to the NetDevice where this PHY layer is attached.
@@ -291,6 +293,9 @@ protected:
*/
uint16_t m_cellId;
/// component carrier Id used to address sap
uint8_t m_componentCarrierId;
}; // end of `class LtePhy`

View File

@@ -984,6 +984,7 @@ LteSpectrumPhy::EndRxData ()
params.m_rv = (*itTb).second.rv;
params.m_ndi = (*itTb).second.ndi;
params.m_correctness = (uint8_t)!(*itTb).second.corrupt;
params.m_ccId = m_componentCarrierId;
if ((*itTb).second.downlink)
{
// DL
@@ -1189,6 +1190,11 @@ LteSpectrumPhy::SetCellId (uint16_t cellId)
m_cellId = cellId;
}
void
LteSpectrumPhy::SetComponentCarrierId (uint8_t componentCarrierId)
{
m_componentCarrierId = componentCarrierId;
}
void
LteSpectrumPhy::AddRsPowerChunkProcessor (Ptr<LteChunkProcessor> p)

View File

@@ -323,6 +323,11 @@ public:
*/
void SetCellId (uint16_t cellId);
/**
*
* \param componentCarrierId the component carrier id
*/
void SetComponentCarrierId (uint8_t componentCarrierId);
/**
*
@@ -468,6 +473,7 @@ private:
uint16_t m_cellId;
uint8_t m_componentCarrierId;
expectedTbs_t m_expectedTbs;
SpectrumValue m_sinrPerceived;

View File

@@ -177,6 +177,7 @@ public:
struct UeMeasurementsParameters
{
std::vector <struct UeMeasurementsElement> m_ueMeasurementsList;
uint16_t m_componentCarrierId;
};

View File

@@ -224,6 +224,7 @@ LteUeMac::LteUeMac ()
m_cmacSapProvider = new UeMemberLteUeCmacSapProvider (this);
m_uePhySapUser = new UeMemberLteUePhySapUser (this);
m_raPreambleUniformVariable = CreateObject<UniformRandomVariable> ();
m_componentCarrierId = 0;
}
@@ -275,6 +276,11 @@ LteUeMac::GetLteUeCmacSapProvider (void)
return m_cmacSapProvider;
}
void
LteUeMac::SetComponentCarrierId (uint16_t index)
{
m_componentCarrierId = index;
}
void
LteUeMac::DoTransmitPdu (LteMacSapProvider::TransmitPduParameters params)

View File

@@ -56,6 +56,8 @@ public:
LteMacSapProvider* GetLteMacSapProvider (void);
void SetLteUeCmacSapUser (LteUeCmacSapUser* s);
LteUeCmacSapProvider* GetLteUeCmacSapProvider (void);
void SetComponentCarrierId (uint16_t index);
/**
* \brief Get the PHY SAP user
@@ -113,6 +115,9 @@ private:
void SendReportBufferStatus (void);
void RefreshHarqProcessesPacketBuffer (void);
/// component carrier Id --> used to address sap
uint8_t m_componentCarrierId;
private:
struct LcInfo