A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ns3::LteSpectrumPhy Class Reference

#include <lte-spectrum-phy.h>

+ Inheritance diagram for ns3::LteSpectrumPhy:

Public Types

enum  State { IDLE, TX, RX_DATA, RX_CTRL }
 

Public Member Functions

void AddCtrlSinrChunkProcessor (Ptr< LteSinrChunkProcessor > p)
 
void AddDataSinrChunkProcessor (Ptr< LteSinrChunkProcessor > 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 AddInterferenceChunkProcessor (Ptr< LteSinrChunkProcessor > p)
 
void AddRsPowerChunkProcessor (Ptr< LteSinrChunkProcessor > p)
 
int64_t AssignStreams (int64_t stream)
 
virtual void DoDispose ()
 
Ptr< SpectrumChannelGetChannel ()
 
Ptr< NetDeviceGetDevice ()
 
Ptr< MobilityModelGetMobility ()
 
Ptr< AntennaModelGetRxAntenna ()
 
Ptr< const SpectrumModelGetRxSpectrumModel () const
 
void Reset ()
 
void SetAntenna (Ptr< AntennaModel > a)
 
void SetCellId (uint16_t cellId)
 
void SetChannel (Ptr< SpectrumChannel > c)
 
void SetDevice (Ptr< NetDevice > d)
 
void SetHarqPhyModule (Ptr< LteHarqPhy > harq)
 
void SetLtePhyDlHarqFeedbackCallback (LtePhyDlHarqFeedbackCallback c)
 
void SetLtePhyRxCtrlEndErrorCallback (LtePhyRxCtrlEndErrorCallback c)
 
void SetLtePhyRxCtrlEndOkCallback (LtePhyRxCtrlEndOkCallback c)
 
void SetLtePhyRxDataEndErrorCallback (LtePhyRxDataEndErrorCallback c)
 
void SetLtePhyRxDataEndOkCallback (LtePhyRxDataEndOkCallback c)
 
void SetLtePhyTxEndCallback (LtePhyTxEndCallback c)
 
void SetLtePhyUlHarqFeedbackCallback (LtePhyUlHarqFeedbackCallback c)
 
void SetMobility (Ptr< MobilityModel > m)
 
void SetNoisePowerSpectralDensity (Ptr< const SpectrumValue > noisePsd)
 set the noise power spectral density More...
 
void SetState (State newState)
 Set the state of the phy layer. More...
 
void SetTransmissionMode (uint8_t txMode)
 
void SetTxPowerSpectralDensity (Ptr< SpectrumValue > txPsd)
 
void StartRx (Ptr< SpectrumSignalParameters > params)
 
void StartRxCtrl (Ptr< SpectrumSignalParameters > params)
 
void StartRxData (Ptr< LteSpectrumSignalParametersDataFrame > params)
 
bool StartTxDataFrame (Ptr< PacketBurst > pb, std::list< Ptr< LteControlMessage > > ctrlMsgList, Time duration)
 
bool StartTxDlCtrlFrame (std::list< Ptr< LteControlMessage > > ctrlMsgList)
 
bool StartTxUlSrsFrame ()
 
void UpdateSinrPerceived (const SpectrumValue &sinr)
 
- Public Member Functions inherited from ns3::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 Initialize (void)
 
- Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
 SimpleRefCount (const SimpleRefCount &o)
 
uint32_t GetReferenceCount (void) const
 
SimpleRefCountoperator= (const SimpleRefCount &o)
 
void Ref (void) const
 
void Unref (void) const
 
- Public Member Functions inherited from ns3::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)
 
- 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< AntennaModelm_antenna
 
uint16_t m_cellId
 
Ptr< SpectrumChannelm_channel
 
bool m_ctrlErrorModelEnabled
 
bool m_dataErrorModelEnabled
 
Ptr< NetDevicem_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< LteHarqPhym_harqPhyModule
 
Ptr< LteInterferencem_interferenceCtrl
 
Ptr< LteInterferencem_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< MobilityModelm_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< UniformRandomVariablem_random
 Provides uniform random variables.
 
std::list< Ptr
< LteControlMessage > > 
m_rxControlMessageList
 
