The LteSpectrumPhy models the physical layer of LTE. More...
#include "lte-spectrum-phy.h"
Public Types | |
enum | State { IDLE , TX_DL_CTRL , TX_DATA , TX_UL_SRS , RX_DL_CTRL , RX_DATA , RX_UL_SRS } |
PHY states. More... | |
Public Member Functions | |
LteSpectrumPhy () | |
~LteSpectrumPhy () override | |
void | AddCtrlSinrChunkProcessor (Ptr< LteChunkProcessor > p) |
void | AddDataPowerChunkProcessor (Ptr< LteChunkProcessor > p) |
void | AddDataSinrChunkProcessor (Ptr< LteChunkProcessor > p) |
void | AddExpectedTb (uint16_t rnti, uint8_t ndi, uint16_t size, uint8_t mcs, std::vector< int > map, uint8_t layer, uint8_t harqId, uint8_t rv, bool downlink) |
void | AddInterferenceCtrlChunkProcessor (Ptr< LteChunkProcessor > p) |
LteChunkProcessor devoted to evaluate interference + noise power in control symbols of the subframe. | |
void | AddInterferenceDataChunkProcessor (Ptr< LteChunkProcessor > p) |
LteChunkProcessor devoted to evaluate interference + noise power in data symbols of the subframe. | |
void | AddRsPowerChunkProcessor (Ptr< LteChunkProcessor > p) |
int64_t | AssignStreams (int64_t stream) |
Assign a fixed random variable stream number to the random variables used by this model. | |
void | DoDispose () override |
Destructor implementation. | |
Ptr< Object > | GetAntenna () const override |
Get the AntennaModel used by this SpectrumPhy instance for transmission and/or reception. | |
Ptr< SpectrumChannel > | GetChannel () |
Ptr< NetDevice > | GetDevice () const override |
Get the associated NetDevice instance. | |
Ptr< MobilityModel > | GetMobility () const override |
Get the associated MobilityModel instance. | |
Ptr< const SpectrumModel > | GetRxSpectrumModel () const override |
void | RemoveExpectedTb (uint16_t rnti) |
Remove expected transport block. | |
void | Reset () |
reset the internal state | |
void | SetAntenna (Ptr< AntennaModel > a) |
set the AntennaModel to be used | |
void | SetCellId (uint16_t cellId) |
void | SetChannel (Ptr< SpectrumChannel > c) override |
Set the channel attached to this device. | |
void | SetComponentCarrierId (uint8_t componentCarrierId) |
void | SetDevice (Ptr< NetDevice > d) override |
Set the associated NetDevice instance. | |
void | SetHarqPhyModule (Ptr< LteHarqPhy > harq) |
Set HARQ phy function. | |
void | SetLtePhyDlHarqFeedbackCallback (LtePhyDlHarqFeedbackCallback c) |
set the callback for the DL HARQ feedback as part of the interconnections between the LteSpectrumPhy and the PHY | |
void | SetLtePhyRxCtrlEndErrorCallback (LtePhyRxCtrlEndErrorCallback c) |
set the callback for the erroneous end of a RX ctrl frame, as part of the interconnections between the LteSpectrumPhy and the PHY | |
void | SetLtePhyRxCtrlEndOkCallback (LtePhyRxCtrlEndOkCallback c) |
set the callback for the successful end of a RX ctrl frame, as part of the interconnections between the LteSpectrumPhy and the PHY | |
void | SetLtePhyRxDataEndErrorCallback (LtePhyRxDataEndErrorCallback c) |
set the callback for the end of a RX in error, as part of the interconnections between the PHY and the MAC | |
void | SetLtePhyRxDataEndOkCallback (LtePhyRxDataEndOkCallback c) |
set the callback for the successful end of a RX, as part of the interconnections between the PHY and the MAC | |
void | SetLtePhyRxPssCallback (LtePhyRxPssCallback c) |
set the callback for the reception of the PSS as part of the interconnections between the LteSpectrumPhy and the UE PHY | |
void | SetLtePhyUlHarqFeedbackCallback (LtePhyUlHarqFeedbackCallback c) |
set the callback for the UL HARQ feedback as part of the interconnections between the LteSpectrumPhy and the PHY | |
void | SetMobility (Ptr< MobilityModel > m) override |
Set the mobility model associated with this device. | |
void | SetNoisePowerSpectralDensity (Ptr< const SpectrumValue > noisePsd) |
set the noise power spectral density | |
void | SetState (State newState) |
Set the state of the phy layer. | |
void | SetTransmissionMode (uint8_t txMode) |
void | SetTxPowerSpectralDensity (Ptr< SpectrumValue > txPsd) |
set the Power Spectral Density of outgoing signals in W/Hz. | |
void | StartRx (Ptr< SpectrumSignalParameters > params) override |
Notify the SpectrumPhy instance of an incoming signal. | |
void | StartRxData (Ptr< LteSpectrumSignalParametersDataFrame > params) |
Start receive data function. | |
void | StartRxDlCtrl (Ptr< LteSpectrumSignalParametersDlCtrlFrame > lteDlCtrlRxParams) |
Start receive DL control function. | |
void | StartRxUlSrs (Ptr< LteSpectrumSignalParametersUlSrsFrame > lteUlSrsRxParams) |
Start receive UL SRS function. | |
bool | StartTxDataFrame (Ptr< PacketBurst > pb, std::list< Ptr< LteControlMessage > > ctrlMsgList, Time duration) |
Start a transmission of data frame in DL and UL. | |
bool | StartTxDlCtrlFrame (std::list< Ptr< LteControlMessage > > ctrlMsgList, bool pss) |
Start a transmission of control frame in DL. | |
bool | StartTxUlSrsFrame () |
Start a transmission of control frame in UL. | |
void | UpdateSinrPerceived (const SpectrumValue &sinr) |
Public Member Functions inherited from ns3::SpectrumPhy | |
SpectrumPhy () | |
SpectrumPhy (const SpectrumPhy &)=delete | |
~SpectrumPhy () override | |
SpectrumPhy & | operator= (const SpectrumPhy &)=delete |
Public Member Functions inherited from ns3::Object | |
Object () | |
Constructor. | |
~Object () override | |
Destructor. | |
void | AggregateObject (Ptr< Object > other) |
Aggregate two Objects together. | |
void | Dispose () |
Dispose of this Object. | |
AggregateIterator | GetAggregateIterator () const |
Get an iterator to the Objects aggregated to this one. | |
TypeId | GetInstanceTypeId () const override |
Get the most derived TypeId for this Object. | |
template<typename T > | |
Ptr< T > | GetObject () const |
Get a pointer to the requested aggregated Object. | |
template<> | |
Ptr< Object > | GetObject () const |
Specialization of () for objects of type ns3::Object. | |
template<typename T > | |
Ptr< T > | GetObject (TypeId tid) const |
Get a pointer to the requested aggregated Object by TypeId. | |
template<> | |
Ptr< Object > | GetObject (TypeId tid) const |
Specialization of (TypeId tid) for objects of type ns3::Object. | |
void | Initialize () |
Invoke DoInitialize on all Objects aggregated to this one. | |
bool | IsInitialized () const |
Check if the object has been initialized. | |
void | UnidirectionalAggregateObject (Ptr< Object > other) |
Aggregate an Object to another Object. | |
Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter > | |
SimpleRefCount () | |
Default constructor. | |
SimpleRefCount (const SimpleRefCount &o) | |
Copy constructor. | |
uint32_t | GetReferenceCount () const |
Get the reference count of the object. | |
SimpleRefCount & | operator= (const SimpleRefCount &o) |
Assignment operator. | |
void | Ref () const |
Increment the reference count. | |
void | Unref () const |
Decrement the reference count. | |
Public Member Functions inherited from ns3::ObjectBase | |
virtual | ~ObjectBase () |
Virtual destructor. | |
void | GetAttribute (std::string name, AttributeValue &value, bool permissive=false) const |
Get the value of an attribute, raising fatal errors if unsuccessful. | |
bool | GetAttributeFailSafe (std::string name, AttributeValue &value) const |
Get the value of an attribute without raising errors. | |
void | SetAttribute (std::string name, const AttributeValue &value) |
Set a single attribute, raising fatal errors if unsuccessful. | |
bool | SetAttributeFailSafe (std::string name, const AttributeValue &value) |
Set a single attribute without raising errors. | |
bool | TraceConnect (std::string name, std::string context, const CallbackBase &cb) |
Connect a TraceSource to a Callback with a context. | |
bool | TraceConnectWithoutContext (std::string name, const CallbackBase &cb) |
Connect a TraceSource to a Callback without a context. | |
bool | TraceDisconnect (std::string name, std::string context, const CallbackBase &cb) |
Disconnect from a TraceSource a Callback previously connected with a context. | |
bool | TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb) |
Disconnect from a TraceSource a Callback previously connected without a context. | |
Static Public Member Functions | |
static TypeId | GetTypeId () |
Get the type ID. | |
Static Public Member Functions inherited from ns3::SpectrumPhy | |
static TypeId | GetTypeId () |
Get the type ID. | |
Static Public Member Functions inherited from ns3::Object | |
static TypeId | GetTypeId () |
Register this type. | |
Static Public Member Functions inherited from ns3::ObjectBase | |
static TypeId | GetTypeId () |
Get the type ID. | |
Private Member Functions | |
void | ChangeState (State newState) |
Change state function. | |
void | EndRxData () |
End receive data function. | |
void | EndRxDlCtrl () |
End receive DL control function. | |
void | EndRxUlSrs () |
End receive UL SRS function. | |
void | EndTxData () |
End transmit data function. | |
void | EndTxDlCtrl () |
End transmit DL control function. | |
void | EndTxUlSrs () |
End transmit UL SRS function. | |
void | SetTxModeGain (uint8_t txMode, double gain) |
Set transmit mode gain function. | |
Private Attributes | |
Ptr< AntennaModel > | m_antenna |
the antenna model | |
uint16_t | m_cellId |
the cell ID | |
Ptr< SpectrumChannel > | m_channel |
the channel | |
uint8_t | m_componentCarrierId |
the component carrier ID | |
bool | m_ctrlErrorModelEnabled |
when true (default) the phy error model is enabled for DL ctrl frame | |
bool | m_dataErrorModelEnabled |
when true (default) the phy error model is enabled | |
Ptr< NetDevice > | m_device |
the device | |
TracedCallback< PhyReceptionStatParameters > | m_dlPhyReception |
Trace information regarding PHY stats from DL Rx perspective PhyReceptionStatParameters (see lte-common.h) | |
EventId | m_endRxDataEvent |
end receive data event | |
EventId | m_endRxDlCtrlEvent |
end receive DL control event | |
EventId | m_endRxUlSrsEvent |
end receive UL SRS event | |
EventId | m_endTxEvent |
end transmit event | |
expectedTbs_t | m_expectedTbs |
the expected TBS | |
Time | m_firstRxDuration |
the first receive duration | |
Time | m_firstRxStart |
the first receive start | |
Ptr< LteHarqPhy > | m_harqPhyModule |
the HARQ phy module | |
Ptr< LteInterference > | m_interferenceCtrl |
the control interference | |
Ptr< LteInterference > | m_interferenceData |
the data interference | |
uint8_t | m_layersNum |
layers num | |
LtePhyDlHarqFeedbackCallback | m_ltePhyDlHarqFeedbackCallback |
the LTE phy DL HARQ feedback callback | |
LtePhyRxCtrlEndErrorCallback | m_ltePhyRxCtrlEndErrorCallback |
the LTE phy receive control end error callback | |
LtePhyRxCtrlEndOkCallback | m_ltePhyRxCtrlEndOkCallback |
the LTE phy receive control end ok callback | |
LtePhyRxDataEndErrorCallback | m_ltePhyRxDataEndErrorCallback |
the LTE phy receive data end error callback | |
LtePhyRxDataEndOkCallback | m_ltePhyRxDataEndOkCallback |
the LTE phy receive data end ok callback | |
LtePhyRxPssCallback | m_ltePhyRxPssCallback |
the LTE phy receive PSS callback | |
LtePhyUlHarqFeedbackCallback | m_ltePhyUlHarqFeedbackCallback |
the LTE phy UL HARQ feedback callback | |
Ptr< MobilityModel > | m_mobility |
the modility model | |
TracedCallback< Ptr< const Packet > > | m_phyRxEndErrorTrace |
the phy receive end error trace callback | |
TracedCallback< Ptr< const Packet > > | m_phyRxEndOkTrace |
the phy receive end ok trace callback | |
TracedCallback< Ptr< const PacketBurst > > | m_phyRxStartTrace |
the phy receive start trace callback | |
TracedCallback< Ptr< const PacketBurst > > | m_phyTxEndTrace |
the phy transmit end trace callback | |
TracedCallback< Ptr< const PacketBurst > > | m_phyTxStartTrace |
the phy transmit start trace callback | |
Ptr< UniformRandomVariable > | m_random |
Provides uniform random variables. | |
std::list< Ptr< LteControlMessage > > | m_rxControlMessageList |
the receive control message list | |
std::list< Ptr< PacketBurst > > | m_rxPacketBurstList |
the receive burst list | |
Ptr< const SpectrumModel > | m_rxSpectrumModel |
the spectrum model | |
SpectrumValue | m_sinrPerceived |
the preceived SINR | |
State | m_state |
the state | |
uint8_t | m_transmissionMode |
for UEs: store the transmission mode | |
std::list< Ptr< LteControlMessage > > | m_txControlMessageList |
the transmit control message list | |
std::vector< double > | m_txModeGain |
duplicate value of LteUePhy | |
Ptr< PacketBurst > | m_txPacketBurst |
the transmit packet burst | |
Ptr< SpectrumValue > | m_txPsd |
the transmit PSD | |
TracedCallback< PhyReceptionStatParameters > | m_ulPhyReception |
Trace information regarding PHY stats from UL Rx perspective PhyReceptionStatParameters (see lte-common.h) | |
Friends | |
class | LteUePhy |
allow LteUePhy class friend access | |
Additional Inherited Members | |
Protected Member Functions inherited from ns3::Object | |
Object (const Object &o) | |
Copy an Object. | |
virtual void | DoInitialize () |
Initialize() implementation. | |
virtual void | NotifyNewAggregate () |
Notify all Objects aggregated to this one of a new Object being aggregated. | |
Protected Member Functions inherited from ns3::ObjectBase | |
void | ConstructSelf (const AttributeConstructionList &attributes) |
Complete construction of ObjectBase; invoked by derived classes. | |
virtual void | NotifyConstructionCompleted () |
Notifier called once the ObjectBase is fully constructed. | |
Related Symbols inherited from ns3::ObjectBase | |
static TypeId | GetObjectIid () |
Ensure the TypeId for ObjectBase gets fully configured to anchor the inheritance tree properly. | |
The LteSpectrumPhy models the physical layer of LTE.
It supports a single antenna model instance which is used for both transmission and reception.
Definition at line 138 of file lte-spectrum-phy.h.
PHY states.
Enumerator | |
---|---|
IDLE | |
TX_DL_CTRL | |
TX_DATA | |
TX_UL_SRS | |
RX_DL_CTRL | |
RX_DATA | |
RX_UL_SRS |
Definition at line 147 of file lte-spectrum-phy.h.
ns3::LteSpectrumPhy::LteSpectrumPhy | ( | ) |
Definition at line 87 of file lte-spectrum-phy.cc.
References ns3::CreateObject(), m_interferenceCtrl, m_interferenceData, m_random, m_txModeGain, and NS_LOG_FUNCTION.
|
override |
Definition at line 107 of file lte-spectrum-phy.cc.
References m_expectedTbs, m_txModeGain, and NS_LOG_FUNCTION.
void ns3::LteSpectrumPhy::AddCtrlSinrChunkProcessor | ( | Ptr< LteChunkProcessor > | p | ) |
p | the new LteChunkProcessor to be added to the ctrl processing chain |
Definition at line 1280 of file lte-spectrum-phy.cc.
References m_interferenceCtrl.
void ns3::LteSpectrumPhy::AddDataPowerChunkProcessor | ( | Ptr< LteChunkProcessor > | p | ) |
p | the new LteChunkProcessor to be added to the Data Channel power processing chain |
Definition at line 1256 of file lte-spectrum-phy.cc.
References m_interferenceData.
void ns3::LteSpectrumPhy::AddDataSinrChunkProcessor | ( | Ptr< LteChunkProcessor > | p | ) |
p | the new LteChunkProcessor to be added to the data processing chain |
Definition at line 1262 of file lte-spectrum-phy.cc.
References m_interferenceData.
void ns3::LteSpectrumPhy::AddExpectedTb | ( | uint16_t | rnti, |
uint8_t | ndi, | ||
uint16_t | size, | ||
uint8_t | mcs, | ||
std::vector< int > | map, | ||
uint8_t | layer, | ||
uint8_t | harqId, | ||
uint8_t | rv, | ||
bool | downlink ) |
rnti | the RNTI of the source of the TB |
ndi | new data indicator flag |
size | the size of the TB |
mcs | the MCS of the TB |
map | the map of RB(s) used |
layer | the layer (in case of MIMO tx) |
harqId | the id of the HARQ process (valid only for DL) |
rv | the redundancy version |
downlink | true when the TB is for DL |
Definition at line 887 of file lte-spectrum-phy.cc.
References m_expectedTbs, ns3::TbId_t::m_layer, ns3::TbId_t::m_rnti, and NS_LOG_FUNCTION.
void ns3::LteSpectrumPhy::AddInterferenceCtrlChunkProcessor | ( | Ptr< LteChunkProcessor > | p | ) |
LteChunkProcessor devoted to evaluate interference + noise power in control symbols of the subframe.
p | the new LteChunkProcessor to be added to the data processing chain |
Definition at line 1268 of file lte-spectrum-phy.cc.
References m_interferenceCtrl.
void ns3::LteSpectrumPhy::AddInterferenceDataChunkProcessor | ( | Ptr< LteChunkProcessor > | p | ) |
LteChunkProcessor devoted to evaluate interference + noise power in data symbols of the subframe.
p | the new LteChunkProcessor to be added to the data processing chain |
Definition at line 1274 of file lte-spectrum-phy.cc.
References m_interferenceData.
void ns3::LteSpectrumPhy::AddRsPowerChunkProcessor | ( | Ptr< LteChunkProcessor > | p | ) |
p | the new LteChunkProcessor to be added to the RS power processing chain |
Definition at line 1250 of file lte-spectrum-phy.cc.
References m_interferenceCtrl.
int64_t ns3::LteSpectrumPhy::AssignStreams | ( | int64_t | stream | ) |
Assign a fixed random variable stream number to the random variables used by this model.
Return the number of streams (possibly zero) that have been assigned.
stream | first stream index to use |
Definition at line 1312 of file lte-spectrum-phy.cc.
References m_random, and NS_LOG_FUNCTION.
|
private |
Change state function.
newState | the new state to set |
Definition at line 383 of file lte-spectrum-phy.cc.
References m_state, and NS_LOG_LOGIC.
Referenced by EndRxData(), EndRxDlCtrl(), EndRxUlSrs(), EndTxData(), EndTxDlCtrl(), EndTxUlSrs(), SetState(), StartRxData(), StartRxDlCtrl(), StartRxUlSrs(), StartTxDataFrame(), StartTxDlCtrlFrame(), and StartTxUlSrsFrame().
|
overridevirtual |
Destructor implementation.
This method is called by Dispose() or by the Object's destructor, whichever comes first.
Subclasses are expected to implement their real destruction code in an overridden 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::Object.
Definition at line 115 of file lte-spectrum-phy.cc.
References ns3::Object::DoDispose(), m_channel, m_device, m_interferenceCtrl, m_interferenceData, m_ltePhyDlHarqFeedbackCallback, m_ltePhyRxCtrlEndErrorCallback, m_ltePhyRxCtrlEndOkCallback, m_ltePhyRxDataEndErrorCallback, m_ltePhyRxDataEndOkCallback, m_ltePhyRxPssCallback, m_ltePhyUlHarqFeedbackCallback, m_mobility, ns3::MakeNullCallback(), and NS_LOG_FUNCTION.
|
private |
End receive data function.
Definition at line 933 of file lte-spectrum-phy.cc.
References ns3::DlInfoListElement_s::ACK, ChangeState(), ns3::EffectiveCodingRate, ns3::LteRadioBearerTag::GetLayer(), ns3::Time::GetMilliSeconds(), ns3::LteRadioBearerTag::GetRnti(), ns3::LteMiErrorModel::GetTbDecodificationStats(), IDLE, ns3::Callback< R, UArgs >::IsNull(), m_cellId, m_componentCarrierId, m_dataErrorModelEnabled, m_dlPhyReception, m_expectedTbs, m_harqPhyModule, ns3::DlInfoListElement_s::m_harqProcessId, ns3::DlInfoListElement_s::m_harqStatus, m_interferenceData, ns3::TbId_t::m_layer, m_layersNum, m_ltePhyDlHarqFeedbackCallback, m_ltePhyRxCtrlEndOkCallback, m_ltePhyRxDataEndOkCallback, m_ltePhyUlHarqFeedbackCallback, m_phyRxEndErrorTrace, m_phyRxEndOkTrace, m_random, ns3::DlInfoListElement_s::m_rnti, ns3::TbId_t::m_rnti, ns3::UlInfoListElement_s::m_rnti, m_rxControlMessageList, m_rxPacketBurstList, m_sinrPerceived, m_state, ns3::UlInfoListElement_s::m_tpc, m_transmissionMode, m_txModeGain, m_ulPhyReception, ns3::TbStats_t::mi, ns3::DlInfoListElement_s::NACK, ns3::UlInfoListElement_s::NotOk, ns3::Simulator::Now(), NS_ASSERT, NS_ASSERT_MSG, NS_LOG_DEBUG, NS_LOG_FUNCTION, NS_LOG_INFO, NS_LOG_LOGIC, ns3::UlInfoListElement_s::Ok, RX_DATA, and ns3::TbStats_t::tbler.
Referenced by StartRxData().
|
private |
End receive DL control function.
Definition at line 1179 of file lte-spectrum-phy.cc.
References ChangeState(), ns3::LteMiErrorModel::GetPcfichPdcchError(), IDLE, ns3::Callback< R, UArgs >::IsNull(), m_ctrlErrorModelEnabled, m_interferenceCtrl, m_ltePhyRxCtrlEndErrorCallback, m_ltePhyRxCtrlEndOkCallback, m_random, m_rxControlMessageList, m_sinrPerceived, m_state, m_transmissionMode, m_txModeGain, NS_ASSERT, NS_LOG_DEBUG, NS_LOG_FUNCTION, NS_LOG_LOGIC, and RX_DL_CTRL.
Referenced by StartRxDlCtrl().
|
private |
End receive UL SRS function.
Definition at line 1229 of file lte-spectrum-phy.cc.
References ChangeState(), IDLE, m_interferenceCtrl, m_state, NS_ASSERT, and RX_UL_SRS.
Referenced by StartRxUlSrs().
|
private |
End transmit data function.
Definition at line 566 of file lte-spectrum-phy.cc.
References ChangeState(), IDLE, m_phyTxEndTrace, m_state, m_txPacketBurst, NS_ASSERT, NS_LOG_FUNCTION, NS_LOG_LOGIC, and TX_DATA.
Referenced by StartTxDataFrame().
|
private |
End transmit DL control function.
Definition at line 578 of file lte-spectrum-phy.cc.
References ChangeState(), IDLE, m_state, m_txPacketBurst, NS_ASSERT, NS_LOG_FUNCTION, NS_LOG_LOGIC, and TX_DL_CTRL.
Referenced by StartTxDlCtrlFrame().
|
private |
End transmit UL SRS function.
Definition at line 589 of file lte-spectrum-phy.cc.
References ChangeState(), IDLE, m_state, m_txPacketBurst, NS_ASSERT, NS_LOG_FUNCTION, NS_LOG_LOGIC, and TX_UL_SRS.
Referenced by StartTxUlSrsFrame().
Get the AntennaModel used by this SpectrumPhy instance for transmission and/or reception.
Note that in general and depending on each module design, there can be multiple SpectrumPhy instances per NetDevice.
Implements ns3::SpectrumPhy.
Definition at line 364 of file lte-spectrum-phy.cc.
References m_antenna.
Ptr< SpectrumChannel > ns3::LteSpectrumPhy::GetChannel | ( | ) |
Definition at line 258 of file lte-spectrum-phy.cc.
References m_channel.
Get the associated NetDevice instance.
Implements ns3::SpectrumPhy.
Definition at line 223 of file lte-spectrum-phy.cc.
References m_device, and NS_LOG_FUNCTION.
|
overridevirtual |
Get the associated MobilityModel instance.
Implements ns3::SpectrumPhy.
Definition at line 230 of file lte-spectrum-phy.cc.
References m_mobility, and NS_LOG_FUNCTION.
|
overridevirtual |
Implements ns3::SpectrumPhy.
Definition at line 264 of file lte-spectrum-phy.cc.
References m_rxSpectrumModel.
|
static |
Get the type ID.
Definition at line 173 of file lte-spectrum-phy.cc.
References m_ctrlErrorModelEnabled, m_dataErrorModelEnabled, m_dlPhyReception, m_phyRxEndErrorTrace, m_phyRxEndOkTrace, m_phyRxStartTrace, m_phyTxEndTrace, m_phyTxStartTrace, m_ulPhyReception, ns3::MakeBooleanAccessor(), ns3::MakeBooleanChecker(), ns3::MakeTraceSourceAccessor(), and ns3::TypeId::SetParent().
void ns3::LteSpectrumPhy::RemoveExpectedTb | ( | uint16_t | rnti | ) |
Remove expected transport block.
When UE context at eNodeB is removed and if UL TB is expected to be received but not transmitted due to break in radio link. The TB with different rnti or lcid remains during the transmission of a new TB and causes problems with m_ulPhyReception trace, since the UE context was already removed. TB has to be removed when ue context at eNodeB is removed
rnti | The RNTI of the UE |
Definition at line 915 of file lte-spectrum-phy.cc.
References m_expectedTbs, ns3::TbId_t::m_layer, ns3::TbId_t::m_rnti, and NS_LOG_FUNCTION.
void ns3::LteSpectrumPhy::Reset | ( | ) |
reset the internal state
Definition at line 288 of file lte-spectrum-phy.cc.
References ns3::EventId::Cancel(), IDLE, m_cellId, m_channel, m_endRxDataEvent, m_endRxDlCtrlEvent, m_endRxUlSrsEvent, m_endTxEvent, m_expectedTbs, m_layersNum, m_rxControlMessageList, m_rxPacketBurstList, m_rxSpectrumModel, m_state, m_transmissionMode, m_txControlMessageList, m_txPacketBurst, and NS_LOG_FUNCTION.
void ns3::LteSpectrumPhy::SetAntenna | ( | Ptr< AntennaModel > | a | ) |
set the AntennaModel to be used
a | the Antenna Model |
Definition at line 370 of file lte-spectrum-phy.cc.
References m_antenna, and NS_LOG_FUNCTION.
void ns3::LteSpectrumPhy::SetCellId | ( | uint16_t | cellId | ) |
cellId | the Cell Identifier |
Definition at line 1238 of file lte-spectrum-phy.cc.
References m_cellId.
|
overridevirtual |
Set the channel attached to this device.
c | the channel |
Implements ns3::SpectrumPhy.
Definition at line 251 of file lte-spectrum-phy.cc.
References m_channel, and NS_LOG_FUNCTION.
void ns3::LteSpectrumPhy::SetComponentCarrierId | ( | uint8_t | componentCarrierId | ) |
componentCarrierId | the component carrier id |
Definition at line 1244 of file lte-spectrum-phy.cc.
References m_componentCarrierId.
Set the associated NetDevice instance.
d | the NetDevice instance |
Implements ns3::SpectrumPhy.
Definition at line 237 of file lte-spectrum-phy.cc.
References m_device, and NS_LOG_FUNCTION.
void ns3::LteSpectrumPhy::SetHarqPhyModule | ( | Ptr< LteHarqPhy > | harq | ) |
Set HARQ phy function.
harq | the HARQ phy module |
Definition at line 390 of file lte-spectrum-phy.cc.
References m_harqPhyModule.
void ns3::LteSpectrumPhy::SetLtePhyDlHarqFeedbackCallback | ( | LtePhyDlHarqFeedbackCallback | c | ) |
set the callback for the DL HARQ feedback as part of the interconnections between the LteSpectrumPhy and the PHY
c | the callback |
Definition at line 350 of file lte-spectrum-phy.cc.
References m_ltePhyDlHarqFeedbackCallback, and NS_LOG_FUNCTION.
void ns3::LteSpectrumPhy::SetLtePhyRxCtrlEndErrorCallback | ( | LtePhyRxCtrlEndErrorCallback | c | ) |
set the callback for the erroneous end of a RX ctrl frame, as part of the interconnections between the LteSpectrumPhy and the PHY
c | the callback |
Definition at line 336 of file lte-spectrum-phy.cc.
References m_ltePhyRxCtrlEndErrorCallback, and NS_LOG_FUNCTION.
void ns3::LteSpectrumPhy::SetLtePhyRxCtrlEndOkCallback | ( | LtePhyRxCtrlEndOkCallback | c | ) |
set the callback for the successful end of a RX ctrl frame, as part of the interconnections between the LteSpectrumPhy and the PHY
c | the callback |
Definition at line 329 of file lte-spectrum-phy.cc.
References m_ltePhyRxCtrlEndOkCallback, and NS_LOG_FUNCTION.
void ns3::LteSpectrumPhy::SetLtePhyRxDataEndErrorCallback | ( | LtePhyRxDataEndErrorCallback | c | ) |
set the callback for the end of a RX in error, as part of the interconnections between the PHY and the MAC
c | the callback |
Definition at line 315 of file lte-spectrum-phy.cc.
References m_ltePhyRxDataEndErrorCallback, and NS_LOG_FUNCTION.
void ns3::LteSpectrumPhy::SetLtePhyRxDataEndOkCallback | ( | LtePhyRxDataEndOkCallback | c | ) |
set the callback for the successful end of a RX, as part of the interconnections between the PHY and the MAC
c | the callback |
Definition at line 322 of file lte-spectrum-phy.cc.
References m_ltePhyRxDataEndOkCallback, and NS_LOG_FUNCTION.
void ns3::LteSpectrumPhy::SetLtePhyRxPssCallback | ( | LtePhyRxPssCallback | c | ) |
set the callback for the reception of the PSS as part of the interconnections between the LteSpectrumPhy and the UE PHY
c | the callback |
Definition at line 343 of file lte-spectrum-phy.cc.
References m_ltePhyRxPssCallback, and NS_LOG_FUNCTION.
void ns3::LteSpectrumPhy::SetLtePhyUlHarqFeedbackCallback | ( | LtePhyUlHarqFeedbackCallback | c | ) |
set the callback for the UL HARQ feedback as part of the interconnections between the LteSpectrumPhy and the PHY
c | the callback |
Definition at line 357 of file lte-spectrum-phy.cc.
References m_ltePhyUlHarqFeedbackCallback, and NS_LOG_FUNCTION.
|
overridevirtual |
Set the mobility model associated with this device.
m | the mobility model |
Implements ns3::SpectrumPhy.
Definition at line 244 of file lte-spectrum-phy.cc.
References m_mobility, and NS_LOG_FUNCTION.
void ns3::LteSpectrumPhy::SetNoisePowerSpectralDensity | ( | Ptr< const SpectrumValue > | noisePsd | ) |
set the noise power spectral density
noisePsd | the Noise Power Spectral Density in power units (Watt, Pascal...) per Hz. |
Definition at line 278 of file lte-spectrum-phy.cc.
References m_interferenceCtrl, m_interferenceData, m_rxSpectrumModel, NS_ASSERT, and NS_LOG_FUNCTION.
void ns3::LteSpectrumPhy::SetState | ( | State | newState | ) |
Set the state of the phy layer.
newState | the state |
Definition at line 377 of file lte-spectrum-phy.cc.
References ChangeState().
void ns3::LteSpectrumPhy::SetTransmissionMode | ( | uint8_t | txMode | ) |
txMode | UE transmission mode (SISO, MIMO tx diversity, ...) |
Definition at line 1286 of file lte-spectrum-phy.cc.
References m_layersNum, m_transmissionMode, m_txModeGain, NS_ASSERT_MSG, NS_LOG_FUNCTION, and ns3::TransmissionModesLayers::TxMode2LayerNum().
|
private |
Set transmit mode gain function.
txMode | the transmit mode |
gain | the gain to set |
Definition at line 1296 of file lte-spectrum-phy.cc.
References m_txModeGain, and NS_LOG_FUNCTION.
void ns3::LteSpectrumPhy::SetTxPowerSpectralDensity | ( | Ptr< SpectrumValue > | txPsd | ) |
set the Power Spectral Density of outgoing signals in W/Hz.
txPsd |
Definition at line 270 of file lte-spectrum-phy.cc.
References m_txPsd, NS_ASSERT, and NS_LOG_FUNCTION.
|
overridevirtual |
Notify the SpectrumPhy instance of an incoming signal.
params | the parameters of the signals being received |
Implements ns3::SpectrumPhy.
Definition at line 600 of file lte-spectrum-phy.cc.
References ns3::DynamicCast(), m_interferenceCtrl, m_interferenceData, m_state, NS_LOG_FUNCTION, NS_LOG_LOGIC, StartRxData(), StartRxDlCtrl(), and StartRxUlSrs().
Referenced by LteDownlinkCtrlSinrTestCase::DoRun(), LteDownlinkDataSinrTestCase::DoRun(), LteUplinkDataSinrTestCase::DoRun(), and LteUplinkSrsSinrTestCase::DoRun().
void ns3::LteSpectrumPhy::StartRxData | ( | Ptr< LteSpectrumSignalParametersDataFrame > | params | ) |
Start receive data function.
params | Ptr<LteSpectrumSignalParametersDataFrame> |
Definition at line 640 of file lte-spectrum-phy.cc.
References ChangeState(), EndRxData(), IDLE, m_cellId, m_endRxDataEvent, m_firstRxDuration, m_firstRxStart, m_interferenceData, m_phyRxStartTrace, m_rxControlMessageList, m_rxPacketBurstList, m_state, ns3::Simulator::Now(), NS_ASSERT, NS_FATAL_ERROR, NS_LOG_DEBUG, NS_LOG_FUNCTION, NS_LOG_LOGIC, RX_DATA, RX_DL_CTRL, ns3::Time::S, ns3::Simulator::Schedule(), TX_DATA, TX_DL_CTRL, and TX_UL_SRS.
Referenced by StartRx().
void ns3::LteSpectrumPhy::StartRxDlCtrl | ( | Ptr< LteSpectrumSignalParametersDlCtrlFrame > | lteDlCtrlRxParams | ) |
Start receive DL control function.
lteDlCtrlRxParams | Ptr<LteSpectrumSignalParametersDlCtrlFrame> |
Definition at line 722 of file lte-spectrum-phy.cc.
References ChangeState(), EndRxDlCtrl(), IDLE, ns3::Callback< R, UArgs >::IsNull(), m_cellId, m_endRxDlCtrlEvent, m_firstRxDuration, m_firstRxStart, m_interferenceCtrl, m_ltePhyRxPssCallback, m_rxControlMessageList, m_state, ns3::Simulator::Now(), NS_ASSERT, NS_ASSERT_MSG, NS_FATAL_ERROR, NS_LOG_FUNCTION, NS_LOG_LOGIC, RX_DATA, RX_DL_CTRL, RX_UL_SRS, ns3::Simulator::Schedule(), TX_DATA, TX_DL_CTRL, and TX_UL_SRS.
Referenced by StartRx().
void ns3::LteSpectrumPhy::StartRxUlSrs | ( | Ptr< LteSpectrumSignalParametersUlSrsFrame > | lteUlSrsRxParams | ) |
Start receive UL SRS function.
lteUlSrsRxParams | Ptr<LteSpectrumSignalParametersUlSrsFrame> |
Definition at line 806 of file lte-spectrum-phy.cc.
References ChangeState(), EndRxUlSrs(), IDLE, m_cellId, m_endRxUlSrsEvent, m_firstRxDuration, m_firstRxStart, m_interferenceCtrl, m_rxControlMessageList, m_state, ns3::Simulator::Now(), NS_ASSERT, NS_FATAL_ERROR, NS_LOG_FUNCTION, NS_LOG_LOGIC, RX_DATA, RX_DL_CTRL, RX_UL_SRS, ns3::Simulator::Schedule(), TX_DATA, TX_DL_CTRL, and TX_UL_SRS.
Referenced by StartRx().
bool ns3::LteSpectrumPhy::StartTxDataFrame | ( | Ptr< PacketBurst > | pb, |
std::list< Ptr< LteControlMessage > > | ctrlMsgList, | ||
Time | duration ) |
Start a transmission of data frame in DL and UL.
pb | the burst of packets to be transmitted in PDSCH/PUSCH |
ctrlMsgList | the list of LteControlMessage to send |
duration | the duration of the data frame |
Definition at line 396 of file lte-spectrum-phy.cc.
References ChangeState(), ns3::Create(), EndTxData(), ns3::Object::GetObject(), IDLE, m_antenna, m_cellId, m_channel, m_endTxEvent, m_phyTxStartTrace, m_state, m_txPacketBurst, m_txPsd, NS_ASSERT, NS_FATAL_ERROR, NS_LOG_FUNCTION, NS_LOG_LOGIC, RX_DATA, RX_DL_CTRL, RX_UL_SRS, ns3::Simulator::Schedule(), TX_DATA, TX_DL_CTRL, and TX_UL_SRS.
bool ns3::LteSpectrumPhy::StartTxDlCtrlFrame | ( | std::list< Ptr< LteControlMessage > > | ctrlMsgList, |
bool | pss ) |
Start a transmission of control frame in DL.
ctrlMsgList | the burst of control messages to be transmitted |
pss | the flag for transmitting the primary synchronization signal |
Definition at line 456 of file lte-spectrum-phy.cc.
References ChangeState(), ns3::Create(), ns3::DL_CTRL_DURATION, EndTxDlCtrl(), ns3::Object::GetObject(), IDLE, m_antenna, m_cellId, m_channel, m_endTxEvent, m_state, m_txPsd, NS_ASSERT, NS_FATAL_ERROR, NS_LOG_FUNCTION, NS_LOG_LOGIC, RX_DATA, RX_DL_CTRL, RX_UL_SRS, ns3::Simulator::Schedule(), TX_DATA, TX_DL_CTRL, and TX_UL_SRS.
bool ns3::LteSpectrumPhy::StartTxUlSrsFrame | ( | ) |
Start a transmission of control frame in UL.
Definition at line 512 of file lte-spectrum-phy.cc.
References ChangeState(), ns3::Create(), EndTxUlSrs(), ns3::Object::GetObject(), IDLE, m_antenna, m_cellId, m_channel, m_endTxEvent, m_state, m_txPsd, NS_ASSERT, NS_FATAL_ERROR, NS_LOG_FUNCTION, NS_LOG_LOGIC, RX_DATA, RX_DL_CTRL, RX_UL_SRS, ns3::Simulator::Schedule(), TX_DATA, TX_DL_CTRL, TX_UL_SRS, and ns3::UL_SRS_DURATION.
void ns3::LteSpectrumPhy::UpdateSinrPerceived | ( | const SpectrumValue & | sinr | ) |
sinr | vector of sinr perceived per each RB |
Definition at line 880 of file lte-spectrum-phy.cc.
References m_sinrPerceived, and NS_LOG_FUNCTION.
Referenced by ns3::LteHelper::InstallSingleEnbDevice(), and ns3::LteHelper::InstallSingleUeDevice().
|
friend |
allow LteUePhy class friend access
Definition at line 435 of file lte-spectrum-phy.h.
|
private |
the antenna model
Definition at line 476 of file lte-spectrum-phy.h.
Referenced by GetAntenna(), SetAntenna(), StartTxDataFrame(), StartTxDlCtrlFrame(), and StartTxUlSrsFrame().
|
private |
the cell ID
Definition at line 516 of file lte-spectrum-phy.h.
Referenced by EndRxData(), Reset(), SetCellId(), StartRxData(), StartRxDlCtrl(), StartRxUlSrs(), StartTxDataFrame(), StartTxDlCtrlFrame(), and StartTxUlSrsFrame().
|
private |
the channel
Definition at line 479 of file lte-spectrum-phy.h.
Referenced by DoDispose(), GetChannel(), Reset(), SetChannel(), StartTxDataFrame(), StartTxDlCtrlFrame(), and StartTxUlSrsFrame().
|
private |
the component carrier ID
Definition at line 518 of file lte-spectrum-phy.h.
Referenced by EndRxData(), and SetComponentCarrierId().
|
private |
when true (default) the phy error model is enabled for DL ctrl frame
Definition at line 525 of file lte-spectrum-phy.h.
Referenced by EndRxDlCtrl(), and GetTypeId().
|
private |
when true (default) the phy error model is enabled
Definition at line 524 of file lte-spectrum-phy.h.
Referenced by EndRxData(), and GetTypeId().
the device
Definition at line 477 of file lte-spectrum-phy.h.
Referenced by DoDispose(), GetDevice(), and SetDevice().
|
private |
Trace information regarding PHY stats from DL Rx perspective PhyReceptionStatParameters (see lte-common.h)
Definition at line 542 of file lte-spectrum-phy.h.
Referenced by EndRxData(), and GetTypeId().
|
private |
end receive data event
Definition at line 551 of file lte-spectrum-phy.h.
Referenced by Reset(), and StartRxData().
|
private |
end receive DL control event
Definition at line 552 of file lte-spectrum-phy.h.
Referenced by Reset(), and StartRxDlCtrl().
|
private |
end receive UL SRS event
Definition at line 553 of file lte-spectrum-phy.h.
Referenced by Reset(), and StartRxUlSrs().
|
private |
end transmit event
Definition at line 550 of file lte-spectrum-phy.h.
Referenced by Reset(), StartTxDataFrame(), StartTxDlCtrlFrame(), and StartTxUlSrsFrame().
|
private |
the expected TBS
Definition at line 519 of file lte-spectrum-phy.h.
Referenced by ~LteSpectrumPhy(), AddExpectedTb(), EndRxData(), RemoveExpectedTb(), and Reset().
|
private |
the first receive duration
Definition at line 491 of file lte-spectrum-phy.h.
Referenced by StartRxData(), StartRxDlCtrl(), and StartRxUlSrs().
|
private |
the first receive start
Definition at line 490 of file lte-spectrum-phy.h.
Referenced by StartRxData(), StartRxDlCtrl(), and StartRxUlSrs().
|
private |
the HARQ phy module
Definition at line 532 of file lte-spectrum-phy.h.
Referenced by EndRxData(), and SetHarqPhyModule().
|
private |
the control interference
Definition at line 514 of file lte-spectrum-phy.h.
Referenced by LteSpectrumPhy(), AddCtrlSinrChunkProcessor(), AddInterferenceCtrlChunkProcessor(), AddRsPowerChunkProcessor(), DoDispose(), EndRxDlCtrl(), EndRxUlSrs(), SetNoisePowerSpectralDensity(), StartRx(), StartRxDlCtrl(), and StartRxUlSrs().
|
private |
the data interference
Definition at line 513 of file lte-spectrum-phy.h.
Referenced by LteSpectrumPhy(), AddDataPowerChunkProcessor(), AddDataSinrChunkProcessor(), AddInterferenceDataChunkProcessor(), DoDispose(), EndRxData(), SetNoisePowerSpectralDensity(), StartRx(), and StartRxData().
|
private |
layers num
Definition at line 529 of file lte-spectrum-phy.h.
Referenced by EndRxData(), Reset(), and SetTransmissionMode().
|
private |
the LTE phy DL HARQ feedback callback
Definition at line 534 of file lte-spectrum-phy.h.
Referenced by DoDispose(), EndRxData(), and SetLtePhyDlHarqFeedbackCallback().
|
private |
the LTE phy receive control end error callback
Definition at line 510 of file lte-spectrum-phy.h.
Referenced by DoDispose(), EndRxDlCtrl(), and SetLtePhyRxCtrlEndErrorCallback().
|
private |
the LTE phy receive control end ok callback
Definition at line 508 of file lte-spectrum-phy.h.
Referenced by DoDispose(), EndRxData(), EndRxDlCtrl(), and SetLtePhyRxCtrlEndOkCallback().
|
private |
the LTE phy receive data end error callback
Definition at line 503 of file lte-spectrum-phy.h.
Referenced by DoDispose(), and SetLtePhyRxDataEndErrorCallback().
|
private |
the LTE phy receive data end ok callback
Definition at line 505 of file lte-spectrum-phy.h.
Referenced by DoDispose(), EndRxData(), and SetLtePhyRxDataEndOkCallback().
|
private |
the LTE phy receive PSS callback
Definition at line 511 of file lte-spectrum-phy.h.
Referenced by DoDispose(), SetLtePhyRxPssCallback(), and StartRxDlCtrl().
|
private |
the LTE phy UL HARQ feedback callback
Definition at line 536 of file lte-spectrum-phy.h.
Referenced by DoDispose(), EndRxData(), and SetLtePhyUlHarqFeedbackCallback().
|
private |
the modility model
Definition at line 475 of file lte-spectrum-phy.h.
Referenced by DoDispose(), GetMobility(), and SetMobility().
|
private |
the phy receive end error trace callback
Definition at line 500 of file lte-spectrum-phy.h.
Referenced by EndRxData(), and GetTypeId().
|
private |
the phy receive end ok trace callback
Definition at line 498 of file lte-spectrum-phy.h.
Referenced by EndRxData(), and GetTypeId().
|
private |
the phy receive start trace callback
Definition at line 497 of file lte-spectrum-phy.h.
Referenced by GetTypeId(), and StartRxData().
|
private |
the phy transmit end trace callback
Definition at line 495 of file lte-spectrum-phy.h.
Referenced by EndTxData(), and GetTypeId().
|
private |
the phy transmit start trace callback
Definition at line 494 of file lte-spectrum-phy.h.
Referenced by GetTypeId(), and StartTxDataFrame().
|
private |
Provides uniform random variables.
Definition at line 523 of file lte-spectrum-phy.h.
Referenced by LteSpectrumPhy(), AssignStreams(), EndRxData(), and EndRxDlCtrl().
|
private |
the receive control message list
Definition at line 487 of file lte-spectrum-phy.h.
Referenced by EndRxData(), EndRxDlCtrl(), Reset(), StartRxData(), StartRxDlCtrl(), and StartRxUlSrs().
|
private |
the receive burst list
Definition at line 484 of file lte-spectrum-phy.h.
Referenced by EndRxData(), Reset(), and StartRxData().
|
private |
the spectrum model
Definition at line 481 of file lte-spectrum-phy.h.
Referenced by GetRxSpectrumModel(), Reset(), and SetNoisePowerSpectralDensity().
|
private |
the preceived SINR
Definition at line 520 of file lte-spectrum-phy.h.
Referenced by EndRxData(), EndRxDlCtrl(), and UpdateSinrPerceived().
|
private |
the state
Definition at line 489 of file lte-spectrum-phy.h.
Referenced by ChangeState(), EndRxData(), EndRxDlCtrl(), EndRxUlSrs(), EndTxData(), EndTxDlCtrl(), EndTxUlSrs(), Reset(), StartRx(), StartRxData(), StartRxDlCtrl(), StartRxUlSrs(), StartTxDataFrame(), StartTxDlCtrlFrame(), and StartTxUlSrsFrame().
|
private |
for UEs: store the transmission mode
Definition at line 528 of file lte-spectrum-phy.h.
Referenced by EndRxData(), EndRxDlCtrl(), Reset(), and SetTransmissionMode().
|
private |
the transmit control message list
Definition at line 486 of file lte-spectrum-phy.h.
Referenced by Reset().
|
private |
duplicate value of LteUePhy
Definition at line 530 of file lte-spectrum-phy.h.
Referenced by LteSpectrumPhy(), ~LteSpectrumPhy(), EndRxData(), EndRxDlCtrl(), SetTransmissionMode(), and SetTxModeGain().
|
private |
the transmit packet burst
Definition at line 483 of file lte-spectrum-phy.h.
Referenced by EndTxData(), EndTxDlCtrl(), EndTxUlSrs(), Reset(), and StartTxDataFrame().
|
private |
the transmit PSD
Definition at line 482 of file lte-spectrum-phy.h.
Referenced by SetTxPowerSpectralDensity(), StartTxDataFrame(), StartTxDlCtrlFrame(), and StartTxUlSrsFrame().
|
private |
Trace information regarding PHY stats from UL Rx perspective PhyReceptionStatParameters (see lte-common.h)
Definition at line 548 of file lte-spectrum-phy.h.
Referenced by EndRxData(), and GetTypeId().