SsServiceFlowManager class. More...
#include "ss-service-flow-manager.h"
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. More... | |
~SsServiceFlowManager (void) | |
void | AddServiceFlow (ServiceFlow *serviceFlow) |
add a service flow to the list More... | |
void | AddServiceFlow (ServiceFlow serviceFlow) |
add a service flow to the list More... | |
Ptr< Packet > | CreateDsaAck (void) |
Create DSA ack. More... | |
DsaReq | CreateDsaReq (const ServiceFlow *serviceFlow) |
Create DSA request. More... | |
void | DoDispose (void) |
Destructor implementation. More... | |
EventId | GetDsaAckTimeoutEvent (void) const |
Get DSA ack timeout event. More... | |
EventId | GetDsaRspTimeoutEvent (void) const |
Get DSA response timeout event. More... | |
uint8_t | GetMaxDsaReqRetries (void) const |
void | InitiateServiceFlows (void) |
Initiate service flows. More... | |
void | ProcessDsaRsp (const DsaRsp &dsaRsp) |
Process DSA response. More... | |
void | ScheduleDsaReq (const ServiceFlow *serviceFlow) |
Schedule DSA response. More... | |
void | SetMaxDsaReqRetries (uint8_t maxDsaReqRetries) |
sets the maximum retries on DSA request message More... | |
Public Member Functions inherited from ns3::ServiceFlowManager | |
ServiceFlowManager () | |
~ServiceFlowManager (void) | |
void | AddServiceFlow (ServiceFlow *serviceFlow) |
Add service flow function. More... | |
bool | AreServiceFlowsAllocated () |
bool | AreServiceFlowsAllocated (std::vector< ServiceFlow * > *serviceFlows) |
bool | AreServiceFlowsAllocated (std::vector< ServiceFlow * > serviceFlows) |
ServiceFlow * | DoClassify (Ipv4Address SrcAddress, Ipv4Address DstAddress, uint16_t SrcPort, uint16_t DstPort, uint8_t Proto, ServiceFlow::Direction dir) const |
ServiceFlow * | GetNextServiceFlowToAllocate () |
uint32_t | GetNrServiceFlows (void) const |
ServiceFlow * | GetServiceFlow (Cid cid) const |
Get service flow by CID. More... | |
ServiceFlow * | GetServiceFlow (uint32_t sfid) const |
Get service flow by flow id. More... | |
std::vector< ServiceFlow * > | GetServiceFlows (enum ServiceFlow::SchedulingType schedulingType) const |
Get service flows function. More... | |
Public Member Functions inherited from ns3::Object | |
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 |
Get the most derived TypeId for this Object. More... | |
template<> | |
Ptr< Object > | GetObject () const |
Specialization of () for objects of type ns3::Object. More... | |
template<typename T > | |
Ptr< T > | GetObject (TypeId tid) const |
Get a pointer to the requested aggregated Object by TypeId. More... | |
template<> | |
Ptr< Object > | GetObject (TypeId tid) const |
Specialization of (TypeId tid) for objects of type ns3::Object. More... | |
template<typename T > | |
Ptr< T > | GetObject (void) const |
Get a pointer to the requested aggregated Object. More... | |
void | Initialize (void) |
Invoke DoInitialize on all Objects aggregated to this one. More... | |
bool | IsInitialized (void) const |
Check if the object has been initialized. More... | |
Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter > | |
SimpleRefCount () | |
Default constructor. More... | |
SimpleRefCount (const SimpleRefCount &o[[maybe_unused]]) | |
Copy constructor. More... | |
uint32_t | GetReferenceCount (void) const |
Get the reference count of the object. More... | |
SimpleRefCount & | operator= ([[maybe_unused]] const SimpleRefCount &o) |
Assignment operator. 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 |
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) |
Register this type. More... | |
Static Public Member Functions inherited from ns3::ServiceFlowManager | |
static TypeId | GetTypeId (void) |
Get the type ID. More... | |
Static Public Member Functions inherited from ns3::Object | |
static TypeId | GetTypeId (void) |
Register this type. More... | |
Static Public Member Functions inherited from ns3::ObjectBase | |
static TypeId | GetTypeId (void) |
Get the type ID. More... | |
Private Attributes | |
uint16_t | m_currentTransactionId |
current transaction ID More... | |
Ptr< SubscriberStationNetDevice > | m_device |
the device More... | |
DsaAck | m_dsaAck |
DSA ack. More... | |
EventId | m_dsaAckTimeoutEvent |
DSA ack timeout event. More... | |
DsaReq | m_dsaReq |
DSA request. More... | |
uint8_t | m_dsaReqRetries |
DSA request retries. More... | |
EventId | m_dsaRspTimeoutEvent |
DSA response timeout event. More... | |
uint8_t | m_maxDsaReqRetries |
maximum DSA request retries More... | |
ServiceFlow * | m_pendingServiceFlow |
pending service flow More... | |
uint16_t | m_transactionIdIndex |
transaction ID index More... | |
Additional Inherited Members | |
Protected Member Functions inherited from ns3::Object | |
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... | |
Protected Member Functions inherited from ns3::ObjectBase | |
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... | |
Related Functions inherited from ns3::ObjectBase | |
static TypeId | GetObjectIid (void) |
Ensure the TypeId for ObjectBase gets fully configured to anchor the inheritance tree properly. More... | |
SsServiceFlowManager class.
Definition at line 43 of file ss-service-flow-manager.h.
Confirmation code enumeration.
Enumerator | |
---|---|
CONFIRMATION_CODE_SUCCESS | |
CONFIRMATION_CODE_REJECT |
Definition at line 47 of file ss-service-flow-manager.h.
ns3::SsServiceFlowManager::SsServiceFlowManager | ( | Ptr< SubscriberStationNetDevice > | device | ) |
Constructor.
Creates a service flow manager and attaches it to a device
device | the device to which the service flow manager will be attached |
Definition at line 46 of file ss-service-flow-manager.cc.
ns3::SsServiceFlowManager::~SsServiceFlowManager | ( | void | ) |
Definition at line 58 of file ss-service-flow-manager.cc.
void ns3::SsServiceFlowManager::AddServiceFlow | ( | ServiceFlow * | serviceFlow | ) |
add a service flow to the list
serviceFlow | the service flow to add |
Definition at line 113 of file ss-service-flow-manager.cc.
References ns3::ServiceFlowManager::AddServiceFlow().
void ns3::SsServiceFlowManager::AddServiceFlow | ( | ServiceFlow | serviceFlow | ) |
add a service flow to the list
serviceFlow | the service flow to add |
Definition at line 105 of file ss-service-flow-manager.cc.
References ns3::ServiceFlowManager::AddServiceFlow(), and ns3::ServiceFlow::CopyParametersFrom().
Create DSA ack.
Definition at line 143 of file ss-service-flow-manager.cc.
References ns3::Packet::AddHeader(), 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().
DsaReq ns3::SsServiceFlowManager::CreateDsaReq | ( | const ServiceFlow * | serviceFlow | ) |
Create DSA request.
serviceFlow | the service flow |
Definition at line 129 of file ss-service-flow-manager.cc.
References m_currentTransactionId, m_transactionIdIndex, ns3::DsaReq::SetServiceFlow(), and ns3::DsaReq::SetTransactionId().
Referenced by ScheduleDsaReq().
|
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 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 75 of file ss-service-flow-manager.cc.
References ns3::ServiceFlowManager::DoDispose().
EventId ns3::SsServiceFlowManager::GetDsaAckTimeoutEvent | ( | void | ) | const |
Get DSA ack timeout event.
Definition at line 99 of file ss-service-flow-manager.cc.
References m_dsaAckTimeoutEvent.
EventId ns3::SsServiceFlowManager::GetDsaRspTimeoutEvent | ( | void | ) | const |
Get DSA response timeout event.
Definition at line 93 of file ss-service-flow-manager.cc.
References m_dsaRspTimeoutEvent.
uint8_t ns3::SsServiceFlowManager::GetMaxDsaReqRetries | ( | void | ) | const |
Definition at line 87 of file ss-service-flow-manager.cc.
References m_maxDsaReqRetries.
|
static |
Register this type.
Definition at line 64 of file ss-service-flow-manager.cc.
References ns3::TypeId::SetParent().
void ns3::SsServiceFlowManager::InitiateServiceFlows | ( | void | ) |
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().
void ns3::SsServiceFlowManager::ProcessDsaRsp | ( | const DsaRsp & | dsaRsp | ) |
Process DSA response.
dsaRsp | the DSA response |
Definition at line 198 of file ss-service-flow-manager.cc.
References CreateDsaAck(), ns3::ServiceFlow::GetCid(), ns3::ServiceFlowManager::GetNextServiceFlowToAllocate(), ns3::DsaRsp::GetServiceFlow(), ns3::DsaRsp::GetTransactionId(), m_currentTransactionId, m_device, m_dsaReqRetries, m_pendingServiceFlow, ScheduleDsaReq(), ns3::ServiceFlow::SetConnection(), ns3::ServiceFlow::SetIsEnabled(), ns3::ServiceFlow::SetUnsolicitedGrantInterval(), ns3::ServiceFlow::SetUnsolicitedPollingInterval(), and ns3::Cid::TRANSPORT.
void ns3::SsServiceFlowManager::ScheduleDsaReq | ( | const ServiceFlow * | serviceFlow | ) |
Schedule DSA response.
serviceFlow | the service flow |
Definition at line 156 of file ss-service-flow-manager.cc.
References ns3::Packet::AddHeader(), 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, and ns3::Simulator::Schedule().
Referenced by InitiateServiceFlows(), and ProcessDsaRsp().
void ns3::SsServiceFlowManager::SetMaxDsaReqRetries | ( | uint8_t | maxDsaReqRetries | ) |
sets the maximum retries on DSA request message
maxDsaReqRetries | the maximum retries on DSA request message |
Definition at line 81 of file ss-service-flow-manager.cc.
References m_maxDsaReqRetries.
|
private |
current transaction ID
Definition at line 140 of file ss-service-flow-manager.h.
Referenced by CreateDsaReq(), and ProcessDsaRsp().
|
private |
the device
Definition at line 130 of file ss-service-flow-manager.h.
Referenced by ProcessDsaRsp(), and ScheduleDsaReq().
|
private |
|
private |
DSA ack timeout event.
Definition at line 135 of file ss-service-flow-manager.h.
Referenced by GetDsaAckTimeoutEvent().
|
private |
DSA request.
Definition at line 137 of file ss-service-flow-manager.h.
Referenced by CreateDsaAck(), and ScheduleDsaReq().
|
private |
DSA request retries.
Definition at line 142 of file ss-service-flow-manager.h.
Referenced by ProcessDsaRsp(), and ScheduleDsaReq().
|
private |
DSA response timeout event.
Definition at line 134 of file ss-service-flow-manager.h.
Referenced by GetDsaRspTimeoutEvent(), and ScheduleDsaReq().
|
private |
maximum DSA request retries
Definition at line 132 of file ss-service-flow-manager.h.
Referenced by GetMaxDsaReqRetries(), ScheduleDsaReq(), and SetMaxDsaReqRetries().
|
private |
pending service flow
Definition at line 145 of file ss-service-flow-manager.h.
Referenced by InitiateServiceFlows(), and ProcessDsaRsp().
|
private |
transaction ID index
Definition at line 141 of file ss-service-flow-manager.h.
Referenced by CreateDsaReq().