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

BsServiceFlowManager. More...

#include "bs-service-flow-manager.h"

+ Inheritance diagram for ns3::BsServiceFlowManager:
+ Collaboration diagram for ns3::BsServiceFlowManager:

Public Types

enum  ConfirmationCode { CONFIRMATION_CODE_SUCCESS , CONFIRMATION_CODE_REJECT }
 Confirmation code enumeration. More...
 
- Public Types inherited from ns3::ServiceFlowManager
enum  ConfirmationCode { CONFIRMATION_CODE_SUCCESS , CONFIRMATION_CODE_REJECT }
 confirmation code enumeration as per Table 384 (not all codes implemented) More...
 

Public Member Functions

 BsServiceFlowManager (Ptr< BaseStationNetDevice > device)
 Constructor.
 
 ~BsServiceFlowManager () override
 
void AddMulticastServiceFlow (ServiceFlow sf, WimaxPhy::ModulationType modulation)
 add a multicast service flow
 
void AddServiceFlow (ServiceFlow *serviceFlow)
 Add a new service flow.
 
void AllocateServiceFlows (const DsaReq &dsaReq, Cid cid)
 allocate service flows
 
void DoDispose () override
 Destructor implementation.
 
EventId GetDsaAckTimeoutEvent () const
 
ServiceFlowGetServiceFlow (Cid cid) const
 
ServiceFlowGetServiceFlow (uint32_t sfid) const
 
std::vector< ServiceFlow * > GetServiceFlows (ServiceFlow::SchedulingType schedulingType) const
 
void ProcessDsaAck (const DsaAck &dsaAck, Cid cid)
 process a DSA-ACK message
 
ServiceFlowProcessDsaReq (const DsaReq &dsaReq, Cid cid)
 process a DSA-Req message
 
void SetMaxDsaRspRetries (uint8_t maxDsaRspRetries)
 set the maximum Dynamic ServiceFlow Add (DSA) retries
 
- Public Member Functions inherited from ns3::ServiceFlowManager
 ServiceFlowManager ()
 
 ~ServiceFlowManager () override
 
void AddServiceFlow (ServiceFlow *serviceFlow)
 Add service flow function.
 
bool AreServiceFlowsAllocated ()
 
bool AreServiceFlowsAllocated (std::vector< ServiceFlow * > *serviceFlows)
 
bool AreServiceFlowsAllocated (std::vector< ServiceFlow * > serviceFlows)
 
ServiceFlowDoClassify (Ipv4Address SrcAddress, Ipv4Address DstAddress, uint16_t SrcPort, uint16_t DstPort, uint8_t Proto, ServiceFlow::Direction dir) const
 
void DoDispose () override
 Destructor implementation.
 
ServiceFlowGetNextServiceFlowToAllocate ()
 
uint32_t GetNrServiceFlows () const
 
ServiceFlowGetServiceFlow (Cid cid) const
 Get service flow by CID.
 
ServiceFlowGetServiceFlow (uint32_t sfid) const
 Get service flow by flow id.
 
std::vector< ServiceFlow * > GetServiceFlows (ServiceFlow::SchedulingType schedulingType) const
 Get service flows function.
 
- 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 ()
 Register this type.
 
- Static Public Member Functions inherited from ns3::ServiceFlowManager
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

DsaRsp CreateDsaRsp (const ServiceFlow *serviceFlow, uint16_t transactionId)
 Create DSA response function.
 
uint8_t GetMaxDsaRspRetries () const
 
void ScheduleDsaRsp (ServiceFlow *serviceFlow, Cid cid)
 Create DSA response function.
 

Private Attributes

Ptr< WimaxNetDevicem_device
 the device
 
EventId m_dsaAckTimeoutEvent
 DSA ack timeout event.
 
Cid m_inuseScheduleDsaRspCid
 in use schedule DSA response CID
 
uint8_t m_maxDsaRspRetries
 maximum number of DSA response retries
 
uint32_t m_sfidIndex
 SFID index.
 

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

BsServiceFlowManager.

Definition at line 35 of file bs-service-flow-manager.h.

Member Enumeration Documentation

◆ ConfirmationCode

Confirmation code enumeration.

Enumerator
CONFIRMATION_CODE_SUCCESS 
CONFIRMATION_CODE_REJECT 

Definition at line 39 of file bs-service-flow-manager.h.

Constructor & Destructor Documentation

◆ BsServiceFlowManager()

ns3::BsServiceFlowManager::BsServiceFlowManager ( Ptr< BaseStationNetDevice > device)

Constructor.

Parameters
devicebase station device

Definition at line 36 of file bs-service-flow-manager.cc.

References ns3::Cid::InitialRanging(), and m_inuseScheduleDsaRspCid.

