A Discrete-Event Network Simulator
API
service-flow-manager.h
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2007,2008, 2009 INRIA, UDcast
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License version 2 as
7  * published by the Free Software Foundation;
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * Author: Jahanzeb Farooq <jahanzeb.farooq@sophia.inria.fr>
19  * Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
20  */
21 
22 #ifndef SERVICE_FLOW_MANAGER_H
23 #define SERVICE_FLOW_MANAGER_H
24 
25 #include <stdint.h>
26 #include "ns3/event-id.h"
27 #include "mac-messages.h"
28 #include "ns3/buffer.h"
29 
30 namespace ns3 {
31 
32 class Packet;
33 class ServiceFlow;
34 class WimaxNetDevice;
35 class SSRecord;
36 class WimaxConnection;
37 
42 class ServiceFlowManager : public Object
43 {
44 public:
47  {
50  };
51 
56  static TypeId GetTypeId (void);
57 
59  ~ServiceFlowManager (void);
60  void DoDispose (void);
61 
66  void AddServiceFlow (ServiceFlow * serviceFlow);
72  ServiceFlow* GetServiceFlow (uint32_t sfid) const;
78  ServiceFlow* GetServiceFlow (Cid cid) const;
84  std::vector<ServiceFlow*> GetServiceFlows (enum ServiceFlow::SchedulingType schedulingType) const;
85 
94  bool AreServiceFlowsAllocated (std::vector<ServiceFlow*>* serviceFlows);
99  bool AreServiceFlowsAllocated (std::vector<ServiceFlow*> serviceFlows);
104 
108  uint32_t GetNrServiceFlows (void) const;
109 
119  ServiceFlow* DoClassify (Ipv4Address SrcAddress,
120  Ipv4Address DstAddress,
121  uint16_t SrcPort,
122  uint16_t DstPort,
123  uint8_t Proto,
125 private:
126  std::vector<ServiceFlow*> * m_serviceFlows;
127 };
128 
129 } // namespace ns3
130 
131 #endif /* SERVICE_FLOW_MANAGER_H */
Cid class.
Definition: cid.h:38
Ipv4 addresses are stored in host order in this class.
Definition: ipv4-address.h:41
A base class which provides memory management and object aggregation.
Definition: object.h:88
This class implements service flows as described by the IEEE-802.16 standard.
Definition: service-flow.h:40
SchedulingType
section 11.13.11 Service flow scheduling type, page 701
Definition: service-flow.h:59
Direction
Direction enumeration.
Definition: service-flow.h:44
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
std::vector< ServiceFlow * > GetServiceFlows(enum ServiceFlow::SchedulingType schedulingType) const
Get service flows function.
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.
uint32_t GetNrServiceFlows(void) const
static TypeId GetTypeId(void)
Get the type ID.
std::vector< ServiceFlow * > * m_serviceFlows
the service flows
void DoDispose(void)
Destructor implementation.
a unique identifier for an interface.
Definition: type-id.h:59
std::string dir
Every class exported by the ns3 library is enclosed in the ns3 namespace.