17#include "ns3/random-variable-stream.h" 
   51    static TypeId tid = 
TypeId(
"ns3::NoOpComponentCarrierManager")
 
 
   75                  "could not find Sap for ComponentCarrier " << params.componentCarrierId);
 
   77    it->second->TransmitPdu(params);
 
 
   88    it->second->ReportBufferStatus(params);
 
 
   98    m_ueInfo.at(txOpParams.
rnti).m_ueAttached.at(txOpParams.
lcid)->NotifyTxOpportunity(txOpParams);
 
 
  105    auto lcidIt = 
m_ueInfo.at(rxPduParams.
rnti).m_ueAttached.find(rxPduParams.
lcid);
 
  106    if (lcidIt != 
m_ueInfo.at(rxPduParams.
rnti).m_ueAttached.end())
 
  108        lcidIt->second->ReceivePdu(rxPduParams);
 
 
  128    auto ueInfoIt = 
m_ueInfo.find(rnti);
 
  131        NS_LOG_DEBUG(
this << 
" UE " << rnti << 
" was not found, now it is added in the map");
 
  145        NS_LOG_DEBUG(
this << 
" UE " << rnti << 
"found, updating the state from " 
  146                          << +ueInfoIt->second.m_ueState << 
" to " << +state);
 
  147        ueInfoIt->second.m_ueState = state;
 
 
  167std::vector<LteCcmRrcSapProvider::LcsConfig>
 
  182    std::vector<LteCcmRrcSapProvider::LcsConfig> res;
 
  215        res.push_back(entry);
 
  218    auto lcidIt = rntiIt->second.m_rlcLcInstantiated.find(lcid);
 
  219    if (lcidIt == rntiIt->second.m_rlcLcInstantiated.end())
 
  230        rntiIt->second.m_rlcLcInstantiated.emplace(lcinfo.
lcId, lcinfo);
 
  231        rntiIt->second.m_ueAttached.emplace(lcinfo.
lcId, msu);
 
 
  249                  "request to Release Data Radio Bearer on UE with unknown RNTI " << rnti);
 
  251    NS_LOG_DEBUG(
this << 
" remove LCID " << +lcid << 
" for RNTI " << rnti);
 
  252    std::vector<uint8_t> res;
 
  253    for (uint16_t i = 0; i < rntiIt->second.m_enabledComponentCarrier; i++)
 
  255        res.insert(res.end(), i);
 
  258    auto lcIt = rntiIt->second.m_ueAttached.find(lcid);
 
  259    NS_ASSERT_MSG(lcIt != rntiIt->second.m_ueAttached.end(), 
"Logical Channel not found");
 
  260    rntiIt->second.m_ueAttached.erase(lcIt);
 
  262    auto rlcInstancesIt = rntiIt->second.m_rlcLcInstantiated.find(rnti);
 
  263    NS_ASSERT_MSG(rlcInstancesIt != rntiIt->second.m_rlcLcInstantiated.end(),
 
  264                  "Logical Channel not found");
 
  265    rntiIt->second.m_rlcLcInstantiated.erase(rlcInstancesIt);
 
 
  278                  "request to add a signal bearer to unknown RNTI " << lcinfo.
rnti);
 
  280    auto lcidIt = rntiIt->second.m_ueAttached.find(lcinfo.
lcId);
 
  281    if (lcidIt == rntiIt->second.m_ueAttached.end())
 
  283        rntiIt->second.m_ueAttached.emplace(lcinfo.
lcId, msu);
 
 
  298                                         << 
" at carrier:" << (
uint32_t)componentCarrierId);
 
  299    m_ccPrbOccupancy.insert(std::pair<uint8_t, double>(componentCarrierId, prbOccupancy));
 
 
  307                  "Received a Control Message not allowed " << bsr.m_macCeType);
 
  312        newBsr.m_macCeType = bsr.m_macCeType;
 
  316        for (uint16_t i = 0; i < 4; i++)
 
  340            sapIt->second->ReportMacCeToScheduler(newBsr);
 
 
  356                    "Sap not found in the CcmMacSapProviderMap");
 
  358    sapIt->second->ReportSrToScheduler(rnti);
 
 
  378    static TypeId tid = 
TypeId(
"ns3::RrComponentCarrierManager")
 
 
  391    uint32_t numberOfCarriersForUe = 
