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

This class implements a testing loopback MAC layer. More...

#include <lte-test-entities.h>

+ Inheritance diagram for ns3::LteTestMac:
+ Collaboration diagram for ns3::LteTestMac:

Public Types

enum  RlcHeaderType_t { UM_RLC_HEADER = 0, AM_RLC_HEADER = 1 }
 
enum  TxOpportunityMode_t { MANUAL_MODE = 0, AUTOMATIC_MODE = 1, RANDOM_MODE = 2 }
 

Public Member Functions

 LteTestMac (void)
 
virtual ~LteTestMac (void)
 
virtual void DoDispose (void)
 This method is called by Object::Dispose or by the object's destructor, whichever comes first. More...
 
std::string GetDataReceived (void)
 
LteMacSapProviderGetLteMacSapProvider (void)
 Get the MAC SAP provider. More...
 
uint32_t GetRxBytes (void)
 
uint32_t GetRxPdus (void)
 
uint32_t GetTxBytes (void)
 
uint32_t GetTxPdus (void)
 
bool Receive (Ptr< NetDevice > nd, Ptr< const Packet > p, uint16_t protocol, const Address &addr)
 
void SendTxOpportunity (Time, uint32_t)
 
void SetDevice (Ptr< NetDevice > device)
 
void SetLteMacLoopback (Ptr< LteTestMac > s)
 Set the other side of the MAC Loopback. More...
 
void SetLteMacSapUser (LteMacSapUser *s)
 Set the MAC SAP user. More...
 
void SetPdcpHeaderPresent (bool present)
 
void SetRlcHeaderType (uint8_t rlcHeaderType)
 
void SetTxOpportunityMode (uint8_t mode)
 
void SetTxOppSize (uint32_t txOppSize)
 
void SetTxOppTime (Time txOppTime)
 
- 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 DoReportBufferStatus (LteMacSapProvider::ReportBufferStatusParameters)
 
void DoTransmitPdu (LteMacSapProvider::TransmitPduParameters)
 MAC SAP. More...
 

Private Attributes

Ptr< NetDevicem_device
 
Ptr< LteTestMacm_macLoopback
 
LteMacSapProviderm_macSapProvider
 
LteMacSapUserm_macSapUser
 
EventId m_nextTxOpp
 
bool m_pdcpHeaderPresent
 
std::string m_receivedData
 
uint8_t m_rlcHeaderType
 
uint32_t m_rxBytes
 
uint32_t m_rxPdus
 
uint32_t m_txBytes
 
uint8_t m_txOpportunityMode
 
uint32_t m_txOppSize
 
Time m_txOppTime
 
uint32_t m_txPdus
 

Friends

class EnbMacMemberLteMacSapProvider< LteTestMac >
 

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

This class implements a testing loopback MAC layer.

Definition at line 154 of file lte-test-entities.h.

Member Enumeration Documentation

Enumerator
UM_RLC_HEADER 
AM_RLC_HEADER 

Definition at line 203 of file lte-test-entities.h.

Enumerator
MANUAL_MODE 
AUTOMATIC_MODE 
RANDOM_MODE 

Definition at line 213 of file lte-test-entities.h.

Constructor & Destructor Documentation

ns3::LteTestMac::~LteTestMac ( void  )
virtual

Definition at line 370 of file lte-test-entities.cc.

References NS_LOG_FUNCTION.

Member Function Documentation

void ns3::LteTestMac::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 376 of file lte-test-entities.cc.

References m_device, m_macSapProvider, and NS_LOG_FUNCTION.

std::string ns3::LteTestMac::GetDataReceived ( void  )

Definition at line 413 of file lte-test-entities.cc.

References m_receivedData, and NS_LOG_FUNCTION.

Referenced by LteRlcUmTransmitterTestCase::DoCheckDataReceived(), and LteRlcAmTransmitterTestCase::DoCheckDataReceived().

+ Here is the caller graph for this function:

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

Get the MAC SAP provider.

Returns
a pointer to the SAP provider of the MAC

Definition at line 401 of file lte-test-entities.cc.

References m_macSapProvider.

Referenced by LteRlcUmTransmitterTestCase::DoRun(), LteRlcAmTransmitterTestCase::DoRun(), ns3::LteSimpleHelper::InstallSingleEnbDevice(), and ns3::LteSimpleHelper::InstallSingleUeDevice().

+ Here is the caller graph for this function:

uint32_t ns3::LteTestMac::GetRxBytes ( void  )

Definition at line 442 of file lte-test-entities.cc.

References m_rxBytes, and NS_LOG_FUNCTION.

uint32_t ns3::LteTestMac::GetRxPdus ( void  )

Definition at line 435 of file lte-test-entities.cc.

References m_rxPdus, and NS_LOG_FUNCTION.

uint32_t ns3::LteTestMac::GetTxBytes ( void  )

Definition at line 428 of file lte-test-entities.cc.

References m_txBytes, and NS_LOG_FUNCTION.

uint32_t ns3::LteTestMac::GetTxPdus ( void  )

Definition at line 421 of file lte-test-entities.cc.

References m_txPdus, and NS_LOG_FUNCTION.

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

Definition at line 336 of file lte-test-entities.cc.

References ns3::TypeId::SetParent().

+ Here is the call graph for this function:

bool ns3::LteTestMac::Receive ( Ptr< NetDevice nd,
Ptr< const Packet p,
uint16_t  protocol,
const Address addr 
)

Definition at line 592 of file lte-test-entities.cc.

References ns3::Packet::Copy(), ns3::Packet::GetSize(), m_macSapUser, m_rxBytes, m_rxPdus, NS_LOG_FUNCTION, and ns3::LteMacSapUser::ReceivePdu().

