|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
24 #include <ns3/lte-ue-mac.h>
159 static TypeId tid =
TypeId (
"ns3::SimpleUeComponentCarrierManager")
198 it->second->TransmitPdu (params);
211 for (std::map <uint8_t, std::map<uint8_t, LteMacSapProvider*> >::iterator ccLcMapIt =
m_componentCarrierLcMap.begin();
214 NS_LOG_DEBUG (
"BSR from RLC for CC id = "<< (uint16_t)ccLcMapIt->first);
215 std::map <uint8_t, LteMacSapProvider*>::iterator it = ccLcMapIt->second.find (params.
lcid);
216 if (it !=ccLcMapIt->second.end())
218 it->second->ReportBufferStatus (params);
234 std::map<uint8_t, LteMacSapUser*>::iterator lcidIt =
m_lcAttached.find (txOpParams.
lcid);
236 NS_LOG_DEBUG (
this <<
" lcid = " << (uint32_t) txOpParams.
lcid <<
" layer= "
237 << (uint16_t) txOpParams.
layer <<
" componentCarierId "
241 <<
" with lcid = " << (uint32_t) txOpParams.
lcid <<
" to transmit "<< txOpParams.
bytes<<
" bytes");
242 (*lcidIt).second->NotifyTxOpportunity (txOpParams);
248 std::map<uint8_t, LteMacSapUser*>::iterator lcidIt =
m_lcAttached.find (rxPduParams.
lcid);
252 (*lcidIt).second->ReceivePdu (rxPduParams);
259 std::vector<uint16_t>
263 std::vector<uint16_t> res;
270 std::map<uint8_t, LteMacSapProvider*>::iterator lcToRemove = it->second.find (lcid);
271 if (lcToRemove != it->second.end ())
273 res.insert (res.end (), it->first);
277 NS_ABORT_MSG_IF (res.size () == 0,
"LCID " << lcid <<
" not found in the ComponentCarrierManager map");
288 std::map<uint8_t, LteMacSapUser*>::iterator it =
m_lcAttached.begin ();
304 std::vector<LteUeCcmRrcSapProvider::LcsConfig>
308 std::vector<LteUeCcmRrcSapProvider::LcsConfig> res;
309 std::map<uint8_t, LteMacSapUser*>::iterator it =
m_lcAttached.find (lcId);
311 m_lcAttached.insert (std::pair<uint8_t, LteMacSapUser*> (lcId, msu));
313 std::map <uint8_t, std::map<uint8_t, LteMacSapProvider*> >::iterator ccLcMapIt;
319 res.insert (res.end (), elem);
324 ccLcMapIt->second.insert (std::pair <uint8_t, LteMacSapProvider*> (lcId,
m_macSapProvidersMap.at (ncc)));
328 std::map<uint8_t, LteMacSapProvider*>
empty;
329 std::pair <std::map <uint8_t, std::map<uint8_t, LteMacSapProvider*> >::iterator,
bool>
331 NS_ABORT_MSG_IF (!ret.second,
"element already present, ComponentCarrierId already exist");
333 ccLcMapIt->second.insert (std::pair <uint8_t, LteMacSapProvider*> (lcId,
m_macSapProvidersMap.at (ncc)));
344 std::map<uint8_t, LteMacSapUser*>::iterator it =
m_lcAttached.find (lcid);
349 m_lcAttached.insert (std::pair<uint8_t, LteMacSapUser*> (lcid, msu));
351 std::map <uint8_t, std::map<uint8_t, LteMacSapProvider*> >::iterator ccLcMapIt;
357 ccLcMapIt->second.insert (std::pair <uint8_t, LteMacSapProvider*> (lcid,
m_macSapProvidersMap.at (ncc)));
361 std::map<uint8_t, LteMacSapProvider*>
empty;
362 std::pair <std::map <uint8_t, std::map<uint8_t, LteMacSapProvider*> >::iterator,
bool>
364 NS_ABORT_MSG_IF (!ret.second,
"element already present, ComponentCarrierId already existed");
366 ccLcMapIt->second.insert (std::pair <uint8_t, LteMacSapProvider*> (lcid,
m_macSapProvidersMap.at (ncc)));
Parameters for LteMacSapProvider::TransmitPdu.
a unique identifier for an interface.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
uint8_t componentCarrierId
component carrier ID
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Service Access Point (SAP) offered by the MAC to the RLC See Femto Forum MAC Scheduler Interface Spec...
virtual void DoInitialize()
Initialize() implementation.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Parameters for LteMacSapUser::NotifyTxOpportunity.
friend class SimpleUeCcmMacSapProvider
allow SimpleUeCcmMacSapProvider class friend access
std::map< uint8_t, LteMacSapProvider * > m_macSapProvidersMap
Map of pointers to SAP to interfaces of the MAC instance if the flows of this UE.
virtual void DoDispose()
Destructor implementation.
void DoNotifyTxOpportunity(LteMacSapUser::TxOpportunityParameters txOpParams)
Notify TX opportunity function.
void DoReset()
Reset LC map.
virtual void NotifyHarqDeliveryFailure()
Called by the MAC to notify the RLC that an HARQ process related to this RLC instance has failed.
void DoNotifyHarqDeliveryFailure()
Notify HARQ deliver failure.
void DoReceivePdu(LteMacSapUser::ReceivePduParameters rxPduParams)
Receive PDU function.
static TypeId GetTypeId()
Get the type ID.
SimpleUeComponentCarrierManager * m_mac
the component carrier manager
uint16_t rnti
the C-RNTI identifying the UE
uint8_t lcid
the logical channel id
virtual LteMacSapProvider * GetLteMacSapProvider()
Returns the MAC sap provider interface that if forwarding calls to the instance of the LteUeComponent...
SimpleUeCcmMacSapUser(SimpleUeComponentCarrierManager *mac)
Constructor.
uint16_t m_noOfComponentCarriers
// The number of component carriers that this UE can support.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
friend class MemberLteUeCcmRrcSapProvider< SimpleUeComponentCarrierManager >
let the forwarder class access the protected and private members
LteMacSapUser * m_ccmMacSapUser
Interface to the UE RLC instance.
uint8_t componentCarrierId
the component carrier id corresponding to the sending Mac istance
uint8_t lcid
the logical channel id
virtual void TransmitPdu(LteMacSapProvider::TransmitPduParameters params)
send an RLC PDU to the MAC for transmission.
Parameters for LteMacSapProvider::ReportBufferStatus.
SimpleUeCcmMacSapProvider class.
virtual void ReceivePdu(LteMacSapUser::ReceivePduParameters rxPduParams)
Called by the MAC to notify the RLC of the reception of a new PDU.
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
SimpleUeCcmMacSapUser class.
The abstract base class of a Component Carrier Manager* for UE that operates using the component carr...
Parameters for LteMacSapUser::ReceivePdu.
LteUeCmacSapProvider::LogicalChannelConfig lcConfig
logical channel config
SimpleUeComponentCarrierManager * m_mac
the component carrier manager
#define NS_ABORT_MSG_IF(cond, msg)
Abnormal program termination if a condition is true, with a message.
virtual void DoInitialize(void)
Initialize() implementation.
void DoReportUeMeas(uint16_t rnti, LteRrcSap::MeasResults measResults)
Report Ue Measure function.
virtual ~SimpleUeComponentCarrierManager()
std::map< uint8_t, LteMacSapUser * > m_lcAttached
Map of pointers to SAP interfaces of the RLC instance of the flows of this UE.
virtual void NotifyTxOpportunity(LteMacSapUser::TxOpportunityParameters txOpParams)
Called by the MAC to notify the RLC that the scheduler granted a transmission opportunity to this RLC...
LteUeCcmRrcSapProvider * m_ccmRrcSapProvider
Receive API calls from the UE RRC instance.
void DoTransmitPdu(LteMacSapProvider::TransmitPduParameters params)
Transmit PDU function.
Service Access Point (SAP) offered by the MAC to the RLC See Femto Forum MAC Scheduler Interface Spec...
virtual std::vector< LteUeCcmRrcSapProvider::LcsConfig > DoAddLc(uint8_t lcId, LteUeCmacSapProvider::LogicalChannelConfig lcConfig, LteMacSapUser *msu)
Add LC function.
LteMacSapProvider * m_ccmMacSapProvider
Receive API calls from the UE RLC instance.
LogicalChannelConfig structure.
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
virtual void DoReportBufferStatus(LteMacSapProvider::ReportBufferStatusParameters params)
Report buffer status function.
friend class SimpleUeCcmMacSapUser
allow SimpleUeCcmMacSapUser class friend access
SimpleUeComponentCarrierManager()
Creates a No-op CCS algorithm instance.
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 ",...
uint32_t bytes
the number of bytes to transmit
Component carrier manager implementation which simply does nothing.
uint8_t lcid
the logical channel id corresponding to the sending RLC instance
std::vector< uint16_t > DoRemoveLc(uint8_t lcid)
Remove LC function.
uint8_t layer
the layer of transmission (MIMO)
SimpleUeCcmMacSapProvider(SimpleUeComponentCarrierManager *mac)
Constructor.
std::map< uint8_t, std::map< uint8_t, LteMacSapProvider * > > m_componentCarrierLcMap
Flow configuration per flow Id of this UE.
virtual void ReportBufferStatus(LteMacSapProvider::ReportBufferStatusParameters params)
Report the RLC buffer status to the MAC.
make Callback use a separate empty type
virtual LteMacSapUser * DoConfigureSignalBearer(uint8_t lcId, LteUeCmacSapProvider::LogicalChannelConfig lcConfig, LteMacSapUser *msu)
Configure signal bearer function.