22 #include <ns3/waveform-generator.h> 23 #include <ns3/object-factory.h> 26 #include <ns3/simulator.h> 27 #include "ns3/spectrum-error-model.h" 45 : m_downlinkSpectrumPhy (dlPhy),
46 m_uplinkSpectrumPhy (ulPhy),
53 m_componentCarrierId(0)
151 uint16_t SrsPeriodicity[9] = {0, 2, 5, 10, 20, 40, 80, 160, 320};
152 uint16_t SrsCiLow[9] = {0, 0, 2, 7, 17, 37, 77, 157, 317};
153 uint16_t SrsCiHigh[9] = {0, 1, 6, 16, 36, 76, 156, 316, 636};
155 for (i = 8; i > 0; i --)
157 if ((srcCi>=SrsCiLow[i])&&(srcCi<=SrsCiHigh[i]))
162 return SrsPeriodicity[i];
169 uint16_t SrsSubframeOffset[9] = {0, 0, 2, 7, 17, 37, 77, 157, 317};
170 uint16_t SrsCiLow[9] = {0, 0, 2, 7, 17, 37, 77, 157, 317};
171 uint16_t SrsCiHigh[9] = {0, 1, 6, 16, 36, 76, 156, 316, 636};
173 for (i = 8; i > 0; i --)
175 if ((srcCi>=SrsCiLow[i])&&(srcCi<=SrsCiHigh[i]))
180 return (srcCi - SrsSubframeOffset[i]);
222 std::list<Ptr<LteControlMessage> >
230 std::list<Ptr<LteControlMessage> > newlist;
237 std::list<Ptr<LteControlMessage> > newlist;
239 std::list<Ptr<LteControlMessage> > emptylist;
void SetDevice(Ptr< LteNetDevice > d)
Set the device where the phy layer is attached.
static TypeId GetTypeId(void)
Get the type ID.
Smart pointer class similar to boost::intrusive_ptr.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
void DoSetCellId(uint16_t cellId)
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
uint8_t m_componentCarrierId
component carrier Id used to address sap
std::vector< Ptr< PacketBurst > > m_packetBurstQueue
A queue of packet bursts to be sent.
void SetComponentCarrierId(uint8_t index)
Set the component carrier ID.
double m_tti
Transmission time interval.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Ptr< LteSpectrumPhy > m_downlinkSpectrumPhy
The downlink LteSpectrumPhy associated to this LtePhy.
void SetUplinkChannel(Ptr< SpectrumChannel > c)
Set the uplink channel.
Ptr< LteSpectrumPhy > GetUplinkSpectrumPhy()
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
virtual void DoDispose(void)
Destructor implementation.
uint16_t GetSrsPeriodicity(uint16_t srcCi) const
double GetTti(void) const
uint8_t GetRbgSize(void) const
void DoDispose()
Destructor implementation.
void SetDownlinkChannel(Ptr< SpectrumChannel > c)
Set the downlink channel.
uint16_t GetSrsSubframeOffset(uint16_t srcCi) const
Ptr< LteSpectrumPhy > GetDownlinkSpectrumPhy()
Every class exported by the ns3 library is enclosed in the ns3 namespace.
void SetControlMessages(Ptr< LteControlMessage > m)
Ptr< LteNetDevice > GetDevice() const
Get the device where the phy layer is attached.
uint16_t m_cellId
Cell identifier.
uint8_t GetComponentCarrierId()
Get the component carrier ID.
Ptr< LteNetDevice > m_netDevice
Pointer to the NetDevice where this PHY layer is attached.
std::list< Ptr< LteControlMessage > > GetControlMessages(void)
Ptr< PacketBurst > GetPacketBurst(void)
uint8_t m_rbgSize
The RB group size according to the bandwidth.
std::vector< std::list< Ptr< LteControlMessage > > > m_controlMessagesQueue
A queue of control messages to be sent.
A base class which provides memory management and object aggregation.
Ptr< LteSpectrumPhy > m_uplinkSpectrumPhy
The uplink LteSpectrumPhy associated to this LtePhy.
void SetMacPdu(Ptr< Packet > p)
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.