A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ns3::WimaxConnection Class Reference

Class to represent WiMAX connections. More...

#include "wimax-connection.h"

+ Inheritance diagram for ns3::WimaxConnection:
+ Collaboration diagram for ns3::WimaxConnection:

Public Types

typedef std::list< Ptr< const Packet > > FragmentsQueue
 Definition of Fragments Queue data type.
 

Public Member Functions

 WimaxConnection (Cid cid, Cid::Type type)
 Constructor.
 
 ~WimaxConnection () override
 
void ClearFragmentsQueue ()
 delete all enqueued fragments
 
Ptr< PacketDequeue (MacHeaderType::HeaderType packetType, uint32_t availableByte)
 dequeue a packet from the queue of the connection Dequeue the first packet in the queue if its size is lower than availableByte, the first availableByte of the first packet otherwise
 
Ptr< PacketDequeue (MacHeaderType::HeaderType packetType=MacHeaderType::HEADER_TYPE_GENERIC)
 dequeue a packet from the queue of the connection
 
bool Enqueue (Ptr< Packet > packet, const MacHeaderType &hdrType, const GenericMacHeader &hdr)
 enqueue a packet in the queue of the connection
 
void FragmentEnqueue (Ptr< const Packet > fragment)
 enqueue a received packet (that is a fragment) into the fragments queue
 
Cid GetCid () const
 Get CID function.
 
const FragmentsQueue GetFragmentsQueue () const
 get a queue of received fragments
 
Ptr< WimaxMacQueueGetQueue () const
 
uint8_t GetSchedulingType () const
 
ServiceFlowGetServiceFlow () const
 
Cid::Type GetType () const
 Get type function.
 
std::string GetTypeStr () const
 Get type string.
 
bool HasPackets () const
 
bool HasPackets (MacHeaderType::HeaderType packetType) const
 
void SetServiceFlow (ServiceFlow *serviceFlow)
 set the service flow associated to this connection
 
- Public Member Functions inherited from ns3::Object
 Object ()
 Constructor.
 
 ~Object () override
 Destructor.
 
void AggregateObject (Ptr< Object > other)
 Aggregate two Objects together.
 
void Dispose ()
 Dispose of this Object.
 
AggregateIterator GetAggregateIterator () const
 Get an iterator to the Objects aggregated to this one.
 
TypeId GetInstanceTypeId () const override
 Get the most derived TypeId for this Object.
 
template<typename T >
Ptr< T > GetObject () const
 Get a pointer to the requested aggregated Object.
 
template<>
Ptr< ObjectGetObject () const
 Specialization of () for objects of type ns3::Object.
 
template<typename T >
Ptr< T > GetObject (TypeId tid) const
 Get a pointer to the requested aggregated Object by TypeId.
 
template<>
Ptr< ObjectGetObject (TypeId tid) const
 Specialization of (TypeId tid) for objects of type ns3::Object.
 
void Initialize ()
 Invoke DoInitialize on all Objects aggregated to this one.
 
bool IsInitialized () const
 Check if the object has been initialized.
 
void UnidirectionalAggregateObject (Ptr< Object > other)
 Aggregate an Object to another Object.
 
- Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
 SimpleRefCount ()
 Default constructor.
 
 SimpleRefCount (const SimpleRefCount &o)
 Copy constructor.
 
uint32_t GetReferenceCount () const
 Get the reference count of the object.
 
SimpleRefCountoperator= (const SimpleRefCount &o)
 Assignment operator.
 
void Ref () const
 Increment the reference count.
 
void Unref () const
 Decrement the reference count.
 
- Public Member Functions inherited from ns3::ObjectBase
virtual ~ObjectBase ()
 Virtual destructor.
 
void GetAttribute (std::string name, AttributeValue &value, bool permissive=false) const
 Get the value of an attribute, raising fatal errors if unsuccessful.
 
bool GetAttributeFailSafe (std::string name, AttributeValue &value) const
 Get the value of an attribute without raising errors.
 
void SetAttribute (std::string name, const AttributeValue &value)
 Set a single attribute, raising fatal errors if unsuccessful.
 
bool SetAttributeFailSafe (std::string name, const AttributeValue &value)
 Set a single attribute without raising errors.
 
bool TraceConnect (std::string name, std::string context, const CallbackBase &cb)
 Connect a TraceSource to a Callback with a context.
 
bool TraceConnectWithoutContext (std::string name, const CallbackBase &cb)
 Connect a TraceSource to a Callback without a context.
 
