A Discrete-Event Network Simulator
API
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 (void)
 
virtual ~CcHelper (void)
 
ComponentCarrier DoCreateSingleCc (uint16_t ulBandwidth, uint16_t dlBandwidth, uint32_t ulEarfcn, uint32_t dlEarfcn, bool isPrimary)
 Create single CC. More...
 
virtual void DoDispose (void)
 Destructor implementation. More...
 
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. More...
 
uint16_t GetDlBandwidth ()
 Get DL bandwidth. More...
 
uint32_t GetDlEarfcn ()
 Get DL EARFCN. More...
 
uint16_t GetNumberOfComponentCarriers ()
 Get number of component carriers. More...
 
uint16_t GetUlBandwidth ()
 Get UL bandwidth. More...
 
uint32_t GetUlEarfcn ()
 Get UL EARFCN. More...
 
void SetCcAttribute (std::string n, const AttributeValue &v)
 Set an attribute for the Component Carrier to be created. More...
 
void SetDlBandwidth (uint16_t dlBandwidth)
 Set DL bandwidth. More...
 
void SetDlEarfcn (uint32_t dlEarfcn)
 Set DL EARFCN. More...
 
void SetNumberOfComponentCarriers (uint16_t nCc)
 Set number of CCs. More...
 
void SetUlBandwidth (uint16_t ulBandwidth)
 Set UL bandwidth. More...
 
void SetUlEarfcn (uint32_t ulEarfcn)
 Set UL EARFCN. More...
 
- Public Member Functions inherited from ns3::Object
 Object ()
 Constructor. More...
 
virtual ~Object ()
 Destructor. More...
 
void AggregateObject (Ptr< Object > other)
 Aggregate two Objects together. More...
 
void Dispose (void)
 Dispose of this Object. More...
 
AggregateIterator GetAggregateIterator (void) const
 Get an iterator to the Objects aggregated to this one. More...
 
virtual TypeId GetInstanceTypeId (void) const
 Get the most derived TypeId for this Object. More...
 
template<typename T >
Ptr< T > GetObject (void) const
 Get a pointer to the requested aggregated Object. More...
 
template<typename T >
Ptr< T > GetObject (TypeId tid) const
 Get a pointer to the requested aggregated Object by TypeId. More...
 
template<>
Ptr< ObjectGetObject () const
 Specialization of () for objects of type ns3::Object. More...
 
template<>
Ptr< ObjectGetObject (TypeId tid) const
 Specialization of (TypeId tid) for objects of type ns3::Object. More...
 
void Initialize (void)
 Invoke DoInitialize on all Objects aggregated to this one. More...
 
bool IsInitialized (void) const
 Check if the object has been initialized. More...
 
- Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
 SimpleRefCount ()
 Default constructor. More...
 
 SimpleRefCount (const SimpleRefCount &o)
 Copy constructor. More...
 
uint32_t GetReferenceCount (void) const
 Get the reference count of the object. More...
 
SimpleRefCountoperator= (const SimpleRefCount &o)
 Assignment operator. More...
 
void Ref (void) const
 Increment the reference count. More...
 
void Unref (void) const
 Decrement the reference count. More...
 
- Public Member Functions inherited from ns3::ObjectBase
virtual ~ObjectBase ()
 Virtual destructor. More...
 
void GetAttribute (std::string name, AttributeValue &value) const
 Get the value of an attribute, raising fatal errors if unsuccessful. More...
 
bool GetAttributeFailSafe (std::string name, AttributeValue &value) const
 Get the value of an attribute without raising erros. More...
 
void SetAttribute (std::string name, const AttributeValue &value)
 Set a single attribute, raising fatal errors if unsuccessful. More...
 
bool SetAttributeFailSafe (std::string name, const AttributeValue &value)
 Set a single attribute without raising errors. More...
 
bool TraceConnect (std::string name, std::string context, const CallbackBase &cb)
 Connect a TraceSource to a Callback with a context. More...
 
bool TraceConnectWithoutContext (std::string name, const CallbackBase &cb)
 Connect a TraceSource to a Callback without a context. More...
 
bool TraceDisconnect (std::string name, std::string context, const CallbackBase &cb)
 Disconnect from a TraceSource a Callback previously connected with a context. More...
 
bool TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb)
 Disconnect from a TraceSource a Callback previously connected without a context. More...
 

Static Public Member Functions

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

Protected Member Functions

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

Private Member Functions

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

Private Attributes

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

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

  • 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: construct write read
  • 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: construct write read
  • 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: construct write read
  • DlBandwidth: Set Dl Bandwidth for the first carrier component
    • Set with class: ns3::UintegerValue
    • Underlying type: uint16_t 0:100
    • Initial value: 25
    • Flags: construct write read
  • UlBandwidth: Set Dl Bandwidth for the first carrier component
    • Set with class: ns3::UintegerValue
    • Underlying type: uint16_t 0:100
    • Initial value: 25
    • Flags: construct write read

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 ( void  )

Definition at line 40 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 ( void  )
virtual

Definition at line 90 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 
)
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 221 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
isPrimaryture if primary
Returns
the component carrier

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

References CreateSingleCc().

+ Here is the call graph for this function:

◆ DoDispose()

void ns3::CcHelper::DoDispose ( void  )
virtual

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 96 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 ( void  )
protectedvirtual

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 47 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 172 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 ( )

Get DL bandwidth.

Returns
the DL bandwidth

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

References m_dlBandwidth.

◆ GetDlEarfcn()

uint32_t ns3::CcHelper::GetDlEarfcn ( )

Get DL EARFCN.

Returns
the DL EARFCN

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

References m_dlEarfcn.

◆ GetNumberOfComponentCarriers()

uint16_t ns3::CcHelper::GetNumberOfComponentCarriers ( )

Get number of component carriers.

Returns
the number of component carriers

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

References m_numberOfComponentCarriers.

◆ GetTypeId()

TypeId ns3::CcHelper::GetTypeId ( void  )
static

Register this type.

Returns
The object TypeId.

Definition at line 52 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 ( )

Get UL bandwidth.

Returns
the UL bandwidth

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

References m_ulBandwidth.

◆ GetUlEarfcn()

uint32_t ns3::CcHelper::GetUlEarfcn ( )

Get UL EARFCN.

Returns
the UL EARFCN

Definition at line 145 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 103 of file cc-helper.cc.

References m_ccFactory, sample-rng-plot::n, 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 128 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 122 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 110 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 134 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 116 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 185 of file cc-helper.h.

Referenced by CcHelper(), and SetCcAttribute().

◆ m_dlBandwidth

uint16_t ns3::CcHelper::m_dlBandwidth
private

Downlink Bandwidth.

Definition at line 189 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 188 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 191 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 190 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 187 of file cc-helper.h.

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


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