A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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:
45  enum ConfirmationCode // as per Table 384 (not all codes implemented)
46  {
48  };
49 
50  static TypeId GetTypeId (void);
51 
53  ~ServiceFlowManager (void);
54  void DoDispose (void);
55 
56  void AddServiceFlow (ServiceFlow * serviceFlow);
57  ServiceFlow* GetServiceFlow (uint32_t sfid) const;
58  ServiceFlow* GetServiceFlow (Cid cid) const;
59  std::vector<ServiceFlow*> GetServiceFlows (enum ServiceFlow::SchedulingType schedulingType) const;
60 
69  bool AreServiceFlowsAllocated (std::vector<ServiceFlow*>* serviceFlows);
74  bool AreServiceFlowsAllocated (std::vector<ServiceFlow*> serviceFlows);
79 
83  uint32_t GetNrServiceFlows (void) const;
84 
94  ServiceFlow* DoClassify (Ipv4Address SrcAddress,
95  Ipv4Address DstAddress,
96  uint16_t SrcPort,
97  uint16_t DstPort,
98  uint8_t Proto,
99  ServiceFlow::Direction dir) const;
100 private:
101  std::vector<ServiceFlow*> * m_serviceFlows;
102 };
103 
104 } // namespace ns3
105 
106 #endif /* SERVICE_FLOW_MANAGER_H */
static TypeId GetTypeId(void)
ServiceFlow * GetServiceFlow(uint32_t sfid) const
ServiceFlow * GetNextServiceFlowToAllocate()
uint32_t GetNrServiceFlows(void) const
ServiceFlow * DoClassify(Ipv4Address SrcAddress, Ipv4Address DstAddress, uint16_t SrcPort, uint16_t DstPort, uint8_t Proto, ServiceFlow::Direction dir) const
void DoDispose(void)
This method is called by Object::Dispose or by the object's destructor, whichever comes first...
Definition: cid.h:35
std::vector< ServiceFlow * > GetServiceFlows(enum ServiceFlow::SchedulingType schedulingType) const
This class implements service flows as described by the IEEE-802.16 standard.
Definition: service-flow.h:39
Ipv4 addresses are stored in host order in this class.
Definition: ipv4-address.h:38
std::vector< ServiceFlow * > * m_serviceFlows
void AddServiceFlow(ServiceFlow *serviceFlow)
a base class which provides memory management and object aggregation
Definition: object.h:64
The same service flow manager class serves both for BS and SS though some functions are exclusive to ...
a unique identifier for an interface.
Definition: type-id.h:49