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

SsServiceFlowManager class. More...

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

+ Inheritance diagram for ns3::SsServiceFlowManager:
+ Collaboration diagram for ns3::SsServiceFlowManager:

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

 SsServiceFlowManager (Ptr< SubscriberStationNetDevice > device)
 Constructor.
 
 ~SsServiceFlowManager () override
 
void AddServiceFlow (ServiceFlow *serviceFlow)
 add a service flow to the list
 
void AddServiceFlow (ServiceFlow serviceFlow)
 add a service flow to the list
 
Ptr< PacketCreateDsaAck ()
 Create DSA ack.
 
DsaReq CreateDsaReq (const ServiceFlow *serviceFlow)
 Create DSA request.
 
void DoDispose () override
 Destructor implementation.
 
EventId GetDsaAckTimeoutEvent () const
 Get DSA ack timeout event.
 
EventId GetDsaRspTimeoutEvent () const
 Get DSA response timeout event.
 
uint8_t GetMaxDsaReqRetries () const
 
void InitiateServiceFlows ()
 Initiate service flows.
 
void ProcessDsaRsp (const DsaRsp &dsaRsp)
 Process DSA response.
 
void ScheduleDsaReq (const ServiceFlow *serviceFlow)
 Schedule DSA response.
 
void SetMaxDsaReqRetries (uint8_t maxDsaReqRetries)
 sets the maximum retries on DSA request message
 
- 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) 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.
 
virtual TypeId GetInstanceTypeId () const =0
 Get the most derived TypeId for this Object.
 
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 Attributes

uint16_t m_currentTransactionId
 current transaction ID
 
Ptr< SubscriberStationNetDevicem_device
 the device
 
DsaAck m_dsaAck
 DSA ack.
 
EventId m_dsaAckTimeoutEvent
 DSA ack timeout event.
 
DsaReq m_dsaReq
 DSA request.
 
uint8_t m_dsaReqRetries
 DSA request retries.
 
EventId m_dsaRspTimeoutEvent
 DSA response timeout event.
 
uint8_t m_maxDsaReqRetries
 maximum DSA request retries
 
ServiceFlowm_pendingServiceFlow
 pending service flow
 
uint16_t m_transactionIdIndex
 transaction ID index
 

Additional Inherited Members

- Protected Member Functions inherited from ns3::Object
 Object (const Object &o)
 Copy an Object.
 
virtual void DoDispose ()
 Destructor implementation.
 
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

SsServiceFlowManager class.

Definition at line 45 of file ss-service-flow-manager.h.

Member Enumeration Documentation

◆ ConfirmationCode

Confirmation code enumeration.

Enumerator
CONFIRMATION_CODE_SUCCESS 
CONFIRMATION_CODE_REJECT 

Definition at line 49 of file ss-service-flow-manager.h.

Constructor & Destructor Documentation

◆ SsServiceFlowManager()

ns3::SsServiceFlowManager::SsServiceFlowManager ( Ptr< SubscriberStationNetDevice device)

Constructor.

Creates a service flow manager and attaches it to a device

Parameters
devicethe device to which the service flow manager will be attached

Definition at line 48 of file ss-service-flow-manager.cc.

◆ ~SsServiceFlowManager()

ns3::SsServiceFlowManager::~SsServiceFlowManager ( )
override

Definition at line 60 of file ss-service-flow-manager.cc.

Member Function Documentation

◆ AddServiceFlow() [1/2]

void ns3::SsServiceFlowManager::AddServiceFlow ( ServiceFlow serviceFlow)

add a service flow to the list

Parameters
serviceFlowthe service flow to add

Definition at line 114 of file ss-service-flow-manager.cc.

References ns3::ServiceFlowManager::AddServiceFlow().

+ Here is the call graph for this function:

◆ AddServiceFlow() [2/2]

void ns3::SsServiceFlowManager::AddServiceFlow ( ServiceFlow  serviceFlow)

add a service flow to the list

Parameters
serviceFlowthe service flow to add

Definition at line 106 of file ss-service-flow-manager.cc.

References ns3::ServiceFlowManager::AddServiceFlow().

+ Here is the call graph for this function:

◆ CreateDsaAck()

Ptr< Packet > ns3::SsServiceFlowManager::CreateDsaAck ( )

Create DSA ack.

Returns
the packet

Definition at line 145 of file ss-service-flow-manager.cc.

References CONFIRMATION_CODE_SUCCESS, ns3::DsaReq::GetTransactionId(), m_dsaAck, m_dsaReq, ns3::ManagementMessageType::MESSAGE_TYPE_DSA_ACK, ns3::DsaAck::SetConfirmationCode(), and ns3::DsaAck::SetTransactionId().

Referenced by ProcessDsaRsp().

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

◆ CreateDsaReq()

DsaReq ns3::SsServiceFlowManager::CreateDsaReq ( const ServiceFlow serviceFlow)

Create DSA request.

Parameters
serviceFlowthe service flow
Returns
the DSA request

Definition at line 131 of file ss-service-flow-manager.cc.

References m_currentTransactionId, m_transactionIdIndex, ns3::DsaReq::SetServiceFlow(), and ns3::DsaReq::SetTransactionId().

Referenced by ScheduleDsaReq().

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

◆ DoDispose()

void ns3::SsServiceFlowManager::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::ServiceFlowManager.

Definition at line 76 of file ss-service-flow-manager.cc.

References ns3::ServiceFlowManager::DoDispose().

