24 #include <ns3/lte-ue-mac.h> 93 virtual void NotifyTxOpportunity (uint32_t bytes, uint8_t layer, uint8_t harqId, uint8_t componentCarrierId, uint16_t rnti, uint8_t lcid);
110 NS_LOG_INFO (
"SimpleUeCcmMacSapUser::NotifyTxOpportunity for ccId:"<<(uint32_t)componentCarrierId);
132 : m_ccmRrcSapUser (0)
162 static TypeId tid =
TypeId (
"ns3::SimpleUeComponentCarrierManager")
216 it->second->TransmitPdu (params);
225 it->second->ReportBufferStatus (params);
239 std::map<uint8_t, LteMacSapUser*>::iterator lcidIt =
m_lcAttached.find (lcid);
241 NS_LOG_DEBUG (
this <<
" lcid= " << (uint32_t) lcid <<
" layer= " << (uint16_t) layer <<
" componentCarierId " << (uint16_t) componentCarrierId <<
" rnti " << rnti);
242 (*lcidIt).second->NotifyTxOpportunity (bytes, layer, harqId, componentCarrierId, rnti, lcid);
248 std::map<uint8_t, LteMacSapUser*>::iterator lcidIt =
m_lcAttached.find (lcid);
251 (*lcidIt).second->ReceivePdu (p, rnti, lcid);
258 std::vector<uint16_t>
262 std::vector<uint16_t> res;
269 std::map<uint8_t, LteMacSapProvider*>::iterator lcToRemove = it->second.find (lcid);
270 if (lcToRemove != it->second.end ())
272 res.insert (res.end (), it->first);
276 NS_ASSERT_MSG (res.size () != 0,
"Not found in the ComponentCarrierManager maps the LCID " << lcid);
282 std::vector<LteUeCcmRrcSapProvider::LcsConfig>
286 std::vector<LteUeCcmRrcSapProvider::LcsConfig> res;
287 std::map<uint8_t, LteMacSapUser*>::iterator it =
m_lcAttached.find (lcId);
289 m_lcAttached.insert (std::pair<uint8_t, LteMacSapUser*> (lcId, msu));
291 std::map <uint8_t, std::map<uint8_t, LteMacSapProvider*> >::iterator ccLcMapIt;
297 res.insert (res.end (), elem);
302 ccLcMapIt->second.insert (std::pair <uint8_t, LteMacSapProvider*> (lcId,
m_macSapProvidersMap.at (ncc)));
306 std::map<uint8_t, LteMacSapProvider*>
empty;
307 std::pair <std::map <uint8_t, std::map<uint8_t, LteMacSapProvider*> >::iterator,
bool>
310 NS_ASSERT_MSG (ret.second,
"element already present, ComponentCarrierId already existed");
312 ccLcMapIt->second.insert (std::pair <uint8_t, LteMacSapProvider*> (lcId,
m_macSapProvidersMap.at (ncc)));
329 std::vector<uint8_t> res;
340 std::map<uint8_t, LteMacSapUser*>::iterator it =
m_lcAttached.find (lcid);
349 m_lcAttached.insert (std::pair<uint8_t, LteMacSapUser*> (lcid, msu));
void DoReportUeMeas(uint16_t rnti, LteRrcSap::MeasResults measResults)
Report Ue Measure function.
virtual void TransmitPdu(LteMacSapProvider::TransmitPduParameters params)
send an RLC PDU to the MAC for transmission.
virtual void DoInitialize(void)
Initialize() implementation.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
void DoReportBufferStatus(LteMacSapProvider::ReportBufferStatusParameters params)
Report buffer status function.
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
NS_ASSERT_MSG(false, "Ipv4AddressGenerator::MaskToIndex(): Impossible")
virtual ~SimpleUeComponentCarrierManager()
void DoReceivePdu(Ptr< Packet > p, uint16_t rnti, uint8_t lcid)
Receive PDU function.
uint16_t m_noOfComponentCarriersEnabled
The number of enabled component carriers that are enabled for this UE.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
std::vector< uint16_t > DoRemoveLc(uint8_t lcid)
Remove LC function.
LteUeCcmRrcSapProvider * m_ccmRrcSapProvider
Receive API calls from the eNodeB RRC instance.
virtual void DoInitialize()
Initialize() implementation.
LteUeCcmRrcSapUser * m_ccmRrcSapUser
Interface to the eNodeB RRC instance.
uint8_t componentCarrierId
the component carrier id corresponding to the sending Mac istance
std::map< uint8_t, LteMacSapUser * > m_lcAttached
Map of pointers to SAP interfaces of the RLC instance of the flows of this UE.
Parameters for LteMacSapProvider::ReportBufferStatus.
SimpleUeComponentCarrierManager * m_mac
the component carrier manager
std::map< uint8_t, std::map< uint8_t, LteMacSapProvider * > > m_componentCarrierLcMap
Flow configuration per flow Id of this UE.
void DoNotifyConnectionReconfigurationMsg()
Notify connection reconfiguration message.
make Callback use a separate empty type
LteMacSapUser * DoConfigureSignalBearer(uint8_t lcId, LteUeCmacSapProvider::LogicalChannelConfig lcConfig, LteMacSapUser *msu)
Configure signal bearer function.
MemberLteUeCcmRrcSapProvider class.
Service Access Point (SAP) offered by the UE RRC to the UE CCM.
LteMacSapProvider * m_ccmMacSapProvider
Receive API calls from the eNodeB RLC instance.
virtual void NotifyHarqDeliveryFailure()
Called by the MAC to notify the RLC that an HARQ process related to this RLC instance has failed...
LogicalChannelConfig structure.
uint8_t componentCarrierId
component carrier ID
virtual void DoDispose()
Destructor implementation.
SimpleUeCcmMacSapProvider(SimpleUeComponentCarrierManager *mac)
Constructor.
SimpleUeCcmMacSapUser class.
virtual LteMacSapProvider * GetLteMacSapProvider()
Returns the MAC sap provider interface that if forwarding calls to the instance of the LteUeComponent...
Every class exported by the ns3 library is enclosed in the ns3 namespace.
virtual void ReportBufferStatus(LteMacSapProvider::ReportBufferStatusParameters params)
Report the RLC buffer status to the MAC.
void DoTransmitPdu(LteMacSapProvider::TransmitPduParameters params)
Transmit PDU function.
virtual void ReceivePdu(Ptr< Packet > p, uint16_t rnti, uint8_t lcid)
Called by the MAC to notify the RLC of the reception of a new PDU.
virtual void ComponentCarrierEnabling(std::vector< uint8_t > componentCarrierList)=0
this function will be used after the RRC notify to ComponentCarrierManager that a reconfiguration mes...
LteUeCmacSapProvider::LogicalChannelConfig * lcConfig
logical channel config
std::map< uint8_t, LteMacSapProvider * > m_macSapProvidersMap
Map of pointers to SAP to interfaces of the MAC instance if the flows of this UE. ...
void DoNotifyTxOpportunity(uint32_t bytes, uint8_t layer, uint8_t harqId, uint8_t componentCarrierId, uint16_t rnti, uint8_t lcid)
Notify TX opportunity function.
SimpleUeCcmMacSapUser(SimpleUeComponentCarrierManager *mac)
Constructor.
The abstract base class of a Component Carrier Manager* for UE that operates using the component carr...
Component carrier manager implementation which simply does nothing.
Service Access Point (SAP) offered by the UE component carrier manager to the UE RRC...
virtual LteUeCcmRrcSapProvider * GetLteCcmRrcSapProvider()
Exports the "provider" part of the ComponentCarrier Management SAP interface.
Service Access Point (SAP) offered by the MAC to the RLC See Femto Forum MAC Scheduler Interface Spec...
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
static TypeId GetTypeId()
Get the type ID.
SimpleUeCcmMacSapProvider class.
Service Access Point (SAP) offered by the MAC to the RLC See Femto Forum MAC Scheduler Interface Spec...
SimpleUeComponentCarrierManager()
Creates a No-op CCS algorithm instance.
void DoNotifyHarqDeliveryFailure()
Notify HARQ deliver failure.
friend class SimpleUeCcmMacSapUser
allow SimpleUeCcmMacSapUser class friend access
virtual void NotifyTxOpportunity(uint32_t bytes, uint8_t layer, uint8_t harqId, uint8_t componentCarrierId, uint16_t rnti, uint8_t lcid)
Called by the MAC to notify the RLC that the scheduler granted a transmission opportunity to this RLC...
LteMacSapUser * m_ccmMacSapUser
Interface to the eNodeB RLC instance.
SimpleUeComponentCarrierManager * m_mac
the component carrier manager
std::vector< LteUeCcmRrcSapProvider::LcsConfig > DoAddLc(uint8_t lcId, LteUeCmacSapProvider::LogicalChannelConfig lcConfig, LteMacSapUser *msu)
Add LC function.
a unique identifier for an interface.
friend class SimpleUeCcmMacSapProvider
allow SimpleUeCcmMacSapProvider class friend access
virtual void SetLteCcmRrcSapUser(LteUeCcmRrcSapUser *s)
Set the "user" part of the ComponentCarrier Management SAP interface that this UE component carrier m...
TypeId SetParent(TypeId tid)
Set the parent TypeId.
uint16_t m_noOfComponentCarriers
// The number of component carriers that this UE can support.
Parameters for LteMacSapProvider::TransmitPdu.