A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ns3::CcHelper Class Reference

Creation and configuration of Component Carrier entities. More...

#include "cc-helper.h"

+ Inheritance diagram for ns3::CcHelper:
+ Collaboration diagram for ns3::CcHelper:

Public Member Functions

 CcHelper ()
 
 ~CcHelper () override
 
ComponentCarrier DoCreateSingleCc (uint16_t ulBandwidth, uint16_t dlBandwidth, uint32_t ulEarfcn, uint32_t dlEarfcn, bool isPrimary)
 Create single CC.
 
void DoDispose () override
 Destructor implementation.
 
std::map< uint8_t, ComponentCarrierEquallySpacedCcs ()
 EquallySpacedCcs() create a valid std::map< uint8_t, Ptr<ComponentCarrier> > The Primary Component Carrier it is at the position 0 in the map The number of Component Carrier created depend on m_noOfCcs Currently it is limited to maximum 2 ComponentCarrier Since, only a LteEnbPhy object is available just symmetric Carrier Aggregation scheme are allowed, i.e.
 
uint16_t GetDlBandwidth () const
 Get DL bandwidth.
 
uint32_t GetDlEarfcn () const
 Get DL EARFCN.
 
uint16_t GetNumberOfComponentCarriers () const
 Get number of component carriers.
 
uint16_t GetUlBandwidth () const
 Get UL bandwidth.
 
uint32_t GetUlEarfcn () const
 Get UL EARFCN.
 
void SetCcAttribute (std::string n, const AttributeValue &v)
 Set an attribute for the Component Carrier to be created.
 
void SetDlBandwidth (uint16_t dlBandwidth)
 Set DL bandwidth.
 
void SetDlEarfcn (uint32_t dlEarfcn)
 Set DL EARFCN.
 
void SetNumberOfComponentCarriers (uint16_t nCc)
 Set number of CCs.
 
void SetUlBandwidth (uint16_t ulBandwidth)
 Set UL bandwidth.
 
void SetUlEarfcn (uint32_t ulEarfcn)
 Set UL EARFCN.
 
- Public Member Functions inherited from ns3::Object
 Object ()
 Constructor.
 
 ~Object () override
 Destructor.
 
void AggregateObject (Ptr< Object > other)
 Aggregate two Objects together.
 
void Dispose ()
 Dispose of this Object.
 
AggregateIterator GetAggregateIterator () const
 Get an iterator to the Objects aggregated to this one.
 
TypeId GetInstanceTypeId () const override
 Get the most derived TypeId for this Object.
 
template<typename T >
Ptr< T > GetObject () const
 Get a pointer to the requested aggregated Object.
 
template<>
Ptr< ObjectGetObject () const
 Specialization of () for objects of type ns3::Object.
 
template<typename T >
Ptr< T > GetObject (TypeId tid) const
 Get a pointer to the requested aggregated Object by TypeId.
 
template<>
Ptr< ObjectGetObject (TypeId tid) const
 Specialization of (TypeId tid) for objects of type ns3::Object.
 
void Initialize ()
 Invoke DoInitialize on all Objects aggregated to this one.
 
bool IsInitialized () const
 Check if the object has been initialized.
 
void UnidirectionalAggregateObject (Ptr< Object > other)
 Aggregate an Object to another Object.
 
- Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
 SimpleRefCount ()
 Default constructor.
 
 SimpleRefCount (const SimpleRefCount &o)
 Copy constructor.
 
uint32_t GetReferenceCount () const
 Get the reference count of the object.
 
SimpleRefCountoperator= (const SimpleRefCount &o)
 Assignment operator.
 
void Ref () const
 Increment the reference count.
 
void Unref () const
 Decrement the reference count.
 
- Public Member Functions inherited from ns3::ObjectBase
virtual ~ObjectBase ()
 Virtual destructor.
 
void GetAttribute (std::string name, AttributeValue &value, bool permissive=false) const
 Get the value of an attribute, raising fatal errors if unsuccessful.
 
bool GetAttributeFailSafe (std::string name, AttributeValue &value) const
 Get the value of an attribute without raising errors.
 
void SetAttribute (std::string name, const AttributeValue &value)
 Set a single attribute, raising fatal errors if unsuccessful.
 
bool SetAttributeFailSafe (std::string name, const AttributeValue &value)
 Set a single attribute without raising errors.
 
