A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ns3::LteUeMac Class Reference

#include <lte-ue-mac.h>

+ Inheritance diagram for ns3::LteUeMac:
+ Collaboration diagram for ns3::LteUeMac:

Classes

struct  LcInfo
 

Public Member Functions

 LteUeMac ()
 
virtual ~LteUeMac ()
 
int64_t AssignStreams (int64_t stream)
 Assign a fixed random variable stream number to the random variables used by this model. More...
 
virtual void DoDispose (void)
 This method is called by Object::Dispose or by the object's destructor, whichever comes first. More...
 
void DoSubframeIndication (uint32_t frameNo, uint32_t subframeNo)
 Forwarded from LteUePhySapUser: trigger the start from a new frame. More...
 
LteMacSapProviderGetLteMacSapProvider (void)
 
LteUeCmacSapProviderGetLteUeCmacSapProvider (void)
 
LteUePhySapUserGetLteUePhySapUser ()
 Get the PHY SAP user. More...
 
void SetLteUeCmacSapUser (LteUeCmacSapUser *s)
 
void SetLteUePhySapProvider (LteUePhySapProvider *s)
 Set the PHY SAP Provider. More...
 
- Public Member Functions inherited from ns3::Object
 Object ()
 
virtual ~Object ()
 
void AggregateObject (Ptr< Object > other)
 
void Dispose (void)
 Run the DoDispose methods of this object and all the objects aggregated to it. More...
 
AggregateIterator GetAggregateIterator (void) const
 
virtual TypeId GetInstanceTypeId (void) const
 
template<typename T >
Ptr< T > GetObject (void) const
 
template<typename T >
Ptr< T > GetObject (TypeId tid) const
 
void Initialize (void)
 This method calls the virtual DoInitialize method on all the objects aggregated to this object. More...
 
- Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
 SimpleRefCount ()
 Constructor. More...
 
 SimpleRefCount (const SimpleRefCount &o)
 Copy constructor. More...
 
uint32_t GetReferenceCount (void) const
 Get the reference count of the object. More...
 
SimpleRefCountoperator= (const SimpleRefCount &o)
 Assignment. More...
 
void Ref (void) const
 Increment the reference count. More...
 
void Unref (void) const
 Decrement the reference count. More...
 
- Public Member Functions inherited from ns3::ObjectBase
virtual ~ObjectBase ()
 Virtual destructor. More...
 
void GetAttribute (std::string name, AttributeValue &value) const
 
bool GetAttributeFailSafe (std::string name, AttributeValue &attribute) const
 
void SetAttribute (std::string name, const AttributeValue &value)
 
bool SetAttributeFailSafe (std::string name, const AttributeValue &value)
 
bool TraceConnect (std::string name, std::string context, const CallbackBase &cb)
 
bool TraceConnectWithoutContext (std::string name, const CallbackBase &cb)
 
bool TraceDisconnect (std::string name, std::string context, const CallbackBase &cb)
 
bool TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb)
 

Static Public Member Functions

static TypeId GetTypeId (void)
 
- Static Public Member Functions inherited from ns3::Object
static TypeId GetTypeId (void)
 Register this type. More...
 
- Static Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
static void Cleanup (void)
 Noop. More...
 
- Static Public Member Functions inherited from ns3::ObjectBase
static TypeId GetTypeId (void)
 Get the type ID. More...
 

Private Member Functions

void DoAddLc (uint8_t lcId, LteUeCmacSapProvider::LogicalChannelConfig lcConfig, LteMacSapUser *msu)
 
void DoConfigureRach (LteUeCmacSapProvider::RachConfig rc)
 
void DoReceiveLteControlMessage (Ptr< LteControlMessage > msg)
 
void DoReceivePhyPdu (Ptr< Packet > p)
 
void DoRemoveLc (uint8_t lcId)
 
void DoReportBufferStatus (LteMacSapProvider::ReportBufferStatusParameters params)
 
void DoReset ()
 
void DoStartContentionBasedRandomAccessProcedure ()
 
void DoStartNonContentionBasedRandomAccessProcedure (uint16_t rnti, uint8_t rapId, uint8_t prachMask)
 
