A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
Loading...
Searching...
No Matches
service-flow-manager.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2007,2008, 2009 INRIA, UDcast
3
*
4
* SPDX-License-Identifier: GPL-2.0-only
5
*
6
* Author: Jahanzeb Farooq <jahanzeb.farooq@sophia.inria.fr>
7
* Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
8
*/
9
10
#ifndef SERVICE_FLOW_MANAGER_H
11
#define SERVICE_FLOW_MANAGER_H
12
13
#include "
mac-messages.h
"
14
15
#include "ns3/buffer.h"
16
#include "ns3/event-id.h"
17
18
#include <stdint.h>
19
20
namespace
ns3
21
{
22
23
class
Packet;
24
class
ServiceFlow;
25
class
WimaxNetDevice;
26
class
SSRecord;
27
class
WimaxConnection;
28
29
/**
30
* \ingroup wimax
31
* The same service flow manager class serves both for BS and SS though some functions are exclusive
32
* to only one of them.
33
*/
34
class
ServiceFlowManager
:
public
Object
35
{
36
public
:
37
/// confirmation code enumeration as per Table 384 (not all codes implemented)
38
enum
ConfirmationCode
39
{
40
CONFIRMATION_CODE_SUCCESS
,
41
CONFIRMATION_CODE_REJECT
42
};
43
44
/**
45
* \brief Get the type ID.
46
* \return the object TypeId
47
*/
48
static
TypeId
GetTypeId
();
49
50
ServiceFlowManager
();
51
~ServiceFlowManager
()
override
;
52
void
DoDispose
()
override
;
53
54
/**
55
* Add service flow function
56
* \param serviceFlow the service flow
57
*/
58
void
AddServiceFlow
(
ServiceFlow
* serviceFlow);
59
/**
60
* Get service flow by flow id
61
* \param sfid the service flow id
62
* \returns pointer to the service flow object corresponding to the flow id
63
*/
64
ServiceFlow
*
GetServiceFlow
(
uint32_t
sfid)
const
;
65
/**
66
* Get service flow by CID
67
* \param cid the CID
68
* \returns pointer to the service flow object corresponding to the CID
69
*/
70
ServiceFlow
*
GetServiceFlow
(
Cid
cid)
const
;
71
/**
72
* Get service flows function
73
* \param schedulingType the scheduling type
74
* \returns vector of pointers to service flows corresponding to the scheduling type
75
*/
76
std::vector<ServiceFlow*>
GetServiceFlows
(
ServiceFlow::SchedulingType
schedulingType)
const
;
77
78
/**
79
* \return true if all service flows are allocated, false otherwise
80
*/
81
bool
AreServiceFlowsAllocated
();
82
/**
83
* \param serviceFlows vector of pointers to service flows to be checked
84
* \return true if all service flows are allocated, false otherwise
85
*/
86
bool
AreServiceFlowsAllocated
(std::vector<ServiceFlow*>* serviceFlows);
87
/**
88
* \param serviceFlows vector of pointers to service flows to be checked
89
* \return true if all service flows are allocated, false otherwise
90
*/
91
bool
AreServiceFlowsAllocated
(std::vector<ServiceFlow*> serviceFlows);
92
/**
93
* \return pointer to the next service flow to be allocated
94
*/
95
ServiceFlow
*
GetNextServiceFlowToAllocate
();
96
97
/**
98
* \return the number of all service flows
99
*/
100
uint32_t
GetNrServiceFlows
()
const
;
101
102
/**
103
* \param SrcAddress the source ip address
104
* \param DstAddress the destination ip address
105
* \param SrcPort the source port
106
* \param DstPort the destination port
107
* \param Proto the protocol
108
* \param dir the direction of the service flow
109
* \return the service flow to which this ip flow is associated
110
*/
111
ServiceFlow
*
DoClassify
(
Ipv4Address
SrcAddress,
112
Ipv4Address
DstAddress,
113
uint16_t SrcPort,
114
uint16_t DstPort,
115
uint8_t Proto,
116
ServiceFlow::Direction
dir
)
const
;
117
118
private
:
119
std::vector<ServiceFlow*>*
m_serviceFlows
;
///< the service flows
120
};
121
122
}
// namespace ns3
123
124
#endif
/* SERVICE_FLOW_MANAGER_H */
ns3::Cid
Cid class.
Definition
cid.h:26
ns3::Ipv4Address
Ipv4 addresses are stored in host order in this class.
Definition
ipv4-address.h:31
ns3::Object
A base class which provides memory management and object aggregation.
Definition
object.h:78
ns3::ServiceFlow
This class implements service flows as described by the IEEE-802.16 standard.
Definition
service-flow.h:32
ns3::ServiceFlow::SchedulingType
SchedulingType
section 11.13.11 Service flow scheduling type, page 701
Definition
service-flow.h:51
ns3::ServiceFlow::Direction
Direction
Direction enumeration.
Definition
service-flow.h:36
ns3::ServiceFlowManager
The same service flow manager class serves both for BS and SS though some functions are exclusive to ...
Definition
service-flow-manager.h:35
ns3::ServiceFlowManager::GetNextServiceFlowToAllocate
ServiceFlow * GetNextServiceFlowToAllocate()
Definition
service-flow-manager.cc:166
ns3::ServiceFlowManager::DoClassify
ServiceFlow * DoClassify(Ipv4Address SrcAddress, Ipv4Address DstAddress, uint16_t SrcPort, uint16_t DstPort, uint8_t Proto, ServiceFlow::Direction dir) const
Definition
service-flow-manager.cc:75
ns3::ServiceFlowManager::AddServiceFlow
void AddServiceFlow(ServiceFlow *serviceFlow)
Add service flow function.
Definition
service-flow-manager.cc:69
ns3::ServiceFlowManager::ConfirmationCode
ConfirmationCode
confirmation code enumeration as per Table 384 (not all codes implemented)
Definition
service-flow-manager.h:39
ns3::ServiceFlowManager::CONFIRMATION_CODE_REJECT
@ CONFIRMATION_CODE_REJECT
Definition
service-flow-manager.h:41
ns3::ServiceFlowManager::CONFIRMATION_CODE_SUCCESS
@ CONFIRMATION_CODE_SUCCESS
Definition
service-flow-manager.h:40
ns3::ServiceFlowManager::GetServiceFlow
ServiceFlow * GetServiceFlow(uint32_t sfid) const
Get service flow by flow id.
Definition
service-flow-manager.cc:96
ns3::ServiceFlowManager::GetServiceFlows
std::vector< ServiceFlow * > GetServiceFlows(ServiceFlow::SchedulingType schedulingType) const
Get service flows function.
Definition
service-flow-manager.cc:126
ns3::ServiceFlowManager::ServiceFlowManager
ServiceFlowManager()
Definition
service-flow-manager.cc:48
ns3::ServiceFlowManager::GetNrServiceFlows
uint32_t GetNrServiceFlows() const
Definition
service-flow-manager.cc:179
ns3::ServiceFlowManager::~ServiceFlowManager
~ServiceFlowManager() override
Definition
service-flow-manager.cc:53
ns3::ServiceFlowManager::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition
service-flow-manager.cc:42
ns3::ServiceFlowManager::DoDispose
void DoDispose() override
Destructor implementation.
Definition
service-flow-manager.cc:58
ns3::ServiceFlowManager::AreServiceFlowsAllocated
bool AreServiceFlowsAllocated()
Definition
service-flow-manager.cc:141
ns3::ServiceFlowManager::m_serviceFlows
std::vector< ServiceFlow * > * m_serviceFlows
the service flows
Definition
service-flow-manager.h:119
ns3::TypeId
a unique identifier for an interface.
Definition
type-id.h:48
uint32_t
mac-messages.h
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
dir
std::string dir
Definition
tcp-bbr-example.cc:57
src
wimax
model
service-flow-manager.h
Generated on Sun Nov 3 2024 09:20:53 for ns-3 by
1.11.0