bool TraceConnect (std::string name, std::string context, const CallbackBase &cb)
 Connect a TraceSource to a Callback with a context.
 
bool TraceConnectWithoutContext (std::string name, const CallbackBase &cb)
 Connect a TraceSource to a Callback without a context.
 
bool TraceDisconnect (std::string name, std::string context, const CallbackBase &cb)
 Disconnect from a TraceSource a Callback previously connected with a context.
 
bool TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb)
 Disconnect from a TraceSource a Callback previously connected without a context.
 

Static Public Member Functions

static TypeId GetTypeId ()
 Register this type.
 
- Static Public Member Functions inherited from ns3::Object
static TypeId GetTypeId ()
 Register this type.
 
- Static Public Member Functions inherited from ns3::ObjectBase
static TypeId GetTypeId ()
 Get the type ID.
 

Protected Member Functions

void DoInitialize () override
 Initialize() implementation.
 
- Protected Member Functions inherited from ns3::Object
 Object (const Object &o)
 Copy an Object.
 
virtual void NotifyNewAggregate ()
 Notify all Objects aggregated to this one of a new Object being aggregated.
 
- Protected Member Functions inherited from ns3::ObjectBase
void ConstructSelf (const AttributeConstructionList &attributes)
 Complete construction of ObjectBase; invoked by derived classes.
 
virtual void NotifyConstructionCompleted ()
 Notifier called once the ObjectBase is fully constructed.
 

Private Member Functions

ComponentCarrier CreateSingleCc (uint16_t ulBandwidth, uint16_t dlBandwidth, uint32_t ulEarfcn, uint32_t dlEarfcn, bool isPrimary) const
 Create a single component carrier.
 

Private Attributes

ObjectFactory m_ccFactory
 Factory for each Carrier Component.
 
uint16_t m_dlBandwidth
 Downlink Bandwidth.
 
uint32_t m_dlEarfcn
 Downlink EARFCN.
 
uint16_t m_numberOfComponentCarriers
 Number of component carriers.
 
uint16_t m_ulBandwidth
 Uplink Bandwidth.
 
uint32_t m_ulEarfcn
 Uplink EARFCN.
 

Additional Inherited Members

Detailed Description

Creation and configuration of Component Carrier entities.

One CcHelper instance is typically enough for an LTE simulation. To create it:

Ptr<CcHelper> ccHelper = CreateObject<CcHelper> ();

The general responsibility of the helper is to create various Component Carrier objects and arrange them together to set the eNodeB. The overall arrangement would look like the following:

  • Ul Bandwidths
  • Dl Bandwidths
  • Ul Earfcn
  • Dl Earfcn

This helper it is also used within the LteHelper in order to maintain backwards compatibility with previous user simulation script.

Definition at line 46 of file cc-helper.h.

Constructor & Destructor Documentation

◆ CcHelper()

ns3::CcHelper::CcHelper ( )

Definition at line 31 of file cc-helper.cc.

References ns3::ComponentCarrier::GetTypeId(), m_ccFactory, NS_LOG_FUNCTION, and ns3::ObjectFactory::SetTypeId().

+ Here is the call graph for this function:

◆ ~CcHelper()

ns3::CcHelper::~CcHelper ( )
override

Definition at line 80 of file cc-helper.cc.

References NS_LOG_FUNCTION.

Member Function Documentation

◆ CreateSingleCc()

ComponentCarrier ns3::CcHelper::CreateSingleCc ( uint16_t ulBandwidth,
uint16_t dlBandwidth,
uint32_t ulEarfcn,
uint32_t dlEarfcn,
bool isPrimary ) const
private

Create a single component carrier.

Parameters
ulBandwidthuplink bandwidth for the current CC
dlBandwidthdownlink bandwidth for the current CC
ulEarfcnuplink EARFCN - not control on the validity at this point
dlEarfcndownlink EARFCN - not control on the validity at this point
isPrimaryidentify if this is the Primary Component Carrier (PCC) - only one PCC is allowed
Returns
the component carrier

Definition at line 219 of file cc-helper.cc.

References ns3::ComponentCarrier::GetDlEarfcn(), ns3::ComponentCarrier::GetUlEarfcn(), m_dlEarfcn, m_ulEarfcn, ns3::ComponentCarrier::SetAsPrimary(), ns3::ComponentCarrier::SetDlBandwidth(), ns3::ComponentCarrier::SetDlEarfcn(), ns3::ComponentCarrier::SetUlBandwidth(), and ns3::ComponentCarrier::SetUlEarfcn().

