A Discrete-Event Network Simulator
API
bs-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) 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  * Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
19  */
20 
21 #ifndef BS_SERVICE_FLOW_MANAGER_H
22 #define BS_SERVICE_FLOW_MANAGER_H
23 
24 #include <stdint.h>
25 #include "ns3/event-id.h"
26 #include "mac-messages.h"
27 #include "ns3/buffer.h"
28 #include "service-flow-manager.h"
29 #include "bs-net-device.h"
30 
31 namespace ns3 {
32 
33 class Packet;
34 class ServiceFlow;
35 class WimaxNetDevice;
36 class SSRecord;
37 class WimaxConnection;
38 class BaseStationNetDevice;
39 
44 {
45 public:
46  enum ConfirmationCode // as per Table 384 (not all codes implemented)
47  {
49  };
50 
52  ~BsServiceFlowManager (void);
53  void DoDispose (void);
58  static TypeId GetTypeId (void);
59 
64  void AddServiceFlow (ServiceFlow *serviceFlow);
68  ServiceFlow* GetServiceFlow (uint32_t sfid) const;
72  ServiceFlow* GetServiceFlow (Cid cid) const;
76  std::vector<ServiceFlow*> GetServiceFlows (ServiceFlow::SchedulingType schedulingType) const;
80  void SetMaxDsaRspRetries (uint8_t maxDsaRspRetries);
81 
82  EventId GetDsaAckTimeoutEvent (void) const;
83 
84  void AllocateServiceFlows (const DsaReq &dsaReq, Cid cid);
94  void ProcessDsaAck (const DsaAck &dsaAck, Cid cid);
95 
101  ServiceFlow* ProcessDsaReq (const DsaReq &dsaReq, Cid cid);
102 
103 private:
104  DsaRsp CreateDsaRsp (const ServiceFlow *serviceFlow, uint16_t transactionId);
105  uint8_t GetMaxDsaRspRetries (void) const;
106  void ScheduleDsaRsp (ServiceFlow *serviceFlow, Cid cid);
108  uint32_t m_sfidIndex;
112 };
113 
114 } // namespace ns3
115 
116 #endif /* BS_SERVICE_FLOW_MANAGER_H */
Introspection did not find any typical Config paths.
Definition: mac-messages.h:344
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:73
Introspection did not find any typical Config paths.
Definition: mac-messages.h:430
void AllocateServiceFlows(const DsaReq &dsaReq, Cid cid)
static TypeId GetTypeId(void)
Register this type.
BsServiceFlowManager(Ptr< BaseStationNetDevice > device)
uint8_t GetMaxDsaRspRetries(void) const
void DoDispose(void)
Destructor implementation.
void ScheduleDsaRsp(ServiceFlow *serviceFlow, Cid cid)
ServiceFlow * GetServiceFlow(uint32_t sfid) const
EventId GetDsaAckTimeoutEvent(void) const
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Definition: cid.h:35
ServiceFlow * ProcessDsaReq(const DsaReq &dsaReq, Cid cid)
process a DSA-Req message
This class implements service flows as described by the IEEE-802.16 standard.
Definition: service-flow.h:39
void SetMaxDsaRspRetries(uint8_t maxDsaRspRetries)
set the maximum Dynamic ServiceFlow Add (DSA) retries
void ProcessDsaAck(const DsaAck &dsaAck, Cid cid)
process a DSA-ACK message
An identifier for simulation events.
Definition: event-id.h:53
void AddServiceFlow(ServiceFlow *serviceFlow)
Add a new service flow.
void AddMulticastServiceFlow(ServiceFlow sf, enum WimaxPhy::ModulationType modulation)
add a multicast service flow
Introspection did not find any typical Config paths.
Definition: mac-messages.h:262
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:58
DsaRsp CreateDsaRsp(const ServiceFlow *serviceFlow, uint16_t transactionId)
std::vector< ServiceFlow * > GetServiceFlows(ServiceFlow::SchedulingType schedulingType) const