void DoTransmitPdu (LteMacSapProvider::TransmitPduParameters params)
 
void RandomlySelectAndSendRaPreamble ()
 
void RaResponseTimeout (bool contention)
 
void RecvRaResponse (BuildRarListElement_s raResponse)
 
void RefreshHarqProcessesPacketBuffer (void)
 
void SendRaPreamble (bool contention)
 
void SendReportBufferStatus (void)
 
void StartWaitingForRaResponse ()
 

Private Attributes

uint16_t m_backoffParameter
 
Time m_bsrLast
 
Time m_bsrPeriodicity
 
LteUeCmacSapProviderm_cmacSapProvider
 
LteUeCmacSapUserm_cmacSapUser
 
uint32_t m_frameNo
 
bool m_freshUlBsr
 
uint8_t m_harqProcessId
 
std::map< uint8_t, LcInfom_lcInfoMap
 
LteMacSapProviderm_macSapProvider
 
std::vector< Ptr< PacketBurst > > m_miUlHarqProcessesPacket
 
std::vector< uint8_t > m_miUlHarqProcessesPacketTimer
 
EventId m_noRaResponseReceivedEvent
 
uint8_t m_preambleTransmissionCounter
 
LteUeCmacSapProvider::RachConfig m_rachConfig
 
bool m_rachConfigured
 
uint8_t m_raPreambleId
 
Ptr< UniformRandomVariablem_raPreambleUniformVariable
 
uint8_t m_raRnti
 
uint16_t m_rnti
 
uint32_t m_subframeNo
 
LteUePhySapProviderm_uePhySapProvider
 
LteUePhySapUserm_uePhySapUser
 
std::map< uint8_t,
LteMacSapProvider::ReportBufferStatusParameters
m_ulBsrReceived
 
bool m_waitingForRaResponse
 

Friends

class UeMemberLteMacSapProvider
 
class UeMemberLteUeCmacSapProvider
 
class UeMemberLteUePhySapUser
 

Additional Inherited Members

- Protected Member Functions inherited from ns3::Object
 Object (const Object &o)
 
virtual void DoInitialize (void)
 This method is called only once by Object::Initialize. More...
 
virtual void NotifyNewAggregate (void)
 This method is invoked whenever two sets of objects are aggregated together. More...
 
- Protected Member Functions inherited from ns3::ObjectBase
void ConstructSelf (const AttributeConstructionList &attributes)
 
virtual void NotifyConstructionCompleted (void)
 This method is invoked once all member attributes have been initialized. More...
 

Detailed Description

Config Paths

ns3::LteUeMac is accessible through the following paths with Config::Set and Config::Connect:

  • /NodeList/[i]/DeviceList/[i]/$ns3::LteNetDevice/$ns3::LteUeNetDevice/LteUeMac
  • /NodeList/[i]/DeviceList/[i]/$ns3::LteUeNetDevice/LteUeMac

No Attributes are defined for this type.
No TraceSources are defined for this type.

Definition at line 43 of file lte-ue-mac.h.

Constructor & Destructor Documentation

ns3::LteUeMac::~LteUeMac ( )
virtual

Definition at line 230 of file lte-ue-mac.cc.

References NS_LOG_FUNCTION.

Member Function Documentation

int64_t ns3::LteUeMac::AssignStreams ( int64_t  stream)

Assign a fixed random variable stream number to the random variables used by this model.

Return the number of streams (possibly zero) that have been assigned.

Parameters
streamfirst stream index to use
Returns
the number of stream indices assigned by this model

Definition at line 783 of file lte-ue-mac.cc.

References m_raPreambleUniformVariable, NS_LOG_FUNCTION, and ns3::RandomVariableStream::SetStream().

+ Here is the call graph for this function:

void ns3::LteUeMac::DoAddLc ( uint8_t  lcId,
LteUeCmacSapProvider::LogicalChannelConfig  lcConfig,
LteMacSapUser msu 
)
private

Definition at line 494 of file lte-ue-mac.cc.

References ns3::LteUeMac::LcInfo::lcConfig, m_lcInfoMap, NS_ASSERT_MSG, and NS_LOG_FUNCTION.