Referenced by DoCreateSingleCc(), and EquallySpacedCcs().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DoCreateSingleCc()

ComponentCarrier ns3::CcHelper::DoCreateSingleCc ( uint16_t ulBandwidth,
uint16_t dlBandwidth,
uint32_t ulEarfcn,
uint32_t dlEarfcn,
bool isPrimary )

Create single CC.

Parameters
ulBandwidththe UL bandwidth
dlBandwidththe DL bandwidth
ulEarfcnthe UL EARFCN
dlEarfcnthe DL EARFCN
isPrimarytrue if primary
Returns
the component carrier

Definition at line 160 of file cc-helper.cc.

References CreateSingleCc().

+ Here is the call graph for this function:

◆ DoDispose()

void ns3::CcHelper::DoDispose ( )
overridevirtual

Destructor implementation.

This method is called by Dispose() or by the Object's destructor, whichever comes first.

Subclasses are expected to implement their real destruction code in an overridden 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 86 of file cc-helper.cc.

References ns3::Object::DoDispose(), and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

◆ DoInitialize()

void ns3::CcHelper::DoInitialize ( )
overrideprotectedvirtual

Initialize() implementation.

This method is called only once by Initialize(). If the user calls Initialize() multiple times, DoInitialize() is called only the first time.

Subclasses are expected to override this method and chain up to their parent's implementation once they are done. It is safe to call GetObject() and AggregateObject() from within this method.

Reimplemented from ns3::Object.

Definition at line 38 of file cc-helper.cc.

References NS_LOG_FUNCTION.

◆ EquallySpacedCcs()

std::map< uint8_t, ComponentCarrier > ns3::CcHelper::EquallySpacedCcs ( )

EquallySpacedCcs() create a valid std::map< uint8_t, Ptr<ComponentCarrier> > The Primary Component Carrier it is at the position 0 in the map The number of Component Carrier created depend on m_noOfCcs Currently it is limited to maximum 2 ComponentCarrier Since, only a LteEnbPhy object is available just symmetric Carrier Aggregation scheme are allowed, i.e.

2 Uplink Component Carrier and 2 Downlink Component Carrier Using this method, each CC will have the same characteristics (bandwidth) while they are spaced by exactly the bandwidth. Hence, using this method, you will create a intra-channel Carrier Aggregation scheme.

Returns
std::map< uint8_t, Ptr<ComponentCarrier> >

Definition at line 170 of file cc-helper.cc.

References CreateSingleCc(), ns3::LteSpectrumValueHelper::GetChannelBandwidth(), ns3::LteSpectrumValueHelper::GetDownlinkCarrierBand(), ns3::LteSpectrumValueHelper::GetUplinkCarrierBand(), m_dlBandwidth, m_dlEarfcn, m_numberOfComponentCarriers, m_ulBandwidth, m_ulEarfcn, NS_FATAL_ERROR, and NS_LOG_INFO.

+ Here is the call graph for this function:

◆ GetDlBandwidth()

uint16_t ns3::CcHelper::GetDlBandwidth ( ) const

Get DL bandwidth.

Returns
the DL bandwidth

Definition at line 148 of file cc-helper.cc.

References m_dlBandwidth.

◆ GetDlEarfcn()

uint32_t ns3::CcHelper::GetDlEarfcn ( ) const

Get DL EARFCN.

Returns
the DL EARFCN

Definition at line 142 of file cc-helper.cc.

References m_dlEarfcn.

◆ GetNumberOfComponentCarriers()

uint16_t ns3::CcHelper::GetNumberOfComponentCarriers ( ) const

Get number of component carriers.

Returns
the number of component carriers

Definition at line 130 of file cc-helper.cc.

References m_numberOfComponentCarriers.

◆ GetTypeId()

TypeId ns3::CcHelper::GetTypeId ( )
static

Register this type.

Returns
The object TypeId.

Definition at line 44 of file cc-helper.cc.

References m_dlBandwidth, m_dlEarfcn, m_numberOfComponentCarriers, m_ulBandwidth, m_ulEarfcn, ns3::MakeUintegerAccessor(), ns3::MakeUintegerChecker(), MAX_CC, MIN_CC, and ns3::TypeId::SetParent().