std::list< Ptr< PacketBurst > > m_rxPacketBurstList
 
Ptr< const SpectrumModelm_rxSpectrumModel
 
SpectrumValue m_sinrPerceived
 
State m_state
 
uint8_t m_transmissionMode
 
std::list< Ptr
< LteControlMessage > > 
m_txControlMessageList
 
std::vector< double > m_txModeGain
 
Ptr< PacketBurstm_txPacketBurst
 
Ptr< SpectrumValuem_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)
 

Detailed Description

The LteSpectrumPhy models the physical layer of LTE

It supports a single antenna model instance which is used for both transmission and reception.

Config Paths

ns3::LteSpectrumPhy is accessible through the following paths with Config::Set and Config::Connect:

  • /NodeList/[i]/DeviceList/[i]/$ns3::LteEnbNetDevice/LteEnbPhy/DlSpectrumPhy
  • /NodeList/[i]/DeviceList/[i]/$ns3::LteEnbNetDevice/LteEnbPhy/UlSpectrumPhy
  • /NodeList/[i]/DeviceList/[i]/$ns3::LteNetDevice/$ns3::LteEnbNetDevice/LteEnbPhy/DlSpectrumPhy
  • /NodeList/[i]/DeviceList/[i]/$ns3::LteNetDevice/$ns3::LteEnbNetDevice/LteEnbPhy/UlSpectrumPhy
  • /NodeList/[i]/DeviceList/[i]/$ns3::LteNetDevice/$ns3::LteUeNetDevice/LteUePhy/DlSpectrumPhy
  • /NodeList/[i]/DeviceList/[i]/$ns3::LteNetDevice/$ns3::LteUeNetDevice/LteUePhy/UlSpectrumPhy
  • /NodeList/[i]/DeviceList/[i]/$ns3::LteUeNetDevice/LteUePhy/DlSpectrumPhy
  • /NodeList/[i]/DeviceList/[i]/$ns3::LteUeNetDevice/LteUePhy/UlSpectrumPhy

Attributes

  • DataErrorModelEnabled: Activate/Deactivate the error model of data (TBs of PDSCH and PUSCH) [by default is active].
    • Set with class: BooleanValue
    • Underlying type: bool
    • Initial value: true
    • Flags: construct write read
  • CtrlErrorModelEnabled: Activate/Deactivate the error model of control (PCFICH-PDCCH decodification) [by default is active].
    • Set with class: BooleanValue
    • Underlying type: bool
    • Initial value: true
    • Flags: construct write read

TraceSources

  • TxStart: Trace fired when a new transmission is started
  • TxEnd: Trace fired when a previosuly started transmission is finished
  • RxStart: Trace fired when the start of a signal is detected
  • RxEndOk: Trace fired when a previosuly started RX terminates successfully
  • RxEndError: Trace fired when a previosuly started RX terminates with an error
  • DlPhyReception: DL reception PHY layer statistics.
  • UlPhyReception: DL reception PHY layer statistics.

Definition at line 146 of file lte-spectrum-phy.h.

Member Enumeration Documentation

PHY states

Definition at line 156 of file lte-spectrum-phy.h.

Member Function Documentation

void ns3::LteSpectrumPhy::AddCtrlSinrChunkProcessor ( Ptr< LteSinrChunkProcessor p)
Parameters
pthe 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)
Parameters
pthe 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 
)
Parameters
rntithe rnti of the source of the TB
ndinew data indicator flag
sizethe size of the TB
mcsthe MCS of the TB
mapthe map of RB(s) used
layerthe layer (in case of MIMO tx)
harqIdthe id of the HARQ process (valid only for DL)
downlinktrue 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

Parameters
pthe 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)
Parameters
pthe 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.

Parameters
streamfirst stream index to use
Returns
the number of stream indices assigned by this model

Definition at line 1156 of file lte-spectrum-phy.cc.

References m_random, NS_LOG_FUNCTION, and ns3::RandomVariableStream::SetStream().

void ns3::LteSpectrumPhy::DoDispose ( void  )
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  )
Returns
the previously set channel

Definition at line 266 of file lte-spectrum-phy.cc.

Ptr< NetDevice > ns3::LteSpectrumPhy::GetDevice ( )
virtual