Referenced by ns3::UeMemberLteUeCmacSapProvider::AddLc().

+ Here is the caller graph for this function:

void ns3::LteUeMac::DoConfigureRach ( LteUeCmacSapProvider::RachConfig  rc)
private

Definition at line 463 of file lte-ue-mac.cc.

References m_rachConfig, m_rachConfigured, and NS_LOG_FUNCTION.

Referenced by ns3::UeMemberLteUeCmacSapProvider::ConfigureRach().

+ Here is the caller graph for this function:

void ns3::LteUeMac::DoDispose ( void  )
virtual

This method is called by Object::Dispose or by the object's destructor, whichever comes first.

Subclasses are expected to implement their real destruction code in an overriden version of this method and chain up to their parent's implementation once they are done. i.e., for simplicity, the destructor of every subclass should be empty and its content should be moved to the associated DoDispose method.

It is safe to call GetObject from within this method.

Reimplemented from ns3::Object.

Definition at line 236 of file lte-ue-mac.cc.

References ns3::Object::DoDispose(), m_cmacSapProvider, m_macSapProvider, m_miUlHarqProcessesPacket, m_uePhySapUser, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

void ns3::LteUeMac::DoReceiveLteControlMessage ( Ptr< LteControlMessage msg)
private
Todo:
RRC generates the RecvRaResponse messaged for avoiding holes in transmission at PHY layer (which produce erroneous UL CQI evaluation)

Definition at line 552 of file lte-ue-mac.cc.

References ns3::Packet::Copy(), HARQ_PERIOD, list, m_freshUlBsr, m_harqProcessId, m_lcInfoMap, m_miUlHarqProcessesPacket, m_miUlHarqProcessesPacketTimer, m_raPreambleId, m_raRnti, m_rnti, m_uePhySapProvider, m_ulBsrReceived, m_waitingForRaResponse, NS_FATAL_ERROR, NS_LOG_DEBUG, NS_LOG_ERROR, NS_LOG_FUNCTION, NS_LOG_LOGIC, NS_LOG_WARN, ns3::LteControlMessage::RAR, RecvRaResponse(), ns3::LteUePhySapProvider::SendMacPdu(), and ns3::LteControlMessage::UL_DCI.

Referenced by ns3::UeMemberLteUePhySapUser::ReceiveLteControlMessage().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::LteUeMac::DoReceivePhyPdu ( Ptr< Packet p)
private

Definition at line 537 of file lte-ue-mac.cc.

References ns3::LteRadioBearerTag::GetLcid(), ns3::LteRadioBearerTag::GetRnti(), m_lcInfoMap, m_rnti, NS_ASSERT_MSG, and ns3::Packet::RemovePacketTag().

Referenced by ns3::UeMemberLteUePhySapUser::ReceivePhyPdu().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::LteUeMac::DoRemoveLc ( uint8_t  lcId)
private

Definition at line 506 of file lte-ue-mac.cc.

References m_lcInfoMap, NS_ASSERT_MSG, and NS_LOG_FUNCTION.

Referenced by ns3::UeMemberLteUeCmacSapProvider::RemoveLc().

+ Here is the caller graph for this function:

void ns3::LteUeMac::DoReportBufferStatus ( LteMacSapProvider::ReportBufferStatusParameters  params)
private

Definition at line 293 of file lte-ue-mac.cc.

References ns3::LteMacSapProvider::ReportBufferStatusParameters::lcid, m_freshUlBsr, m_ulBsrReceived, and NS_LOG_FUNCTION.

Referenced by ns3::UeMemberLteMacSapProvider::ReportBufferStatus().

+ Here is the caller graph for this function:

void ns3::LteUeMac::DoReset ( void  )
private

Definition at line 514 of file lte-ue-mac.cc.

References m_freshUlBsr, m_lcInfoMap, m_rachConfigured, m_ulBsrReceived, and NS_LOG_FUNCTION.

Referenced by ns3::UeMemberLteUeCmacSapProvider::Reset().

+ Here is the caller graph for this function:

