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