28#include <ns3/random-variable-stream.h> 
   62    static TypeId tid = 
TypeId(
"ns3::NoOpComponentCarrierManager")
 
   84    std::map<uint8_t, LteMacSapProvider*>::iterator it =
 
   87                  "could not find Sap for ComponentCarrier " << params.componentCarrierId);
 
   89    it->second->TransmitPdu(params);
 
   98    std::map<uint8_t, LteMacSapProvider*>::iterator it =
 
  101    it->second->ReportBufferStatus(params);
 
  109    NS_LOG_DEBUG(
this << 
" rnti= " << txOpParams.
rnti << 
" lcid= " << +txOpParams.
lcid << 
" layer= " 
  111    m_ueInfo.at(txOpParams.
rnti).m_ueAttached.at(txOpParams.
lcid)->NotifyTxOpportunity(txOpParams);
 
  118    auto lcidIt = 
m_ueInfo.at(rxPduParams.
rnti).m_ueAttached.find(rxPduParams.
lcid);
 
  119    if (lcidIt != 
m_ueInfo.at(rxPduParams.
rnti).m_ueAttached.end())
 
  121        lcidIt->second->ReceivePdu(rxPduParams);
 
  141    std::map<uint16_t, uint8_t>::iterator eccIt; 
 
  142    auto ueInfoIt = 
m_ueInfo.find(rnti);
 
  145        NS_LOG_DEBUG(
this << 
" UE " << rnti << 
" was not found, now it is added in the map");
 
  159        NS_LOG_DEBUG(
this << 
" UE " << rnti << 
"found, updating the state from " 
  160                          << +ueInfoIt->second.m_ueState << 
" to " << +state);
 
  161        ueInfoIt->second.m_ueState = state;
 
  181std::vector<LteCcmRrcSapProvider::LcsConfig>
 
  196    std::vector<LteCcmRrcSapProvider::LcsConfig> res;
 
  229        res.push_back(entry);
 
  232    auto lcidIt = rntiIt->second.m_rlcLcInstantiated.find(lcid);
 
  233    if (lcidIt == rntiIt->second.m_rlcLcInstantiated.end())
 
  244        rntiIt->second.m_rlcLcInstantiated.emplace(lcinfo.
lcId, lcinfo);
 
  245        rntiIt->second.m_ueAttached.emplace(lcinfo.
lcId, msu);
 
  263                  "request to Release Data Radio Bearer on UE with unknown RNTI " << rnti);
 
  265    NS_LOG_DEBUG(
this << 
" remove LCID " << +lcid << 
" for RNTI " << rnti);
 
  266    std::vector<uint8_t> res;
 
  267    for (uint16_t i = 0; i < rntiIt->second.m_enabledComponentCarrier; i++)
 
  269        res.insert(res.end(), i);
 
  272    auto lcIt = rntiIt->second.m_ueAttached.find(lcid);
 
  273    NS_ASSERT_MSG(lcIt != rntiIt->second.m_ueAttached.end(), 
"Logical Channel not found");
 
  274    rntiIt->second.m_ueAttached.erase(lcIt);
 
  276    auto rlcInstancesIt = rntiIt->second.m_rlcLcInstantiated.find(rnti);
 
  277    NS_ASSERT_MSG(rlcInstancesIt != rntiIt->second.m_rlcLcInstantiated.end(),
 
  278                  "Logical Channel not found");
 
  279    rntiIt->second.m_rlcLcInstantiated.erase(rlcInstancesIt);
 
  292                  "request to add a signal bearer to unknown RNTI " << lcinfo.
rnti);
 
  294    auto lcidIt = rntiIt->second.m_ueAttached.find(lcinfo.
lcId);
 
  295    if (lcidIt == rntiIt->second.m_ueAttached.end())
 
  297        rntiIt->second.m_ueAttached.emplace(lcinfo.
lcId, msu);
 
  312                                         << 
" at carrier:" << (
uint32_t)componentCarrierId);
 
  313    m_ccPrbOccupancy.insert(std::pair<uint8_t, double>(componentCarrierId, prbOccupancy));
 
  321                  "Received a Control Message not allowed " << bsr.m_macCeType);
 
  326        newBsr.m_macCeType = bsr.m_macCeType;
 
  330        for (uint16_t i = 0; i < 4; i++)
 
  354            sapIt->second->ReportMacCeToScheduler(newBsr);
 
  370                    "Sap not found in the CcmMacSapProviderMap");
 
  372    sapIt->second->ReportSrToScheduler(rnti);
 
  392    static TypeId tid = 
TypeId(
"ns3::RrComponentCarrierManager")
 
  405    uint32_t numberOfCarriersForUe = 
m_ueInfo.at(params.rnti).m_enabledComponentCarrier;
 
  406    if (params.lcid == 0 || params.lcid == 1 || numberOfCarriersForUe == 1)
 
  408        NS_LOG_INFO(
"Buffer status forwarded to the primary carrier.");
 
  414        params.retxQueueSize /= numberOfCarriersForUe;
 
  415        params.txQueueSize /= numberOfCarriersForUe;
 
  416        for (
uint32_t i = 0; i < numberOfCarriersForUe; i++)
 
  419                          "Mac sap provider does not exist.");
 
  430                  "Received BSR from a ComponentCarrier not allowed, ComponentCarrierId = " 
  431                      << componentCarrierId);
 
  433                  "Received a Control Message not allowed " << bsr.m_macCeType);
 
  443        newBsr.m_macCeType = bsr.m_macCeType;
 
  451        for (uint16_t i = 0; i < 4; i++)
 
  465        for (
uint32_t i = 0; i < numberOfCarriersForUe; i++)
 
  468                          "Mac sap provider does not exist.");
 
  484    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