#include <lte-spectrum-phy.h>
Public Types | |
enum | State { IDLE, TX, RX_DATA, RX_CTRL } |
Static Public Member Functions | |
static TypeId | GetTypeId (void) |
Static Public Member Functions inherited from ns3::SpectrumPhy | |
static TypeId | GetTypeId (void) |
Static Public Member Functions inherited from ns3::Object | |
static TypeId | GetTypeId (void) |
Static Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter > | |
static void | Cleanup (void) |
Static Public Member Functions inherited from ns3::ObjectBase | |
static TypeId | GetTypeId (void) |
Private Member Functions | |
void | ChangeState (State newState) |
void | EndRxData () |
void | EndRxDlCtrl () |
void | EndRxUlSrs () |
void | EndTx () |
void | SetTxModeGain (uint8_t txMode, double gain) |
Private Attributes | |
Ptr< AntennaModel > | m_antenna |
uint16_t | m_cellId |
Ptr< SpectrumChannel > | m_channel |
bool | m_ctrlErrorModelEnabled |
bool | m_dataErrorModelEnabled |
Ptr< NetDevice > | m_device |
TracedCallback < PhyReceptionStatParameters > | m_dlPhyReception |
EventId | m_endRxDataEvent |
EventId | m_endRxDlCtrlEvent |
EventId | m_endRxUlSrsEvent |
EventId | m_endTxEvent |
expectedTbs_t | m_expectedTbs |
Time | m_firstRxDuration |
Time | m_firstRxStart |
Ptr< LteHarqPhy > | m_harqPhyModule |
Ptr< LteInterference > | m_interferenceCtrl |
Ptr< LteInterference > | m_interferenceData |
uint8_t | m_layersNum |
LtePhyDlHarqFeedbackCallback | m_ltePhyDlHarqFeedbackCallback |
LtePhyRxCtrlEndErrorCallback | m_ltePhyRxCtrlEndErrorCallback |
LtePhyRxCtrlEndOkCallback | m_ltePhyRxCtrlEndOkCallback |
LtePhyRxDataEndErrorCallback | m_ltePhyRxDataEndErrorCallback |
LtePhyRxDataEndOkCallback | m_ltePhyRxDataEndOkCallback |
LtePhyTxEndCallback | m_ltePhyTxEndCallback |
LtePhyUlHarqFeedbackCallback | m_ltePhyUlHarqFeedbackCallback |
Ptr< MobilityModel > | m_mobility |
TracedCallback< Ptr< const Packet > > | m_phyRxEndErrorTrace |
TracedCallback< Ptr< const Packet > > | m_phyRxEndOkTrace |
TracedCallback< Ptr< const PacketBurst > > | m_phyRxStartTrace |
TracedCallback< Ptr< const PacketBurst > > | m_phyTxEndTrace |
TracedCallback< Ptr< const PacketBurst > > | m_phyTxStartTrace |
Ptr< UniformRandomVariable > | m_random |
Provides uniform random variables. | |
std::list< Ptr < LteControlMessage > > | m_rxControlMessageList |
std::list< Ptr< PacketBurst > > | m_rxPacketBurstList |
Ptr< const SpectrumModel > | m_rxSpectrumModel |
SpectrumValue | m_sinrPerceived |
State | m_state |
uint8_t | m_transmissionMode |
std::list< Ptr < LteControlMessage > > | m_txControlMessageList |
std::vector< double > | m_txModeGain |
Ptr< PacketBurst > | m_txPacketBurst |
Ptr< SpectrumValue > | m_txPsd |
TracedCallback < PhyReceptionStatParameters > | m_ulPhyReception |
Friends | |
class | LteUePhy |
Additional Inherited Members | |
Protected Member Functions inherited from ns3::Object | |
Object (const Object &o) | |
virtual void | DoInitialize (void) |
virtual void | NotifyNewAggregate (void) |
Protected Member Functions inherited from ns3::ObjectBase | |
void | ConstructSelf (const AttributeConstructionList &attributes) |
virtual void | NotifyConstructionCompleted (void) |
The LteSpectrumPhy models the physical layer of LTE
It supports a single antenna model instance which is used for both transmission and reception.
ns3::LteSpectrumPhy is accessible through the following paths with Config::Set and Config::Connect:
Definition at line 146 of file lte-spectrum-phy.h.
PHY states
Definition at line 156 of file lte-spectrum-phy.h.
void ns3::LteSpectrumPhy::AddCtrlSinrChunkProcessor | ( | Ptr< LteSinrChunkProcessor > | p | ) |
p | the new LteSinrChunkProcessor to be added to the ctrl processing chain |
Definition at line 1114 of file lte-spectrum-phy.cc.
void ns3::LteSpectrumPhy::AddDataSinrChunkProcessor | ( | Ptr< LteSinrChunkProcessor > | p | ) |
p | the new LteSinrChunkProcessor to be added to the data processing chain |
Definition at line 1102 of file lte-spectrum-phy.cc.
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) |
downlink | true when the TB is for DL |
Definition at line 812 of file lte-spectrum-phy.cc.
References NS_LOG_FUNCTION.
void ns3::LteSpectrumPhy::AddInterferenceChunkProcessor | ( | Ptr< LteSinrChunkProcessor > | p | ) |
LteSinrChunkProcessor devoted to evaluate intefrerence + noise power in data frame
p | the new LteSinrChunkProcessor to be added to the data processing chain |
Definition at line 1108 of file lte-spectrum-phy.cc.
void ns3::LteSpectrumPhy::AddRsPowerChunkProcessor | ( | Ptr< LteSinrChunkProcessor > | p | ) |
p | the new LteSinrChunkProcessor to be added to the RS power chain |
Definition at line 1095 of file lte-spectrum-phy.cc.
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 1156 of file lte-spectrum-phy.cc.
References m_random, NS_LOG_FUNCTION, and ns3::RandomVariableStream::SetStream().
|
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::Object.
Definition at line 141 of file lte-spectrum-phy.cc.
References ns3::Object::DoDispose(), and NS_LOG_FUNCTION.
Ptr< SpectrumChannel > ns3::LteSpectrumPhy::GetChannel | ( | void | ) |
Definition at line 266 of file lte-spectrum-phy.cc.
get the associated NetDevice instance
Implements ns3::SpectrumPhy.
Definition at line 227 of file lte-spectrum-phy.cc.
References NS_LOG_FUNCTION.
|
virtual |
get the associated MobilityModel instance
Implements ns3::SpectrumPhy.
Definition at line 235 of file lte-spectrum-phy.cc.
References NS_LOG_FUNCTION.
|
virtual |
get the AntennaModel used by the NetDevice for reception
Implements ns3::SpectrumPhy.
Definition at line 373 of file lte-spectrum-phy.cc.
|
virtual |
Implements ns3::SpectrumPhy.
Definition at line 272 of file lte-spectrum-phy.cc.
void ns3::LteSpectrumPhy::Reset | ( | void | ) |
reset the internal state
Definition at line 299 of file lte-spectrum-phy.cc.
References ns3::EventId::Cancel(), and NS_LOG_FUNCTION.
void ns3::LteSpectrumPhy::SetAntenna | ( | Ptr< AntennaModel > | a | ) |
set the AntennaModel to be used
a | the Antenna Model |
Definition at line 379 of file lte-spectrum-phy.cc.
References NS_LOG_FUNCTION.
void ns3::LteSpectrumPhy::SetCellId | ( | uint16_t | cellId | ) |
cellId | the Cell Identifier |
Definition at line 1088 of file lte-spectrum-phy.cc.
|
virtual |
Set the channel attached to this device.
c | the channel |
Implements ns3::SpectrumPhy.
Definition at line 259 of file lte-spectrum-phy.cc.
References NS_LOG_FUNCTION.
set the associated NetDevice instance
d | the NetDevice instance |
Implements ns3::SpectrumPhy.
Definition at line 243 of file lte-spectrum-phy.cc.
References NS_LOG_FUNCTION.
void ns3::LteSpectrumPhy::SetLtePhyDlHarqFeedbackCallback | ( | LtePhyDlHarqFeedbackCallback | c | ) |
set the callback for the DL HARQ feedback as part of the interconnections betweenthe LteSpectrumPhy and the PHY
c | the callback |
Definition at line 358 of file lte-spectrum-phy.cc.
References 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 betweenthe LteSpectrumPhy and the PHY
c | the callback |
Definition at line 351 of file lte-spectrum-phy.cc.
References 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 betweenthe LteSpectrumPhy and the PHY
c | the callback |
Definition at line 344 of file lte-spectrum-phy.cc.
References 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 betweenthe PHY and the MAC
c | the callback |
Definition at line 329 of file lte-spectrum-phy.cc.
References NS_LOG_FUNCTION.
void ns3::LteSpectrumPhy::SetLtePhyRxDataEndOkCallback | ( | LtePhyRxDataEndOkCallback | c | ) |
set the callback for the successful end of a RX, as part of the interconnections betweenthe PHY and the MAC
c | the callback |
Definition at line 337 of file lte-spectrum-phy.cc.
References NS_LOG_FUNCTION.
void ns3::LteSpectrumPhy::SetLtePhyTxEndCallback | ( | LtePhyTxEndCallback | c | ) |
set the callback for the end of a TX, as part of the interconnections betweenthe PHY and the MAC
c | the callback |
Definition at line 321 of file lte-spectrum-phy.cc.
References NS_LOG_FUNCTION.
void ns3::LteSpectrumPhy::SetLtePhyUlHarqFeedbackCallback | ( | LtePhyUlHarqFeedbackCallback | c | ) |
set the callback for the UL HARQ feedback as part of the interconnections betweenthe LteSpectrumPhy and the PHY
c | the callback |
Definition at line 365 of file lte-spectrum-phy.cc.
References NS_LOG_FUNCTION.
|
virtual |
Set the mobility model associated with this device.
m | the mobility model |
Implements ns3::SpectrumPhy.
Definition at line 251 of file lte-spectrum-phy.cc.
References 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 288 of file lte-spectrum-phy.cc.
References 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 386 of file lte-spectrum-phy.cc.
void ns3::LteSpectrumPhy::SetTransmissionMode | ( | uint8_t | txMode | ) |
txMode | UE transmission mode (SISO, MIMO tx diversity, ...) |
Definition at line 1120 of file lte-spectrum-phy.cc.
References NS_ASSERT_MSG, 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 279 of file lte-spectrum-phy.cc.
References NS_ASSERT, and NS_LOG_FUNCTION.
|
virtual |
Notify the SpectrumPhy instance of an incoming signal
params | the parameters of the signals being received |
Implements ns3::SpectrumPhy.
Definition at line 603 of file lte-spectrum-phy.cc.
References NS_LOG_FUNCTION, and NS_LOG_LOGIC.
Referenced by ns3::LteDownlinkDataSinrTestCase::DoRun(), ns3::LteUplinkDataSinrTestCase::DoRun(), ns3::LteDownlinkCtrlSinrTestCase::DoRun(), and ns3::LteUplinkSrsSinrTestCase::DoRun().
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 410 of file lte-spectrum-phy.cc.
References NS_ASSERT, NS_FATAL_ERROR, NS_LOG_FUNCTION, NS_LOG_LOGIC, and ns3::Simulator::Schedule().
bool ns3::LteSpectrumPhy::StartTxDlCtrlFrame | ( | std::list< Ptr< LteControlMessage > > | ctrlMsgList | ) |
Start a transmission of control frame in DL
dlDci | the burst of DL-DCIs to be transmitted |
ulDci | the burst of UL-DCIs to be transmitted |
Definition at line 466 of file lte-spectrum-phy.cc.
References NS_ASSERT, NS_FATAL_ERROR, NS_LOG_FUNCTION, NS_LOG_LOGIC, and ns3::Simulator::Schedule().
bool ns3::LteSpectrumPhy::StartTxUlSrsFrame | ( | ) |
Start a transmission of control frame in UL
pb | the burst of control messages to be transmitted |
Definition at line 522 of file lte-spectrum-phy.cc.
References NS_ASSERT, NS_FATAL_ERROR, NS_LOG_FUNCTION, NS_LOG_LOGIC, and ns3::Simulator::Schedule().
void ns3::LteSpectrumPhy::UpdateSinrPerceived | ( | const SpectrumValue & | sinr | ) |
sinr | vector of sinr perceived per each RB |
Definition at line 804 of file lte-spectrum-phy.cc.
References NS_LOG_FUNCTION.
|
private |
Trace information regarding PHY stats from DL Rx perspective PhyReceptionStatParameters (see lte-common.h)
Definition at line 461 of file lte-spectrum-phy.h.
|
private |
Trace information regarding PHY stats from UL Rx perspective PhyReceptionStatParameters (see lte-common.h)
Definition at line 468 of file lte-spectrum-phy.h.