bool TraceDisconnect (std::string name, std::string context, const CallbackBase &cb)
 Disconnect from a TraceSource a Callback previously connected with a context.
 
bool TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb)
 Disconnect from a TraceSource a Callback previously connected without a context.
 

Static Public Member Functions

static TypeId GetTypeId ()
 Get the type ID.
 
- Static Public Member Functions inherited from ns3::Object
static TypeId GetTypeId ()
 Register this type.
 
- Static Public Member Functions inherited from ns3::ObjectBase
static TypeId GetTypeId ()
 Get the type ID.
 

Private Member Functions

void DoDispose () override
 Destructor implementation.
 

Private Attributes

Cid m_cid
 CID.
 
Cid::Type m_cidType
 CID type.
 
FragmentsQueue m_fragmentsQueue
 fragments queue
 
Ptr< WimaxMacQueuem_queue
 queue
 
ServiceFlowm_serviceFlow
 service flow
 

Additional Inherited Members

- Protected Member Functions inherited from ns3::Object
 Object (const Object &o)
 Copy an Object.
 
virtual void DoInitialize ()
 Initialize() implementation.
 
virtual void NotifyNewAggregate ()
 Notify all Objects aggregated to this one of a new Object being aggregated.
 
- Protected Member Functions inherited from ns3::ObjectBase
void ConstructSelf (const AttributeConstructionList &attributes)
 Complete construction of ObjectBase; invoked by derived classes.
 
virtual void NotifyConstructionCompleted ()
 Notifier called once the ObjectBase is fully constructed.
 

Detailed Description

Class to represent WiMAX connections.

Definition at line 33 of file wimax-connection.h.

Member Typedef Documentation

◆ FragmentsQueue

typedef std::list<Ptr<const Packet> > ns3::WimaxConnection::FragmentsQueue

Definition of Fragments Queue data type.

Definition at line 124 of file wimax-connection.h.

Constructor & Destructor Documentation

◆ WimaxConnection()

ns3::WimaxConnection::WimaxConnection ( Cid cid,
Cid::Type type )

Constructor.

Parameters
cidconnection ID
typeCID type

Definition at line 59 of file wimax-connection.cc.

◆ ~WimaxConnection()

ns3::WimaxConnection::~WimaxConnection ( )
override

Definition at line 67 of file wimax-connection.cc.

Member Function Documentation

◆ ClearFragmentsQueue()

void ns3::WimaxConnection::ClearFragmentsQueue ( )

delete all enqueued fragments

Definition at line 184 of file wimax-connection.cc.

References m_fragmentsQueue.

◆ Dequeue() [1/2]

Ptr< Packet > ns3::WimaxConnection::Dequeue ( MacHeaderType::HeaderType packetType,
uint32_t availableByte )

dequeue a packet from the queue of the connection Dequeue the first packet in the queue if its size is lower than availableByte, the first availableByte of the first packet otherwise

Parameters
packetTypethe type of the packet to dequeue
availableBytethe number of available bytes
Returns
packet dequeued

Definition at line 129 of file wimax-connection.cc.

References m_queue.

◆ Dequeue() [2/2]

Ptr< Packet > ns3::WimaxConnection::Dequeue ( MacHeaderType::HeaderType packetType = MacHeaderType::HEADER_TYPE_GENERIC)

dequeue a packet from the queue of the connection

Parameters
packetTypethe type of the packet to dequeue
Returns
packet dequeued

Definition at line 123 of file wimax-connection.cc.

References m_queue.

◆ DoDispose()

void ns3::WimaxConnection::DoDispose ( )
overrideprivatevirtual

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 overridden 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 72 of file wimax-connection.cc.

References m_queue.

◆ Enqueue()

bool ns3::WimaxConnection::Enqueue ( Ptr< Packet > packet,
const MacHeaderType & hdrType,
const GenericMacHeader & hdr )

enqueue a packet in the queue of the connection

Parameters
packetthe packet to be enqueued
hdrTypethe header type of the packet
hdrthe header of the packet
Returns
true if successful

Definition at line 115 of file wimax-connection.cc.

References m_queue.

◆ FragmentEnqueue()

void ns3::WimaxConnection::FragmentEnqueue ( Ptr< const Packet > fragment)

enqueue a received packet (that is a fragment) into the fragments queue

Parameters
fragmentreceived fragment

Definition at line 178 of file wimax-connection.cc.

