branch merge

This commit is contained in:
Natale Patriciello
2017-01-25 19:11:08 +01:00
8 changed files with 1391 additions and 1 deletions

View File

@@ -4,7 +4,6 @@ callback_classes = [
['bool', 'ns3::Ptr<ns3::NetDevice>', 'ns3::Ptr<ns3::Packet const>', 'unsigned short', 'ns3::Address const&', 'ns3::Address const&', 'ns3::NetDevice::PacketType', 'ns3::empty', 'ns3::empty', 'ns3::empty'],
['bool', 'ns3::Ptr<ns3::NetDevice>', 'ns3::Ptr<ns3::Packet const>', 'unsigned short', 'ns3::Address const&', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'],
['bool', 'ns3::Ptr<ns3::Packet>', 'ns3::Address const&', 'ns3::Address const&', 'unsigned short', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'],
['void', 'ns3::Ptr<ns3::NetDevice>', 'ns3::Ptr<ns3::Packet const>', 'unsigned short', 'ns3::Address const&', 'ns3::Address const&', 'ns3::NetDevice::PacketType', 'ns3::empty', 'ns3::empty', 'ns3::empty'],
['void', 'ns3::Ptr<ns3::Socket>', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'],
['void', 'ns3::Ptr<ns3::Socket>', 'unsigned int', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'],
['void', 'ns3::Ptr<ns3::Socket>', 'ns3::Address const&', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'],
@@ -13,5 +12,6 @@ callback_classes = [
['void', 'ns3::UlInfoListElement_s', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'],
['void', 'ns3::DlInfoListElement_s', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'],
['void', 'std::list<ns3::Ptr<ns3::LteControlMessage>, std::allocator<ns3::Ptr<ns3::LteControlMessage> > >', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'],
['void', 'ns3::Ptr<ns3::NetDevice>', 'ns3::Ptr<ns3::Packet const>', 'unsigned short', 'ns3::Address const&', 'ns3::Address const&', 'ns3::NetDevice::PacketType', 'ns3::empty', 'ns3::empty', 'ns3::empty'],
['unsigned char', 'ns3::Ptr<ns3::QueueItem>', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'],
]

View File

@@ -1004,6 +1004,8 @@ def register_types(module):
module.add_class('CallbackImplBase', import_from_module='ns.core', parent=root_module['ns3::SimpleRefCount< ns3::CallbackImplBase, ns3::empty, ns3::DefaultDeleter<ns3::CallbackImplBase> >'])
## callback.h (module 'core'): ns3::CallbackValue [class]
module.add_class('CallbackValue', import_from_module='ns.core', parent=root_module['ns3::AttributeValue'])
## cc-helper.h (module 'lte'): ns3::CcHelper [class]
module.add_class('CcHelper', parent=root_module['ns3::Object'])
## channel.h (module 'network'): ns3::Channel [class]
module.add_class('Channel', import_from_module='ns.network', parent=root_module['ns3::Object'])
## component-carrier.h (module 'lte'): ns3::ComponentCarrier [class]
@@ -1244,6 +1246,8 @@ def register_types(module):
module.add_class('NetDeviceQueueInterface', import_from_module='ns.network', parent=root_module['ns3::Object'])
## nix-vector.h (module 'network'): ns3::NixVector [class]
module.add_class('NixVector', import_from_module='ns.network', parent=root_module['ns3::SimpleRefCount< ns3::NixVector, ns3::empty, ns3::DefaultDeleter<ns3::NixVector> >'])
## no-op-component-carrier-manager.h (module 'lte'): ns3::NoOpComponentCarrierManager [class]
module.add_class('NoOpComponentCarrierManager', parent=root_module['ns3::LteEnbComponentCarrierManager'])
## no-op-handover-algorithm.h (module 'lte'): ns3::NoOpHandoverAlgorithm [class]
module.add_class('NoOpHandoverAlgorithm', parent=root_module['ns3::LteHandoverAlgorithm'])
## node.h (module 'network'): ns3::Node [class]
@@ -1288,6 +1292,8 @@ def register_types(module):
module.add_class('Rar', outer_class=root_module['ns3::RarLteControlMessage'])
## rem-spectrum-phy.h (module 'lte'): ns3::RemSpectrumPhy [class]
module.add_class('RemSpectrumPhy', parent=root_module['ns3::SpectrumPhy'])
## no-op-component-carrier-manager.h (module 'lte'): ns3::RrComponentCarrierManager [class]
module.add_class('RrComponentCarrierManager', parent=root_module['ns3::NoOpComponentCarrierManager'])
## rr-ff-mac-scheduler.h (module 'lte'): ns3::RrFfMacScheduler [class]
module.add_class('RrFfMacScheduler', parent=root_module['ns3::FfMacScheduler'])
## lte-rrc-header.h (module 'lte'): ns3::RrcAsn1Header [class]
@@ -1469,6 +1475,7 @@ def register_types(module):
module.add_container('std::vector< ns3::Ipv6Address >', 'ns3::Ipv6Address', container_type=u'vector')
module.add_container('std::vector< double >', 'double', container_type=u'vector')
module.add_container('ns3::Bands', 'ns3::BandInfo', container_type=u'vector')
module.add_container('std::map< unsigned char, ns3::Ptr< ns3::ComponentCarrier > >', ('unsigned char', 'ns3::Ptr< ns3::ComponentCarrier >'), container_type=u'map')
module.add_container('std::map< unsigned int, unsigned int >', ('unsigned int', 'unsigned int'), container_type=u'map')
module.add_container('std::map< unsigned char, ns3::Ptr< ns3::ComponentCarrierEnb > >', ('unsigned char', 'ns3::Ptr< ns3::ComponentCarrierEnb >'), container_type=u'map')
module.add_container('std::list< ns3::Ptr< ns3::LteControlMessage > >', 'ns3::Ptr< ns3::LteControlMessage >', container_type=u'list')
@@ -2116,6 +2123,7 @@ def register_methods(root_module):
register_Ns3CallbackChecker_methods(root_module, root_module['ns3::CallbackChecker'])
register_Ns3CallbackImplBase_methods(root_module, root_module['ns3::CallbackImplBase'])
register_Ns3CallbackValue_methods(root_module, root_module['ns3::CallbackValue'])
register_Ns3CcHelper_methods(root_module, root_module['ns3::CcHelper'])
register_Ns3Channel_methods(root_module, root_module['ns3::Channel'])
register_Ns3ComponentCarrier_methods(root_module, root_module['ns3::ComponentCarrier'])
register_Ns3ComponentCarrierEnb_methods(root_module, root_module['ns3::ComponentCarrierEnb'])
@@ -2224,6 +2232,7 @@ def register_methods(root_module):
register_Ns3NetDeviceQueue_methods(root_module, root_module['ns3::NetDeviceQueue'])
register_Ns3NetDeviceQueueInterface_methods(root_module, root_module['ns3::NetDeviceQueueInterface'])
register_Ns3NixVector_methods(root_module, root_module['ns3::NixVector'])
register_Ns3NoOpComponentCarrierManager_methods(root_module, root_module['ns3::NoOpComponentCarrierManager'])
register_Ns3NoOpHandoverAlgorithm_methods(root_module, root_module['ns3::NoOpHandoverAlgorithm'])
register_Ns3Node_methods(root_module, root_module['ns3::Node'])
register_Ns3NormalRandomVariable_methods(root_module, root_module['ns3::NormalRandomVariable'])
@@ -2245,6 +2254,7 @@ def register_methods(root_module):
register_Ns3RarLteControlMessage_methods(root_module, root_module['ns3::RarLteControlMessage'])
register_Ns3RarLteControlMessageRar_methods(root_module, root_module['ns3::RarLteControlMessage::Rar'])
register_Ns3RemSpectrumPhy_methods(root_module, root_module['ns3::RemSpectrumPhy'])
register_Ns3RrComponentCarrierManager_methods(root_module, root_module['ns3::RrComponentCarrierManager'])
register_Ns3RrFfMacScheduler_methods(root_module, root_module['ns3::RrFfMacScheduler'])
register_Ns3RrcAsn1Header_methods(root_module, root_module['ns3::RrcAsn1Header'])
register_Ns3RrcDlCcchMessage_methods(root_module, root_module['ns3::RrcDlCcchMessage'])
@@ -13279,6 +13289,80 @@ def register_Ns3CallbackValue_methods(root_module, cls):
[param('ns3::CallbackBase', 'base')])
return
def register_Ns3CcHelper_methods(root_module, cls):
## cc-helper.h (module 'lte'): ns3::CcHelper::CcHelper(ns3::CcHelper const & arg0) [copy constructor]
cls.add_constructor([param('ns3::CcHelper const &', 'arg0')])
## cc-helper.h (module 'lte'): ns3::CcHelper::CcHelper() [constructor]
cls.add_constructor([])
## cc-helper.h (module 'lte'): ns3::Ptr<ns3::ComponentCarrier> ns3::CcHelper::DoCreateSingleCc(uint16_t ulBandwidth, uint16_t dlBandwidth, uint32_t ulEarfcn, uint32_t dlEarfcn, bool isPrimary) [member function]
cls.add_method('DoCreateSingleCc',
'ns3::Ptr< ns3::ComponentCarrier >',
[param('uint16_t', 'ulBandwidth'), param('uint16_t', 'dlBandwidth'), param('uint32_t', 'ulEarfcn'), param('uint32_t', 'dlEarfcn'), param('bool', 'isPrimary')])
## cc-helper.h (module 'lte'): void ns3::CcHelper::DoDispose() [member function]
cls.add_method('DoDispose',
'void',
[],
is_virtual=True)
## cc-helper.h (module 'lte'): std::map<unsigned char,ns3::Ptr<ns3::ComponentCarrier>,std::less<unsigned char>,std::allocator<std::pair<const unsigned char, ns3::Ptr<ns3::ComponentCarrier> > > > ns3::CcHelper::EquallySpacedCcs() [member function]
cls.add_method('EquallySpacedCcs',
'std::map< unsigned char, ns3::Ptr< ns3::ComponentCarrier > >',
[])
## cc-helper.h (module 'lte'): uint16_t ns3::CcHelper::GetDlBandwidth() [member function]
cls.add_method('GetDlBandwidth',
'uint16_t',
[])
## cc-helper.h (module 'lte'): uint32_t ns3::CcHelper::GetDlEarfcn() [member function]
cls.add_method('GetDlEarfcn',
'uint32_t',
[])
## cc-helper.h (module 'lte'): uint16_t ns3::CcHelper::GetNumberOfComponentCarriers() [member function]
cls.add_method('GetNumberOfComponentCarriers',
'uint16_t',
[])
## cc-helper.h (module 'lte'): static ns3::TypeId ns3::CcHelper::GetTypeId() [member function]
cls.add_method('GetTypeId',
'ns3::TypeId',
[],
is_static=True)
## cc-helper.h (module 'lte'): uint16_t ns3::CcHelper::GetUlBandwidth() [member function]
cls.add_method('GetUlBandwidth',
'uint16_t',
[])
## cc-helper.h (module 'lte'): uint32_t ns3::CcHelper::GetUlEarfcn() [member function]
cls.add_method('GetUlEarfcn',
'uint32_t',
[])
## cc-helper.h (module 'lte'): void ns3::CcHelper::SetCcAttribute(std::string n, ns3::AttributeValue const & v) [member function]
cls.add_method('SetCcAttribute',
'void',
[param('std::string', 'n'), param('ns3::AttributeValue const &', 'v')])
## cc-helper.h (module 'lte'): void ns3::CcHelper::SetDlBandwidth(uint16_t dlBandwidth) [member function]
cls.add_method('SetDlBandwidth',
'void',
[param('uint16_t', 'dlBandwidth')])
## cc-helper.h (module 'lte'): void ns3::CcHelper::SetDlEarfcn(uint32_t dlEarfcn) [member function]
cls.add_method('SetDlEarfcn',
'void',
[param('uint32_t', 'dlEarfcn')])
## cc-helper.h (module 'lte'): void ns3::CcHelper::SetNumberOfComponentCarriers(uint16_t nCc) [member function]
cls.add_method('SetNumberOfComponentCarriers',
'void',
[param('uint16_t', 'nCc')])
## cc-helper.h (module 'lte'): void ns3::CcHelper::SetUlBandwidth(uint16_t ulBandwidth) [member function]
cls.add_method('SetUlBandwidth',
'void',
[param('uint16_t', 'ulBandwidth')])
## cc-helper.h (module 'lte'): void ns3::CcHelper::SetUlEarfcn(uint32_t ulEarfcn) [member function]
cls.add_method('SetUlEarfcn',
'void',
[param('uint32_t', 'ulEarfcn')])
## cc-helper.h (module 'lte'): void ns3::CcHelper::DoInitialize() [member function]
cls.add_method('DoInitialize',
'void',
[],
visibility='protected', is_virtual=True)
return
def register_Ns3Channel_methods(root_module, cls):
## channel.h (module 'network'): ns3::Channel::Channel(ns3::Channel const & arg0) [copy constructor]
cls.add_constructor([param('ns3::Channel const &', 'arg0')])
@@ -19326,6 +19410,98 @@ def register_Ns3NixVector_methods(root_module, cls):
is_const=True)
return
def register_Ns3NoOpComponentCarrierManager_methods(root_module, cls):
## no-op-component-carrier-manager.h (module 'lte'): ns3::NoOpComponentCarrierManager::NoOpComponentCarrierManager(ns3::NoOpComponentCarrierManager const & arg0) [copy constructor]
cls.add_constructor([param('ns3::NoOpComponentCarrierManager const &', 'arg0')])
## no-op-component-carrier-manager.h (module 'lte'): ns3::NoOpComponentCarrierManager::NoOpComponentCarrierManager() [constructor]
cls.add_constructor([])
## no-op-component-carrier-manager.h (module 'lte'): static ns3::TypeId ns3::NoOpComponentCarrierManager::GetTypeId() [member function]
cls.add_method('GetTypeId',
'ns3::TypeId',
[],
is_static=True)
## no-op-component-carrier-manager.h (module 'lte'): void ns3::NoOpComponentCarrierManager::DoAddLc(ns3::LteEnbCmacSapProvider::LcInfo lcInfo, ns3::LteMacSapUser * msu) [member function]
cls.add_method('DoAddLc',
'void',
[param('ns3::LteEnbCmacSapProvider::LcInfo', 'lcInfo'), param('ns3::LteMacSapUser *', 'msu')],
visibility='protected', is_virtual=True)
## no-op-component-carrier-manager.h (module 'lte'): void ns3::NoOpComponentCarrierManager::DoAddUe(uint16_t rnti, uint8_t state) [member function]
cls.add_method('DoAddUe',
'void',
[param('uint16_t', 'rnti'), param('uint8_t', 'state')],
visibility='protected', is_virtual=True)
## no-op-component-carrier-manager.h (module 'lte'): ns3::LteMacSapUser * ns3::NoOpComponentCarrierManager::DoConfigureSignalBearer(ns3::LteEnbCmacSapProvider::LcInfo lcinfo, ns3::LteMacSapUser * msu) [member function]
cls.add_method('DoConfigureSignalBearer',
'ns3::LteMacSapUser *',
[param('ns3::LteEnbCmacSapProvider::LcInfo', 'lcinfo'), param('ns3::LteMacSapUser *', 'msu')],
visibility='protected', is_virtual=True)
## no-op-component-carrier-manager.h (module 'lte'): void ns3::NoOpComponentCarrierManager::DoDispose() [member function]
cls.add_method('DoDispose',
'void',
[],
visibility='protected', is_virtual=True)
## no-op-component-carrier-manager.h (module 'lte'): void ns3::NoOpComponentCarrierManager::DoInitialize() [member function]
cls.add_method('DoInitialize',
'void',
[],
visibility='protected', is_virtual=True)
## no-op-component-carrier-manager.h (module 'lte'): void ns3::NoOpComponentCarrierManager::DoNotifyHarqDeliveryFailure() [member function]
cls.add_method('DoNotifyHarqDeliveryFailure',
'void',
[],
visibility='protected', is_virtual=True)
## no-op-component-carrier-manager.h (module 'lte'): void ns3::NoOpComponentCarrierManager::DoNotifyPrbOccupancy(double prbOccupancy, uint8_t componentCarrierId) [member function]
cls.add_method('DoNotifyPrbOccupancy',
'void',
[param('double', 'prbOccupancy'), param('uint8_t', 'componentCarrierId')],
visibility='protected', is_virtual=True)
## no-op-component-carrier-manager.h (module 'lte'): void ns3::NoOpComponentCarrierManager::DoNotifyTxOpportunity(uint32_t bytes, uint8_t layer, uint8_t harqId, uint8_t componentCarrierId, uint16_t rnti, uint8_t lcid) [member function]
cls.add_method('DoNotifyTxOpportunity',
'void',
[param('uint32_t', 'bytes'), param('uint8_t', 'layer'), param('uint8_t', 'harqId'), param('uint8_t', 'componentCarrierId'), param('uint16_t', 'rnti'), param('uint8_t', 'lcid')],
visibility='protected', is_virtual=True)
## no-op-component-carrier-manager.h (module 'lte'): void ns3::NoOpComponentCarrierManager::DoReceivePdu(ns3::Ptr<ns3::Packet> p, uint16_t rnti, uint8_t lcid) [member function]
cls.add_method('DoReceivePdu',
'void',
[param('ns3::Ptr< ns3::Packet >', 'p'), param('uint16_t', 'rnti'), param('uint8_t', 'lcid')],
visibility='protected', is_virtual=True)
## no-op-component-carrier-manager.h (module 'lte'): std::vector<unsigned short, std::allocator<unsigned short> > ns3::NoOpComponentCarrierManager::DoReleaseDataRadioBearer(uint16_t rnti, uint8_t lcid) [member function]
cls.add_method('DoReleaseDataRadioBearer',
'std::vector< unsigned short >',
[param('uint16_t', 'rnti'), param('uint8_t', 'lcid')],
visibility='protected', is_virtual=True)
## no-op-component-carrier-manager.h (module 'lte'): void ns3::NoOpComponentCarrierManager::DoRemoveUe(uint16_t rnti) [member function]
cls.add_method('DoRemoveUe',
'void',
[param('uint16_t', 'rnti')],
visibility='protected', is_virtual=True)
## no-op-component-carrier-manager.h (module 'lte'): void ns3::NoOpComponentCarrierManager::DoReportBufferStatus(ns3::LteMacSapProvider::ReportBufferStatusParameters params) [member function]
cls.add_method('DoReportBufferStatus',
'void',
[param('ns3::LteMacSapProvider::ReportBufferStatusParameters', 'params')],
visibility='protected', is_virtual=True)
## no-op-component-carrier-manager.h (module 'lte'): void ns3::NoOpComponentCarrierManager::DoReportUeMeas(uint16_t rnti, ns3::LteRrcSap::MeasResults measResults) [member function]
cls.add_method('DoReportUeMeas',
'void',
[param('uint16_t', 'rnti'), param('ns3::LteRrcSap::MeasResults', 'measResults')],
visibility='protected', is_virtual=True)
## no-op-component-carrier-manager.h (module 'lte'): std::vector<ns3::LteCcmRrcSapProvider::LcsConfig, std::allocator<ns3::LteCcmRrcSapProvider::LcsConfig> > ns3::NoOpComponentCarrierManager::DoSetupDataRadioBearer(ns3::EpsBearer bearer, uint8_t bearerId, uint16_t rnti, uint8_t lcid, uint8_t lcGroup, ns3::LteMacSapUser * msu) [member function]
cls.add_method('DoSetupDataRadioBearer',
'std::vector< ns3::LteCcmRrcSapProvider::LcsConfig >',
[param('ns3::EpsBearer', 'bearer'), param('uint8_t', 'bearerId'), param('uint16_t', 'rnti'), param('uint8_t', 'lcid'), param('uint8_t', 'lcGroup'), param('ns3::LteMacSapUser *', 'msu')],
visibility='protected', is_virtual=True)
## no-op-component-carrier-manager.h (module 'lte'): void ns3::NoOpComponentCarrierManager::DoTransmitPdu(ns3::LteMacSapProvider::TransmitPduParameters params) [member function]
cls.add_method('DoTransmitPdu',
'void',
[param('ns3::LteMacSapProvider::TransmitPduParameters', 'params')],
visibility='protected', is_virtual=True)
## no-op-component-carrier-manager.h (module 'lte'): void ns3::NoOpComponentCarrierManager::DoUlReceiveMacCe(ns3::MacCeListElement_s bsr, uint8_t componentCarrierId) [member function]
cls.add_method('DoUlReceiveMacCe',
'void',
[param('ns3::MacCeListElement_s', 'bsr'), param('uint8_t', 'componentCarrierId')],
visibility='protected', is_virtual=True)
return
def register_Ns3NoOpHandoverAlgorithm_methods(root_module, cls):
## no-op-handover-algorithm.h (module 'lte'): ns3::NoOpHandoverAlgorithm::NoOpHandoverAlgorithm(ns3::NoOpHandoverAlgorithm const & arg0) [copy constructor]
cls.add_constructor([param('ns3::NoOpHandoverAlgorithm const &', 'arg0')])
@@ -20430,6 +20606,28 @@ def register_Ns3RemSpectrumPhy_methods(root_module, cls):
[param('int32_t', 'rbId')])
return
def register_Ns3RrComponentCarrierManager_methods(root_module, cls):
## no-op-component-carrier-manager.h (module 'lte'): ns3::RrComponentCarrierManager::RrComponentCarrierManager(ns3::RrComponentCarrierManager const & arg0) [copy constructor]
cls.add_constructor([param('ns3::RrComponentCarrierManager const &', 'arg0')])
## no-op-component-carrier-manager.h (module 'lte'): ns3::RrComponentCarrierManager::RrComponentCarrierManager() [constructor]
cls.add_constructor([])
## no-op-component-carrier-manager.h (module 'lte'): static ns3::TypeId ns3::RrComponentCarrierManager::GetTypeId() [member function]
cls.add_method('GetTypeId',
'ns3::TypeId',
[],
is_static=True)
## no-op-component-carrier-manager.h (module 'lte'): void ns3::RrComponentCarrierManager::DoReportBufferStatus(ns3::LteMacSapProvider::ReportBufferStatusParameters params) [member function]
cls.add_method('DoReportBufferStatus',
'void',
[param('ns3::LteMacSapProvider::ReportBufferStatusParameters', 'params')],
visibility='protected', is_virtual=True)
## no-op-component-carrier-manager.h (module 'lte'): void ns3::RrComponentCarrierManager::DoUlReceiveMacCe(ns3::MacCeListElement_s bsr, uint8_t componentCarrierId) [member function]
cls.add_method('DoUlReceiveMacCe',
'void',
[param('ns3::MacCeListElement_s', 'bsr'), param('uint8_t', 'componentCarrierId')],
visibility='protected', is_virtual=True)
return
def register_Ns3RrFfMacScheduler_methods(root_module, cls):
## rr-ff-mac-scheduler.h (module 'lte'): ns3::RrFfMacScheduler::RrFfMacScheduler(ns3::RrFfMacScheduler const & arg0) [copy constructor]
cls.add_constructor([param('ns3::RrFfMacScheduler const &', 'arg0')])

View File

@@ -1004,6 +1004,8 @@ def register_types(module):
module.add_class('CallbackImplBase', import_from_module='ns.core', parent=root_module['ns3::SimpleRefCount< ns3::CallbackImplBase, ns3::empty, ns3::DefaultDeleter<ns3::CallbackImplBase> >'])
## callback.h (module 'core'): ns3::CallbackValue [class]
module.add_class('CallbackValue', import_from_module='ns.core', parent=root_module['ns3::AttributeValue'])
## cc-helper.h (module 'lte'): ns3::CcHelper [class]
module.add_class('CcHelper', parent=root_module['ns3::Object'])
## channel.h (module 'network'): ns3::Channel [class]
module.add_class('Channel', import_from_module='ns.network', parent=root_module['ns3::Object'])
## component-carrier.h (module 'lte'): ns3::ComponentCarrier [class]
@@ -1244,6 +1246,8 @@ def register_types(module):
module.add_class('NetDeviceQueueInterface', import_from_module='ns.network', parent=root_module['ns3::Object'])
## nix-vector.h (module 'network'): ns3::NixVector [class]
module.add_class('NixVector', import_from_module='ns.network', parent=root_module['ns3::SimpleRefCount< ns3::NixVector, ns3::empty, ns3::DefaultDeleter<ns3::NixVector> >'])
## no-op-component-carrier-manager.h (module 'lte'): ns3::NoOpComponentCarrierManager [class]
module.add_class('NoOpComponentCarrierManager', parent=root_module['ns3::LteEnbComponentCarrierManager'])
## no-op-handover-algorithm.h (module 'lte'): ns3::NoOpHandoverAlgorithm [class]
module.add_class('NoOpHandoverAlgorithm', parent=root_module['ns3::LteHandoverAlgorithm'])
## node.h (module 'network'): ns3::Node [class]
@@ -1288,6 +1292,8 @@ def register_types(module):
module.add_class('Rar', outer_class=root_module['ns3::RarLteControlMessage'])
## rem-spectrum-phy.h (module 'lte'): ns3::RemSpectrumPhy [class]
module.add_class('RemSpectrumPhy', parent=root_module['ns3::SpectrumPhy'])
## no-op-component-carrier-manager.h (module 'lte'): ns3::RrComponentCarrierManager [class]
module.add_class('RrComponentCarrierManager', parent=root_module['ns3::NoOpComponentCarrierManager'])
## rr-ff-mac-scheduler.h (module 'lte'): ns3::RrFfMacScheduler [class]
module.add_class('RrFfMacScheduler', parent=root_module['ns3::FfMacScheduler'])
## lte-rrc-header.h (module 'lte'): ns3::RrcAsn1Header [class]
@@ -1469,6 +1475,7 @@ def register_types(module):
module.add_container('std::vector< ns3::Ipv6Address >', 'ns3::Ipv6Address', container_type=u'vector')
module.add_container('std::vector< double >', 'double', container_type=u'vector')
module.add_container('ns3::Bands', 'ns3::BandInfo', container_type=u'vector')
module.add_container('std::map< unsigned char, ns3::Ptr< ns3::ComponentCarrier > >', ('unsigned char', 'ns3::Ptr< ns3::ComponentCarrier >'), container_type=u'map')
module.add_container('std::map< unsigned int, unsigned int >', ('unsigned int', 'unsigned int'), container_type=u'map')
module.add_container('std::map< unsigned char, ns3::Ptr< ns3::ComponentCarrierEnb > >', ('unsigned char', 'ns3::Ptr< ns3::ComponentCarrierEnb >'), container_type=u'map')
module.add_container('std::list< ns3::Ptr< ns3::LteControlMessage > >', 'ns3::Ptr< ns3::LteControlMessage >', container_type=u'list')
@@ -2116,6 +2123,7 @@ def register_methods(root_module):
register_Ns3CallbackChecker_methods(root_module, root_module['ns3::CallbackChecker'])
register_Ns3CallbackImplBase_methods(root_module, root_module['ns3::CallbackImplBase'])
register_Ns3CallbackValue_methods(root_module, root_module['ns3::CallbackValue'])
register_Ns3CcHelper_methods(root_module, root_module['ns3::CcHelper'])
register_Ns3Channel_methods(root_module, root_module['ns3::Channel'])
register_Ns3ComponentCarrier_methods(root_module, root_module['ns3::ComponentCarrier'])
register_Ns3ComponentCarrierEnb_methods(root_module, root_module['ns3::ComponentCarrierEnb'])
@@ -2224,6 +2232,7 @@ def register_methods(root_module):
register_Ns3NetDeviceQueue_methods(root_module, root_module['ns3::NetDeviceQueue'])
register_Ns3NetDeviceQueueInterface_methods(root_module, root_module['ns3::NetDeviceQueueInterface'])
register_Ns3NixVector_methods(root_module, root_module['ns3::NixVector'])
register_Ns3NoOpComponentCarrierManager_methods(root_module, root_module['ns3::NoOpComponentCarrierManager'])
register_Ns3NoOpHandoverAlgorithm_methods(root_module, root_module['ns3::NoOpHandoverAlgorithm'])
register_Ns3Node_methods(root_module, root_module['ns3::Node'])
register_Ns3NormalRandomVariable_methods(root_module, root_module['ns3::NormalRandomVariable'])
@@ -2245,6 +2254,7 @@ def register_methods(root_module):
register_Ns3RarLteControlMessage_methods(root_module, root_module['ns3::RarLteControlMessage'])
register_Ns3RarLteControlMessageRar_methods(root_module, root_module['ns3::RarLteControlMessage::Rar'])
register_Ns3RemSpectrumPhy_methods(root_module, root_module['ns3::RemSpectrumPhy'])
register_Ns3RrComponentCarrierManager_methods(root_module, root_module['ns3::RrComponentCarrierManager'])
register_Ns3RrFfMacScheduler_methods(root_module, root_module['ns3::RrFfMacScheduler'])
register_Ns3RrcAsn1Header_methods(root_module, root_module['ns3::RrcAsn1Header'])
register_Ns3RrcDlCcchMessage_methods(root_module, root_module['ns3::RrcDlCcchMessage'])
@@ -13279,6 +13289,80 @@ def register_Ns3CallbackValue_methods(root_module, cls):
[param('ns3::CallbackBase', 'base')])
return
def register_Ns3CcHelper_methods(root_module, cls):
## cc-helper.h (module 'lte'): ns3::CcHelper::CcHelper(ns3::CcHelper const & arg0) [copy constructor]
cls.add_constructor([param('ns3::CcHelper const &', 'arg0')])
## cc-helper.h (module 'lte'): ns3::CcHelper::CcHelper() [constructor]
cls.add_constructor([])
## cc-helper.h (module 'lte'): ns3::Ptr<ns3::ComponentCarrier> ns3::CcHelper::DoCreateSingleCc(uint16_t ulBandwidth, uint16_t dlBandwidth, uint32_t ulEarfcn, uint32_t dlEarfcn, bool isPrimary) [member function]
cls.add_method('DoCreateSingleCc',
'ns3::Ptr< ns3::ComponentCarrier >',
[param('uint16_t', 'ulBandwidth'), param('uint16_t', 'dlBandwidth'), param('uint32_t', 'ulEarfcn'), param('uint32_t', 'dlEarfcn'), param('bool', 'isPrimary')])
## cc-helper.h (module 'lte'): void ns3::CcHelper::DoDispose() [member function]
cls.add_method('DoDispose',
'void',
[],
is_virtual=True)
## cc-helper.h (module 'lte'): std::map<unsigned char,ns3::Ptr<ns3::ComponentCarrier>,std::less<unsigned char>,std::allocator<std::pair<const unsigned char, ns3::Ptr<ns3::ComponentCarrier> > > > ns3::CcHelper::EquallySpacedCcs() [member function]
cls.add_method('EquallySpacedCcs',
'std::map< unsigned char, ns3::Ptr< ns3::ComponentCarrier > >',
[])
## cc-helper.h (module 'lte'): uint16_t ns3::CcHelper::GetDlBandwidth() [member function]
cls.add_method('GetDlBandwidth',
'uint16_t',
[])
## cc-helper.h (module 'lte'): uint32_t ns3::CcHelper::GetDlEarfcn() [member function]
cls.add_method('GetDlEarfcn',
'uint32_t',
[])
## cc-helper.h (module 'lte'): uint16_t ns3::CcHelper::GetNumberOfComponentCarriers() [member function]
cls.add_method('GetNumberOfComponentCarriers',
'uint16_t',
[])
## cc-helper.h (module 'lte'): static ns3::TypeId ns3::CcHelper::GetTypeId() [member function]
cls.add_method('GetTypeId',
'ns3::TypeId',
[],
is_static=True)
## cc-helper.h (module 'lte'): uint16_t ns3::CcHelper::GetUlBandwidth() [member function]
cls.add_method('GetUlBandwidth',
'uint16_t',
[])
## cc-helper.h (module 'lte'): uint32_t ns3::CcHelper::GetUlEarfcn() [member function]
cls.add_method('GetUlEarfcn',
'uint32_t',
[])
## cc-helper.h (module 'lte'): void ns3::CcHelper::SetCcAttribute(std::string n, ns3::AttributeValue const & v) [member function]
cls.add_method('SetCcAttribute',
'void',
[param('std::string', 'n'), param('ns3::AttributeValue const &', 'v')])
## cc-helper.h (module 'lte'): void ns3::CcHelper::SetDlBandwidth(uint16_t dlBandwidth) [member function]
cls.add_method('SetDlBandwidth',
'void',
[param('uint16_t', 'dlBandwidth')])
## cc-helper.h (module 'lte'): void ns3::CcHelper::SetDlEarfcn(uint32_t dlEarfcn) [member function]
cls.add_method('SetDlEarfcn',
'void',
[param('uint32_t', 'dlEarfcn')])
## cc-helper.h (module 'lte'): void ns3::CcHelper::SetNumberOfComponentCarriers(uint16_t nCc) [member function]
cls.add_method('SetNumberOfComponentCarriers',
'void',
[param('uint16_t', 'nCc')])
## cc-helper.h (module 'lte'): void ns3::CcHelper::SetUlBandwidth(uint16_t ulBandwidth) [member function]
cls.add_method('SetUlBandwidth',
'void',
[param('uint16_t', 'ulBandwidth')])
## cc-helper.h (module 'lte'): void ns3::CcHelper::SetUlEarfcn(uint32_t ulEarfcn) [member function]
cls.add_method('SetUlEarfcn',
'void',
[param('uint32_t', 'ulEarfcn')])
## cc-helper.h (module 'lte'): void ns3::CcHelper::DoInitialize() [member function]
cls.add_method('DoInitialize',
'void',
[],
visibility='protected', is_virtual=True)
return
def register_Ns3Channel_methods(root_module, cls):
## channel.h (module 'network'): ns3::Channel::Channel(ns3::Channel const & arg0) [copy constructor]
cls.add_constructor([param('ns3::Channel const &', 'arg0')])
@@ -19326,6 +19410,98 @@ def register_Ns3NixVector_methods(root_module, cls):
is_const=True)
return
def register_Ns3NoOpComponentCarrierManager_methods(root_module, cls):
## no-op-component-carrier-manager.h (module 'lte'): ns3::NoOpComponentCarrierManager::NoOpComponentCarrierManager(ns3::NoOpComponentCarrierManager const & arg0) [copy constructor]
cls.add_constructor([param('ns3::NoOpComponentCarrierManager const &', 'arg0')])
## no-op-component-carrier-manager.h (module 'lte'): ns3::NoOpComponentCarrierManager::NoOpComponentCarrierManager() [constructor]
cls.add_constructor([])
## no-op-component-carrier-manager.h (module 'lte'): static ns3::TypeId ns3::NoOpComponentCarrierManager::GetTypeId() [member function]
cls.add_method('GetTypeId',
'ns3::TypeId',
[],
is_static=True)
## no-op-component-carrier-manager.h (module 'lte'): void ns3::NoOpComponentCarrierManager::DoAddLc(ns3::LteEnbCmacSapProvider::LcInfo lcInfo, ns3::LteMacSapUser * msu) [member function]
cls.add_method('DoAddLc',
'void',
[param('ns3::LteEnbCmacSapProvider::LcInfo', 'lcInfo'), param('ns3::LteMacSapUser *', 'msu')],
visibility='protected', is_virtual=True)
## no-op-component-carrier-manager.h (module 'lte'): void ns3::NoOpComponentCarrierManager::DoAddUe(uint16_t rnti, uint8_t state) [member function]
cls.add_method('DoAddUe',
'void',
[param('uint16_t', 'rnti'), param('uint8_t', 'state')],
visibility='protected', is_virtual=True)
## no-op-component-carrier-manager.h (module 'lte'): ns3::LteMacSapUser * ns3::NoOpComponentCarrierManager::DoConfigureSignalBearer(ns3::LteEnbCmacSapProvider::LcInfo lcinfo, ns3::LteMacSapUser * msu) [member function]
cls.add_method('DoConfigureSignalBearer',
'ns3::LteMacSapUser *',
[param('ns3::LteEnbCmacSapProvider::LcInfo', 'lcinfo'), param('ns3::LteMacSapUser *', 'msu')],
visibility='protected', is_virtual=True)
## no-op-component-carrier-manager.h (module 'lte'): void ns3::NoOpComponentCarrierManager::DoDispose() [member function]
cls.add_method('DoDispose',
'void',
[],
visibility='protected', is_virtual=True)
## no-op-component-carrier-manager.h (module 'lte'): void ns3::NoOpComponentCarrierManager::DoInitialize() [member function]
cls.add_method('DoInitialize',
'void',
[],
visibility='protected', is_virtual=True)
## no-op-component-carrier-manager.h (module 'lte'): void ns3::NoOpComponentCarrierManager::DoNotifyHarqDeliveryFailure() [member function]
cls.add_method('DoNotifyHarqDeliveryFailure',
'void',
[],
visibility='protected', is_virtual=True)
## no-op-component-carrier-manager.h (module 'lte'): void ns3::NoOpComponentCarrierManager::DoNotifyPrbOccupancy(double prbOccupancy, uint8_t componentCarrierId) [member function]
cls.add_method('DoNotifyPrbOccupancy',
'void',
[param('double', 'prbOccupancy'), param('uint8_t', 'componentCarrierId')],
visibility='protected', is_virtual=True)
## no-op-component-carrier-manager.h (module 'lte'): void ns3::NoOpComponentCarrierManager::DoNotifyTxOpportunity(uint32_t bytes, uint8_t layer, uint8_t harqId, uint8_t componentCarrierId, uint16_t rnti, uint8_t lcid) [member function]
cls.add_method('DoNotifyTxOpportunity',
'void',
[param('uint32_t', 'bytes'), param('uint8_t', 'layer'), param('uint8_t', 'harqId'), param('uint8_t', 'componentCarrierId'), param('uint16_t', 'rnti'), param('uint8_t', 'lcid')],
visibility='protected', is_virtual=True)
## no-op-component-carrier-manager.h (module 'lte'): void ns3::NoOpComponentCarrierManager::DoReceivePdu(ns3::Ptr<ns3::Packet> p, uint16_t rnti, uint8_t lcid) [member function]
cls.add_method('DoReceivePdu',
'void',
[param('ns3::Ptr< ns3::Packet >', 'p'), param('uint16_t', 'rnti'), param('uint8_t', 'lcid')],
visibility='protected', is_virtual=True)
## no-op-component-carrier-manager.h (module 'lte'): std::vector<unsigned short, std::allocator<unsigned short> > ns3::NoOpComponentCarrierManager::DoReleaseDataRadioBearer(uint16_t rnti, uint8_t lcid) [member function]
cls.add_method('DoReleaseDataRadioBearer',
'std::vector< unsigned short >',
[param('uint16_t', 'rnti'), param('uint8_t', 'lcid')],
visibility='protected', is_virtual=True)
## no-op-component-carrier-manager.h (module 'lte'): void ns3::NoOpComponentCarrierManager::DoRemoveUe(uint16_t rnti) [member function]
cls.add_method('DoRemoveUe',
'void',
[param('uint16_t', 'rnti')],
visibility='protected', is_virtual=True)
## no-op-component-carrier-manager.h (module 'lte'): void ns3::NoOpComponentCarrierManager::DoReportBufferStatus(ns3::LteMacSapProvider::ReportBufferStatusParameters params) [member function]
cls.add_method('DoReportBufferStatus',
'void',
[param('ns3::LteMacSapProvider::ReportBufferStatusParameters', 'params')],
visibility='protected', is_virtual=True)
## no-op-component-carrier-manager.h (module 'lte'): void ns3::NoOpComponentCarrierManager::DoReportUeMeas(uint16_t rnti, ns3::LteRrcSap::MeasResults measResults) [member function]
cls.add_method('DoReportUeMeas',
'void',
[param('uint16_t', 'rnti'), param('ns3::LteRrcSap::MeasResults', 'measResults')],
visibility='protected', is_virtual=True)
## no-op-component-carrier-manager.h (module 'lte'): std::vector<ns3::LteCcmRrcSapProvider::LcsConfig, std::allocator<ns3::LteCcmRrcSapProvider::LcsConfig> > ns3::NoOpComponentCarrierManager::DoSetupDataRadioBearer(ns3::EpsBearer bearer, uint8_t bearerId, uint16_t rnti, uint8_t lcid, uint8_t lcGroup, ns3::LteMacSapUser * msu) [member function]
cls.add_method('DoSetupDataRadioBearer',
'std::vector< ns3::LteCcmRrcSapProvider::LcsConfig >',
[param('ns3::EpsBearer', 'bearer'), param('uint8_t', 'bearerId'), param('uint16_t', 'rnti'), param('uint8_t', 'lcid'), param('uint8_t', 'lcGroup'), param('ns3::LteMacSapUser *', 'msu')],
visibility='protected', is_virtual=True)
## no-op-component-carrier-manager.h (module 'lte'): void ns3::NoOpComponentCarrierManager::DoTransmitPdu(ns3::LteMacSapProvider::TransmitPduParameters params) [member function]
cls.add_method('DoTransmitPdu',
'void',
[param('ns3::LteMacSapProvider::TransmitPduParameters', 'params')],
visibility='protected', is_virtual=True)
## no-op-component-carrier-manager.h (module 'lte'): void ns3::NoOpComponentCarrierManager::DoUlReceiveMacCe(ns3::MacCeListElement_s bsr, uint8_t componentCarrierId) [member function]
cls.add_method('DoUlReceiveMacCe',
'void',
[param('ns3::MacCeListElement_s', 'bsr'), param('uint8_t', 'componentCarrierId')],
visibility='protected', is_virtual=True)
return
def register_Ns3NoOpHandoverAlgorithm_methods(root_module, cls):
## no-op-handover-algorithm.h (module 'lte'): ns3::NoOpHandoverAlgorithm::NoOpHandoverAlgorithm(ns3::NoOpHandoverAlgorithm const & arg0) [copy constructor]
cls.add_constructor([param('ns3::NoOpHandoverAlgorithm const &', 'arg0')])
@@ -20430,6 +20606,28 @@ def register_Ns3RemSpectrumPhy_methods(root_module, cls):
[param('int32_t', 'rbId')])
return
def register_Ns3RrComponentCarrierManager_methods(root_module, cls):
## no-op-component-carrier-manager.h (module 'lte'): ns3::RrComponentCarrierManager::RrComponentCarrierManager(ns3::RrComponentCarrierManager const & arg0) [copy constructor]
cls.add_constructor([param('ns3::RrComponentCarrierManager const &', 'arg0')])
## no-op-component-carrier-manager.h (module 'lte'): ns3::RrComponentCarrierManager::RrComponentCarrierManager() [constructor]
cls.add_constructor([])
## no-op-component-carrier-manager.h (module 'lte'): static ns3::TypeId ns3::RrComponentCarrierManager::GetTypeId() [member function]
cls.add_method('GetTypeId',
'ns3::TypeId',
[],
is_static=True)
## no-op-component-carrier-manager.h (module 'lte'): void ns3::RrComponentCarrierManager::DoReportBufferStatus(ns3::LteMacSapProvider::ReportBufferStatusParameters params) [member function]
cls.add_method('DoReportBufferStatus',
'void',
[param('ns3::LteMacSapProvider::ReportBufferStatusParameters', 'params')],
visibility='protected', is_virtual=True)
## no-op-component-carrier-manager.h (module 'lte'): void ns3::RrComponentCarrierManager::DoUlReceiveMacCe(ns3::MacCeListElement_s bsr, uint8_t componentCarrierId) [member function]
cls.add_method('DoUlReceiveMacCe',
'void',
[param('ns3::MacCeListElement_s', 'bsr'), param('uint8_t', 'componentCarrierId')],
visibility='protected', is_virtual=True)
return
def register_Ns3RrFfMacScheduler_methods(root_module, cls):
## rr-ff-mac-scheduler.h (module 'lte'): ns3::RrFfMacScheduler::RrFfMacScheduler(ns3::RrFfMacScheduler const & arg0) [copy constructor]
cls.add_constructor([param('ns3::RrFfMacScheduler const &', 'arg0')])

224
src/lte/helper/cc-helper.cc Normal file
View File

@@ -0,0 +1,224 @@
/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2015 Danilo Abrignani
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation;
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Author: Danilo Abrignani <danilo.abrignani@unibo.it> (Carrier Aggregation - GSoC 2015)
*/
#include "cc-helper.h"
#include <ns3/component-carrier.h>
#include <ns3/string.h>
#include <ns3/log.h>
#include <ns3/abort.h>
#include <ns3/pointer.h>
#include <iostream>
#include <ns3/uinteger.h>
#define MIN_CC 1
#define MAX_CC 2
namespace ns3 {
NS_LOG_COMPONENT_DEFINE ("CcHelper");
NS_OBJECT_ENSURE_REGISTERED (CcHelper);
CcHelper::CcHelper (void)
{
NS_LOG_FUNCTION (this);
m_ccFactory.SetTypeId (ComponentCarrier::GetTypeId ());
}
void
CcHelper::DoInitialize (void)
{
NS_LOG_FUNCTION (this);
}
TypeId CcHelper::GetTypeId (void)
{
static TypeId
tid =
TypeId ("ns3::CcHelper")
.SetParent<Object> ()
.AddConstructor<CcHelper> ()
.AddAttribute ("NumberOfComponentCarriers",
"Set the number of Component Carriers to setup per eNodeB"
"Currently the maximum Number of Component Carriers allowed is 2",
UintegerValue (1),
MakeUintegerAccessor (&CcHelper::m_numberOfComponentCarriers),
MakeUintegerChecker<uint16_t> (MIN_CC, MAX_CC))
.AddAttribute ("UlFreq",
"Set Ul Channel [EARFCN] for the first carrier component",
UintegerValue (0),
MakeUintegerAccessor (&CcHelper::m_ulEarfcn),
MakeUintegerChecker<uint32_t> ())
.AddAttribute ("DlFreq",
"Set Dl Channel [EARFCN] for the first carrier component",
UintegerValue (0),
MakeUintegerAccessor (&CcHelper::m_dlEarfcn),
MakeUintegerChecker<uint32_t> (0))
.AddAttribute ("DlBandwidth",
"Set Dl Bandwidth for the first carrier component",
UintegerValue (25),
MakeUintegerAccessor (&CcHelper::m_dlBandwidth),
MakeUintegerChecker<uint16_t> (0,100))
.AddAttribute ("UlBandwidth",
"Set Dl Bandwidth for the first carrier component",
UintegerValue (25),
MakeUintegerAccessor (&CcHelper::m_ulBandwidth),
MakeUintegerChecker<uint16_t> (0,100))
;
return tid;
}
CcHelper::~CcHelper (void)
{
NS_LOG_FUNCTION (this);
}
void
CcHelper::DoDispose ()
{
NS_LOG_FUNCTION (this);
Object::DoDispose ();
}
void
CcHelper::SetCcAttribute (std::string n, const AttributeValue &v)
{
NS_LOG_FUNCTION (this << n);
m_ccFactory.Set (n, v);
}
void
CcHelper:: SetNumberOfComponentCarriers (uint16_t nCc)
{
m_numberOfComponentCarriers = nCc;
}
void
CcHelper::SetUlEarfcn (uint32_t ulEarfcn)
{
m_ulEarfcn = ulEarfcn;
}
void
CcHelper::SetDlEarfcn (uint32_t dlEarfcn)
{
m_dlEarfcn = dlEarfcn;
}
void
CcHelper::SetDlBandwidth (uint16_t dlBandwidth)
{
m_dlBandwidth = dlBandwidth;
}
void
CcHelper::SetUlBandwidth (uint16_t ulBandwidth)
{
m_ulBandwidth = ulBandwidth;
}
uint16_t
CcHelper::GetNumberOfComponentCarriers ()
{
return m_numberOfComponentCarriers;
}
uint32_t CcHelper::GetUlEarfcn ()
{
return m_ulEarfcn;
}
uint32_t CcHelper::GetDlEarfcn ()
{
return m_dlEarfcn;
}
uint16_t CcHelper::GetDlBandwidth ()
{
return m_dlBandwidth;
}
uint16_t CcHelper::GetUlBandwidth ()
{
return m_ulBandwidth;
}
Ptr<ComponentCarrier>
CcHelper::DoCreateSingleCc (uint16_t ulBandwidth, uint16_t dlBandwidth, uint32_t ulEarfcn, uint32_t dlEarfcn, bool isPrimary)
{
return CreateSingleCc (ulBandwidth, dlBandwidth, ulEarfcn, dlEarfcn, isPrimary);
}
std::map< uint8_t, Ptr<ComponentCarrier> >
CcHelper::EquallySpacedCcs ()
{
std::map< uint8_t, Ptr<ComponentCarrier> > ccmap;
for (uint32_t i = 0; i < m_numberOfComponentCarriers; i++)
{
bool pc =false;
uint32_t ul = m_ulEarfcn + i * m_ulBandwidth;
uint32_t dl = m_dlEarfcn + i * m_dlBandwidth;
if (i == 0)
{
pc = true;
}
Ptr<ComponentCarrier> cc = CreateSingleCc (m_ulBandwidth, m_dlBandwidth, ul, dl, pc);
ccmap.insert (std::pair<uint8_t,Ptr<ComponentCarrier> >(i, cc));
NS_LOG_INFO(" ulBandwidth:"<<m_ulBandwidth<<" , dlBandwidth: "<<m_dlBandwidth<<" , ul:"<<ul<<" , dl:"<<dl);
}
return ccmap;
}
Ptr<ComponentCarrier>
CcHelper::CreateSingleCc (uint16_t ulBandwidth, uint16_t dlBandwidth, uint32_t ulEarfcn, uint32_t dlEarfcn, bool isPrimary)
{
Ptr <ComponentCarrier> cc = CreateObject<ComponentCarrier> ();
if ( m_ulEarfcn != 0)
{
cc->SetUlEarfcn (ulEarfcn);
}
else
{
uint16_t ul = cc->GetUlEarfcn () + ulEarfcn;
cc->SetUlEarfcn (ul);
}
if ( m_dlEarfcn != 0)
{
cc->SetDlEarfcn (dlEarfcn);
}
else
{
uint16_t dl = cc->GetDlEarfcn () + dlEarfcn;
cc->SetDlEarfcn (dl);
}
cc->SetDlBandwidth (dlBandwidth);
cc->SetUlBandwidth (ulBandwidth);
cc->SetAsPrimary (isPrimary);
return cc;
}
} // namespace ns3

138
src/lte/helper/cc-helper.h Normal file
View File

@@ -0,0 +1,138 @@
/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2015 Danilo Abrignani
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation;
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Author: Danilo Abrignani <danilo.abrignani@unibo.it>
*/
#ifndef CC_HELPER_H
#define CC_HELPER_H
#include <ns3/config.h>
#include <ns3/simulator.h>
#include <ns3/names.h>
#include <ns3/net-device.h>
#include <ns3/net-device-container.h>
#include <ns3/node.h>
#include <ns3/node-container.h>
#include <ns3/component-carrier.h>
#include <map>
namespace ns3 {
/**
* \ingroup lte
*
* 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.
*/
class CcHelper : public Object
{
public:
CcHelper (void);
virtual ~CcHelper (void);
/**
* Register this type.
* \return The object TypeId.
*/
static TypeId GetTypeId (void);
virtual void DoDispose (void);
Ptr<ComponentCarrier> DoCreateSingleCc (uint16_t ulBandwidth, uint16_t dlBandwidth, uint32_t ulEarfcn, uint32_t dlEarfcn, bool isPrimary);
/**
* Set an attribute for the Component Carrier to be created.
*
* \param n the name of the attribute.
* \param v the value of the attribute
*/
void SetCcAttribute (std::string n, const AttributeValue &v);
/**
* 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.
*/
std::map< uint8_t, Ptr<ComponentCarrier> > EquallySpacedCcs ();
void SetNumberOfComponentCarriers (uint16_t nCc);
void SetUlEarfcn (uint32_t ulEarfcn);
void SetDlEarfcn (uint32_t dlEarfcn);
void SetDlBandwidth (uint16_t dlBandwidth);
void SetUlBandwidth (uint16_t ulBandwidth);
uint16_t GetNumberOfComponentCarriers ();
uint32_t GetUlEarfcn ();
uint32_t GetDlEarfcn ();
uint16_t GetDlBandwidth ();
uint16_t GetUlBandwidth ();
protected:
// inherited from Object
virtual void DoInitialize (void);
private:
/**
* Create an single component carrier map
* \param ulBw uplink bandwidth for the current CC
* \param dlBw downlink bandwidth for the current CC
* \param ulFreq uplink EARFCN - not control on the validity at this point
* \param dlFreq downlink EARFCN - not control on the validity at this point
* \param pc - this identify if this is the Primary Component Carrier (PCC) - only one PCC is allowed
* \return pointer to the created object
*/
Ptr<ComponentCarrier> CreateSingleCc (uint16_t ulBandwidth, uint16_t dlBandwidth, uint32_t ulEarfcn, uint32_t dlEarfcn, bool isPrimary);
/// Factory for each Carrier Component.
ObjectFactory m_ccFactory;
uint32_t m_ulEarfcn; /// Uplink EARFCN
uint32_t m_dlEarfcn; /// Downlink EARFCN
uint16_t m_dlBandwidth; /// Downlink Bandwidth
uint16_t m_ulBandwidth; /// Uplink Bandwidth
uint16_t m_numberOfComponentCarriers; /// Number of component carriers
}; // end of `class LteHelper`
} // namespace ns3
#endif // LTE_HELPER_H

View File

@@ -0,0 +1,515 @@
/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2015 Danilo Abrignani
* Copyright (c) 2016 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation;
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Authors: Danilo Abrignani <danilo.abrignani@unibo.it>
* Biljana Bojovic <biljana.bojovic@cttc.es>
*
*/
#include "no-op-component-carrier-manager.h"
#include <ns3/log.h>
#include <ns3/random-variable-stream.h>
namespace ns3 {
NS_LOG_COMPONENT_DEFINE ("NoOpComponentCarrierManager");
NS_OBJECT_ENSURE_REGISTERED (NoOpComponentCarrierManager);
NoOpComponentCarrierManager::NoOpComponentCarrierManager ()
{
NS_LOG_FUNCTION (this);
m_ccmRrcSapProvider = new MemberLteCcmRrcSapProvider<NoOpComponentCarrierManager> (this);
m_ccmMacSapUser = new MemberLteCcmMacSapUser<NoOpComponentCarrierManager> (this);
m_macSapProvider = new EnbMacMemberLteMacSapProvider <NoOpComponentCarrierManager> (this);
m_ccmRrcSapUser = 0;
}
NoOpComponentCarrierManager::~NoOpComponentCarrierManager ()
{
NS_LOG_FUNCTION (this);
}
void
NoOpComponentCarrierManager::DoDispose ()
{
NS_LOG_FUNCTION (this);
delete m_ccmRrcSapProvider;
delete m_ccmMacSapUser;
delete m_macSapProvider;
}
TypeId
NoOpComponentCarrierManager::GetTypeId ()
{
static TypeId tid = TypeId ("ns3::NoOpComponentCarrierManager")
.SetParent<LteEnbComponentCarrierManager> ()
.SetGroupName("Lte")
.AddConstructor<NoOpComponentCarrierManager> ()
;
return tid;
}
void
NoOpComponentCarrierManager::DoInitialize ()
{
NS_LOG_FUNCTION (this);
LteEnbComponentCarrierManager::DoInitialize ();
}
//////////////////////////////////////////////
// MAC SAP
/////////////////////////////////////////////
void
NoOpComponentCarrierManager::DoTransmitPdu (LteMacSapProvider::TransmitPduParameters params)
{
NS_LOG_FUNCTION (this);
std::map <uint8_t, LteMacSapProvider*>::iterator it = m_macSapProvidersMap.find (params.componentCarrierId);
NS_ASSERT_MSG (it != m_macSapProvidersMap.end (), "could not find Sap for ComponentCarrier " << params.componentCarrierId);
// with this algorithm all traffic is on Primary Carrier
it->second->TransmitPdu (params);
}
void
NoOpComponentCarrierManager::DoReportBufferStatus (LteMacSapProvider::ReportBufferStatusParameters params)
{
NS_LOG_FUNCTION (this);
std::map <uint8_t, LteMacSapProvider*>::iterator it = m_macSapProvidersMap.find (0);
NS_ASSERT_MSG (it != m_macSapProvidersMap.end (), "could not find Sap for ComponentCarrier ");
it->second->ReportBufferStatus (params);
}
void
NoOpComponentCarrierManager::DoNotifyTxOpportunity (uint32_t bytes, uint8_t layer, uint8_t harqId, uint8_t componentCarrierId, uint16_t rnti, uint8_t lcid)
{
NS_LOG_FUNCTION (this);
std::map <uint16_t, std::map<uint8_t, LteMacSapUser*> >::iterator rntiIt = m_ueAttached.find (rnti);
NS_ASSERT_MSG (rntiIt != m_ueAttached.end (), "could not find RNTI" << rnti);
std::map<uint8_t, LteMacSapUser*>::iterator lcidIt = rntiIt->second.find (lcid);
NS_ASSERT_MSG (lcidIt != rntiIt->second.end (), "could not find LCID " << (uint16_t) lcid);
NS_LOG_DEBUG (this << " rnti= " << rnti << " lcid= " << (uint32_t) lcid << " layer= " << (uint32_t)layer<<" ccId="<< (uint32_t)componentCarrierId);
(*lcidIt).second->NotifyTxOpportunity (bytes, layer, harqId, componentCarrierId, rnti, lcid);
}
void
NoOpComponentCarrierManager::DoReceivePdu (Ptr<Packet> p, uint16_t rnti, uint8_t lcid)
{
NS_LOG_FUNCTION (this);
std::map <uint16_t, std::map<uint8_t, LteMacSapUser*> >::iterator rntiIt = m_ueAttached.find (rnti);
NS_ASSERT_MSG (rntiIt != m_ueAttached.end (), "could not find RNTI" << rnti);
std::map<uint8_t, LteMacSapUser*>::iterator lcidIt = rntiIt->second.find (lcid);
if (lcidIt != rntiIt->second.end ())
{
(*lcidIt).second->ReceivePdu (p, rnti, lcid);
}
}
void
NoOpComponentCarrierManager::DoNotifyHarqDeliveryFailure ()
{
NS_LOG_FUNCTION (this);
}
void
NoOpComponentCarrierManager::DoReportUeMeas (uint16_t rnti,
LteRrcSap::MeasResults measResults)
{
NS_LOG_FUNCTION (this << rnti << (uint16_t) measResults.measId);
}
void
NoOpComponentCarrierManager::DoAddUe (uint16_t rnti, uint8_t state)
{
NS_LOG_FUNCTION (this << rnti << (uint16_t) state);
std::map<uint16_t, uint8_t>::iterator stateIt;
std::map<uint16_t, uint8_t>::iterator eccIt; // m_enabledComponentCarrier iterator
stateIt = m_ueState.find (rnti);
if (stateIt == m_ueState.end ())
{
// NS_ASSERT_MSG ((stateIt == m_ueState.end () && state == 3), " ERROR: Ue was not indexed and current state is CONNECTED_NORMALLY" << (uint16_t) state);
NS_LOG_DEBUG (this << " UE " << rnti << " was not found, now it is added in the map");
m_ueState.insert (std::pair<uint16_t, uint8_t> (rnti, state));
eccIt = m_enabledComponentCarrier.find (rnti);
//if ((state == 7 || state == 0) && eccIt == m_enabledComponentCarrier.end ())
if (eccIt == m_enabledComponentCarrier.end ())
{
// the Primary carrier (PC) is enabled by default
// on the PC the SRB0 and SRB1 are enabled when the Ue is connected
// these are hard-coded and the configuration not pass through the
// Component Carrier Manager which is responsible of configure
// only DataRadioBearer on the different Component Carrier
m_enabledComponentCarrier.insert (std::pair<uint16_t, uint8_t> (rnti, 1));
}
else
{
NS_FATAL_ERROR (this << " Ue " << rnti << " had Component Carrier enabled before join the network" << (uint16_t) state);
}
// preparing the rnti,lcid,LteMacSapUser map
std::map<uint8_t, LteMacSapUser*> empty;
std::pair <std::map <uint16_t, std::map<uint8_t, LteMacSapUser*> >::iterator, bool>
ret = m_ueAttached.insert (std::pair <uint16_t, std::map<uint8_t, LteMacSapUser*> >
(rnti, empty));
NS_LOG_DEBUG (this << "AddUe: UE Pointer LteMacSapUser Map " << rnti << " added " << (uint16_t) ret.second);
NS_ASSERT_MSG (ret.second, "element already present, RNTI already existed");
//add new rnti in the map
std::map<uint8_t, LteEnbCmacSapProvider::LcInfo> emptyA;
std::pair <std::map <uint16_t, std::map<uint8_t, LteEnbCmacSapProvider::LcInfo> >::iterator, bool>
retA = m_rlcLcInstantiated.insert (std::pair <uint16_t, std::map<uint8_t, LteEnbCmacSapProvider::LcInfo> >
(rnti, emptyA));
NS_ASSERT_MSG (retA.second, "element already present, RNTI already existed");
NS_LOG_DEBUG (this << "AddUe: UE " << rnti << " added " << (uint16_t) retA.second);
}
else
{
NS_LOG_DEBUG (this << " UE " << rnti << "found, updating the state from " << (uint16_t) stateIt->second << " to " << (uint16_t) state);
stateIt->second = state;
}
}
void
NoOpComponentCarrierManager::DoAddLc (LteEnbCmacSapProvider::LcInfo lcInfo, LteMacSapUser* msu)
{
NS_LOG_FUNCTION (this);
NS_ASSERT_MSG( m_rlcLcInstantiated.find(lcInfo.rnti) != m_rlcLcInstantiated.end(), "Adding lc for a user that was not yet added to component carrier manager list.");
m_rlcLcInstantiated.find(lcInfo.rnti)->second.insert(std::pair <uint8_t, LteEnbCmacSapProvider::LcInfo> (lcInfo.lcId, lcInfo));
}
void
NoOpComponentCarrierManager::DoRemoveUe (uint16_t rnti)
{
NS_LOG_FUNCTION (this);
std::map<uint16_t, uint8_t>::iterator stateIt;
std::map<uint16_t, uint8_t>::iterator eccIt; // m_enabledComponentCarrier iterator
stateIt = m_ueState.find (rnti);
eccIt = m_enabledComponentCarrier.find (rnti);
NS_ASSERT_MSG (stateIt != m_ueState.end (), "request to remove UE info with unknown rnti ");
NS_ASSERT_MSG (eccIt != m_enabledComponentCarrier.end (), "request to remove UE info with unknown rnti ");
}
std::vector<LteCcmRrcSapProvider::LcsConfig>
NoOpComponentCarrierManager::DoSetupDataRadioBearer (EpsBearer bearer, uint8_t bearerId, uint16_t rnti, uint8_t lcid, uint8_t lcGroup, LteMacSapUser *msu)
{
NS_LOG_FUNCTION (this << rnti);
std::map<uint16_t, uint8_t>::iterator eccIt; // m_enabledComponentCarrier iterator
eccIt = m_enabledComponentCarrier.find (rnti);
NS_ASSERT_MSG (eccIt != m_enabledComponentCarrier.end (), "SetupDataRadioBearer on unknown rnti ");
// enable by default all carriers
eccIt->second = m_noOfComponentCarriers;
std::vector<LteCcmRrcSapProvider::LcsConfig> res;
LteCcmRrcSapProvider::LcsConfig entry;
LteEnbCmacSapProvider::LcInfo lcinfo;
// NS_LOG_DEBUG (this << " componentCarrierEnabled " << (uint16_t) eccIt->second);
for (uint16_t ncc = 0; ncc < m_noOfComponentCarriers; ncc++)
{
// NS_LOG_DEBUG (this << " res size " << (uint16_t) res.size ());
LteEnbCmacSapProvider::LcInfo lci;
lci.rnti = rnti;
lci.lcId = lcid;
lci.lcGroup = lcGroup;
lci.qci = bearer.qci;
if (ncc == 0)
{
lci.isGbr = bearer.IsGbr ();
lci.mbrUl = bearer.gbrQosInfo.mbrUl;
lci.mbrDl = bearer.gbrQosInfo.mbrDl;
lci.gbrUl = bearer.gbrQosInfo.gbrUl;
lci.gbrDl = bearer.gbrQosInfo.gbrDl;
}
else
{
lci.isGbr = 0;
lci.mbrUl = 0;
lci.mbrDl = 0;
lci.gbrUl = 0;
lci.gbrDl = 0;
} // data flows only on PC
NS_LOG_DEBUG (this << " RNTI " << lci.rnti << "Lcid " << (uint16_t) lci.lcId << " lcGroup " << (uint16_t) lci.lcGroup);
entry.componentCarrierId = ncc;
entry.lc = lci;
entry.msu = m_ccmMacSapUser;
res.push_back (entry);
} // end for
// preparing the rnti,lcid,LcInfo map
std::map <uint16_t, std::map<uint8_t, LteEnbCmacSapProvider::LcInfo> >::iterator rntiIter = m_rlcLcInstantiated.find (rnti);
rntiIter = m_rlcLcInstantiated.begin ();
// while (rntiIter != m_rlcLcInstantiated.end ())
// {
// ++rntiIter;
// }
// if (rntiIt == m_rlcLcInstantiated.end ())
// {
// //add new rnti in the map
// std::map<uint8_t, LteEnbCmacSapProvider::LcInfo> empty;
// std::pair <std::map <uint16_t, std::map<uint8_t, LteEnbCmacSapProvider::LcInfo> >::iterator, bool>
// ret = m_rlcLcInstantiated.insert (std::pair <uint16_t, std::map<uint8_t, LteEnbCmacSapProvider::LcInfo> >
// (rnti, empty));
// NS_LOG_DEBUG (this << " UE " << rnti << " added " << (uint16_t) ret.second);
// }
std::map <uint16_t, std::map<uint8_t, LteMacSapUser*> >::iterator sapIt = m_ueAttached.find (rnti);
NS_ASSERT_MSG (sapIt != m_ueAttached.end (), "RNTI not found");
rntiIter = m_rlcLcInstantiated.find (rnti);
std::map<uint8_t, LteEnbCmacSapProvider::LcInfo>::iterator lcidIt = rntiIter->second.find (lcid);
//std::map<uint8_t, LteMacSapUser*>::iterator lcidIt = sapIt->second.find (lcinfo.lcId);
NS_ASSERT_MSG (rntiIter != m_rlcLcInstantiated.end (), "RNTI not found");
if (lcidIt == rntiIter->second.end ())
{
lcinfo.rnti = rnti;
lcinfo.lcId = lcid;
lcinfo.lcGroup = lcGroup;
lcinfo.qci = bearer.qci;
lcinfo.isGbr = bearer.IsGbr ();
lcinfo.mbrUl = bearer.gbrQosInfo.mbrUl;
lcinfo.mbrDl = bearer.gbrQosInfo.mbrDl;
lcinfo.gbrUl = bearer.gbrQosInfo.gbrUl;
lcinfo.gbrDl = bearer.gbrQosInfo.gbrDl;
rntiIter->second.insert (std::pair<uint8_t, LteEnbCmacSapProvider::LcInfo> (lcinfo.lcId, lcinfo));
sapIt->second.insert (std::pair<uint8_t, LteMacSapUser*> (lcinfo.lcId, msu));
}
else
{
NS_LOG_ERROR ("LC already exists");
}
return res;
}
std::vector<uint16_t>
NoOpComponentCarrierManager::DoReleaseDataRadioBearer (uint16_t rnti, uint8_t lcid)
{
NS_LOG_FUNCTION (this);
// here we receive directly the rnti and the lcid, instead of only drbid
// drbid are mapped as drbid = lcid + 2
std::map<uint16_t, uint8_t>::iterator eccIt; // m_enabledComponentCarrier iterator
eccIt= m_enabledComponentCarrier.find (rnti);
NS_ASSERT_MSG (eccIt != m_enabledComponentCarrier.end (), "request to Release Data Radio Bearer on Ue without Component Carrier Enabled");
std::map <uint16_t, std::map<uint8_t, LteEnbCmacSapProvider::LcInfo> >::iterator lcsIt;
lcsIt = m_rlcLcInstantiated.find (rnti);
NS_ASSERT_MSG (lcsIt != m_rlcLcInstantiated.end (), "request to Release Data Radio Bearer on Ue without Logical Channels enabled");
std::map<uint8_t, LteEnbCmacSapProvider::LcInfo>::iterator lcIt;
NS_LOG_DEBUG (this << " remove lcid " << (uint16_t) lcid << " for rnti " << rnti);
lcIt = lcsIt->second.find (lcid);
NS_ASSERT_MSG (lcIt != lcsIt->second.end (), " Logical Channel not found");
std::vector<uint16_t> res;
for (uint16_t i = 0; i < eccIt->second; i++)
{
res.insert (res.end (), i);
}
//Find user based on rnti and then erase lcid stored against the same
std::map <uint16_t, std::map<uint8_t, LteMacSapUser*> >::iterator rntiIt = m_ueAttached.find (rnti);
rntiIt->second.erase (lcid);
std::map <uint16_t, std::map<uint8_t, LteEnbCmacSapProvider::LcInfo> >::iterator rlcInstancesIt = m_rlcLcInstantiated.find (rnti);
std::map<uint8_t, LteEnbCmacSapProvider::LcInfo>::iterator rclLcIt;
lcIt = rlcInstancesIt->second.find (lcid);
NS_ASSERT_MSG (lcIt != lcsIt->second.end (), " Erasing: Logical Channel not found");
lcsIt->second.erase (lcid);
return res;
}
LteMacSapUser*
NoOpComponentCarrierManager::DoConfigureSignalBearer(LteEnbCmacSapProvider::LcInfo lcinfo, LteMacSapUser* msu)
{
NS_LOG_FUNCTION (this);
std::map <uint16_t, std::map<uint8_t, LteMacSapUser*> >::iterator itSapUserAtCcm;
itSapUserAtCcm = m_ueAttached.find (lcinfo.rnti);
NS_ASSERT_MSG (itSapUserAtCcm != m_ueAttached.end (), "request to Add a SignalBearer to unknown rnti");
std::map <uint16_t, std::map<uint8_t, LteMacSapUser*> >::iterator rntiIt = m_ueAttached.find (lcinfo.rnti);
NS_ASSERT_MSG (rntiIt != m_ueAttached.end (), "RNTI not found");
std::map<uint8_t, LteMacSapUser*>::iterator lcidIt = rntiIt->second.find (lcinfo.lcId);
if (lcidIt == rntiIt->second.end ())
{
rntiIt->second.insert (std::pair<uint8_t, LteMacSapUser*> (lcinfo.lcId, msu));
}
else
{
NS_LOG_ERROR ("LC already exists");
}
return m_ccmMacSapUser;
}
void
NoOpComponentCarrierManager::DoNotifyPrbOccupancy (double prbOccupancy, uint8_t componentCarrierId)
{
NS_LOG_FUNCTION (this);
NS_LOG_DEBUG ("Update PRB occupancy:"<<prbOccupancy<<" at carrier:"<< (uint32_t) componentCarrierId);
m_ccPrbOccupancy.insert(std::pair<uint8_t, double> (componentCarrierId, prbOccupancy));
}
void
NoOpComponentCarrierManager::DoUlReceiveMacCe (MacCeListElement_s bsr, uint8_t componentCarrierId)
{
NS_LOG_FUNCTION (this);
NS_ASSERT_MSG (componentCarrierId == 0, "Received BSR from a ComponentCarrier not allowed, ComponentCarrierId = " << componentCarrierId);
NS_ASSERT_MSG (bsr.m_macCeType == MacCeListElement_s::BSR, "Received a Control Message not allowed " << bsr.m_macCeType);
MacCeListElement_s newBsr;
if ( bsr.m_macCeType == MacCeListElement_s::BSR)
{
newBsr.m_rnti = bsr.m_rnti;
newBsr.m_macCeType = bsr.m_macCeType;
newBsr.m_macCeValue.m_phr = bsr.m_macCeValue.m_phr;
newBsr.m_macCeValue.m_crnti = bsr.m_macCeValue.m_crnti;
newBsr.m_macCeValue.m_bufferStatus.resize (4);
for (uint16_t i = 0; i < 4; i++)
{
uint8_t bsrId = bsr.m_macCeValue.m_bufferStatus.at (i);
uint32_t buffer = BufferSizeLevelBsr::BsrId2BufferSize (bsrId);
// here the buffer should be divide among the different sap
// since the buffer status report are compressed information
// it is needed to use BsrId2BufferSize to uncompress
// after the split over all component carriers is is needed to
// compress again the information to fit MacCeListEkement_s structure
// verify how many Component Carrier are enabled per UE
// in this simple code the BufferStatus will be notify only
// to the primary carrier component
newBsr.m_macCeValue.m_bufferStatus.at (i) = BufferSizeLevelBsr::BufferSize2BsrId (buffer);
}
}
std::map< uint8_t,LteCcmMacSapProvider*>::iterator sapIt = m_ccmMacSapProviderMap.find (0);
if (sapIt == m_ccmMacSapProviderMap.end ())
{
NS_FATAL_ERROR ("Sap not found in the CcmMacSapProviderMap");
}
else
{
// in the current implementation bsr in uplink is forwarded only to the primary carrier.
// above code demonstrates how to resize buffer status if more carriers are being used in future
sapIt->second->ReportMacCeToScheduler (newBsr);
}
}
//////////////////////////////////////////
NS_OBJECT_ENSURE_REGISTERED (RrComponentCarrierManager);
RrComponentCarrierManager::RrComponentCarrierManager ()
{
NS_LOG_FUNCTION (this);
}
RrComponentCarrierManager::~RrComponentCarrierManager ()
{
NS_LOG_FUNCTION (this);
}
TypeId
RrComponentCarrierManager::GetTypeId ()
{
static TypeId tid = TypeId ("ns3::RrComponentCarrierManager")
.SetParent<NoOpComponentCarrierManager> ()
.SetGroupName("Lte")
.AddConstructor<RrComponentCarrierManager> ()
;
return tid;
}
void
RrComponentCarrierManager::DoReportBufferStatus (LteMacSapProvider::ReportBufferStatusParameters params)
{
NS_LOG_FUNCTION (this);
NS_ASSERT_MSG( m_enabledComponentCarrier.find(params.rnti)!=m_enabledComponentCarrier.end(), " UE with provided RNTI not found. RNTI:"<<params.rnti);
if (params.lcid == 0 || params.lcid==1)
{
NS_LOG_INFO("Buffer status for lcId=0 and lcId=1 forwarded to the primary carrier.");
m_macSapProvidersMap.find(0)->second->ReportBufferStatus(params);
}
else
{
uint32_t numberOfCarriersForUe = m_enabledComponentCarrier.find(params.rnti)->second;
params.retxQueueSize /= numberOfCarriersForUe;
params.txQueueSize /= numberOfCarriersForUe;
for ( uint16_t i = 0; i < numberOfCarriersForUe ; i++)
{
NS_ASSERT_MSG (m_macSapProvidersMap.find(i)!=m_macSapProvidersMap.end(), "Mac sap provider does not exist.");
m_macSapProvidersMap.find(i)->second->ReportBufferStatus(params);
}
}
}
void
RrComponentCarrierManager::DoUlReceiveMacCe (MacCeListElement_s bsr, uint8_t componentCarrierId)
{
NS_LOG_FUNCTION (this);
NS_ASSERT_MSG (componentCarrierId == 0, "Received BSR from a ComponentCarrier not allowed, ComponentCarrierId = " << componentCarrierId);
NS_ASSERT_MSG (bsr.m_macCeType == MacCeListElement_s::BSR, "Received a Control Message not allowed " << bsr.m_macCeType);
// split traffic in uplink equally among carriers
uint32_t numberOfCarriersForUe = m_enabledComponentCarrier.find(bsr.m_rnti)->second;
if ( bsr.m_macCeType == MacCeListElement_s::BSR)
{
MacCeListElement_s newBsr;
newBsr.m_rnti = bsr.m_rnti;
// mac control element type, values can be BSR, PHR, CRNTI
newBsr.m_macCeType = bsr.m_macCeType;
// the power headroom, 64 means no valid phr is available
newBsr.m_macCeValue.m_phr = bsr.m_macCeValue.m_phr;
// indicates that the CRNTI MAC CE was received. The value is not used.
newBsr.m_macCeValue.m_crnti = bsr.m_macCeValue.m_crnti;
// and value 64 means that the buffer status should not be updated
newBsr.m_macCeValue.m_bufferStatus.resize (4);
// always all 4 LCGs are present see 6.1.3.1 of 3GPP TS 36.321.
for (uint16_t i = 0; i < 4; i++)
{
uint8_t bsrStatusId = bsr.m_macCeValue.m_bufferStatus.at (i);
uint32_t bufferSize = BufferSizeLevelBsr::BsrId2BufferSize (bsrStatusId);
// here the buffer should be divide among the different sap
// since the buffer status report are compressed information
// it is needed to use BsrId2BufferSize to uncompress
// after the split over all component carriers is is needed to
// compress again the information to fit MacCeListElement_s structure
// verify how many Component Carrier are enabled per UE
newBsr.m_macCeValue.m_bufferStatus.at(i) = BufferSizeLevelBsr::BufferSize2BsrId (bufferSize/numberOfCarriersForUe);
}
// notify MAC of each component carrier that is enabled for this UE
for ( uint16_t i = 0; i < numberOfCarriersForUe ; i++)
{
NS_ASSERT_MSG (m_ccmMacSapProviderMap.find(i)!=m_ccmMacSapProviderMap.end(), "Mac sap provider does not exist.");
m_ccmMacSapProviderMap.find(i)->second->ReportMacCeToScheduler(newBsr);
}
}
else
{
NS_ASSERT_MSG (m_ccmMacSapProviderMap[0], "Mac sap provider does not exist.");
m_ccmMacSapProviderMap[0]->ReportMacCeToScheduler(bsr);
}
}
} // end of namespace ns3

View File

@@ -0,0 +1,113 @@
/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2015 Danilo Abrignani
* Copyright (c) 2016 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation;
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Authors: Danilo Abrignani <danilo.abrignani@unibo.it>
* Biljana Bojovic <biljana.bojovic@cttc.es>
*/
#ifndef NO_OP_COMPONENT_CARRIER_MANAGER_H
#define NO_OP_COMPONENT_CARRIER_MANAGER_H
#include <ns3/lte-enb-component-carrier-manager.h>
#include <ns3/lte-ccm-rrc-sap.h>
#include <ns3/lte-rrc-sap.h>
#include <map>
namespace ns3 {
class UeManager;
class LteCcmRrcSapProvider;
/**
* \brief The default component carrier manager that forwards all traffic, the uplink and the downlink,
* over the primary carrier, and will not use secondary carriers. To enable carrier aggregation
* feature, select another component carrier manager class, i.e., some of child classes of
* LteEnbComponentCarrierManager of NoOpComponentCarrierManager.
*/
class NoOpComponentCarrierManager : public LteEnbComponentCarrierManager
{
friend class EnbMacMemberLteMacSapProvider<NoOpComponentCarrierManager>;
friend class MemberLteCcmRrcSapProvider<NoOpComponentCarrierManager>;
friend class MemberLteCcmRrcSapUser<NoOpComponentCarrierManager>;
friend class MemberLteCcmMacSapUser<NoOpComponentCarrierManager>;
public:
NoOpComponentCarrierManager ();
virtual ~NoOpComponentCarrierManager ();
// Inherited method
static TypeId GetTypeId ();
protected:
// Inherited methods
virtual void DoInitialize ();
virtual void DoDispose ();
virtual void DoReportUeMeas (uint16_t rnti, LteRrcSap::MeasResults measResults);
virtual void DoAddUe (uint16_t rnti, uint8_t state);
virtual void DoAddLc (LteEnbCmacSapProvider::LcInfo lcInfo, LteMacSapUser* msu);
virtual std::vector<LteCcmRrcSapProvider::LcsConfig> DoSetupDataRadioBearer (EpsBearer bearer, uint8_t bearerId, uint16_t rnti, uint8_t lcid, uint8_t lcGroup, LteMacSapUser* msu);
virtual void DoTransmitPdu (LteMacSapProvider::TransmitPduParameters params);
virtual void DoReportBufferStatus (LteMacSapProvider::ReportBufferStatusParameters params);
virtual void DoNotifyTxOpportunity (uint32_t bytes, uint8_t layer, uint8_t harqId, uint8_t componentCarrierId, uint16_t rnti, uint8_t lcid);
virtual void DoReceivePdu (Ptr<Packet> p, uint16_t rnti, uint8_t lcid);
virtual void DoNotifyHarqDeliveryFailure ();
virtual void DoRemoveUe (uint16_t rnti);
virtual std::vector<uint16_t> DoReleaseDataRadioBearer (uint16_t rnti, uint8_t lcid);
virtual LteMacSapUser* DoConfigureSignalBearer(LteEnbCmacSapProvider::LcInfo lcinfo, LteMacSapUser* msu);
/*
* \brief Forwards uplink BSR to CCM, called by MAC through CCM SAP interface..
*/
virtual void DoUlReceiveMacCe (MacCeListElement_s bsr, uint8_t componentCarrierId);
/*
* \brief Function implements the function of the SAP interface of CCM instance which is used by MAC
* to notify the PRB occupancy reported by scheduler.
*/
virtual void DoNotifyPrbOccupancy (double prbOccupancy, uint8_t componentCarrierId);
protected:
std::map <uint8_t, double > m_ccPrbOccupancy;//!< The physical resource block occupancy per carrier.
}; // end of class NoOpComponentCarrierManager
/*
* \brief Component carrier manager implementation that splits traffic equally among carriers.
*/
class RrComponentCarrierManager : public NoOpComponentCarrierManager
{
public:
RrComponentCarrierManager ();
virtual ~RrComponentCarrierManager ();
// Inherited method
static TypeId GetTypeId ();
protected:
// Inherited methods
virtual void DoReportBufferStatus (LteMacSapProvider::ReportBufferStatusParameters params);
virtual void DoUlReceiveMacCe (MacCeListElement_s bsr, uint8_t componentCarrierId);
}; // end of class RrComponentCarrierManager
} // end of namespace ns3
#endif /* NO_OP_COMPONENT_CARRIER_MANAGER_H */

View File

@@ -126,8 +126,10 @@ def build(bld):
'model/lte-ccm-mac-sap.cc',
'model/lte-enb-component-carrier-manager.cc',
'model/lte-ue-component-carrier-manager.cc',
'model/no-op-component-carrier-manager.cc',
'model/simple-ue-component-carrier-manager.cc',
'model/component-carrier.cc',
'helper/cc-helper.cc',
'model/component-carrier-ue.cc',
'model/component-carrier-enb.cc'
]
@@ -310,7 +312,9 @@ def build(bld):
'model/lte-ccm-mac-sap.h',
'model/lte-enb-component-carrier-manager.h',
'model/lte-ue-component-carrier-manager.h',
'model/no-op-component-carrier-manager.h',
'model/simple-ue-component-carrier-manager.h',
'helper/cc-helper.h',
'model/component-carrier.h',
'model/component-carrier-ue.h',
'model/component-carrier-enb.h'