Referenced by ns3::LteSimpleHelper::InstallSingleEnbDevice(), and ns3::LteSimpleHelper::InstallSingleUeDevice().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::LteTestMac::SetDevice ( Ptr< NetDevice device)

Definition at line 389 of file lte-test-entities.cc.

References m_device.

Referenced by ns3::LteSimpleHelper::InstallSingleEnbDevice(), and ns3::LteSimpleHelper::InstallSingleUeDevice().

+ Here is the caller graph for this function:

void ns3::LteTestMac::SetLteMacLoopback ( Ptr< LteTestMac s)

Set the other side of the MAC Loopback.

Parameters
sa pointer to the other side of the MAC loopback

Definition at line 407 of file lte-test-entities.cc.

References m_macLoopback, and s.

void ns3::LteTestMac::SetLteMacSapUser ( LteMacSapUser s)

Set the MAC SAP user.

Parameters
sa pointer to the MAC SAP user

Definition at line 395 of file lte-test-entities.cc.

References m_macSapUser, and s.

Referenced by LteRlcUmTransmitterTestCase::DoRun(), LteRlcAmTransmitterTestCase::DoRun(), ns3::LteSimpleHelper::InstallSingleEnbDevice(), and ns3::LteSimpleHelper::InstallSingleUeDevice().

+ Here is the caller graph for this function:

void ns3::LteTestMac::SetPdcpHeaderPresent ( bool  present)

Definition at line 464 of file lte-test-entities.cc.

References m_pdcpHeaderPresent, and NS_LOG_FUNCTION.

void ns3::LteTestMac::SetRlcHeaderType ( uint8_t  rlcHeaderType)

Definition at line 471 of file lte-test-entities.cc.

References m_rlcHeaderType, and NS_LOG_FUNCTION.

Referenced by LteRlcUmTransmitterTestCase::DoRun(), and LteRlcAmTransmitterTestCase::DoRun().

+ Here is the caller graph for this function:

void ns3::LteTestMac::SetTxOpportunityMode ( uint8_t  mode)

Definition at line 478 of file lte-test-entities.cc.

References m_txOpportunityMode, m_txOppSize, m_txOppTime, NS_LOG_FUNCTION, RANDOM_MODE, and SendTxOpportunity().

Referenced by LteRlcAmE2eTestCase::DoRun(), and LteRlcUmE2eTestCase::DoRun().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::LteTestMac::SetTxOppSize ( uint32_t  txOppSize)

Definition at line 500 of file lte-test-entities.cc.

References m_txOppSize, and NS_LOG_FUNCTION.

Referenced by LteRlcAmE2eTestCase::DoRun(), and LteRlcUmE2eTestCase::DoRun().

+ Here is the caller graph for this function:

void ns3::LteTestMac::SetTxOppTime ( Time  txOppTime)

Definition at line 493 of file lte-test-entities.cc.

References m_txOppTime, and NS_LOG_FUNCTION.

Referenced by LteRlcAmE2eTestCase::DoRun(), and LteRlcUmE2eTestCase::DoRun().

+ Here is the caller graph for this function:

Friends And Related Function Documentation

friend class EnbMacMemberLteMacSapProvider< LteTestMac >
friend

Definition at line 157 of file lte-test-entities.h.

Member Data Documentation

Ptr<NetDevice> ns3::LteTestMac::m_device
private

Definition at line 243 of file lte-test-entities.h.

Referenced by DoDispose(), DoTransmitPdu(), LteTestMac(), and SetDevice().

Ptr<LteTestMac> ns3::LteTestMac::m_macLoopback
private

Definition at line 235 of file lte-test-entities.h.

Referenced by DoTransmitPdu(), LteTestMac(), and SetLteMacLoopback().

LteMacSapProvider* ns3::LteTestMac::m_macSapProvider
private

Definition at line 233 of file lte-test-entities.h.

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

LteMacSapUser* ns3::LteTestMac::m_macSapUser
private
EventId ns3::LteTestMac::m_nextTxOpp
private

Definition at line 246 of file lte-test-entities.h.

bool ns3::LteTestMac::m_pdcpHeaderPresent
private

Definition at line 240 of file lte-test-entities.h.

Referenced by DoTransmitPdu(), LteTestMac(), and SetPdcpHeaderPresent().

std::string ns3::LteTestMac::m_receivedData
private

Definition at line 237 of file lte-test-entities.h.

Referenced by DoTransmitPdu(), and GetDataReceived().

uint8_t ns3::LteTestMac::m_rlcHeaderType
private

Definition at line 239 of file lte-test-entities.h.

Referenced by DoTransmitPdu(), LteTestMac(), and SetRlcHeaderType().

uint32_t ns3::LteTestMac::m_rxBytes
private

Definition at line 254 of file lte-test-entities.h.

Referenced by GetRxBytes(), LteTestMac(), and Receive().

uint32_t ns3::LteTestMac::m_rxPdus
private

Definition at line 253 of file lte-test-entities.h.

Referenced by GetRxPdus(), LteTestMac(), and Receive().

uint32_t ns3::LteTestMac::m_txBytes
private

Definition at line 252 of file lte-test-entities.h.

Referenced by DoTransmitPdu(), GetTxBytes(), and LteTestMac().

uint8_t ns3::LteTestMac::m_txOpportunityMode
private
uint32_t ns3::LteTestMac::m_txOppSize
private
Time ns3::LteTestMac::m_txOppTime
private
uint32_t ns3::LteTestMac::m_txPdus
private

Definition at line 251 of file lte-test-entities.h.

Referenced by DoTransmitPdu(), GetTxPdus(), and LteTestMac().


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