+ Here is the call graph for this function:

◆ ~BsServiceFlowManager()

ns3::BsServiceFlowManager::~BsServiceFlowManager ( )
override

Definition at line 44 of file bs-service-flow-manager.cc.

Member Function Documentation

◆ AddMulticastServiceFlow()

void ns3::BsServiceFlowManager::AddMulticastServiceFlow ( ServiceFlow sf,
WimaxPhy::ModulationType modulation )

add a multicast service flow

Parameters
sfthe service flow
modulationthe wimax phy modulation type

Definition at line 213 of file bs-service-flow-manager.cc.

References AddServiceFlow(), m_device, ns3::Cid::MULTICAST, and ns3::ServiceFlow::SF_TYPE_ACTIVE.

+ Here is the call graph for this function:

◆ AddServiceFlow()

void ns3::BsServiceFlowManager::AddServiceFlow ( ServiceFlow * serviceFlow)

Add a new service flow.

Parameters
serviceFlowthe service flow to add

Definition at line 84 of file bs-service-flow-manager.cc.

References ns3::ServiceFlowManager::AddServiceFlow().

Referenced by AddMulticastServiceFlow(), and ProcessDsaReq().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ AllocateServiceFlows()

void ns3::BsServiceFlowManager::AllocateServiceFlows ( const DsaReq & dsaReq,
Cid cid )

allocate service flows

Parameters
dsaReqthe DSA request
cidthe connection identifier

Definition at line 230 of file bs-service-flow-manager.cc.

References NS_LOG_INFO, ProcessDsaReq(), and ScheduleDsaRsp().

+ Here is the call graph for this function:

◆ CreateDsaRsp()

DsaRsp ns3::BsServiceFlowManager::CreateDsaRsp ( const ServiceFlow * serviceFlow,
uint16_t transactionId )
private

Create DSA response function.

Parameters
serviceFlowservice flow
transactionIdtransaction ID
Returns
the DSA response

Definition at line 108 of file bs-service-flow-manager.cc.

References CONFIRMATION_CODE_SUCCESS, ns3::DsaRsp::SetConfirmationCode(), ns3::DsaRsp::SetServiceFlow(), and ns3::DsaRsp::SetTransactionId().

Referenced by ScheduleDsaRsp().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DoDispose()

void ns3::BsServiceFlowManager::DoDispose ( )
overridevirtual

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 60 of file bs-service-flow-manager.cc.

References ns3::ServiceFlowManager::DoDispose().

+ Here is the call graph for this function:

◆ GetDsaAckTimeoutEvent()

EventId ns3::BsServiceFlowManager::GetDsaAckTimeoutEvent ( ) const
Returns
the DSA ack timeout event

Definition at line 78 of file bs-service-flow-manager.cc.

References m_dsaAckTimeoutEvent.

◆ GetMaxDsaRspRetries()

uint8_t ns3::BsServiceFlowManager::GetMaxDsaRspRetries ( ) const
private
Returns
the maximum DSA response retries

Definition at line 72 of file bs-service-flow-manager.cc.

References m_maxDsaRspRetries.

◆ GetServiceFlow() [1/2]

ServiceFlow * ns3::BsServiceFlowManager::GetServiceFlow ( Cid cid) const
Parameters
cidthe connection identifier
Returns
the service flow which has as connection identifier cid

Definition at line 96 of file bs-service-flow-manager.cc.

References ns3::ServiceFlowManager::GetServiceFlow().

+ Here is the call graph for this function:

◆ GetServiceFlow() [2/2]

ServiceFlow * ns3::BsServiceFlowManager::GetServiceFlow ( uint32_t sfid) const
Parameters
sfidthe service flow identifier
Returns
the service flow which has as identifier sfid

Definition at line 90 of file bs-service-flow-manager.cc.

References ns3::ServiceFlowManager::GetServiceFlow().

Referenced by ProcessDsaReq().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetServiceFlows()

std::vector< ServiceFlow * > ns3::BsServiceFlowManager::GetServiceFlows ( ServiceFlow::SchedulingType schedulingType) const
Parameters
schedulingTypethe scheduling type
Returns
the list of service flows configured with schedulingType as a QoS class

Definition at line 102 of file bs-service-flow-manager.cc.

References ns3::ServiceFlowManager::GetServiceFlows().

+ Here is the call graph for this function:

◆ GetTypeId()

TypeId ns3::BsServiceFlowManager::GetTypeId ( )
static

Register this type.

Returns
The TypeId.

Definition at line 50 of file bs-service-flow-manager.cc.

References ns3::TypeId::SetParent().

+ Here is the call graph for this function:

◆ ProcessDsaAck()