void ns3::LteUeMac::DoStartContentionBasedRandomAccessProcedure ( )
private

Definition at line 471 of file lte-ue-mac.cc.

References m_backoffParameter, m_preambleTransmissionCounter, m_rachConfigured, NS_ASSERT_MSG, NS_LOG_FUNCTION, and RandomlySelectAndSendRaPreamble().

Referenced by ns3::UeMemberLteUeCmacSapProvider::StartContentionBasedRandomAccessProcedure().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::LteUeMac::DoStartNonContentionBasedRandomAccessProcedure ( uint16_t  rnti,
uint8_t  rapId,
uint8_t  prachMask 
)
private

Definition at line 483 of file lte-ue-mac.cc.

References m_raPreambleId, m_rnti, NS_ASSERT_MSG, NS_LOG_FUNCTION, and SendRaPreamble().

Referenced by ns3::UeMemberLteUeCmacSapProvider::StartNonContentionBasedRandomAccessProcedure().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::LteUeMac::DoSubframeIndication ( uint32_t  frameNo,
uint32_t  subframeNo 
)

Forwarded from LteUePhySapUser: trigger the start from a new frame.

Parameters
frameNoframe number
subframeNosubframe number

Definition at line 767 of file lte-ue-mac.cc.

References HARQ_PERIOD, m_bsrLast, m_bsrPeriodicity, m_frameNo, m_freshUlBsr, m_harqProcessId, m_subframeNo, ns3::Simulator::Now(), NS_LOG_FUNCTION, RefreshHarqProcessesPacketBuffer(), and SendReportBufferStatus().

Referenced by ns3::UeMemberLteUePhySapUser::SubframeIndication().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

LteMacSapProvider * ns3::LteUeMac::GetLteMacSapProvider ( void  )

Definition at line 261 of file lte-ue-mac.cc.

References m_macSapProvider.

LteUeCmacSapProvider * ns3::LteUeMac::GetLteUeCmacSapProvider ( void  )

Definition at line 273 of file lte-ue-mac.cc.

References m_cmacSapProvider.

LteUePhySapUser * ns3::LteUeMac::GetLteUePhySapUser ( void  )

Get the PHY SAP user.

Returns
a pointer to the SAP user of the PHY

Definition at line 248 of file lte-ue-mac.cc.

References m_uePhySapUser.

TypeId ns3::LteUeMac::GetTypeId ( void  )
static

Definition at line 195 of file lte-ue-mac.cc.

References ns3::TypeId::SetParent().

+ Here is the call graph for this function:

void ns3::LteUeMac::RandomlySelectAndSendRaPreamble ( )
private
void ns3::LteUeMac::RaResponseTimeout ( bool  contention)
private
void ns3::LteUeMac::RefreshHarqProcessesPacketBuffer ( void  )
private

Definition at line 742 of file lte-ue-mac.cc.

References m_miUlHarqProcessesPacket, m_miUlHarqProcessesPacketTimer, NS_LOG_FUNCTION, and NS_LOG_INFO.

Referenced by DoSubframeIndication().

+ Here is the caller graph for this function:

void ns3::LteUeMac::SetLteUeCmacSapUser ( LteUeCmacSapUser s)

Definition at line 267 of file lte-ue-mac.cc.

References m_cmacSapUser, and s.

void ns3::LteUeMac::SetLteUePhySapProvider ( LteUePhySapProvider s)

Set the PHY SAP Provider.

Parameters
sa pointer to the PHY SAP Provider

Definition at line 254 of file lte-ue-mac.cc.

References m_uePhySapProvider, and s.

void ns3::LteUeMac::StartWaitingForRaResponse ( )
private

Definition at line 399 of file lte-ue-mac.cc.

References m_waitingForRaResponse, and NS_LOG_FUNCTION.

Referenced by SendRaPreamble().

+ Here is the caller graph for this function:

Friends And Related Function Documentation

friend class UeMemberLteMacSapProvider
friend

Definition at line 46 of file lte-ue-mac.h.

Referenced by LteUeMac().

friend class UeMemberLteUeCmacSapProvider
friend