References m_fragmentsQueue.

◆ GetCid()

Cid ns3::WimaxConnection::GetCid ( ) const

Get CID function.

Returns
the CID

Definition at line 79 of file wimax-connection.cc.

References m_cid.

◆ GetFragmentsQueue()

const WimaxConnection::FragmentsQueue ns3::WimaxConnection::GetFragmentsQueue ( ) const

get a queue of received fragments

Returns
the fragments queue

Definition at line 172 of file wimax-connection.cc.

References m_fragmentsQueue.

◆ GetQueue()

Ptr< WimaxMacQueue > ns3::WimaxConnection::GetQueue ( ) const
Returns
the queue of the connection

Definition at line 91 of file wimax-connection.cc.

References m_queue.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ GetSchedulingType()

uint8_t ns3::WimaxConnection::GetSchedulingType ( ) const
Returns
the scheduling type of this connection

Definition at line 109 of file wimax-connection.cc.

References ns3::ServiceFlow::GetSchedulingType(), and m_serviceFlow.

+ Here is the call graph for this function:

◆ GetServiceFlow()

ServiceFlow * ns3::WimaxConnection::GetServiceFlow ( ) const
Returns
the service flow associated to this connection

Definition at line 103 of file wimax-connection.cc.

References m_serviceFlow.

◆ GetType()

Cid::Type ns3::WimaxConnection::GetType ( ) const

Get type function.

Returns
the type

Definition at line 85 of file wimax-connection.cc.

References m_cidType.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ GetTypeId()

TypeId ns3::WimaxConnection::GetTypeId ( )
static

Get the type ID.

Returns
the object TypeId

Definition at line 24 of file wimax-connection.cc.

References ns3::Cid::BASIC, ns3::Cid::BROADCAST, GetQueue(), GetType(), ns3::Cid::INITIAL_RANGING, ns3::MakeEnumAccessor(), ns3::MakeEnumChecker(), ns3::MakePointerAccessor(), ns3::MakePointerChecker(), ns3::Cid::MULTICAST, ns3::Cid::PADDING, ns3::Cid::PRIMARY, ns3::TypeId::SetParent(), and ns3::Cid::TRANSPORT.

+ Here is the call graph for this function:

◆ GetTypeStr()

std::string ns3::WimaxConnection::GetTypeStr ( ) const

◆ HasPackets() [1/2]

bool ns3::WimaxConnection::HasPackets ( ) const
Returns
true if the connection has at least one packet in its queue, false otherwise

Definition at line 135 of file wimax-connection.cc.

References m_queue.

◆ HasPackets() [2/2]

bool ns3::WimaxConnection::HasPackets ( MacHeaderType::HeaderType packetType) const
Returns
true if the connection has at least one packet of type packetType in its queue, false otherwise
Parameters
packetTypetype of packet to check in the queue
Returns
true if packets available

Definition at line 141 of file wimax-connection.cc.

References m_queue.

◆ SetServiceFlow()

void ns3::WimaxConnection::SetServiceFlow ( ServiceFlow * serviceFlow)

set the service flow associated to this connection

Parameters
serviceFlowThe service flow to be associated to this connection

Definition at line 97 of file wimax-connection.cc.

References m_serviceFlow.

Member Data Documentation

◆ m_cid

Cid ns3::WimaxConnection::m_cid
private

CID.

Definition at line 143 of file wimax-connection.h.

Referenced by GetCid().

◆ m_cidType

Cid::Type ns3::WimaxConnection::m_cidType
private

CID type.

Definition at line 144 of file wimax-connection.h.

Referenced by GetType(), and GetTypeStr().

◆ m_fragmentsQueue

FragmentsQueue ns3::WimaxConnection::m_fragmentsQueue
private

fragments queue

Definition at line 149 of file wimax-connection.h.

Referenced by ClearFragmentsQueue(), FragmentEnqueue(), and GetFragmentsQueue().

◆ m_queue

Ptr<WimaxMacQueue> ns3::WimaxConnection::m_queue
private

queue

Definition at line 145 of file wimax-connection.h.

Referenced by Dequeue(), Dequeue(), DoDispose(), Enqueue(), GetQueue(), HasPackets(), and HasPackets().

◆ m_serviceFlow

ServiceFlow* ns3::WimaxConnection::m_serviceFlow
private

service flow

Definition at line 146 of file wimax-connection.h.

Referenced by GetSchedulingType(), GetServiceFlow(), and SetServiceFlow().


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