m_ueInfo.at(params.rnti).m_enabledComponentCarrier;
 
  392    if (params.lcid == 0 || params.lcid == 1 || numberOfCarriersForUe == 1)
 
  394        NS_LOG_INFO(
"Buffer status forwarded to the primary carrier.");
 
  400        params.retxQueueSize /= numberOfCarriersForUe;
 
  401        params.txQueueSize /= numberOfCarriersForUe;
 
  402        for (
uint32_t i = 0; i < numberOfCarriersForUe; i++)
 
  405                          "Mac sap provider does not exist.");
 
 
  416                  "Received BSR from a ComponentCarrier not allowed, ComponentCarrierId = " 
  417                      << componentCarrierId);
 
  419                  "Received a Control Message not allowed " << bsr.m_macCeType);
 
  429        newBsr.m_macCeType = bsr.m_macCeType;
 
  437        for (uint16_t i = 0; i < 4; i++)
 
  451        for (
uint32_t i = 0; i < numberOfCarriersForUe; i++)
 
  454                          "Mac sap provider does not exist.");
 
 
  470    uint32_t numberOfCarriersForUe = 
m_ueInfo.at(rnti).m_enabledComponentCarrier;
 
 
static uint8_t BufferSize2BsrId(uint32_t val)
Convert Buffer size to BSR ID.
static uint32_t BsrId2BufferSize(uint8_t val)
Convert BSR ID to buffer size.
This class contains the specification of EPS Bearers.
uint8_t GetResourceType() const
Qci qci
Qos class indicator.
GbrQosInformation gbrQosInfo
GBR QOS information.
virtual Ptr< UeManager > GetUeManager(uint16_t rnti)=0
Get UE manager by RNTI.
The class implements Component Carrier Manager (CCM) that operates using the Component Carrier Manage...
std::map< uint16_t, UeInfo > m_ueInfo
The map from RNTI to UE information.
LteCcmRrcSapProvider * m_ccmRrcSapProvider
A pointer to the SAP interface of the CCM instance to receive API calls from the eNodeB RRC instance.
LteMacSapProvider * m_macSapProvider
A pointer to main SAP interface of the MAC instance, which is in this case handled by CCM.
std::map< uint8_t, LteMacSapProvider * > m_macSapProvidersMap
A map of pointers to real SAP interfaces of MAC instances.
uint16_t m_noOfComponentCarriers
The number component of carriers that are supported by this eNb.
std::map< uint8_t, LteCcmMacSapProvider * > m_ccmMacSapProviderMap
A map of pointers to the SAP interfaces of CCM instance that provides the CCM specific functionalitie...
LteCcmMacSapUser * m_ccmMacSapUser
LteCcmMacSapUser is extended version of LteMacSapUser interface.
LteCcmRrcSapUser * m_ccmRrcSapUser
A pointer to SAP interface of RRC instance, i.e.
Service Access Point (SAP) offered by the MAC to the RLC See Femto Forum MAC Scheduler Interface Spec...
The default component carrier manager that forwards all traffic, the uplink and the downlink,...
void DoDispose() override
Destructor implementation.
virtual LteMacSapUser * DoConfigureSignalBearer(LteEnbCmacSapProvider::LcInfo lcinfo, LteMacSapUser *msu)
Configure the signal bearer.
std::map< uint8_t, double > m_ccPrbOccupancy
The physical resource block occupancy per carrier.
virtual void DoNotifyPrbOccupancy(double prbOccupancy, uint8_t componentCarrierId)
Function implements the function of the SAP interface of CCM instance which is used by MAC to notify ...
friend class MemberLteCcmRrcSapProvider< NoOpComponentCarrierManager >
allow MemberLteCcmRrcSapProvider<NoOpComponentCarrierManager> class friend access
virtual void DoTransmitPdu(LteMacSapProvider::TransmitPduParameters params)
Transmit PDU.
void DoReportUeMeas(uint16_t rnti, LteRrcSap::MeasResults measResults) override
Implementation of ReportUeMeas.
virtual void DoReportBufferStatus(LteMacSapProvider::ReportBufferStatusParameters params)
Report buffer status.
virtual void DoAddLc(LteEnbCmacSapProvider::LcInfo lcInfo, LteMacSapUser *msu)
Add LC.
virtual void DoRemoveUe(uint16_t rnti)
Remove UE.
virtual void DoAddUe(uint16_t rnti, uint8_t state)
Add UE.
virtual void DoNotifyTxOpportunity(LteMacSapUser::TxOpportunityParameters txOpParams)
Notify transmit opportunity.
virtual void DoUlReceiveSr(uint16_t rnti, uint8_t componentCarrierId)
Forward uplink SR to CCM, called by MAC through CCM SAP interface.
friend class MemberLteCcmMacSapUser< NoOpComponentCarrierManager >
allow MemberLteCcmMacSapUser<NoOpComponentCarrierManager> class friend access
NoOpComponentCarrierManager()
virtual void DoUlReceiveMacCe(MacCeListElement_s bsr, uint8_t componentCarrierId)
Forwards uplink BSR to CCM, called by MAC through CCM SAP interface.
friend class EnbMacMemberLteMacSapProvider< NoOpComponentCarrierManager >
allow EnbMacMemberLteMacSapProvider<NoOpComponentCarrierManager> class friend access
virtual std::vector< uint8_t > DoReleaseDataRadioBearer(uint16_t rnti, uint8_t lcid)
Release data radio bearer.
~NoOpComponentCarrierManager() override
virtual void DoReceivePdu(LteMacSapUser::ReceivePduParameters rxPduParams)
Receive PDU.
virtual std::vector< LteCcmRrcSapProvider::LcsConfig > DoSetupDataRadioBearer(EpsBearer bearer, uint8_t bearerId, uint16_t rnti, uint8_t lcid, uint8_t lcGroup, LteMacSapUser *msu)
Setup data radio bearer.
void DoInitialize() override
Initialize() implementation.
static TypeId GetTypeId()
Get the type ID.
virtual void DoNotifyHarqDeliveryFailure()
Notify HARQ delivery failure.
virtual void DoInitialize()
Initialize() implementation.
Component carrier manager implementation that splits traffic equally among carriers.
void DoUlReceiveMacCe(MacCeListElement_s bsr, uint8_t componentCarrierId) override
Forwards uplink BSR to CCM, called by MAC through CCM SAP interface.
~RrComponentCarrierManager() override
static TypeId GetTypeId()
Get the type ID.
RrComponentCarrierManager()
void DoUlReceiveSr(uint16_t rnti, uint8_t componentCarrierId) override
Forward uplink SR to CCM, called by MAC through CCM SAP interface.
uint8_t m_lastCcIdForSr
Last CCID to which a SR was routed.
void DoReportBufferStatus(LteMacSapProvider::ReportBufferStatusParameters params) override
Report buffer status.
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
#define NS_ABORT_MSG_IF(cond, msg)
Abnormal program termination if a condition is true, with a message.
#define NS_LOG_ERROR(msg)
Use NS_LOG to output a message of level LOG_ERROR.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
uint16_t componentCarrierId
component carrier ID
LteEnbCmacSapProvider::LcInfo lc
LC info.
Logical Channel information to be passed to CmacSapProvider::ConfigureLc.
uint64_t gbrUl
guaranteed bitrate in uplink
uint8_t qci
QoS Class Identifier.
uint64_t mbrDl
maximum bitrate in downlink
uint64_t mbrUl
maximum bitrate in uplink
uint8_t lcGroup
logical channel group
uint8_t resourceType
0 if the bearer is NON-GBR, 1 if the bearer is GBR, 2 if the bearer in DC-GBR
uint64_t gbrDl
guaranteed bitrate in downlink
uint8_t lcId
logical channel identifier
uint16_t rnti
C-RNTI identifying the UE.
Structure to represent UE info.
uint8_t m_enabledComponentCarrier
The number of enabled component carriers.
uint8_t m_ueState
RRC states of UE, e.g.
Parameters for LteMacSapProvider::ReportBufferStatus.
Parameters for LteMacSapProvider::TransmitPdu.
Parameters for LteMacSapUser::ReceivePdu.
uint8_t lcid
the logical channel id
uint16_t rnti
the C-RNTI identifying the UE
Parameters for LteMacSapUser::NotifyTxOpportunity.
uint16_t rnti
the C-RNTI identifying the UE
uint8_t componentCarrierId
the component carrier id
uint8_t layer
the layer of transmission (MIMO)
uint8_t lcid
the logical channel id
See section 4.3.14 macCEListElement.
struct MacCeValue_u m_macCeValue
MAC CE value.
std::vector< uint8_t > m_bufferStatus
buffer status