|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
23 #ifndef LTE_SPECTRUM_PHY_H
24 #define LTE_SPECTRUM_PHY_H
26 #include <ns3/event-id.h>
27 #include <ns3/spectrum-value.h>
28 #include <ns3/mobility-model.h>
29 #include <ns3/packet.h>
30 #include <ns3/nstime.h>
31 #include <ns3/net-device.h>
32 #include <ns3/spectrum-phy.h>
33 #include <ns3/spectrum-channel.h>
34 #include <ns3/spectrum-interference.h>
35 #include <ns3/data-rate.h>
36 #include <ns3/generic-phy.h>
37 #include <ns3/packet-burst.h>
38 #include <ns3/lte-interference.h>
39 #include "ns3/random-variable-stream.h"
41 #include <ns3/ff-mac-common.h>
42 #include <ns3/lte-harq-phy.h>
43 #include <ns3/lte-common.h>
61 TbId_t (
const uint16_t a,
const uint8_t b);
402 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 SetHarqPhyModule(Ptr< LteHarqPhy > harq)
Set HARQ phy function.
Ptr< MobilityModel > m_mobility
the modility model
a unique identifier for an interface.
The LteSpectrumPhy models the physical layer of LTE.
Signal parameters for Lte Data Frame (PDSCH), and eventually after some control messages through othe...
Signal parameters for Lte DL Ctrl Frame (RS, PCFICH and PDCCH)
std::list< Ptr< LteControlMessage > > m_txControlMessageList
the transmit control message list
TracedCallback< Ptr< const Packet > > m_phyRxEndErrorTrace
the phy receive end error trace callback
void SetLtePhyUlHarqFeedbackCallback(LtePhyUlHarqFeedbackCallback c)
set the callback for the UL HARQ feedback as part of the interconnections between the LteSpectrumPhy ...
bool downlink
whether is downlink
LtePhyUlHarqFeedbackCallback m_ltePhyUlHarqFeedbackCallback
the LTE phy UL HARQ feedback callback
Callback< void, UlInfoListElement_s > LtePhyUlHarqFeedbackCallback
This method is used by the LteSpectrumPhy to notify the PHY about the status of a certain UL HARQ pro...
An identifier for simulation events.
bool StartTxDlCtrlFrame(std::list< Ptr< LteControlMessage > > ctrlMsgList, bool pss)
Start a transmission of control frame in DL.
void SetLtePhyDlHarqFeedbackCallback(LtePhyDlHarqFeedbackCallback c)
set the callback for the DL HARQ feedback as part of the interconnections between the LteSpectrumPhy ...
Every class exported by the ns3 library is enclosed in the ns3 namespace.
void AddInterferenceDataChunkProcessor(Ptr< LteChunkProcessor > p)
LteChunkProcessor devoted to evaluate interference + noise power in data symbols of the subframe.
The LteSpectrumPhy models the physical layer of LTE.
SpectrumValue m_sinrPerceived
the preceived SINR
void RemoveExpectedTb(uint16_t rnti)
Remove expected transport block.
void StartRxDlCtrl(Ptr< LteSpectrumSignalParametersDlCtrlFrame > lteDlCtrlRxParams)
Start receive DL control function.
void EndTxUlSrs()
End transmit UL SRS function.
Ptr< LteHarqPhy > m_harqPhyModule
the HARQ phy module
Ptr< SpectrumValue > m_txPsd
the transmit PSD
virtual ~LteSpectrumPhy()
void StartRxData(Ptr< LteSpectrumSignalParametersDataFrame > params)
Start receive data function.
void SetAntenna(Ptr< AntennaModel > a)
set the AntennaModel to be used
void SetLtePhyRxDataEndErrorCallback(LtePhyRxDataEndErrorCallback c)
set the callback for the end of a RX in error, as part of the interconnections between the PHY and th...
Ptr< AntennaModel > m_antenna
the antenna model
void SetLtePhyRxCtrlEndOkCallback(LtePhyRxCtrlEndOkCallback c)
set the callback for the successful end of a RX ctrl frame, as part of the interconnections between t...
void SetCellId(uint16_t cellId)
static TypeId GetTypeId(void)
Get the type ID.
Time m_firstRxDuration
the first receive duration
LtePhyRxCtrlEndOkCallback m_ltePhyRxCtrlEndOkCallback
the LTE phy receive control end ok callback
expectedTbs_t m_expectedTbs
the expected TBS
Ptr< PacketBurst > m_txPacketBurst
the transmit packet burst
void EndRxData()
End receive data function.
std::vector< double > m_txModeGain
duplicate value of LteUePhy
friend bool operator==(const TbId_t &a, const TbId_t &b)
Equality operator.
TracedCallback< PhyReceptionStatParameters > m_dlPhyReception
Trace information regarding PHY stats from DL Rx perspective PhyReceptionStatParameters (see lte-comm...
uint8_t ndi
New data indicator.
Ptr< const SpectrumModel > GetRxSpectrumModel() const
void AddDataSinrChunkProcessor(Ptr< LteChunkProcessor > p)
Callback< void, uint16_t, Ptr< SpectrumValue > > LtePhyRxPssCallback
This method is used by the LteSpectrumPhy to notify the UE PHY that a PSS has been received.
void SetChannel(Ptr< SpectrumChannel > c)
Set the channel attached to this device.
uint16_t m_cellId
the cell ID
Smart pointer class similar to boost::intrusive_ptr.
void SetNoisePowerSpectralDensity(Ptr< const SpectrumValue > noisePsd)
set the noise power spectral density
void SetTransmissionMode(uint8_t txMode)
Ptr< UniformRandomVariable > m_random
Provides uniform random variables.
Time m_firstRxStart
the first receive start
std::map< TbId_t, tbInfo_t > expectedTbs_t
expectedTbs_t typedef
Ptr< LteInterference > m_interferenceData
the data interference
uint8_t harqProcessId
HARQ process id.
Ptr< SpectrumChannel > m_channel
the channel
void SetLtePhyRxPssCallback(LtePhyRxPssCallback c)
set the callback for the reception of the PSS as part of the interconnections between the LteSpectrum...
Callback< void, Ptr< Packet > > LtePhyRxDataEndOkCallback
This method is used by the LteSpectrumPhy to notify the PHY that a previously started RX attempt has ...
virtual void DoDispose()
Destructor implementation.
std::vector< int > rbBitmap
Resource block bitmap.
void ChangeState(State newState)
Change state function.
void AddDataPowerChunkProcessor(Ptr< LteChunkProcessor > p)
friend bool operator<(const TbId_t &a, const TbId_t &b)
Less than operator.
Abstract base class for Spectrum-aware PHY layers.
Callback< void, std::list< Ptr< LteControlMessage > > > LtePhyRxCtrlEndOkCallback
This method is used by the LteSpectrumPhy to notify the PHY that a previously started RX of a control...
LtePhyRxCtrlEndErrorCallback m_ltePhyRxCtrlEndErrorCallback
the LTE phy receive control end error callback
LtePhyRxDataEndErrorCallback m_ltePhyRxDataEndErrorCallback
the LTE phy receive data end error callback
Set of values corresponding to a given SpectrumModel.
LtePhyRxPssCallback m_ltePhyRxPssCallback
the LTE phy receive PSS callback
interface for antenna radiation pattern models
Simulation virtual time values and global simulation resolution.
void SetComponentCarrierId(uint8_t componentCarrierId)
void SetTxModeGain(uint8_t txMode, double gain)
Set transmit mode gain function.
void StartRx(Ptr< SpectrumSignalParameters > params)
Notify the SpectrumPhy instance of an incoming signal.
std::list< Ptr< LteControlMessage > > m_rxControlMessageList
the receive control message list
void UpdateSinrPerceived(const SpectrumValue &sinr)
std::list< Ptr< PacketBurst > > m_rxPacketBurstList
the receive burst list
void AddCtrlSinrChunkProcessor(Ptr< LteChunkProcessor > p)
Ptr< AntennaModel > GetRxAntenna() const
Get the AntennaModel used by the NetDevice for reception.
int64_t AssignStreams(int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model.
void SetMobility(Ptr< MobilityModel > m)
Set the mobility model associated with this device.
bool harqFeedbackSent
is HARQ feedback sent
EventId m_endRxUlSrsEvent
end receive UL SRS event
TracedCallback< Ptr< const PacketBurst > > m_phyRxStartTrace
the phy receive start trace callback
Ptr< const SpectrumModel > m_rxSpectrumModel
the spectrum model
void EndRxUlSrs()
End receive UL SRS function.
TracedCallback< Ptr< const PacketBurst > > m_phyTxStartTrace
the phy transmit start trace callback
EventId m_endRxDlCtrlEvent
end receive DL control event
void EndTxDlCtrl()
End transmit DL control function.
bool StartTxDataFrame(Ptr< PacketBurst > pb, std::list< Ptr< LteControlMessage > > ctrlMsgList, Time duration)
Start a transmission of data frame in DL and UL.
Callback< void, DlInfoListElement_s > LtePhyDlHarqFeedbackCallback
This method is used by the LteSpectrumPhy to notify the PHY about the status of a certain DL HARQ pro...
EventId m_endTxEvent
end transmit event
Callback< void > LtePhyRxDataEndErrorCallback
This method is used by the LteSpectrumPhy to notify the PHY that a previously started RX attempt has ...
bool m_ctrlErrorModelEnabled
when true (default) the phy error model is enabled for DL ctrl frame
Ptr< NetDevice > GetDevice() const
Get the associated NetDevice instance.
uint8_t m_transmissionMode
for UEs: store the transmission mode
void Reset()
reset the internal state
TracedCallback< PhyReceptionStatParameters > m_ulPhyReception
Trace information regarding PHY stats from UL Rx perspective PhyReceptionStatParameters (see lte-comm...
bool m_dataErrorModelEnabled
when true (default) the phy error model is enabled
TracedCallback< Ptr< const Packet > > m_phyRxEndOkTrace
the phy receive end ok trace callback
uint8_t m_componentCarrierId
the component carrier ID
bool StartTxUlSrsFrame()
Start a transmission of control frame in UL.
uint16_t size
Transport block size.
The LteControlMessage provides a basic implementations for control messages (such as PDCCH allocation...
void EndRxDlCtrl()
End receive DL control function.
TracedCallback< Ptr< const PacketBurst > > m_phyTxEndTrace
the phy transmit end trace callback
void AddRsPowerChunkProcessor(Ptr< LteChunkProcessor > p)
Ptr< LteInterference > m_interferenceCtrl
the control interference
Ptr< NetDevice > m_device
the device
bool corrupt
whether is corrupt
LteNetDevice provides basic implementation for all LTE network devices.
uint8_t m_layersNum
layers num
uint8_t rv
Redundancy version.
void SetLtePhyRxCtrlEndErrorCallback(LtePhyRxCtrlEndErrorCallback c)
set the callback for the erroneous end of a RX ctrl frame, as part of the interconnections between th...
LtePhyRxDataEndOkCallback m_ltePhyRxDataEndOkCallback
the LTE phy receive data end ok callback
void SetTxPowerSpectralDensity(Ptr< SpectrumValue > txPsd)
set the Power Spectral Density of outgoing signals in W/Hz.
void SetLtePhyRxDataEndOkCallback(LtePhyRxDataEndOkCallback c)
set the callback for the successful end of a RX, as part of the interconnections between the PHY and ...
Forward calls to a chain of Callback.
EventId m_endRxDataEvent
end receive data event
Signal parameters for Lte SRS Frame.
void EndTxData()
End transmit data function.
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)
double mi
Mutual information.
Callback< void > LtePhyRxCtrlEndErrorCallback
This method is used by the LteSpectrumPhy to notify the PHY that a previously started RX of a control...
LtePhyDlHarqFeedbackCallback m_ltePhyDlHarqFeedbackCallback
the LTE phy DL HARQ feedback callback
Ptr< SpectrumChannel > GetChannel()
void StartRxUlSrs(Ptr< LteSpectrumSignalParametersUlSrsFrame > lteUlSrsRxParams)
Start receive UL SRS function.
void SetDevice(Ptr< NetDevice > d)
Set the associated NetDevice instance.
void SetState(State newState)
Set the state of the phy layer.
Ptr< MobilityModel > GetMobility() const
Get the associated MobilityModel instance.
void AddInterferenceCtrlChunkProcessor(Ptr< LteChunkProcessor > p)
LteChunkProcessor devoted to evaluate interference + noise power in control symbols of the subframe.