A Discrete-Event Network Simulator
API
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 
45 class ServiceFlowManager : public Object
46 {
47  public:
50  {
53  };
54 
59  static TypeId GetTypeId();
60 
62  ~ServiceFlowManager() override;
63  void DoDispose() override;
64 
69  void AddServiceFlow(ServiceFlow* serviceFlow);
75  ServiceFlow* GetServiceFlow(uint32_t sfid) const;
81  ServiceFlow* GetServiceFlow(Cid cid) const;
87  std::vector<ServiceFlow*> GetServiceFlows(ServiceFlow::SchedulingType schedulingType) const;
88 
97  bool AreServiceFlowsAllocated(std::vector<ServiceFlow*>* serviceFlows);
102  bool AreServiceFlowsAllocated(std::vector<ServiceFlow*> serviceFlows);
107 
111  uint32_t GetNrServiceFlows() const;
112 
122  ServiceFlow* DoClassify(Ipv4Address SrcAddress,
123  Ipv4Address DstAddress,
124  uint16_t SrcPort,
125  uint16_t DstPort,
126  uint8_t Proto,
128 
129  private:
130  std::vector<ServiceFlow*>* m_serviceFlows;
131 };
132 
133 } // namespace ns3
134 
135 #endif /* SERVICE_FLOW_MANAGER_H */
Cid class.
Definition: cid.h:37
Ipv4 addresses are stored in host order in this class.
Definition: ipv4-address.h:42
A base class which provides memory management and object aggregation.
Definition: object.h:89
This class implements service flows as described by the IEEE-802.16 standard.
Definition: service-flow.h:43
SchedulingType
section 11.13.11 Service flow scheduling type, page 701
Definition: service-flow.h:62
Direction
Direction enumeration.
Definition: service-flow.h:47
The same service flow manager class serves both for BS and SS though some functions are exclusive to ...
ServiceFlow * GetNextServiceFlowToAllocate()
ServiceFlow * DoClassify(Ipv4Address SrcAddress, Ipv4Address DstAddress, uint16_t SrcPort, uint16_t DstPort, uint8_t Proto, ServiceFlow::Direction dir) const
void AddServiceFlow(ServiceFlow *serviceFlow)
Add service flow function.
ConfirmationCode
confirmation code enumeration as per Table 384 (not all codes implemented)
ServiceFlow * GetServiceFlow(uint32_t sfid) const
Get service flow by flow id.
std::vector< ServiceFlow * > GetServiceFlows(ServiceFlow::SchedulingType schedulingType) const
Get service flows function.
uint32_t GetNrServiceFlows() const
static TypeId GetTypeId()
Get the type ID.
void DoDispose() override
Destructor implementation.
std::vector< ServiceFlow * > * m_serviceFlows
the service flows
a unique identifier for an interface.
Definition: type-id.h:59
Every class exported by the ns3 library is enclosed in the ns3 namespace.
std::string dir