#include <lte-enb-phy.h>
Public Member Functions | |
LteEnbPhy () | |
LteEnbPhy (Ptr< LteSpectrumPhy > dlPhy, Ptr< LteSpectrumPhy > ulPhy) | |
virtual | ~LteEnbPhy () |
bool | AddUePhy (uint16_t rnti, Ptr< LteUePhy > phy) |
void | CalcChannelQualityForUe (std::vector< double > sinr, Ptr< LteSpectrumPhy > ue) |
Calculate the channel quality for a given UE. | |
virtual Ptr< SpectrumValue > | CreateTxPowerSpectralDensity () |
Create the PSD for TX. | |
UlCqi_s | CreateUlCqiReport (const SpectrumValue &sinr) |
Create the UL CQI feedback from SINR values perceived at the physical layer with the signal received from eNB. | |
bool | DeleteUePhy (uint16_t rnti) |
std::list < UlDciIdealControlMessage > | DequeueUlDci (void) |
virtual void | DoDispose (void) |
virtual uint8_t | DoGetMacChTtiDelay () |
void | DoSendIdealControlMessage (Ptr< IdealControlMessage > msg) |
virtual void | DoSendMacPdu (Ptr< Packet > p) |
Queue the MAC PDU to be sent. | |
void | DoSetDownlinkSubChannels () |
do some operation after the set of a list of DL sub channels | |
virtual void | DoSetTransmissionMode (uint16_t rnti, uint8_t txMode) |
virtual void | DoStart (void) |
void | EndFrame (void) |
End a LTE frame. | |
void | EndSubFrame (void) |
End a LTE sub frame. | |
virtual void | GenerateCqiReport (const SpectrumValue &sinr) |
LteEnbPhySapProvider * | GetLteEnbPhySapProvider () |
Get the PHY SAP provider. | |
uint8_t | GetMacChDelay (void) const |
double | GetNoiseFigure () const |
double | GetTxPower () const |
void | PhyPduReceived (Ptr< Packet > p) |
PhySpectrum received a new PHY-PDU. | |
void | QueueUlDci (UlDciIdealControlMessage m) |
virtual void | ReceiveIdealControlMessage (Ptr< IdealControlMessage > msg) |
Send the control message. | |
void | SetLteEnbPhySapUser (LteEnbPhySapUser *s) |
Set the PHY SAP User. | |
void | SetMacChDelay (uint8_t delay) |
void | SetNoiseFigure (double pow) |
void | SetTxPower (double pow) |
void | StartFrame (void) |
Start a LTE frame. | |
void | StartSubFrame (void) |
Start a LTE sub frame. | |
![]() | |
LtePhy () | |
LtePhy (Ptr< LteSpectrumPhy > dlPhy, Ptr< LteSpectrumPhy > ulPhy) | |
virtual | ~LtePhy () |
void | DoSetBandwidth (uint8_t ulBandwidth, uint8_t dlBandwidth) |
void | DoSetCellId (uint16_t cellId) |
virtual void | DoSetEarfcn (uint16_t dlEarfcn, uint16_t ulEarfcn) |
virtual void | DoSetUplinkSubChannels () |
do some operation after the set of a list of UL sub channels | |
std::list< Ptr < IdealControlMessage > > | GetControlMessages (void) |
Ptr< LteNetDevice > | GetDevice () |
Get the device where the phy layer is attached. | |
Ptr< LteSpectrumPhy > | GetDownlinkSpectrumPhy () |
std::vector< int > | GetDownlinkSubChannels (void) |
get a list of sub channel to use in the downlink | |
Ptr< PacketBurst > | GetPacketBurst (void) |
uint8_t | GetRbgSize (void) const |
double | GetTti (void) const |
Ptr< LteSpectrumPhy > | GetUplinkSpectrumPhy () |
std::vector< int > | GetUplinkSubChannels (void) |
get a list of sub channel to use in the downlink | |
void | SetControlMessages (Ptr< IdealControlMessage > m) |
void | SetDevice (Ptr< LteNetDevice > d) |
Set the device where the phy layer is attached. | |
void | SetDownlinkChannel (Ptr< SpectrumChannel > c) |
void | SetDownlinkSubChannels (std::vector< int > mask) |
set a list of sub channel to use in the downlink. A sub channel is composed by a couple of resource bloks (180KHz x 1 ms) | |
void | SetMacPdu (Ptr< Packet > p) |
void | SetTti (double tti) |
void | SetUplinkChannel (Ptr< SpectrumChannel > c) |
void | SetUplinkSubChannels (std::vector< int > mask) |
set a list of sub channel to use in the uplink. A sub channel is composed by a couple of resource bloks (180KHz x 1 ms) | |
![]() | |
Object () | |
virtual | ~Object () |
void | AggregateObject (Ptr< Object > other) |
void | Dispose (void) |
AggregateIterator | GetAggregateIterator (void) const |
virtual TypeId | GetInstanceTypeId (void) const |
template<typename T > | |
Ptr< T > | GetObject (void) const |
template<typename T > | |
Ptr< T > | GetObject (TypeId tid) const |
void | Start (void) |
![]() | |
SimpleRefCount () | |
SimpleRefCount (const SimpleRefCount &o) | |
uint32_t | GetReferenceCount (void) const |
SimpleRefCount & | operator= (const SimpleRefCount &o) |
void | Ref (void) const |
void | Unref (void) const |
![]() | |
virtual | ~ObjectBase () |
void | GetAttribute (std::string name, AttributeValue &value) const |
bool | GetAttributeFailSafe (std::string name, AttributeValue &attribute) const |
void | SetAttribute (std::string name, const AttributeValue &value) |
bool | SetAttributeFailSafe (std::string name, const AttributeValue &value) |
bool | TraceConnect (std::string name, std::string context, const CallbackBase &cb) |
bool | TraceConnectWithoutContext (std::string name, const CallbackBase &cb) |
bool | TraceDisconnect (std::string name, std::string context, const CallbackBase &cb) |
bool | TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb) |
Static Public Member Functions | |
static TypeId | GetTypeId (void) |
This method returns the TypeId associated to ns3::LteEnbPhy. |
Private Attributes | |
LteEnbPhySapProvider * | m_enbPhySapProvider |
LteEnbPhySapUser * | m_enbPhySapUser |
uint32_t | m_nrFrames |
uint32_t | m_nrSubFrames |
std::map< uint16_t, Ptr < LteUePhy > > | m_ueAttached |
std::vector< std::list < UlDciIdealControlMessage > > | m_ulDciQueue |
Friends | |
class | EnbMemberLteEnbPhySapProvider |
Additional Inherited Members | |
![]() | |
Object (const Object &o) | |
virtual void | NotifyNewAggregate (void) |
![]() | |
uint16_t | m_cellId |
std::vector< std::list< Ptr < IdealControlMessage > > > | m_controlMessagesQueue |
uint8_t | m_dlBandwidth |
uint16_t | m_dlEarfcn |
Ptr< LteSpectrumPhy > | m_downlinkSpectrumPhy |
std::vector< int > | m_listOfDownlinkSubchannel |
std::vector< int > | m_listOfUplinkSubchannel |
uint8_t | m_macChTtiDelay |
Ptr< LteNetDevice > | m_netDevice |
double | m_noiseFigure |
std::vector< Ptr< PacketBurst > > | m_packetBurstQueue |
uint8_t | m_rbgSize |
double | m_tti |
double | m_txPower |
uint8_t | m_ulBandwidth |
uint16_t | m_ulEarfcn |
Ptr< LteSpectrumPhy > | m_uplinkSpectrumPhy |
LteEnbPhy models the physical layer for the eNodeB
Definition at line 40 of file lte-enb-phy.h.
ns3::LteEnbPhy::LteEnbPhy | ( | ) |
Definition at line 119 of file lte-enb-phy.cc.
References NS_FATAL_ERROR, and NS_LOG_FUNCTION.
ns3::LteEnbPhy::LteEnbPhy | ( | Ptr< LteSpectrumPhy > | dlPhy, |
Ptr< LteSpectrumPhy > | ulPhy | ||
) |
dlPhy | the downlink LteSpectrumPhy instance |
ulPhy | the uplink LteSpectrumPhy instance |
Definition at line 125 of file lte-enb-phy.cc.
References EnbMemberLteEnbPhySapProvider, m_enbPhySapProvider, ns3::Simulator::ScheduleNow(), and StartFrame().
|
virtual |
Definition at line 169 of file lte-enb-phy.cc.
Definition at line 259 of file lte-enb-phy.cc.
References m_ueAttached, and NS_LOG_ERROR.
void ns3::LteEnbPhy::CalcChannelQualityForUe | ( | std::vector< double > | sinr, |
Ptr< LteSpectrumPhy > | ue | ||
) |
Calculate the channel quality for a given UE.
sinr | a list of computed SINR |
ue | the UE |
Definition at line 336 of file lte-enb-phy.cc.
References NS_LOG_FUNCTION.
|
virtual |
Create the PSD for TX.
Implements ns3::LtePhy.
Definition at line 325 of file lte-enb-phy.cc.
References ns3::LtePhy::GetDownlinkSubChannels(), ns3::LtePhy::m_dlBandwidth, ns3::LtePhy::m_dlEarfcn, ns3::LtePhy::m_txPower, and NS_LOG_FUNCTION.
Referenced by DoSetDownlinkSubChannels().
UlCqi_s ns3::LteEnbPhy::CreateUlCqiReport | ( | const SpectrumValue & | sinr | ) |
Create the UL CQI feedback from SINR values perceived at the physical layer with the signal received from eNB.
sinr | SINR values vector |
Definition at line 527 of file lte-enb-phy.cc.
References ns3::SpectrumValue::ConstValuesBegin(), ns3::SpectrumValue::ConstValuesEnd(), ns3::LteFfConverter::double2fpS11dot3(), UlCqi_s::m_sinr, UlCqi_s::m_type, NS_LOG_FUNCTION, and UlCqi_s::PUSCH.
Referenced by GenerateCqiReport().
bool ns3::LteEnbPhy::DeleteUePhy | ( | uint16_t | rnti | ) |
Definition at line 276 of file lte-enb-phy.cc.
References m_ueAttached, and NS_LOG_ERROR.
std::list< UlDciIdealControlMessage > ns3::LteEnbPhy::DequeueUlDci | ( | void | ) |
Definition at line 562 of file lte-enb-phy.cc.
References m_ulDciQueue, and NS_LOG_FUNCTION.
Referenced by StartSubFrame().
|
virtual |
This method is called by Object::Dispose or by the object's destructor, whichever comes first.
Subclasses are expected to implement their real destruction code in an overriden version of this method and chain up to their parent's implementation once they are done. i.e., for simplicity, the destructor of every subclass should be empty and its content should be moved to the associated DoDispose method.
It is safe to call GetObject from within this method.
Reimplemented from ns3::LtePhy.
Definition at line 174 of file lte-enb-phy.cc.
References m_enbPhySapProvider, m_ueAttached, and NS_LOG_FUNCTION.
|
virtual |
Definition at line 302 of file lte-enb-phy.cc.
References ns3::LtePhy::m_macChTtiDelay.
Referenced by ns3::EnbMemberLteEnbPhySapProvider::GetMacChTtiDelay().
void ns3::LteEnbPhy::DoSendIdealControlMessage | ( | Ptr< IdealControlMessage > | msg | ) |
Definition at line 343 of file lte-enb-phy.cc.
References NS_LOG_FUNCTION, and ns3::LtePhy::SetControlMessages().
Referenced by ns3::EnbMemberLteEnbPhySapProvider::SendIdealControlMessage().
Queue the MAC PDU to be sent.
p | the MAC PDU to sent |
Implements ns3::LtePhy.
Definition at line 295 of file lte-enb-phy.cc.
References NS_LOG_FUNCTION, and ns3::LtePhy::SetMacPdu().
Referenced by ns3::EnbMemberLteEnbPhySapProvider::SendMacPdu().
|
virtual |
do some operation after the set of a list of DL sub channels
Reimplemented from ns3::LtePhy.
Definition at line 316 of file lte-enb-phy.cc.
References CreateTxPowerSpectralDensity(), ns3::LtePhy::m_downlinkSpectrumPhy, NS_LOG_FUNCTION, and ns3::LteSpectrumPhy::SetTxPowerSpectralDensity().
|
virtual |
Definition at line 548 of file lte-enb-phy.cc.
References NS_LOG_FUNCTION.
Referenced by ns3::EnbMemberLteEnbPhySapProvider::SetTransmissionMode().
|
virtual |
This method is called only once by Object::Start. If the user calls Object::Start multiple times, DoStart is called only the first time.
Subclasses are expected to override this method and chain up to their parent's implementation once they are done. It is safe to call GetObject and AggregateObject from within this method.
Reimplemented from ns3::Object.
Definition at line 183 of file lte-enb-phy.cc.
References ns3::LteSpectrumValueHelper::CreateNoisePowerSpectralDensity(), ns3::LtePhy::m_noiseFigure, ns3::LtePhy::m_ulBandwidth, ns3::LtePhy::m_ulEarfcn, ns3::LtePhy::m_uplinkSpectrumPhy, NS_LOG_FUNCTION, and ns3::LteSpectrumPhy::SetNoisePowerSpectralDensity().
void ns3::LteEnbPhy::EndFrame | ( | void | ) |
End a LTE frame.
Definition at line 511 of file lte-enb-phy.cc.
References ns3::Simulator::Now(), NS_LOG_FUNCTION, ns3::Simulator::ScheduleNow(), and StartFrame().
Referenced by EndSubFrame().
void ns3::LteEnbPhy::EndSubFrame | ( | void | ) |
End a LTE sub frame.
Definition at line 496 of file lte-enb-phy.cc.
References EndFrame(), m_nrSubFrames, ns3::Simulator::Now(), NS_LOG_FUNCTION, ns3::Simulator::ScheduleNow(), and StartSubFrame().
Referenced by StartSubFrame().
|
virtual |
generate a CQI report based on the given SINR
sinr | the SINR vs frequency measured by the device |
Implements ns3::LtePhy.
Definition at line 519 of file lte-enb-phy.cc.
References CreateUlCqiReport(), m_enbPhySapUser, NS_LOG_FUNCTION, and ns3::LteEnbPhySapUser::UlCqiReport().
LteEnbPhySapProvider * ns3::LteEnbPhy::GetLteEnbPhySapProvider | ( | ) |
Get the PHY SAP provider.
Definition at line 199 of file lte-enb-phy.cc.
References m_enbPhySapProvider.
uint8_t ns3::LteEnbPhy::GetMacChDelay | ( | void | ) | const |
Definition at line 253 of file lte-enb-phy.cc.
References ns3::LtePhy::m_macChTtiDelay.
Referenced by GetTypeId().
double ns3::LteEnbPhy::GetNoiseFigure | ( | ) | const |
Definition at line 226 of file lte-enb-phy.cc.
References ns3::LtePhy::m_noiseFigure, and NS_LOG_FUNCTION.
Referenced by GetTypeId().
double ns3::LteEnbPhy::GetTxPower | ( | ) | const |
Definition at line 212 of file lte-enb-phy.cc.
References ns3::LtePhy::m_txPower, and NS_LOG_FUNCTION.
Referenced by GetTypeId().
|
static |
This method returns the TypeId associated to ns3::LteEnbPhy.
This object is accessible through the following paths with Config::Set and Config::Connect:
Attributes defined for this type:
No TraceSources defined for this type.
Reimplemented from ns3::LtePhy.
Definition at line 135 of file lte-enb-phy.cc.
References GetMacChDelay(), GetNoiseFigure(), GetTxPower(), SetMacChDelay(), SetNoiseFigure(), ns3::TypeId::SetParent(), and SetTxPower().
PhySpectrum received a new PHY-PDU.
Definition at line 309 of file lte-enb-phy.cc.
References m_enbPhySapUser, NS_LOG_FUNCTION, and ns3::LteEnbPhySapUser::ReceivePhyPdu().
Referenced by ns3::LteHelper::InstallSingleEnbDevice().
void ns3::LteEnbPhy::QueueUlDci | ( | UlDciIdealControlMessage | m | ) |
m | the UL-CQI to be queued |
Definition at line 555 of file lte-enb-phy.cc.
References m_ulDciQueue, NS_LOG_FUNCTION, and UL_PUSCH_TTIS_DELAY.
Referenced by StartSubFrame().
|
virtual |
Send the control message.
msg | the message to send Receive the control message |
msg | the received message |
Implements ns3::LtePhy.
Definition at line 353 of file lte-enb-phy.cc.
References m_enbPhySapUser, NS_LOG_FUNCTION, and ns3::LteEnbPhySapUser::ReceiveIdealControlMessage().
void ns3::LteEnbPhy::SetLteEnbPhySapUser | ( | LteEnbPhySapUser * | s | ) |
Set the PHY SAP User.
s | a pointer to the PHY SAP user |
Definition at line 193 of file lte-enb-phy.cc.
References m_enbPhySapUser.
void ns3::LteEnbPhy::SetMacChDelay | ( | uint8_t | delay | ) |
delay | the TTI delay between MAC and channel |
Definition at line 233 of file lte-enb-phy.cc.
References ns3::LtePhy::m_controlMessagesQueue, ns3::LtePhy::m_macChTtiDelay, ns3::LtePhy::m_packetBurstQueue, m_ulDciQueue, and UL_PUSCH_TTIS_DELAY.
Referenced by GetTypeId().
void ns3::LteEnbPhy::SetNoiseFigure | ( | double | pow | ) |
pw | the noise figure in dB |
Definition at line 219 of file lte-enb-phy.cc.
References ns3::LtePhy::m_noiseFigure, and NS_LOG_FUNCTION.
Referenced by GetTypeId().
void ns3::LteEnbPhy::SetTxPower | ( | double | pow | ) |
pw | the transmission power in dBm |
Definition at line 205 of file lte-enb-phy.cc.
References ns3::LtePhy::m_txPower, and NS_LOG_FUNCTION.
Referenced by GetTypeId().
void ns3::LteEnbPhy::StartFrame | ( | void | ) |
Start a LTE frame.
Definition at line 362 of file lte-enb-phy.cc.
References m_nrFrames, m_nrSubFrames, NS_LOG_FUNCTION, NS_LOG_INFO, and StartSubFrame().
Referenced by EndFrame(), and LteEnbPhy().
void ns3::LteEnbPhy::StartSubFrame | ( | void | ) |
Start a LTE sub frame.
Definition at line 374 of file lte-enb-phy.cc.
References ns3::LteSpectrumPhy::AddExpectedTb(), DequeueUlDci(), ns3::IdealControlMessage::DL_DCI, EndSubFrame(), ns3::LtePhy::GetControlMessages(), ns3::IdealControlMessage::GetMessageType(), ns3::LtePhy::GetPacketBurst(), ns3::LtePhy::GetRbgSize(), ns3::LtePhy::GetTti(), ns3::LtePhy::m_downlinkSpectrumPhy, m_enbPhySapUser, m_nrFrames, m_nrSubFrames, m_ueAttached, ns3::LtePhy::m_uplinkSpectrumPhy, NS_LOG_ERROR, NS_LOG_FUNCTION, NS_LOG_INFO, NS_LOG_LOGIC, QueueUlDci(), ns3::Simulator::Schedule(), ns3::Seconds(), ns3::LtePhy::SetDownlinkSubChannels(), ns3::LteSpectrumPhy::StartTx(), ns3::LteEnbPhySapUser::SubframeIndication(), and ns3::IdealControlMessage::UL_DCI.
Referenced by EndSubFrame(), and StartFrame().
|
friend |
Definition at line 43 of file lte-enb-phy.h.
Referenced by LteEnbPhy().
|
private |
Definition at line 201 of file lte-enb-phy.h.
Referenced by DoDispose(), GetLteEnbPhySapProvider(), and LteEnbPhy().
|
private |
Definition at line 202 of file lte-enb-phy.h.
Referenced by GenerateCqiReport(), PhyPduReceived(), ReceiveIdealControlMessage(), SetLteEnbPhySapUser(), and StartSubFrame().
|
private |
Definition at line 204 of file lte-enb-phy.h.
Referenced by StartFrame(), and StartSubFrame().
|
private |
Definition at line 205 of file lte-enb-phy.h.
Referenced by EndSubFrame(), StartFrame(), and StartSubFrame().
Definition at line 197 of file lte-enb-phy.h.
Referenced by AddUePhy(), DeleteUePhy(), DoDispose(), and StartSubFrame().
|
private |
Definition at line 199 of file lte-enb-phy.h.
Referenced by DequeueUlDci(), QueueUlDci(), and SetMacChDelay().