Definition at line 45 of file lte-ue-mac.h.

Referenced by LteUeMac().

friend class UeMemberLteUePhySapUser
friend

Definition at line 47 of file lte-ue-mac.h.

Referenced by LteUeMac().

Member Data Documentation

uint16_t ns3::LteUeMac::m_backoffParameter
private

Definition at line 152 of file lte-ue-mac.h.

Referenced by DoStartContentionBasedRandomAccessProcedure().

Time ns3::LteUeMac::m_bsrLast
private

Definition at line 138 of file lte-ue-mac.h.

Referenced by DoSubframeIndication().

Time ns3::LteUeMac::m_bsrPeriodicity
private

Definition at line 137 of file lte-ue-mac.h.

Referenced by DoSubframeIndication().

LteUeCmacSapProvider* ns3::LteUeMac::m_cmacSapProvider
private

Definition at line 129 of file lte-ue-mac.h.

Referenced by DoDispose(), GetLteUeCmacSapProvider(), and LteUeMac().

LteUeCmacSapUser* ns3::LteUeMac::m_cmacSapUser
private

Definition at line 128 of file lte-ue-mac.h.

Referenced by RaResponseTimeout(), RecvRaResponse(), and SetLteUeCmacSapUser().

uint32_t ns3::LteUeMac::m_frameNo
private

Definition at line 156 of file lte-ue-mac.h.

Referenced by DoSubframeIndication().

bool ns3::LteUeMac::m_freshUlBsr
private
uint8_t ns3::LteUeMac::m_harqProcessId
private

Definition at line 142 of file lte-ue-mac.h.

Referenced by DoReceiveLteControlMessage(), DoSubframeIndication(), and DoTransmitPdu().

std::map<uint8_t, LcInfo> ns3::LteUeMac::m_lcInfoMap
private
LteMacSapProvider* ns3::LteUeMac::m_macSapProvider
private

Definition at line 126 of file lte-ue-mac.h.

Referenced by DoDispose(), GetLteMacSapProvider(), and LteUeMac().

std::vector< Ptr<PacketBurst> > ns3::LteUeMac::m_miUlHarqProcessesPacket
private
std::vector< uint8_t > ns3::LteUeMac::m_miUlHarqProcessesPacketTimer
private
EventId ns3::LteUeMac::m_noRaResponseReceivedEvent
private

Definition at line 153 of file lte-ue-mac.h.

Referenced by RecvRaResponse(), and SendRaPreamble().

uint8_t ns3::LteUeMac::m_preambleTransmissionCounter
private

Definition at line 151 of file lte-ue-mac.h.

Referenced by DoStartContentionBasedRandomAccessProcedure(), and RaResponseTimeout().

LteUeCmacSapProvider::RachConfig ns3::LteUeMac::m_rachConfig
private
bool ns3::LteUeMac::m_rachConfigured
private
uint8_t ns3::LteUeMac::m_raPreambleId
private
Ptr<UniformRandomVariable> ns3::LteUeMac::m_raPreambleUniformVariable
private

Definition at line 154 of file lte-ue-mac.h.

Referenced by AssignStreams(), LteUeMac(), and RandomlySelectAndSendRaPreamble().

uint8_t ns3::LteUeMac::m_raRnti
private

Definition at line 158 of file lte-ue-mac.h.

Referenced by DoReceiveLteControlMessage(), and SendRaPreamble().

uint32_t ns3::LteUeMac::m_subframeNo
private

Definition at line 157 of file lte-ue-mac.h.

Referenced by DoSubframeIndication(), and SendRaPreamble().

LteUePhySapProvider* ns3::LteUeMac::m_uePhySapProvider
private
LteUePhySapUser* ns3::LteUeMac::m_uePhySapUser
private

Definition at line 132 of file lte-ue-mac.h.

Referenced by DoDispose(), GetLteUePhySapUser(), and LteUeMac().

std::map<uint8_t, LteMacSapProvider::ReportBufferStatusParameters> ns3::LteUeMac::m_ulBsrReceived
private
bool ns3::LteUeMac::m_waitingForRaResponse
private

The documentation for this class was generated from the following files: