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 
45 {
46 public:
48  enum ConfirmationCode // as per Table 384 (not all codes implemented)
49  {
51  };
52 
59  ~BsServiceFlowManager (void);
60  void DoDispose (void);
65  static TypeId GetTypeId (void);
66 
71  void AddServiceFlow (ServiceFlow *serviceFlow);
76  ServiceFlow* GetServiceFlow (uint32_t sfid) const;
81  ServiceFlow* GetServiceFlow (Cid cid) const;
86  std::vector<ServiceFlow*> GetServiceFlows (ServiceFlow::SchedulingType schedulingType) const;
91  void SetMaxDsaRspRetries (uint8_t maxDsaRspRetries);
92 
96  EventId GetDsaAckTimeoutEvent (void) const;
102  void AllocateServiceFlows (const DsaReq &dsaReq, Cid cid);
114  void ProcessDsaAck (const DsaAck &dsaAck, Cid cid);
115 
122  ServiceFlow* ProcessDsaReq (const DsaReq &dsaReq, Cid cid);
123 
124 private:
131  DsaRsp CreateDsaRsp (const ServiceFlow *serviceFlow, uint16_t transactionId);
135  uint8_t GetMaxDsaRspRetries (void) const;
141  void ScheduleDsaRsp (ServiceFlow *serviceFlow, Cid cid);
143  uint32_t m_sfidIndex;
147 };
148 
149 } // namespace ns3
150 
151 #endif /* BS_SERVICE_FLOW_MANAGER_H */
ns3::TypeId
a unique identifier for an interface.
Definition: type-id.h:59
ns3::BsServiceFlowManager::AllocateServiceFlows
void AllocateServiceFlows(const DsaReq &dsaReq, Cid cid)
allocate service flows
Definition: bs-service-flow-manager.cc:239
ns3::BsServiceFlowManager::GetMaxDsaRspRetries
uint8_t GetMaxDsaRspRetries(void) const
Definition: bs-service-flow-manager.cc:82
ns3::Cid
Cid class.
Definition: cid.h:38
ns3::EventId
An identifier for simulation events.
Definition: event-id.h:54
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::BsServiceFlowManager::ConfirmationCode
ConfirmationCode
Confirmation code enumeration.
Definition: bs-service-flow-manager.h:49
ns3::BsServiceFlowManager::CONFIRMATION_CODE_REJECT
@ CONFIRMATION_CODE_REJECT
Definition: bs-service-flow-manager.h:50
ns3::BsServiceFlowManager::SetMaxDsaRspRetries
void SetMaxDsaRspRetries(uint8_t maxDsaRspRetries)
set the maximum Dynamic ServiceFlow Add (DSA) retries
Definition: bs-service-flow-manager.cc:76
ns3::BsServiceFlowManager::CONFIRMATION_CODE_SUCCESS
@ CONFIRMATION_CODE_SUCCESS
Definition: bs-service-flow-manager.h:50
ns3::BsServiceFlowManager::m_inuseScheduleDsaRspCid
Cid m_inuseScheduleDsaRspCid
in use schedule DSA response CID
Definition: bs-service-flow-manager.h:146
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:43
ns3::BsServiceFlowManager::m_dsaAckTimeoutEvent
EventId m_dsaAckTimeoutEvent
DSA ack timeout event.
Definition: bs-service-flow-manager.h:145
ns3::BsServiceFlowManager::ProcessDsaReq
ServiceFlow * ProcessDsaReq(const DsaReq &dsaReq, Cid cid)
process a DSA-Req message
Definition: bs-service-flow-manager.cc:188
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:74
ns3::DsaReq
This class implements the DSA-REQ message described by "IEEE Standard for Local and metropolitan area...
Definition: mac-messages.h:374
ns3::WimaxPhy::ModulationType
ModulationType
ModulationType enumeration.
Definition: wimax-phy.h:50
ns3::BsServiceFlowManager::CreateDsaRsp
DsaRsp CreateDsaRsp(const ServiceFlow *serviceFlow, uint16_t transactionId)
Create DSA response function.
Definition: bs-service-flow-manager.cc:118
ns3::DsaAck
This class implements the DSA-ACK message described by "IEEE Standard for Local and metropolitan area...
Definition: mac-messages.h:573
mac-messages.h
ns3::BsServiceFlowManager::ScheduleDsaRsp
void ScheduleDsaRsp(ServiceFlow *serviceFlow, Cid cid)
Create DSA response function.
Definition: bs-service-flow-manager.cc:130
ns3::BsServiceFlowManager::GetServiceFlows
std::vector< ServiceFlow * > GetServiceFlows(ServiceFlow::SchedulingType schedulingType) const
Definition: bs-service-flow-manager.cc:112
ns3::BsServiceFlowManager::GetTypeId
static TypeId GetTypeId(void)
Register this type.
Definition: bs-service-flow-manager.cc:59
ns3::DsaRsp
This class implements the DSA-RSP message described by "IEEE Standard for Local and metropolitan ar...
Definition: mac-messages.h:475
ns3::BsServiceFlowManager::m_sfidIndex
uint32_t m_sfidIndex
SFID index.
Definition: bs-service-flow-manager.h:143
ns3::BsServiceFlowManager::m_maxDsaRspRetries
uint8_t m_maxDsaRspRetries
maximum number of DSA response retries
Definition: bs-service-flow-manager.h:144
ns3::BsServiceFlowManager
BsServiceFlowManager.
Definition: bs-service-flow-manager.h:45
ns3::BsServiceFlowManager::DoDispose
void DoDispose(void)
Destructor implementation.
Definition: bs-service-flow-manager.cc:70
ns3::BsServiceFlowManager::m_device
Ptr< WimaxNetDevice > m_device
the device
Definition: bs-service-flow-manager.h:142
ns3::BsServiceFlowManager::BsServiceFlowManager
BsServiceFlowManager(Ptr< BaseStationNetDevice > device)
Constructor.
Definition: bs-service-flow-manager.cc:45
ns3::BsServiceFlowManager::AddMulticastServiceFlow
void AddMulticastServiceFlow(ServiceFlow sf, enum WimaxPhy::ModulationType modulation)
add a multicast service flow
Definition: bs-service-flow-manager.cc:223
ns3::BsServiceFlowManager::AddServiceFlow
void AddServiceFlow(ServiceFlow *serviceFlow)
Add a new service flow.
Definition: bs-service-flow-manager.cc:94
ns3::BsServiceFlowManager::GetServiceFlow
ServiceFlow * GetServiceFlow(uint32_t sfid) const
Definition: bs-service-flow-manager.cc:100
ns3::ServiceFlow::SchedulingType
SchedulingType
section 11.13.11 Service flow scheduling type, page 701
Definition: service-flow.h:59
ns3::BsServiceFlowManager::ProcessDsaAck
void ProcessDsaAck(const DsaAck &dsaAck, Cid cid)
process a DSA-ACK message
Definition: bs-service-flow-manager.cc:250
ns3::BsServiceFlowManager::GetDsaAckTimeoutEvent
EventId GetDsaAckTimeoutEvent(void) const
Definition: bs-service-flow-manager.cc:88
ns3::ServiceFlow
This class implements service flows as described by the IEEE-802.16 standard.
Definition: service-flow.h:40
ns3::BsServiceFlowManager::~BsServiceFlowManager
~BsServiceFlowManager(void)
Definition: bs-service-flow-manager.cc:53
service-flow-manager.h
bs-net-device.h