void ns3::BsServiceFlowManager::ProcessDsaAck ( const DsaAck & dsaAck,
Cid cid )

process a DSA-ACK message

Parameters
dsaAckthe message to process
cidthe identifier of the connection on which the message was received

Definition at line 244 of file bs-service-flow-manager.cc.

References ns3::ServiceFlowManager::AreServiceFlowsAllocated(), ns3::DsaAck::GetTransactionId(), m_device, and ns3::ServiceFlow::SF_TYPE_ALL.

+ Here is the call graph for this function:

◆ ProcessDsaReq()

ServiceFlow * ns3::BsServiceFlowManager::ProcessDsaReq ( const DsaReq & dsaReq,
Cid cid )

process a DSA-Req message

Parameters
dsaReqthe message to process
cidthe identifier of the connection on which the message was received
Returns
a pointer to the service flow

Definition at line 177 of file bs-service-flow-manager.cc.

References AddServiceFlow(), ns3::ServiceFlow::CopyParametersFrom(), ns3::ServiceFlow::GetCid(), ns3::ServiceFlow::GetConvergenceSublayerParam(), ns3::ServiceFlow::GetDirection(), GetServiceFlow(), ns3::DsaReq::GetServiceFlow(), ns3::ServiceFlow::GetSfid(), ns3::DsaReq::GetTransactionId(), m_device, m_sfidIndex, NS_ASSERT_MSG, NS_LOG_INFO, ns3::ServiceFlow::SetConvergenceSublayerParam(), ns3::ServiceFlow::SetUnsolicitedGrantInterval(), ns3::ServiceFlow::SetUnsolicitedPollingInterval(), and ns3::Cid::TRANSPORT.

Referenced by AllocateServiceFlows().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ScheduleDsaRsp()

void ns3::BsServiceFlowManager::ScheduleDsaRsp ( ServiceFlow * serviceFlow,
Cid cid )
private

Create DSA response function.

Parameters
serviceFlowservice flow
cidthe identifier of the connection on which the message was received

Definition at line 120 of file bs-service-flow-manager.cc.

References ns3::Simulator::Cancel(), ns3::Create(), CreateDsaRsp(), ns3::EventId::IsPending(), m_device, m_dsaAckTimeoutEvent, m_inuseScheduleDsaRspCid, m_maxDsaRspRetries, ns3::ManagementMessageType::MESSAGE_TYPE_DSA_RSP, NS_LOG_DEBUG, NS_LOG_INFO, ns3::Simulator::Schedule(), ScheduleDsaRsp(), ns3::ServiceFlow::SetIsEnabled(), ns3::ServiceFlow::SetType(), and ns3::ServiceFlow::SF_TYPE_ACTIVE.

Referenced by AllocateServiceFlows(), and ScheduleDsaRsp().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetMaxDsaRspRetries()

void ns3::BsServiceFlowManager::SetMaxDsaRspRetries ( uint8_t maxDsaRspRetries)

set the maximum Dynamic ServiceFlow Add (DSA) retries

Parameters
maxDsaRspRetriesthe maximum DSA response retries

Definition at line 66 of file bs-service-flow-manager.cc.

References m_maxDsaRspRetries.

Member Data Documentation

◆ m_device

Ptr<WimaxNetDevice> ns3::BsServiceFlowManager::m_device
private

the device

Definition at line 134 of file bs-service-flow-manager.h.

Referenced by AddMulticastServiceFlow(), ProcessDsaAck(), ProcessDsaReq(), and ScheduleDsaRsp().

◆ m_dsaAckTimeoutEvent

EventId ns3::BsServiceFlowManager::m_dsaAckTimeoutEvent
private

DSA ack timeout event.

Definition at line 137 of file bs-service-flow-manager.h.

Referenced by GetDsaAckTimeoutEvent(), and ScheduleDsaRsp().

◆ m_inuseScheduleDsaRspCid

Cid ns3::BsServiceFlowManager::m_inuseScheduleDsaRspCid
private

in use schedule DSA response CID

Definition at line 138 of file bs-service-flow-manager.h.

Referenced by BsServiceFlowManager(), and ScheduleDsaRsp().

◆ m_maxDsaRspRetries

uint8_t ns3::BsServiceFlowManager::m_maxDsaRspRetries
private

maximum number of DSA response retries

Definition at line 136 of file bs-service-flow-manager.h.

Referenced by GetMaxDsaRspRetries(), ScheduleDsaRsp(), and SetMaxDsaRspRetries().

◆ m_sfidIndex

uint32_t ns3::BsServiceFlowManager::m_sfidIndex
private

SFID index.

Definition at line 135 of file bs-service-flow-manager.h.

Referenced by ProcessDsaReq().


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