#include "bs-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 | |
BsServiceFlowManager (Ptr< BaseStationNetDevice > device) | |
Constructor. More... | |
~BsServiceFlowManager () override | |
void | AddMulticastServiceFlow (ServiceFlow sf, WimaxPhy::ModulationType modulation) |
add a multicast service flow More... | |
void | AddServiceFlow (ServiceFlow *serviceFlow) |
Add a new service flow. More... | |
void | AllocateServiceFlows (const DsaReq &dsaReq, Cid cid) |
allocate service flows More... | |
void | DoDispose () override |
Destructor implementation. More... | |
EventId | GetDsaAckTimeoutEvent () const |
ServiceFlow * | GetServiceFlow (Cid cid) const |
ServiceFlow * | GetServiceFlow (uint32_t sfid) const |
std::vector< ServiceFlow * > | GetServiceFlows (ServiceFlow::SchedulingType schedulingType) const |
void | ProcessDsaAck (const DsaAck &dsaAck, Cid cid) |
process a DSA-ACK message More... | |
ServiceFlow * | ProcessDsaReq (const DsaReq &dsaReq, Cid cid) |
process a DSA-Req message More... | |
void | SetMaxDsaRspRetries (uint8_t maxDsaRspRetries) |
set the maximum Dynamic ServiceFlow Add (DSA) retries More... | |
Public Member Functions inherited from ns3::ServiceFlowManager | |
ServiceFlowManager () | |
~ServiceFlowManager () override | |
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 |
void | DoDispose () override |
Destructor implementation. More... | |
ServiceFlow * | GetNextServiceFlowToAllocate () |
uint32_t | GetNrServiceFlows () 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 (ServiceFlow::SchedulingType schedulingType) const |
Get service flows function. More... | |
Public Member Functions inherited from ns3::Object | |
Object () | |
Constructor. More... | |
~Object () override | |
Destructor. More... | |
void | AggregateObject (Ptr< Object > other) |
Aggregate two Objects together. More... | |
void | Dispose () |
Dispose of this Object. More... | |
AggregateIterator | GetAggregateIterator () const |
Get an iterator to the Objects aggregated to this one. More... | |
TypeId | GetInstanceTypeId () const override |
Get the most derived TypeId for this Object. More... | |
template<typename T > | |
Ptr< T > | GetObject () const |
Get a pointer to the requested aggregated 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... | |
void | Initialize () |
Invoke DoInitialize on all Objects aggregated to this one. More... | |
bool | IsInitialized () 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 () const |
Get the reference count of the object. More... | |
SimpleRefCount & | operator= (const SimpleRefCount &o[[maybe_unused]]) |
Assignment operator. More... | |
void | Ref () const |
Increment the reference count. More... | |
void | Unref () 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 errors. 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 () |
Register this type. More... | |
Static Public Member Functions inherited from ns3::ServiceFlowManager | |
static TypeId | GetTypeId () |
Get the type ID. More... | |
Static Public Member Functions inherited from ns3::Object | |
static TypeId | GetTypeId () |
Register this type. More... | |
Static Public Member Functions inherited from ns3::ObjectBase | |
static TypeId | GetTypeId () |
Get the type ID. More... | |
Private Member Functions | |
DsaRsp | CreateDsaRsp (const ServiceFlow *serviceFlow, uint16_t transactionId) |
Create DSA response function. More... | |
uint8_t | GetMaxDsaRspRetries () const |
void | ScheduleDsaRsp (ServiceFlow *serviceFlow, Cid cid) |
Create DSA response function. More... | |
Private Attributes | |
Ptr< WimaxNetDevice > | m_device |
the device More... | |
EventId | m_dsaAckTimeoutEvent |
DSA ack timeout event. More... | |
Cid | m_inuseScheduleDsaRspCid |
in use schedule DSA response CID More... | |
uint8_t | m_maxDsaRspRetries |
maximum number of DSA response retries More... | |
uint32_t | m_sfidIndex |
SFID index. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from ns3::Object | |
Object (const Object &o) | |
Copy an Object. More... | |
virtual void | DoInitialize () |
Initialize() implementation. More... | |
virtual void | NotifyNewAggregate () |
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 () |
Notifier called once the ObjectBase is fully constructed. More... | |
Related Functions inherited from ns3::ObjectBase | |
static TypeId | GetObjectIid () |
Ensure the TypeId for ObjectBase gets fully configured to anchor the inheritance tree properly. More... | |
Definition at line 46 of file bs-service-flow-manager.h.
Confirmation code enumeration.
Enumerator | |
---|---|
CONFIRMATION_CODE_SUCCESS | |
CONFIRMATION_CODE_REJECT |
Definition at line 50 of file bs-service-flow-manager.h.
ns3::BsServiceFlowManager::BsServiceFlowManager | ( | Ptr< BaseStationNetDevice > | device | ) |
Constructor.
device | base station device |
Definition at line 47 of file bs-service-flow-manager.cc.
References ns3::Cid::InitialRanging(), and m_inuseScheduleDsaRspCid.
|
override |
Definition at line 55 of file bs-service-flow-manager.cc.
void ns3::BsServiceFlowManager::AddMulticastServiceFlow | ( | ServiceFlow | sf, |
WimaxPhy::ModulationType | modulation | ||
) |
add a multicast service flow
sf | the service flow |
modulation | the wimax phy modulation type |
Definition at line 224 of file bs-service-flow-manager.cc.
References AddServiceFlow(), m_device, ns3::Cid::MULTICAST, and ns3::ServiceFlow::SF_TYPE_ACTIVE.
void ns3::BsServiceFlowManager::AddServiceFlow | ( | ServiceFlow * | serviceFlow | ) |
Add a new service flow.
serviceFlow | the service flow to add |
Definition at line 95 of file bs-service-flow-manager.cc.
References ns3::ServiceFlowManager::AddServiceFlow().
Referenced by AddMulticastServiceFlow(), and ProcessDsaReq().
allocate service flows
dsaReq | the DSA request |
cid | the connection identifier |
Definition at line 241 of file bs-service-flow-manager.cc.
References NS_LOG_INFO, ProcessDsaReq(), and ScheduleDsaRsp().
|
private |
Create DSA response function.
serviceFlow | service flow |
transactionId | transaction ID |
Definition at line 119 of file bs-service-flow-manager.cc.
References CONFIRMATION_CODE_SUCCESS, ns3::DsaRsp::SetConfirmationCode(), ns3::DsaRsp::SetServiceFlow(), and ns3::DsaRsp::SetTransactionId().
Referenced by ScheduleDsaRsp().
|
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 71 of file bs-service-flow-manager.cc.
References ns3::ServiceFlowManager::DoDispose().
EventId ns3::BsServiceFlowManager::GetDsaAckTimeoutEvent | ( | ) | const |
Definition at line 89 of file bs-service-flow-manager.cc.
References m_dsaAckTimeoutEvent.
|
private |
Definition at line 83 of file bs-service-flow-manager.cc.
References m_maxDsaRspRetries.
ServiceFlow * ns3::BsServiceFlowManager::GetServiceFlow | ( | Cid | cid | ) | const |
cid | the connection identifier |
Definition at line 107 of file bs-service-flow-manager.cc.
References ns3::ServiceFlowManager::GetServiceFlow().
ServiceFlow * ns3::BsServiceFlowManager::GetServiceFlow | ( | uint32_t | sfid | ) | const |
sfid | the service flow identifier |
Definition at line 101 of file bs-service-flow-manager.cc.
References ns3::ServiceFlowManager::GetServiceFlow().
Referenced by ProcessDsaReq().
std::vector< ServiceFlow * > ns3::BsServiceFlowManager::GetServiceFlows | ( | ServiceFlow::SchedulingType | schedulingType | ) | const |
schedulingType | the scheduling type |
Definition at line 113 of file bs-service-flow-manager.cc.
References ns3::ServiceFlowManager::GetServiceFlows().
|
static |
Register this type.
Definition at line 61 of file bs-service-flow-manager.cc.
References ns3::TypeId::SetParent().
process a DSA-ACK message
dsaAck | the message to process |
cid | the identifier of the connection on which the message was received |
Definition at line 255 of file bs-service-flow-manager.cc.
References ns3::ServiceFlowManager::AreServiceFlowsAllocated(), ns3::DsaAck::GetTransactionId(), m_device, and ns3::ServiceFlow::SF_TYPE_ALL.
ServiceFlow * ns3::BsServiceFlowManager::ProcessDsaReq | ( | const DsaReq & | dsaReq, |
Cid | cid | ||
) |
process a DSA-Req message
dsaReq | the message to process |
cid | the identifier of the connection on which the message was received |
Definition at line 188 of file bs-service-flow-manager.cc.
References AddServiceFlow(), ns3::ServiceFlow::CopyParametersFrom(), ns3::ServiceFlow::GetCid(), ns3::ServiceFlow::GetConvergenceSublayerParam(), ns3::ServiceFlow::GetDirection(), ns3::DsaReq::GetServiceFlow(), 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().
|
private |
Create DSA response function.
serviceFlow | service flow |
cid | the identifier of the connection on which the message was received |
Definition at line 131 of file bs-service-flow-manager.cc.
References ns3::Packet::AddHeader(), ns3::Simulator::Cancel(), CreateDsaRsp(), ns3::EventId::IsRunning(), m_device, m_dsaAckTimeoutEvent, m_inuseScheduleDsaRspCid, m_maxDsaRspRetries, ns3::ManagementMessageType::MESSAGE_TYPE_DSA_RSP, NS_LOG_DEBUG, NS_LOG_INFO, ns3::Simulator::Schedule(), ns3::ServiceFlow::SetIsEnabled(), ns3::ServiceFlow::SetType(), and ns3::ServiceFlow::SF_TYPE_ACTIVE.
Referenced by AllocateServiceFlows().
void ns3::BsServiceFlowManager::SetMaxDsaRspRetries | ( | uint8_t | maxDsaRspRetries | ) |
set the maximum Dynamic ServiceFlow Add (DSA) retries
maxDsaRspRetries | the maximum DSA response retries |
Definition at line 77 of file bs-service-flow-manager.cc.
References m_maxDsaRspRetries.
|
private |
the device
Definition at line 145 of file bs-service-flow-manager.h.
Referenced by AddMulticastServiceFlow(), ProcessDsaAck(), ProcessDsaReq(), and ScheduleDsaRsp().
|
private |
DSA ack timeout event.
Definition at line 148 of file bs-service-flow-manager.h.
Referenced by GetDsaAckTimeoutEvent(), and ScheduleDsaRsp().
|
private |
in use schedule DSA response CID
Definition at line 149 of file bs-service-flow-manager.h.
Referenced by BsServiceFlowManager(), and ScheduleDsaRsp().
|
private |
maximum number of DSA response retries
Definition at line 147 of file bs-service-flow-manager.h.
Referenced by GetMaxDsaRspRetries(), ScheduleDsaRsp(), and SetMaxDsaRspRetries().
|
private |
SFID index.
Definition at line 146 of file bs-service-flow-manager.h.
Referenced by ProcessDsaReq().