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
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License version 2 as
6
* published by the Free Software Foundation;
7
*
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
12
*
13
* You should have received a copy of the GNU General Public License
14
* along with this program; if not, write to the Free Software
15
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16
*
17
* Author: Jahanzeb Farooq <jahanzeb.farooq@sophia.inria.fr>
18
* Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
19
*/
20
21
#ifndef SERVICE_FLOW_MANAGER_H
22
#define SERVICE_FLOW_MANAGER_H
23
24
#include "
mac-messages.h
"
25
26
#include "ns3/buffer.h"
27
#include "ns3/event-id.h"
28
29
#include <stdint.h>
30
31
namespace
ns3
32
{
33
34
class
Packet;
35
class
ServiceFlow;
36
class
WimaxNetDevice;
37
class
SSRecord;
38
class
WimaxConnection;
39
40
/**
41
* \ingroup wimax
42
* The same service flow manager class serves both for BS and SS though some functions are exclusive
43
* to only one of them.
44
*/
45
class
ServiceFlowManager
:
public
Object
46
{
47
public
:
48
/// confirmation code enumeration as per Table 384 (not all codes implemented)
49
enum
ConfirmationCode
50
{
51
CONFIRMATION_CODE_SUCCESS
,
52
CONFIRMATION_CODE_REJECT
53
};
54
55
/**
56
* \brief Get the type ID.
57
* \return the object TypeId
58
*/
59
static
TypeId
GetTypeId
();
60
61
ServiceFlowManager
();
62
~ServiceFlowManager
()
override
;
63
void
DoDispose
()
override
;
64
65
/**
66
* Add service flow function
67
* \param serviceFlow the service flow
68
*/
69
void
AddServiceFlow
(
ServiceFlow
* serviceFlow);
70
/**
71
* Get service flow by flow id
72
* \param sfid the service flow id
73
* \returns pointer to the service flow object corresponding to the flow id
74
*/
75
ServiceFlow
*
GetServiceFlow
(
uint32_t
sfid)
const
;
76
/**
77
* Get service flow by CID
78
* \param cid the CID
79
* \returns pointer to the service flow object corresponding to the CID
80
*/
81
ServiceFlow
*
GetServiceFlow
(
Cid
cid)
const
;
82
/**
83
* Get service flows function
84
* \param schedulingType the scheduling type
85
* \returns vector of pointers to service flows corresponding to the scheduling type
86
*/
87
std::vector<ServiceFlow*>
GetServiceFlows
(
ServiceFlow::SchedulingType
schedulingType)
const
;
88
89
/**
90
* \return true if all service flows are allocated, false otherwise
91
*/
92
bool
AreServiceFlowsAllocated
();
93
/**
94
* \param serviceFlows vector of pointers to service flows to be checked
95
* \return true if all service flows are allocated, false otherwise
96
*/
97
bool
AreServiceFlowsAllocated
(std::vector<ServiceFlow*>* serviceFlows);
98
/**
99
* \param serviceFlows vector of pointers to service flows to be checked
100
* \return true if all service flows are allocated, false otherwise
101
*/
102
bool
AreServiceFlowsAllocated
(std::vector<ServiceFlow*> serviceFlows);
103
/**
104
* \return pointer to the next service flow to be allocated
105
*/
106
ServiceFlow
*
GetNextServiceFlowToAllocate
();
107
108
/**
109
* \return the number of all service flows
110
*/
111
uint32_t
GetNrServiceFlows
()
const
;
112
113
/**
114
*\param SrcAddress the source ip address
115
*\param DstAddress the destination ip address
116
*\param SrcPort the source port
117
*\param DstPort the destination port
118
*\param Proto the protocol
119
*\param dir the direction of the service flow
120
*\return the service flow to which this ip flow is associated
121
*/
122
ServiceFlow
*
DoClassify
(
Ipv4Address
SrcAddress,
123
Ipv4Address
DstAddress,
124
uint16_t SrcPort,
125
uint16_t DstPort,
126
uint8_t Proto,
127
ServiceFlow::Direction
dir
)
const
;
128
129
private
:
130
std::vector<ServiceFlow*>*
m_serviceFlows
;
///< the service flows
131
};
132
133
}
// namespace ns3
134
135
#endif
/* SERVICE_FLOW_MANAGER_H */
ns3::Cid
Cid class.
Definition:
cid.h:37
ns3::Ipv4Address
Ipv4 addresses are stored in host order in this class.
Definition:
ipv4-address.h:42
ns3::Object
A base class which provides memory management and object aggregation.
Definition:
object.h:89
ns3::ServiceFlow
This class implements service flows as described by the IEEE-802.16 standard.
Definition:
service-flow.h:43
ns3::ServiceFlow::SchedulingType
SchedulingType
section 11.13.11 Service flow scheduling type, page 701
Definition:
service-flow.h:62
ns3::ServiceFlow::Direction
Direction
Direction enumeration.
Definition:
service-flow.h:47
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:46
ns3::ServiceFlowManager::GetNextServiceFlowToAllocate
ServiceFlow * GetNextServiceFlowToAllocate()
Definition:
service-flow-manager.cc:177
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:86
ns3::ServiceFlowManager::AddServiceFlow
void AddServiceFlow(ServiceFlow *serviceFlow)
Add service flow function.
Definition:
service-flow-manager.cc:80
ns3::ServiceFlowManager::ConfirmationCode
ConfirmationCode
confirmation code enumeration as per Table 384 (not all codes implemented)
Definition:
service-flow-manager.h:50
ns3::ServiceFlowManager::CONFIRMATION_CODE_REJECT
@ CONFIRMATION_CODE_REJECT
Definition:
service-flow-manager.h:52
ns3::ServiceFlowManager::CONFIRMATION_CODE_SUCCESS
@ CONFIRMATION_CODE_SUCCESS
Definition:
service-flow-manager.h:51
ns3::ServiceFlowManager::GetServiceFlow
ServiceFlow * GetServiceFlow(uint32_t sfid) const
Get service flow by flow id.
Definition:
service-flow-manager.cc:107
ns3::ServiceFlowManager::GetServiceFlows
std::vector< ServiceFlow * > GetServiceFlows(ServiceFlow::SchedulingType schedulingType) const
Get service flows function.
Definition:
service-flow-manager.cc:137
ns3::ServiceFlowManager::ServiceFlowManager
ServiceFlowManager()
Definition:
service-flow-manager.cc:59
ns3::ServiceFlowManager::GetNrServiceFlows
uint32_t GetNrServiceFlows() const
Definition:
service-flow-manager.cc:190
ns3::ServiceFlowManager::~ServiceFlowManager
~ServiceFlowManager() override
Definition:
service-flow-manager.cc:64
ns3::ServiceFlowManager::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition:
service-flow-manager.cc:53
ns3::ServiceFlowManager::DoDispose
void DoDispose() override
Destructor implementation.
Definition:
service-flow-manager.cc:69
ns3::ServiceFlowManager::AreServiceFlowsAllocated
bool AreServiceFlowsAllocated()
Definition:
service-flow-manager.cc:152
ns3::ServiceFlowManager::m_serviceFlows
std::vector< ServiceFlow * > * m_serviceFlows
the service flows
Definition:
service-flow-manager.h:130
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:59
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:68
src
wimax
model
service-flow-manager.h
Generated on Tue May 28 2024 23:41:14 for ns-3 by
1.9.6