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>
54 TbId_t (
const uint16_t a,
const uint8_t b);
56 friend bool operator == (
const TbId_t &a,
const TbId_t &b);
57 friend bool operator < (
const TbId_t &a,
const TbId_t &b);
66 std::vector<int> rbBitmap;
67 uint8_t harqProcessId;
72 bool harqFeedbackSent;
75 typedef std::map<TbId_t, tbInfo_t> expectedTbs_t;
158 IDLE, TX, RX_DATA, RX_CTRL
162 static TypeId GetTypeId (
void);
357 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);
394 void ChangeState (
State newState);
400 void SetTxModeGain (uint8_t txMode,
double gain);
412 std::list<Ptr<PacketBurst> > m_rxPacketBurstList;
414 std::list<Ptr<LteControlMessage> > m_txControlMessageList;
415 std::list<Ptr<LteControlMessage> > m_rxControlMessageList;
420 Time m_firstRxDuration;
440 expectedTbs_t m_expectedTbs;
445 bool m_dataErrorModelEnabled;
446 bool m_ctrlErrorModelEnabled;
448 uint8_t m_transmissionMode;
450 std::vector <double> m_txModeGain;
void SetLtePhyTxEndCallback(LtePhyTxEndCallback c)
smart pointer class similar to boost::intrusive_ptr
void SetState(State newState)
Set the state of the phy layer.
forward calls to a chain of CallbackAn ns3::TracedCallback has almost exactly the same API as a norma...
void SetLtePhyRxDataEndErrorCallback(LtePhyRxDataEndErrorCallback c)
void SetTransmissionMode(uint8_t txMode)
Callback< void, UlInfoListElement_s > LtePhyUlHarqFeedbackCallback
Callback< void > LtePhyRxCtrlEndErrorCallback
Ptr< SpectrumChannel > GetChannel()
void SetNoisePowerSpectralDensity(Ptr< const SpectrumValue > noisePsd)
set the noise power spectral density
Ptr< UniformRandomVariable > m_random
Provides uniform random variables.
void SetDevice(Ptr< NetDevice > d)
Callback< void, std::list< Ptr< LteControlMessage > > > LtePhyRxCtrlEndOkCallback
void SetLtePhyUlHarqFeedbackCallback(LtePhyUlHarqFeedbackCallback c)
void SetLtePhyRxCtrlEndOkCallback(LtePhyRxCtrlEndOkCallback c)
void SetTxPowerSpectralDensity(Ptr< SpectrumValue > txPsd)
void SetLtePhyRxCtrlEndErrorCallback(LtePhyRxCtrlEndErrorCallback c)
bool StartTxDataFrame(Ptr< PacketBurst > pb, std::list< Ptr< LteControlMessage > > ctrlMsgList, Time duration)
int64_t AssignStreams(int64_t stream)
Ptr< NetDevice > GetDevice()
void SetAntenna(Ptr< AntennaModel > a)
void AddRsPowerChunkProcessor(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)
Ptr< const SpectrumModel > GetRxSpectrumModel() const
Ptr< AntennaModel > GetRxAntenna()
Ptr< MobilityModel > GetMobility()
bool StartTxDlCtrlFrame(std::list< Ptr< LteControlMessage > > ctrlMsgList)
void SetChannel(Ptr< SpectrumChannel > c)
TracedCallback< PhyReceptionStatParameters > m_ulPhyReception
void SetLtePhyDlHarqFeedbackCallback(LtePhyDlHarqFeedbackCallback c)
an identifier for simulation events.
void AddCtrlSinrChunkProcessor(Ptr< LteSinrChunkProcessor > p)
void AddDataSinrChunkProcessor(Ptr< LteSinrChunkProcessor > p)
Callback< void, DlInfoListElement_s > LtePhyDlHarqFeedbackCallback
void SetLtePhyRxDataEndOkCallback(LtePhyRxDataEndOkCallback c)
void SetMobility(Ptr< MobilityModel > m)
Callback< void, Ptr< Packet > > LtePhyRxDataEndOkCallback
void AddInterferenceChunkProcessor(Ptr< LteSinrChunkProcessor > p)
Callback< void, Ptr< const Packet > > LtePhyTxEndCallback
void StartRx(Ptr< SpectrumSignalParameters > params)
Set of values corresponding to a given SpectrumModel.
interface for antenna radiation pattern models
a unique identifier for an interface.
void UpdateSinrPerceived(const SpectrumValue &sinr)
void SetCellId(uint16_t cellId)
TracedCallback< PhyReceptionStatParameters > m_dlPhyReception
Callback< void > LtePhyRxDataEndErrorCallback