+ Here is the call graph for this function:

◆ GetDsaAckTimeoutEvent()

EventId ns3::SsServiceFlowManager::GetDsaAckTimeoutEvent ( ) const

Get DSA ack timeout event.

Returns
the DSA ack timeout event

Definition at line 100 of file ss-service-flow-manager.cc.

References m_dsaAckTimeoutEvent.

◆ GetDsaRspTimeoutEvent()

EventId ns3::SsServiceFlowManager::GetDsaRspTimeoutEvent ( ) const

Get DSA response timeout event.

Returns
the DSA response timeout event

Definition at line 94 of file ss-service-flow-manager.cc.

References m_dsaRspTimeoutEvent.

◆ GetMaxDsaReqRetries()

uint8_t ns3::SsServiceFlowManager::GetMaxDsaReqRetries ( ) const
Returns
the maximum retries on DSA request message

Definition at line 88 of file ss-service-flow-manager.cc.

References m_maxDsaReqRetries.

◆ GetTypeId()

TypeId ns3::SsServiceFlowManager::GetTypeId ( )
static

Register this type.

Returns
The TypeId.

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

References ns3::TypeId::SetParent().

+ Here is the call graph for this function:

◆ InitiateServiceFlows()

void ns3::SsServiceFlowManager::InitiateServiceFlows ( )

Initiate service flows.

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

References ns3::ServiceFlowManager::GetNextServiceFlowToAllocate(), m_pendingServiceFlow, NS_ASSERT_MSG, and ScheduleDsaReq().

+ Here is the call graph for this function:

◆ ProcessDsaRsp()

void ns3::SsServiceFlowManager::ProcessDsaRsp ( const DsaRsp dsaRsp)

◆ ScheduleDsaReq()

void ns3::SsServiceFlowManager::ScheduleDsaReq ( const ServiceFlow serviceFlow)

Schedule DSA response.

Parameters
serviceFlowthe service flow

Definition at line 158 of file ss-service-flow-manager.cc.

References ns3::Simulator::Cancel(), CreateDsaReq(), ns3::EventId::IsRunning(), m_device, m_dsaReq, m_dsaReqRetries, m_dsaRspTimeoutEvent, m_maxDsaReqRetries, ns3::ManagementMessageType::MESSAGE_TYPE_DSA_REQ, NS_LOG_DEBUG, ns3::Simulator::Schedule(), and ScheduleDsaReq().

Referenced by InitiateServiceFlows(), ProcessDsaRsp(), and ScheduleDsaReq().

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

◆ SetMaxDsaReqRetries()

void ns3::SsServiceFlowManager::SetMaxDsaReqRetries ( uint8_t  maxDsaReqRetries)

sets the maximum retries on DSA request message

Parameters
maxDsaReqRetriesthe maximum retries on DSA request message

Definition at line 82 of file ss-service-flow-manager.cc.

References m_maxDsaReqRetries.

Member Data Documentation

◆ m_currentTransactionId

uint16_t ns3::SsServiceFlowManager::m_currentTransactionId
private

current transaction ID

Definition at line 142 of file ss-service-flow-manager.h.

Referenced by CreateDsaReq(), and ProcessDsaRsp().

◆ m_device

Ptr<SubscriberStationNetDevice> ns3::SsServiceFlowManager::m_device
private

the device

Definition at line 132 of file ss-service-flow-manager.h.

Referenced by ProcessDsaRsp(), and ScheduleDsaReq().

◆ m_dsaAck

DsaAck ns3::SsServiceFlowManager::m_dsaAck
private

DSA ack.

Definition at line 140 of file ss-service-flow-manager.h.

Referenced by CreateDsaAck().

◆ m_dsaAckTimeoutEvent

EventId ns3::SsServiceFlowManager::m_dsaAckTimeoutEvent
private

DSA ack timeout event.

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

Referenced by GetDsaAckTimeoutEvent().

◆ m_dsaReq

DsaReq ns3::SsServiceFlowManager::m_dsaReq
private

DSA request.

Definition at line 139 of file ss-service-flow-manager.h.

Referenced by CreateDsaAck(), and ScheduleDsaReq().

◆ m_dsaReqRetries

uint8_t ns3::SsServiceFlowManager::m_dsaReqRetries
private

DSA request retries.

Definition at line 144 of file ss-service-flow-manager.h.

Referenced by ProcessDsaRsp(), and ScheduleDsaReq().

◆ m_dsaRspTimeoutEvent

EventId ns3::SsServiceFlowManager::m_dsaRspTimeoutEvent
private

DSA response timeout event.

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

Referenced by GetDsaRspTimeoutEvent(), and ScheduleDsaReq().

◆ m_maxDsaReqRetries

uint8_t ns3::SsServiceFlowManager::m_maxDsaReqRetries
private

maximum DSA request retries

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

Referenced by GetMaxDsaReqRetries(), ScheduleDsaReq(), and SetMaxDsaReqRetries().

◆ m_pendingServiceFlow

ServiceFlow* ns3::SsServiceFlowManager::m_pendingServiceFlow
private

pending service flow

Definition at line 147 of file ss-service-flow-manager.h.

Referenced by InitiateServiceFlows(), and ProcessDsaRsp().

◆ m_transactionIdIndex

uint16_t ns3::SsServiceFlowManager::m_transactionIdIndex
private

transaction ID index

Definition at line 143 of file ss-service-flow-manager.h.

Referenced by CreateDsaReq().


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