|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
26 #include <ns3/random-variable-stream.h>
60 static TypeId tid =
TypeId (
"ns3::NoOpComponentCarrierManager")
88 it->second->TransmitPdu (params);
96 std::map <uint8_t, LteMacSapProvider*>::iterator it =
m_macSapProvidersMap.find (ueManager->GetComponentCarrierId ());
98 it->second->ReportBufferStatus (params);
105 std::map <uint16_t, std::map<uint8_t, LteMacSapUser*> >::iterator rntiIt =
m_ueAttached.find (txOpParams.
rnti);
107 std::map<uint8_t, LteMacSapUser*>::iterator lcidIt = rntiIt->second.find (txOpParams.
lcid);
108 NS_ASSERT_MSG (lcidIt != rntiIt->second.end (),
"could not find LCID " << (uint16_t) txOpParams.
lcid);
110 (*lcidIt).second->NotifyTxOpportunity (txOpParams);
118 std::map <uint16_t, std::map<uint8_t, LteMacSapUser*> >::iterator rntiIt =
m_ueAttached.find (rxPduParams.
rnti);
120 std::map<uint8_t, LteMacSapUser*>::iterator lcidIt = rntiIt->second.find (rxPduParams.
lcid);
121 if (lcidIt != rntiIt->second.end ())
123 (*lcidIt).second->ReceivePdu (rxPduParams);
144 std::map<uint16_t, uint8_t>::iterator stateIt;
145 std::map<uint16_t, uint8_t>::iterator eccIt;
150 NS_LOG_DEBUG (
this <<
" UE " << rnti <<
" was not found, now it is added in the map");
151 m_ueState.insert (std::pair<uint16_t, uint8_t> (rnti, state));
165 NS_FATAL_ERROR (
this <<
" Ue " << rnti <<
" had Component Carrier enabled before join the network" << (uint16_t) state);
168 std::map<uint8_t, LteMacSapUser*>
empty;
169 std::pair <std::map <uint16_t, std::map<uint8_t, LteMacSapUser*> >::iterator,
bool>
170 ret =
m_ueAttached.insert (std::pair <uint16_t, std::map<uint8_t, LteMacSapUser*> >
172 NS_LOG_DEBUG (
this <<
"AddUe: UE Pointer LteMacSapUser Map " << rnti <<
" added " << (uint16_t) ret.second);
173 NS_ASSERT_MSG (ret.second,
"element already present, RNTI already existed");
176 std::map<uint8_t, LteEnbCmacSapProvider::LcInfo> emptyA;
177 std::pair <std::map <uint16_t, std::map<uint8_t, LteEnbCmacSapProvider::LcInfo> >::iterator,
bool>
178 retA =
m_rlcLcInstantiated.insert (std::pair <uint16_t, std::map<uint8_t, LteEnbCmacSapProvider::LcInfo> >
180 NS_ASSERT_MSG (retA.second,
"element already present, RNTI already existed");
181 NS_LOG_DEBUG (
this <<
"AddUe: UE " << rnti <<
" added " << (uint16_t) retA.second);
186 NS_LOG_DEBUG (
this <<
" UE " << rnti <<
"found, updating the state from " << (uint16_t) stateIt->second <<
" to " << (uint16_t) state);
187 stateIt->second = state;
206 std::map<uint16_t, uint8_t>::iterator stateIt;
207 std::map<uint16_t, uint8_t>::iterator eccIt;
227 std::vector<LteCcmRrcSapProvider::LcsConfig>
231 std::map<uint16_t, uint8_t>::iterator eccIt;
238 std::vector<LteCcmRrcSapProvider::LcsConfig> res;
270 res.push_back (entry);
275 std::map <uint16_t, std::map<uint8_t, LteEnbCmacSapProvider::LcInfo> >::iterator rntiIter =
m_rlcLcInstantiated.find (rnti);
291 std::map <uint16_t, std::map<uint8_t, LteMacSapUser*> >::iterator sapIt =
m_ueAttached.find (rnti);
294 std::map<uint8_t, LteEnbCmacSapProvider::LcInfo>::iterator lcidIt = rntiIter->second.find (lcid);
297 if (lcidIt == rntiIter->second.end ())
308 rntiIter->second.insert (std::pair<uint8_t, LteEnbCmacSapProvider::LcInfo> (lcinfo.
lcId, lcinfo));
309 sapIt->second.insert (std::pair<uint8_t, LteMacSapUser*> (lcinfo.
lcId, msu));
325 std::map<uint16_t, uint8_t>::iterator eccIt;
328 std::map <uint16_t, std::map<uint8_t, LteEnbCmacSapProvider::LcInfo> >::iterator lcsIt;
331 std::map<uint8_t, LteEnbCmacSapProvider::LcInfo>::iterator lcIt;
332 NS_LOG_DEBUG (
this <<
" remove lcid " << (uint16_t) lcid <<
" for rnti " << rnti);
333 lcIt = lcsIt->second.find (lcid);
334 NS_ASSERT_MSG (lcIt != lcsIt->second.end (),
" Logical Channel not found");
335 std::vector<uint8_t> res;
336 for (uint16_t i = 0; i < eccIt->second; i++)
338 res.insert (res.end (), i);
341 std::map <uint16_t, std::map<uint8_t, LteMacSapUser*> >::iterator rntiIt =
m_ueAttached.find (rnti);
342 rntiIt->second.erase (lcid);
343 std::map <uint16_t, std::map<uint8_t, LteEnbCmacSapProvider::LcInfo> >::iterator rlcInstancesIt =
m_rlcLcInstantiated.find (rnti);
344 std::map<uint8_t, LteEnbCmacSapProvider::LcInfo>::iterator rclLcIt;
345 lcIt = rlcInstancesIt->second.find (lcid);
346 NS_ASSERT_MSG (lcIt != lcsIt->second.end (),
" Erasing: Logical Channel not found");
347 lcsIt->second.erase (lcid);
355 std::map <uint16_t, std::map<uint8_t, LteMacSapUser*> >::iterator itSapUserAtCcm;
358 std::map <uint16_t, std::map<uint8_t, LteMacSapUser*> >::iterator rntiIt =
m_ueAttached.find (lcinfo.
rnti);
360 std::map<uint8_t, LteMacSapUser*>::iterator lcidIt = rntiIt->second.find (lcinfo.
lcId);
361 if (lcidIt == rntiIt->second.end ())
363 rntiIt->second.insert (std::pair<uint8_t, LteMacSapUser*> (lcinfo.
lcId, msu));
377 NS_LOG_DEBUG (
"Update PRB occupancy:"<<prbOccupancy<<
" at carrier:"<< (uint32_t) componentCarrierId);
378 m_ccPrbOccupancy.insert(std::pair<uint8_t, double> (componentCarrierId, prbOccupancy));
390 newBsr.m_macCeType = bsr.m_macCeType;
394 for (uint16_t i = 0; i < 4; i++)
417 sapIt->second->ReportMacCeToScheduler (newBsr);
433 "Sap not found in the CcmMacSapProviderMap");
435 sapIt->second->ReportSrToScheduler (rnti);
457 static TypeId tid =
TypeId (
"ns3::RrComponentCarrierManager")
474 if (params.
lcid == 0 || params.
lcid == 1 || numberOfCarriersForUe == 1)
476 NS_LOG_INFO(
"Buffer status forwarded to the primary carrier.");
484 for ( uint16_t i = 0; i < numberOfCarriersForUe ; i++)
497 NS_ASSERT_MSG (componentCarrierId == 0,
"Received BSR from a ComponentCarrier not allowed, ComponentCarrierId = " << componentCarrierId);
508 newBsr.m_macCeType = bsr.m_macCeType;
516 for (uint16_t i = 0; i < 4; i++)
529 for ( uint16_t i = 0; i < numberOfCarriersForUe ; i++)
Parameters for LteMacSapProvider::TransmitPdu.
a unique identifier for an interface.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
uint32_t retxQueueSize
the current size of the RLC retransmission queue in bytes
uint16_t rnti
the C-RNTI identifying the UE
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
virtual void DoAddLc(LteEnbCmacSapProvider::LcInfo lcInfo, LteMacSapUser *msu)
Add LC.
uint8_t lcId
logical channel identifier
friend class EnbMacMemberLteMacSapProvider< NoOpComponentCarrierManager >
allow EnbMacMemberLteMacSapProvider<NoOpComponentCarrierManager> class friend access
uint8_t m_lastCcIdForSr
Last CCID to which a SR was routed.
struct MacCeValue_u m_macCeValue
MAC CE value.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Parameters for LteMacSapUser::NotifyTxOpportunity.
virtual void DoInitialize()
Initialize() implementation.
virtual void DoUlReceiveSr(uint16_t rnti, uint8_t componentCarrierId)
Forward uplink SR to CCM, called by MAC through CCM SAP interface.
std::map< uint16_t, uint8_t > m_enabledComponentCarrier
This map tells for each RNTI the number of enabled component carriers.
static TypeId GetTypeId()
Get the type ID.
The default component carrier manager that forwards all traffic, the uplink and the downlink,...
virtual void DoReportUeMeas(uint16_t rnti, LteRrcSap::MeasResults measResults)
Implementation of ReportUeMeas.
uint16_t rnti
the C-RNTI identifying the UE
Logical Channel information to be passed to CmacSapProvider::ConfigureLc.
uint8_t lcid
the logical channel id
NoOpComponentCarrierManager()
LteCcmRrcSapProvider * m_ccmRrcSapProvider
A pointer to the SAP interface of the CCM instance to receive API calls from the eNodeB RRC instance.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
virtual void DoNotifyHarqDeliveryFailure()
Notify HARQ delivery failure.
virtual ~RrComponentCarrierManager() override
virtual std::vector< uint8_t > DoReleaseDataRadioBearer(uint16_t rnti, uint8_t lcid)
Release data radio bearer.
uint8_t lcGroup
logical channel group
static uint8_t BufferSize2BsrId(uint32_t val)
Convert Buffer size to BSR ID.
std::map< uint16_t, std::map< uint8_t, LteMacSapUser * > > m_ueAttached
The map that contains the rnti, lcid, SAP of the RLC instance.
uint8_t componentCarrierId
the component carrier id corresponding to the sending Mac istance
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 ...
uint64_t mbrUl
maximum bitrate in uplink
uint8_t lcid
the logical channel id
std::vector< uint8_t > m_bufferStatus
buffer status
static TypeId GetTypeId()
Get the type ID.
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
virtual void DoUlReceiveSr(uint16_t rnti, uint8_t componentCarrierId) override
Forward uplink SR to CCM, called by MAC through CCM SAP interface.
std::map< uint8_t, LteCcmMacSapProvider * > m_ccmMacSapProviderMap
A map of pointers to the SAP interfaces of CCM instance that provides the CCM specific functionalitie...
virtual void DoNotifyTxOpportunity(LteMacSapUser::TxOpportunityParameters txOpParams)
Notify transmit opportunity.
Parameters for LteMacSapProvider::ReportBufferStatus.
uint64_t gbrUl
guaranteed bitrate in uplink
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
virtual void DoReportBufferStatus(LteMacSapProvider::ReportBufferStatusParameters params) override
Report buffer status.
virtual void DoAddUe(uint16_t rnti, uint8_t state)
Add UE.
#define NS_UNUSED(x)
Mark a local variable as unused.
See section 4.3.14 macCEListElement.
uint32_t txQueueSize
the current size of the RLC transmission queue
std::map< uint16_t, uint8_t > m_ueState
Map of RRC states per UE (rnti, state), e.g.
virtual void DoUlReceiveMacCe(MacCeListElement_s bsr, uint8_t componentCarrierId)
Forwards uplink BSR to CCM, called by MAC through CCM SAP interface.
std::map< uint16_t, std::map< uint8_t, LteEnbCmacSapProvider::LcInfo > > m_rlcLcInstantiated
This map contains logical channel configuration per flow Id (rnti, lcid).
LteCcmRrcSapUser * m_ccmRrcSapUser
A pointer to SAP interface of RRC instance, i.e.
Parameters for LteMacSapUser::ReceivePdu.
GbrQosInformation gbrQosInfo
GBR QOS information.
uint64_t gbrDl
guaranteed bitrate in downlink
virtual void DoReceivePdu(LteMacSapUser::ReceivePduParameters rxPduParams)
Receive PDU.
#define NS_ABORT_MSG_IF(cond, msg)
Abnormal program termination if a condition is true, with a message.
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
virtual void DoDispose()
Destructor implementation.
virtual void DoInitialize(void)
Initialize() implementation.
friend class MemberLteCcmMacSapUser< NoOpComponentCarrierManager >
allow MemberLteCcmMacSapUser<NoOpComponentCarrierManager> class friend access
uint16_t m_noOfComponentCarriers
The number component of carriers that are supported by this eNb.
#define NS_LOG_ERROR(msg)
Use NS_LOG to output a message of level LOG_ERROR.
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...
Service Access Point (SAP) offered by the MAC to the RLC See Femto Forum MAC Scheduler Interface Spec...
This class contains the specification of EPS Bearers.
static uint32_t BsrId2BufferSize(uint8_t val)
Convert BSR ID to buffer size.
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
friend class MemberLteCcmRrcSapProvider< NoOpComponentCarrierManager >
allow MemberLteCcmRrcSapProvider<NoOpComponentCarrierManager> class friend access
bool isGbr
true if the bearer is GBR, false if the bearer is NON-GBR
virtual void DoReportBufferStatus(LteMacSapProvider::ReportBufferStatusParameters params)
Report buffer status.
uint8_t componentCarrierId
the component carrier id
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
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.
std::map< uint8_t, LteMacSapProvider * > m_macSapProvidersMap
A map of pointers to real SAP interfaces of MAC instances.
uint16_t componentCarrierId
component carrier ID
std::map< uint8_t, double > m_ccPrbOccupancy
The physical resource block occupancy per carrier.
enum ns3::EpsBearer::Qci qci
Qos class indicator.
virtual LteMacSapUser * DoConfigureSignalBearer(LteEnbCmacSapProvider::LcInfo lcinfo, LteMacSapUser *msu)
Configure the signal bearer.
LteEnbCmacSapProvider::LcInfo lc
LC info.
virtual void DoRemoveUe(uint16_t rnti)
Remove UE.
LteMacSapProvider * m_macSapProvider
A pointer to main SAP interface of the MAC instance, which is in this case handled by CCM.
uint8_t lcid
the logical channel id corresponding to the sending RLC instance
Component carrier manager implementation that splits traffic equally among carriers.
LteCcmMacSapUser * m_ccmMacSapUser
LteCcmMacSapUser is extended version of LteMacSapUser interface.
uint8_t layer
the layer of transmission (MIMO)
virtual void DoTransmitPdu(LteMacSapProvider::TransmitPduParameters params)
Transmit PDU.
uint8_t qci
QoS Class Identifier.
virtual ~NoOpComponentCarrierManager()
virtual void DoUlReceiveMacCe(MacCeListElement_s bsr, uint8_t componentCarrierId) override
Forwards uplink BSR to CCM, called by MAC through CCM SAP interface.
uint16_t rnti
C-RNTI identifying the UE.
uint64_t mbrDl
maximum bitrate in downlink
make Callback use a separate empty type
uint16_t rnti
the C-RNTI identifying the UE
RrComponentCarrierManager()