+ Here is the call graph for this function:

◆ GetUlBandwidth()

uint16_t ns3::CcHelper::GetUlBandwidth ( ) const

Get UL bandwidth.

Returns
the UL bandwidth

Definition at line 154 of file cc-helper.cc.

References m_ulBandwidth.

◆ GetUlEarfcn()

uint32_t ns3::CcHelper::GetUlEarfcn ( ) const

Get UL EARFCN.

Returns
the UL EARFCN

Definition at line 136 of file cc-helper.cc.

References m_ulEarfcn.

◆ SetCcAttribute()

void ns3::CcHelper::SetCcAttribute ( std::string n,
const AttributeValue & v )

Set an attribute for the Component Carrier to be created.

Parameters
nthe name of the attribute.
vthe value of the attribute

Definition at line 93 of file cc-helper.cc.

References m_ccFactory, NS_LOG_FUNCTION, and ns3::ObjectFactory::Set().

+ Here is the call graph for this function:

◆ SetDlBandwidth()

void ns3::CcHelper::SetDlBandwidth ( uint16_t dlBandwidth)

Set DL bandwidth.

Parameters
dlBandwidththe DL bandwidth

Definition at line 118 of file cc-helper.cc.

References m_dlBandwidth.

◆ SetDlEarfcn()

void ns3::CcHelper::SetDlEarfcn ( uint32_t dlEarfcn)

Set DL EARFCN.

Parameters
dlEarfcnthe DL EARFCN

Definition at line 112 of file cc-helper.cc.

References m_dlEarfcn.

◆ SetNumberOfComponentCarriers()

void ns3::CcHelper::SetNumberOfComponentCarriers ( uint16_t nCc)

Set number of CCs.

Parameters
nCcthe number of CCs

Definition at line 100 of file cc-helper.cc.

References m_numberOfComponentCarriers.

◆ SetUlBandwidth()

void ns3::CcHelper::SetUlBandwidth ( uint16_t ulBandwidth)

Set UL bandwidth.

Parameters
ulBandwidththe UL bandwidth

Definition at line 124 of file cc-helper.cc.

References m_ulBandwidth.

◆ SetUlEarfcn()

void ns3::CcHelper::SetUlEarfcn ( uint32_t ulEarfcn)

Set UL EARFCN.

Parameters
ulEarfcnthe UL EARFCN

Definition at line 106 of file cc-helper.cc.

References m_ulEarfcn.

Member Data Documentation

◆ m_ccFactory

ObjectFactory ns3::CcHelper::m_ccFactory
private

Factory for each Carrier Component.

Definition at line 183 of file cc-helper.h.

Referenced by CcHelper(), and SetCcAttribute().

◆ m_dlBandwidth

uint16_t ns3::CcHelper::m_dlBandwidth
private

Downlink Bandwidth.

Definition at line 187 of file cc-helper.h.

Referenced by EquallySpacedCcs(), GetDlBandwidth(), GetTypeId(), and SetDlBandwidth().

◆ m_dlEarfcn

uint32_t ns3::CcHelper::m_dlEarfcn
private

Downlink EARFCN.

Definition at line 186 of file cc-helper.h.

Referenced by CreateSingleCc(), EquallySpacedCcs(), GetDlEarfcn(), GetTypeId(), and SetDlEarfcn().

◆ m_numberOfComponentCarriers

uint16_t ns3::CcHelper::m_numberOfComponentCarriers
private

Number of component carriers.

Definition at line 189 of file cc-helper.h.

Referenced by EquallySpacedCcs(), GetNumberOfComponentCarriers(), GetTypeId(), and SetNumberOfComponentCarriers().

◆ m_ulBandwidth

uint16_t ns3::CcHelper::m_ulBandwidth
private

Uplink Bandwidth.

Definition at line 188 of file cc-helper.h.

Referenced by EquallySpacedCcs(), GetTypeId(), GetUlBandwidth(), and SetUlBandwidth().

◆ m_ulEarfcn

uint32_t ns3::CcHelper::m_ulEarfcn
private

Uplink EARFCN.

Definition at line 185 of file cc-helper.h.

Referenced by CreateSingleCc(), EquallySpacedCcs(), GetTypeId(), GetUlEarfcn(), and SetUlEarfcn().


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