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.
 
- 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) 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.
 
virtual TypeId GetInstanceTypeId () const =0
 Get the most derived TypeId for this Object.
 
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 DoDispose ()
 Destructor implementation.
 
virtual void DoInitialize ()
 Initialize() implementation.
 
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.

Introspection did not find any typical Config paths.

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.


Attributes

  • DlBandwidth: Set Dl Bandwidth for the first carrier component
    • Set with class: ns3::UintegerValue
    • Underlying type: uint16_t 0:100
    • Initial value: 25
    • Flags: constructwriteread
  • DlEarfcn: Set Dl Channel [EARFCN] for the first carrier component
    • Set with class: ns3::UintegerValue
    • Underlying type: uint32_t 0:4294967295
    • Initial value: 0
    • Flags: constructwriteread
  • NumberOfComponentCarriers: Set the number of Component Carriers to setup per eNodeBCurrently the maximum Number of Component Carriers allowed is 2
    • Set with class: ns3::UintegerValue
    • Underlying type: uint16_t 1:2
    • Initial value: 1
    • Flags: constructwriteread
  • UlBandwidth: Set Dl Bandwidth for the first carrier component
    • Set with class: ns3::UintegerValue
    • Underlying type: uint16_t 0:100
    • Initial value: 25
    • Flags: constructwriteread
  • UlEarfcn: Set Ul Channel [EARFCN] for the first carrier component
    • Set with class: ns3::UintegerValue
    • Underlying type: uint32_t 0:4294967295
    • Initial value: 0
    • Flags: constructwriteread

No TraceSources are defined for this type.
Size of this type is 72 bytes (on a 64-bit architecture).

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

Constructor & Destructor Documentation

◆ CcHelper()

ns3::CcHelper::CcHelper ( )

Definition at line 42 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 91 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 230 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 171 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 97 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 49 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 181 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 159 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 153 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 141 of file cc-helper.cc.

References m_numberOfComponentCarriers.

◆ GetTypeId()

TypeId ns3::CcHelper::GetTypeId ( )
static

Register this type.

Returns
The object TypeId.

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

References m_dlBandwidth, m_dlEarfcn, m_numberOfComponentCarriers, m_ulBandwidth, m_ulEarfcn, ns3::MakeUintegerAccessor(), 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 165 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 147 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 104 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 129 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 123 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 111 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 135 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 117 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 194 of file cc-helper.h.

Referenced by CcHelper(), and SetCcAttribute().

◆ m_dlBandwidth

uint16_t ns3::CcHelper::m_dlBandwidth
private

Downlink Bandwidth.

Definition at line 198 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 197 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 200 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 199 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 196 of file cc-helper.h.

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


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