get the associated NetDevice instance

Returns
a Ptr to the associated NetDevice instance

Implements ns3::SpectrumPhy.

Definition at line 227 of file lte-spectrum-phy.cc.

References NS_LOG_FUNCTION.

Ptr< MobilityModel > ns3::LteSpectrumPhy::GetMobility ( )
virtual

get the associated MobilityModel instance

Returns
a Ptr to the associated MobilityModel instance

Implements ns3::SpectrumPhy.

Definition at line 235 of file lte-spectrum-phy.cc.

References NS_LOG_FUNCTION.

Ptr< AntennaModel > ns3::LteSpectrumPhy::GetRxAntenna ( )
virtual

get the AntennaModel used by the NetDevice for reception

Returns
a Ptr to the AntennaModel used by the NetDevice for reception

Implements ns3::SpectrumPhy.

Definition at line 373 of file lte-spectrum-phy.cc.

Ptr< const SpectrumModel > ns3::LteSpectrumPhy::GetRxSpectrumModel ( ) const
virtual
Returns
returns the SpectrumModel that this SpectrumPhy expects to be used for all SpectrumValues that are passed to StartRx. If 0 is returned, it means that any model will be accepted.

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

Parameters
athe Antenna Model

Definition at line 379 of file lte-spectrum-phy.cc.

References NS_LOG_FUNCTION.

void ns3::LteSpectrumPhy::SetCellId ( uint16_t  cellId)
Parameters
cellIdthe Cell Identifier

Definition at line 1088 of file lte-spectrum-phy.cc.

void ns3::LteSpectrumPhy::SetChannel ( Ptr< SpectrumChannel c)
virtual

Set the channel attached to this device.

Parameters
cthe channel

Implements ns3::SpectrumPhy.

Definition at line 259 of file lte-spectrum-phy.cc.

References NS_LOG_FUNCTION.

void ns3::LteSpectrumPhy::SetDevice ( Ptr< NetDevice d)
virtual

set the associated NetDevice instance

Parameters
dthe 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

Parameters
cthe 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

Parameters
cthe 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

Parameters
cthe 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

Parameters
cthe 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

Parameters
cthe 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

Parameters
cthe 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

Parameters
cthe callback

Definition at line 365 of file lte-spectrum-phy.cc.

References NS_LOG_FUNCTION.

void ns3::LteSpectrumPhy::SetMobility ( Ptr< MobilityModel m)
virtual

Set the mobility model associated with this device.

Parameters
mthe 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

Parameters
noisePsdthe 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.

Parameters
newStatethe state

Definition at line 386 of file lte-spectrum-phy.cc.

void ns3::LteSpectrumPhy::SetTransmissionMode ( uint8_t  txMode)
Parameters
txModeUE 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.

Parameters
txPsd

Definition at line 279 of file lte-spectrum-phy.cc.

References NS_ASSERT, and NS_LOG_FUNCTION.

void ns3::LteSpectrumPhy::StartRx ( Ptr< SpectrumSignalParameters params)
virtual

Notify the SpectrumPhy instance of an incoming signal

Parameters
paramsthe 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

Parameters
pbthe burst of packets to be transmitted in PDSCH/PUSCH
ctrlMsgListthe list of LteControlMessage to send
durationthe duration of the data frame
Returns
true if an error occurred and the transmission was not started, false otherwise.

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

Parameters
dlDcithe burst of DL-DCIs to be transmitted
ulDcithe burst of UL-DCIs to be transmitted
Returns
true if an error occurred and the transmission was not started, false otherwise.

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

Parameters
pbthe burst of control messages to be transmitted
Returns
true if an error occurred and the transmission was not started, false otherwise.

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)
Parameters
sinrvector of sinr perceived per each RB

Definition at line 804 of file lte-spectrum-phy.cc.

References NS_LOG_FUNCTION.

Member Data Documentation

TracedCallback<PhyReceptionStatParameters> ns3::LteSpectrumPhy::m_dlPhyReception
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.

TracedCallback<PhyReceptionStatParameters> ns3::LteSpectrumPhy::m_ulPhyReception
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.


The documentation for this class was generated from the following files: