Creation and configuration of Component Carrier entities. More...
#include "cc-helper.h"
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, ComponentCarrier > | 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. | |
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< Object > | GetObject () 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< Object > | GetObject (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. | |
SimpleRefCount & | operator= (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 | |
Related Functions inherited from ns3::ObjectBase | |
static TypeId | GetObjectIid () |
Ensure the TypeId for ObjectBase gets fully configured to anchor the inheritance tree properly. | |
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:
This helper it is also used within the LteHelper in order to maintain backwards compatibility with previous user simulation script.
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.
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().
|
override |
Definition at line 91 of file cc-helper.cc.
References NS_LOG_FUNCTION.
|
private |
Create a single component carrier.
ulBandwidth | uplink bandwidth for the current CC |
dlBandwidth | downlink bandwidth for the current CC |
ulEarfcn | uplink EARFCN - not control on the validity at this point |
dlEarfcn | downlink EARFCN - not control on the validity at this point |
isPrimary | identify if this is the Primary Component Carrier (PCC) - only one PCC is allowed |
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().
ComponentCarrier ns3::CcHelper::DoCreateSingleCc | ( | uint16_t | ulBandwidth, |
uint16_t | dlBandwidth, | ||
uint32_t | ulEarfcn, | ||
uint32_t | dlEarfcn, | ||
bool | isPrimary | ||
) |
Create single CC.
ulBandwidth | the UL bandwidth |
dlBandwidth | the DL bandwidth |
ulEarfcn | the UL EARFCN |
dlEarfcn | the DL EARFCN |
isPrimary | true if primary |
Definition at line 171 of file cc-helper.cc.
References CreateSingleCc().
|
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.
|
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.
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.
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.
uint16_t ns3::CcHelper::GetDlBandwidth | ( | ) | const |
Get DL bandwidth.
Definition at line 159 of file cc-helper.cc.
References m_dlBandwidth.
uint32_t ns3::CcHelper::GetDlEarfcn | ( | ) | const |
Get DL EARFCN.
Definition at line 153 of file cc-helper.cc.
References m_dlEarfcn.
uint16_t ns3::CcHelper::GetNumberOfComponentCarriers | ( | ) | const |
Get number of component carriers.
Definition at line 141 of file cc-helper.cc.
References m_numberOfComponentCarriers.
|
static |
Register this type.
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().
uint16_t ns3::CcHelper::GetUlBandwidth | ( | ) | const |
Get UL bandwidth.
Definition at line 165 of file cc-helper.cc.
References m_ulBandwidth.
uint32_t ns3::CcHelper::GetUlEarfcn | ( | ) | const |
Get UL EARFCN.
Definition at line 147 of file cc-helper.cc.
References m_ulEarfcn.
void ns3::CcHelper::SetCcAttribute | ( | std::string | n, |
const AttributeValue & | v | ||
) |
Set an attribute for the Component Carrier to be created.
n | the name of the attribute. |
v | the value of the attribute |
Definition at line 104 of file cc-helper.cc.
References m_ccFactory, NS_LOG_FUNCTION, and ns3::ObjectFactory::Set().
void ns3::CcHelper::SetDlBandwidth | ( | uint16_t | dlBandwidth | ) |
Set DL bandwidth.
dlBandwidth | the DL bandwidth |
Definition at line 129 of file cc-helper.cc.
References m_dlBandwidth.
void ns3::CcHelper::SetDlEarfcn | ( | uint32_t | dlEarfcn | ) |
Set DL EARFCN.
dlEarfcn | the DL EARFCN |
Definition at line 123 of file cc-helper.cc.
References m_dlEarfcn.
void ns3::CcHelper::SetNumberOfComponentCarriers | ( | uint16_t | nCc | ) |
Set number of CCs.
nCc | the number of CCs |
Definition at line 111 of file cc-helper.cc.
References m_numberOfComponentCarriers.
void ns3::CcHelper::SetUlBandwidth | ( | uint16_t | ulBandwidth | ) |
Set UL bandwidth.
ulBandwidth | the UL bandwidth |
Definition at line 135 of file cc-helper.cc.
References m_ulBandwidth.
void ns3::CcHelper::SetUlEarfcn | ( | uint32_t | ulEarfcn | ) |
Set UL EARFCN.
ulEarfcn | the UL EARFCN |
Definition at line 117 of file cc-helper.cc.
References m_ulEarfcn.
|
private |
Factory for each Carrier Component.
Definition at line 194 of file cc-helper.h.
Referenced by CcHelper(), and SetCcAttribute().
|
private |
Downlink Bandwidth.
Definition at line 198 of file cc-helper.h.
Referenced by EquallySpacedCcs(), GetDlBandwidth(), GetTypeId(), and SetDlBandwidth().
|
private |
Downlink EARFCN.
Definition at line 197 of file cc-helper.h.
Referenced by CreateSingleCc(), EquallySpacedCcs(), GetDlEarfcn(), GetTypeId(), and SetDlEarfcn().
|
private |
Number of component carriers.
Definition at line 200 of file cc-helper.h.
Referenced by EquallySpacedCcs(), GetNumberOfComponentCarriers(), GetTypeId(), and SetNumberOfComponentCarriers().
|
private |
Uplink Bandwidth.
Definition at line 199 of file cc-helper.h.
Referenced by EquallySpacedCcs(), GetTypeId(), GetUlBandwidth(), and SetUlBandwidth().
|
private |
Uplink EARFCN.
Definition at line 196 of file cc-helper.h.
Referenced by CreateSingleCc(), EquallySpacedCcs(), GetTypeId(), GetUlEarfcn(), and SetUlEarfcn().