#include "lte-ue-mac.h"
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) |
Destructor implementation. More... | |
void | DoSubframeIndication (uint32_t frameNo, uint32_t subframeNo) |
Forwarded from LteUePhySapUser: trigger the start from a new frame. More... | |
LteMacSapProvider * | GetLteMacSapProvider (void) |
LteUeCmacSapProvider * | GetLteUeCmacSapProvider (void) |
LteUePhySapUser * | GetLteUePhySapUser () |
Get the PHY SAP user. More... | |
void | SetLteUeCmacSapUser (LteUeCmacSapUser *s) |
void | SetLteUePhySapProvider (LteUePhySapProvider *s) |
Set the PHY SAP Provider. More... | |
![]() | |
Object () | |
Constructor. More... | |
virtual | ~Object () |
Destructor. More... | |
void | AggregateObject (Ptr< Object > other) |
Aggregate two Objects together. More... | |
void | Dispose (void) |
Dispose of this Object. More... | |
AggregateIterator | GetAggregateIterator (void) const |
Get an iterator to the Objects aggregated to this one. More... | |
virtual TypeId | GetInstanceTypeId (void) const |
Implement the GetInstanceTypeId method defined in ObjectBase. More... | |
template<typename T > | |
Ptr< T > | GetObject (void) const |
Get a pointer to the requested aggregated Object. More... | |
template<typename T > | |
Ptr< T > | GetObject (TypeId tid) const |
Get a pointer to the requested aggregated Object by TypeId. More... | |
void | Initialize (void) |
Invoke DoInitialize on all Objects aggregated to this one. More... | |
![]() | |
SimpleRefCount () | |
Constructor. More... | |
SimpleRefCount (const SimpleRefCount &o) | |
Copy constructor. More... | |
uint32_t | GetReferenceCount (void) const |
Get the reference count of the object. More... | |
SimpleRefCount & | operator= (const SimpleRefCount &o) |
Assignment. More... | |
void | Ref (void) const |
Increment the reference count. More... | |
void | Unref (void) const |
Decrement the reference count. More... | |
![]() | |
virtual | ~ObjectBase () |
Virtual destructor. More... | |
void | GetAttribute (std::string name, AttributeValue &value) const |
Get the value of an attribute, raising fatal errors if unsuccessful. More... | |
bool | GetAttributeFailSafe (std::string name, AttributeValue &value) const |
Get the value of an attribute without raising erros. More... | |
void | SetAttribute (std::string name, const AttributeValue &value) |
Set a single attribute, raising fatal errors if unsuccessful. More... | |
bool | SetAttributeFailSafe (std::string name, const AttributeValue &value) |
Set a single attribute without raising errors. More... | |
bool | TraceConnect (std::string name, std::string context, const CallbackBase &cb) |
Connect a TraceSource to a Callback with a context. More... | |
bool | TraceConnectWithoutContext (std::string name, const CallbackBase &cb) |
Connect a TraceSource to a Callback without a context. More... | |
bool | TraceDisconnect (std::string name, std::string context, const CallbackBase &cb) |
Disconnect from a TraceSource a Callback previously connected with a context. More... | |
bool | TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb) |
Disconnect from a TraceSource a Callback previously connected without a context. More... | |
Static Public Member Functions | |
static TypeId | GetTypeId (void) |
![]() | |
static TypeId | GetTypeId (void) |
Register this type. More... | |
![]() | |
static void | Cleanup (void) |
Noop. More... | |
![]() | |
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 |
LteUeCmacSapProvider * | m_cmacSapProvider |
LteUeCmacSapUser * | m_cmacSapUser |
uint32_t | m_frameNo |
bool | m_freshUlBsr |
uint8_t | m_harqProcessId |
std::map< uint8_t, LcInfo > | m_lcInfoMap |
LteMacSapProvider * | m_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< UniformRandomVariable > | m_raPreambleUniformVariable |
uint8_t | m_raRnti |
uint16_t | m_rnti |
uint32_t | m_subframeNo |
LteUePhySapProvider * | m_uePhySapProvider |
LteUePhySapUser * | m_uePhySapUser |
std::map< uint8_t, LteMacSapProvider::ReportBufferStatusParameters > | m_ulBsrReceived |
bool | m_waitingForRaResponse |
Friends | |
class | UeMemberLteMacSapProvider |
class | UeMemberLteUeCmacSapProvider |
class | UeMemberLteUePhySapUser |
Additional Inherited Members | |
![]() | |
Object (const Object &o) | |
Copy an Object. More... | |
virtual void | DoInitialize (void) |
Initialize() implementation. More... | |
virtual void | NotifyNewAggregate (void) |
Notify all Objects aggregated to this one of a new Object being aggregated. More... | |
![]() | |
void | ConstructSelf (const AttributeConstructionList &attributes) |
Complete construction of ObjectBase; invoked by derived classes. More... | |
virtual void | NotifyConstructionCompleted (void) |
Notifier called once the ObjectBase is fully constructed. More... | |
![]() | |
static TypeId | GetObjectIid (void) |
Ensure the TypeId for ObjectBase gets fully configured to anchor the inheritance tree properly. More... | |
ns3::LteUeMac is accessible through the following paths with Config::Set and Config::Connect:
No Attributes are defined for this type.
No TraceSources are defined for this type.
Size of this type is 304 bytes (on a 64-bit architecture).
Definition at line 43 of file lte-ue-mac.h.
ns3::LteUeMac::LteUeMac | ( | ) |
Definition at line 204 of file lte-ue-mac.cc.
References HARQ_PERIOD, m_cmacSapProvider, m_macSapProvider, m_miUlHarqProcessesPacket, m_miUlHarqProcessesPacketTimer, m_raPreambleUniformVariable, m_uePhySapUser, NS_LOG_FUNCTION, UeMemberLteMacSapProvider, UeMemberLteUeCmacSapProvider, and UeMemberLteUePhySapUser.
|
virtual |
Definition at line 230 of file lte-ue-mac.cc.
References NS_LOG_FUNCTION.
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.
stream | first stream index to use |
Definition at line 791 of file lte-ue-mac.cc.
References m_raPreambleUniformVariable, NS_LOG_FUNCTION, and ns3::RandomVariableStream::SetStream().
|
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().
|
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().
|
virtual |
Destructor implementation.
This method is called by 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.
|
private |
Definition at line 560 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().
Definition at line 539 of file lte-ue-mac.cc.
References ns3::LteRadioBearerTag::GetLcid(), ns3::LteRadioBearerTag::GetRnti(), m_lcInfoMap, m_rnti, NS_LOG_WARN, and ns3::Packet::RemovePacketTag().
Referenced by ns3::UeMemberLteUePhySapUser::ReceivePhyPdu().
|
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().
|
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().
|
private |
Definition at line 514 of file lte-ue-mac.cc.
References ns3::EventId::Cancel(), m_freshUlBsr, m_lcInfoMap, m_noRaResponseReceivedEvent, m_rachConfigured, m_ulBsrReceived, and NS_LOG_FUNCTION.
Referenced by ns3::UeMemberLteUeCmacSapProvider::Reset().
|
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().
|
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().
void ns3::LteUeMac::DoSubframeIndication | ( | uint32_t | frameNo, |
uint32_t | subframeNo | ||
) |
Forwarded from LteUePhySapUser: trigger the start from a new frame.
frameNo | frame number |
subframeNo | subframe number |
Definition at line 775 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().
|
private |
Definition at line 280 of file lte-ue-mac.cc.
References ns3::Packet::AddPacketTag(), HARQ_PERIOD, ns3::LteMacSapProvider::TransmitPduParameters::lcid, m_harqProcessId, m_miUlHarqProcessesPacket, m_miUlHarqProcessesPacketTimer, m_rnti, m_uePhySapProvider, NS_ASSERT_MSG, NS_LOG_FUNCTION, ns3::LteMacSapProvider::TransmitPduParameters::pdu, ns3::LteMacSapProvider::TransmitPduParameters::rnti, and ns3::LteUePhySapProvider::SendMacPdu().
Referenced by ns3::UeMemberLteMacSapProvider::TransmitPdu().
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.
Definition at line 248 of file lte-ue-mac.cc.
References m_uePhySapUser.
|
static |
Definition at line 194 of file lte-ue-mac.cc.
References ns3::TypeId::SetParent().
|
private |
Definition at line 365 of file lte-ue-mac.cc.
References ns3::RandomVariableStream::GetInteger(), m_rachConfig, m_rachConfigured, m_raPreambleId, m_raPreambleUniformVariable, NS_ASSERT_MSG, NS_LOG_FUNCTION, ns3::LteUeCmacSapProvider::RachConfig::numberOfRaPreambles, and SendRaPreamble().
Referenced by DoStartContentionBasedRandomAccessProcedure(), and RaResponseTimeout().
|
private |
Definition at line 437 of file lte-ue-mac.cc.
References m_cmacSapUser, m_preambleTransmissionCounter, m_rachConfig, m_waitingForRaResponse, ns3::LteUeCmacSapUser::NotifyRandomAccessFailed(), NS_LOG_FUNCTION, NS_LOG_INFO, ns3::LteUeCmacSapProvider::RachConfig::preambleTransMax, RandomlySelectAndSendRaPreamble(), and SendRaPreamble().
Referenced by SendRaPreamble().
|
private |
Definition at line 406 of file lte-ue-mac.cc.
References ns3::EventId::Cancel(), m_cmacSapUser, ns3::BuildRarListElement_s::m_grant, m_lcInfoMap, m_noRaResponseReceivedEvent, m_raPreambleId, m_rnti, ns3::BuildRarListElement_s::m_rnti, ns3::UlGrant_s::m_tbSize, m_ulBsrReceived, m_waitingForRaResponse, ns3::LteUeCmacSapUser::NotifyRandomAccessSuccessful(), NS_ASSERT, NS_ASSERT_MSG, NS_LOG_FUNCTION, NS_LOG_INFO, and ns3::LteUeCmacSapUser::SetTemporaryCellRnti().
Referenced by DoReceiveLteControlMessage().
|
private |
Definition at line 750 of file lte-ue-mac.cc.
References m_miUlHarqProcessesPacket, m_miUlHarqProcessesPacketTimer, NS_LOG_FUNCTION, and NS_LOG_INFO.
Referenced by DoSubframeIndication().
|
private |
Definition at line 377 of file lte-ue-mac.cc.
References m_noRaResponseReceivedEvent, m_rachConfig, m_raPreambleId, m_raRnti, m_subframeNo, m_uePhySapProvider, ns3::MilliSeconds(), NS_ASSERT, NS_LOG_FUNCTION, NS_LOG_INFO, RaResponseTimeout(), ns3::LteUeCmacSapProvider::RachConfig::raResponseWindowSize, ns3::Simulator::Schedule(), ns3::LteUePhySapProvider::SendRachPreamble(), and StartWaitingForRaResponse().
Referenced by DoStartNonContentionBasedRandomAccessProcedure(), RandomlySelectAndSendRaPreamble(), and RaResponseTimeout().
|
private |
Definition at line 315 of file lte-ue-mac.cc.
References ns3::MacCeListElement_s::BSR, ns3::BufferSizeLevelBsr::BufferSize2BsrId(), ns3::MacCeValue_u::m_bufferStatus, m_lcInfoMap, ns3::MacCeListElement_s::m_macCeType, ns3::MacCeListElement_s::m_macCeValue, m_rnti, ns3::MacCeListElement_s::m_rnti, m_uePhySapProvider, m_ulBsrReceived, NS_ASSERT, NS_ASSERT_MSG, NS_LOG_FUNCTION, NS_LOG_INFO, and ns3::LteUePhySapProvider::SendLteControlMessage().
Referenced by DoSubframeIndication().
void ns3::LteUeMac::SetLteUeCmacSapUser | ( | LteUeCmacSapUser * | s | ) |
Definition at line 267 of file lte-ue-mac.cc.
References m_cmacSapUser.
void ns3::LteUeMac::SetLteUePhySapProvider | ( | LteUePhySapProvider * | s | ) |
Set the PHY SAP Provider.
s | a pointer to the PHY SAP Provider |
Definition at line 254 of file lte-ue-mac.cc.
References m_uePhySapProvider.
|
private |
Definition at line 399 of file lte-ue-mac.cc.
References m_waitingForRaResponse, and NS_LOG_FUNCTION.
Referenced by SendRaPreamble().
|
friend |
Definition at line 46 of file lte-ue-mac.h.
Referenced by LteUeMac().
|
friend |
Definition at line 45 of file lte-ue-mac.h.
Referenced by LteUeMac().
|
friend |
Definition at line 47 of file lte-ue-mac.h.
Referenced by LteUeMac().
|
private |
Definition at line 152 of file lte-ue-mac.h.
Referenced by DoStartContentionBasedRandomAccessProcedure().
|
private |
Definition at line 138 of file lte-ue-mac.h.
Referenced by DoSubframeIndication().
|
private |
Definition at line 137 of file lte-ue-mac.h.
Referenced by DoSubframeIndication().
|
private |
Definition at line 129 of file lte-ue-mac.h.
Referenced by DoDispose(), GetLteUeCmacSapProvider(), and LteUeMac().
|
private |
Definition at line 128 of file lte-ue-mac.h.
Referenced by RaResponseTimeout(), RecvRaResponse(), and SetLteUeCmacSapUser().
|
private |
Definition at line 156 of file lte-ue-mac.h.
Referenced by DoSubframeIndication().
|
private |
Definition at line 140 of file lte-ue-mac.h.
Referenced by DoReceiveLteControlMessage(), DoReportBufferStatus(), DoReset(), and DoSubframeIndication().
|
private |
Definition at line 142 of file lte-ue-mac.h.
Referenced by DoReceiveLteControlMessage(), DoSubframeIndication(), and DoTransmitPdu().
|
private |
Definition at line 124 of file lte-ue-mac.h.
Referenced by DoAddLc(), DoReceiveLteControlMessage(), DoReceivePhyPdu(), DoRemoveLc(), DoReset(), RecvRaResponse(), and SendReportBufferStatus().
|
private |
Definition at line 126 of file lte-ue-mac.h.
Referenced by DoDispose(), GetLteMacSapProvider(), and LteUeMac().
|
private |
Definition at line 143 of file lte-ue-mac.h.
Referenced by DoDispose(), DoReceiveLteControlMessage(), DoTransmitPdu(), LteUeMac(), and RefreshHarqProcessesPacketBuffer().
|
private |
Definition at line 144 of file lte-ue-mac.h.
Referenced by DoReceiveLteControlMessage(), DoTransmitPdu(), LteUeMac(), and RefreshHarqProcessesPacketBuffer().
|
private |
Definition at line 153 of file lte-ue-mac.h.
Referenced by DoReset(), RecvRaResponse(), and SendRaPreamble().
|
private |
Definition at line 151 of file lte-ue-mac.h.
Referenced by DoStartContentionBasedRandomAccessProcedure(), and RaResponseTimeout().
|
private |
Definition at line 149 of file lte-ue-mac.h.
Referenced by DoConfigureRach(), RandomlySelectAndSendRaPreamble(), RaResponseTimeout(), and SendRaPreamble().
|
private |
Definition at line 148 of file lte-ue-mac.h.
Referenced by DoConfigureRach(), DoReset(), DoStartContentionBasedRandomAccessProcedure(), and RandomlySelectAndSendRaPreamble().
|
private |
Definition at line 150 of file lte-ue-mac.h.
Referenced by DoReceiveLteControlMessage(), DoStartNonContentionBasedRandomAccessProcedure(), RandomlySelectAndSendRaPreamble(), RecvRaResponse(), and SendRaPreamble().
|
private |
Definition at line 154 of file lte-ue-mac.h.
Referenced by AssignStreams(), LteUeMac(), and RandomlySelectAndSendRaPreamble().
|
private |
Definition at line 158 of file lte-ue-mac.h.
Referenced by DoReceiveLteControlMessage(), and SendRaPreamble().
|
private |
Definition at line 146 of file lte-ue-mac.h.
Referenced by DoReceiveLteControlMessage(), DoReceivePhyPdu(), DoStartNonContentionBasedRandomAccessProcedure(), DoTransmitPdu(), RecvRaResponse(), and SendReportBufferStatus().
|
private |
Definition at line 157 of file lte-ue-mac.h.
Referenced by DoSubframeIndication(), and SendRaPreamble().
|
private |
Definition at line 131 of file lte-ue-mac.h.
Referenced by DoReceiveLteControlMessage(), DoTransmitPdu(), SendRaPreamble(), SendReportBufferStatus(), and SetLteUePhySapProvider().
|
private |
Definition at line 132 of file lte-ue-mac.h.
Referenced by DoDispose(), GetLteUePhySapUser(), and LteUeMac().
|
private |
Definition at line 134 of file lte-ue-mac.h.
Referenced by DoReceiveLteControlMessage(), DoReportBufferStatus(), DoReset(), RecvRaResponse(), and SendReportBufferStatus().
|
private |
Definition at line 159 of file lte-ue-mac.h.
Referenced by DoReceiveLteControlMessage(), RaResponseTimeout(), RecvRaResponse(), and StartWaitingForRaResponse().